Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct A
- {
- template<class T> T func();
- };
- template<class T>
- T func()
- {
- //do something
- }
- template<> int A::func<int>();
- template<> char A::func<char>();
- template<class C>
- struct B
- {
- template<typename T>
- T func();
- };
- e.g
- template<classX> int func<int>();
- template<classX> char func<char>();
- template<classY> int func<int>();
- ....
Add Comment
Please, Sign In to add comment