The following code
template<typename T, typename U> class Alpha
{
public:
template<typename V> void foo() {}
};
template<typename T, typename U> class Beta
{
public:
Alpha<T, U> alpha;
void arf();
};
template<typename T, typename U> void Beta<T, U>::arf()
{
alpha.foo<int>();
}
int main()
{
Beta<int, float> beta;
beta.arf();
return 0;
}
Fails to compile due to:
../src/main.cpp: In member function ‘void Beta::arf()’:
../src/main.cpp:16: error: expected primary-expression before ‘int’
../src/main.cpp:16: error: expected ‘;’ before ‘int’
How the heck do I fix this? I've tried everything I can think of.