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; }
Compilation failed due to:
../src/main.cpp: in the member function 'Void Beta :: arf ():
../src/main.cpp:16: error: expected primary expression before 'int .. /src/main.cpp:16: error: expected "; before' int
How can i fix this? I tried everything I could think of.
c ++ templates
Kyle
source share