Guest User

Untitled

a guest
Jul 16th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. typedef int TypeA;
  2. typedef float TypeB;
  3.  
  4. class MyClass
  5. {
  6. // No base template function, only partially specialized functions...
  7. inline TypeA myFunction<TypeA>(int a, int b) {} //error: Too few template-parameter-lists
  8. template<> inline TypeB myFunction<TypeB>(int a, int b) {}
  9. };
  10.  
  11. typedef int TypeA;
  12. typedef float TypeB;
  13. class MyClass
  14. {
  15. template <typename T>
  16. T myFunction( int a, int b );
  17. };
  18. template <>
  19. inline TypeA MyClass::myFunction<TypeA>(int a, int b) {}
  20. template <>
  21. inline TypeB MyClass::myFunction<TypeB>(int a, int b) {}
Add Comment
Please, Sign In to add comment