Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef int TypeA;
- typedef float TypeB;
- class MyClass
- {
- // No base template function, only partially specialized functions...
- inline TypeA myFunction<TypeA>(int a, int b) {} //error: Too few template-parameter-lists
- template<> inline TypeB myFunction<TypeB>(int a, int b) {}
- };
- typedef int TypeA;
- typedef float TypeB;
- class MyClass
- {
- template <typename T>
- T myFunction( int a, int b );
- };
- template <>
- inline TypeA MyClass::myFunction<TypeA>(int a, int b) {}
- template <>
- inline TypeB MyClass::myFunction<TypeB>(int a, int b) {}
Add Comment
Please, Sign In to add comment