Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- template< typename T >
- void f( T a)
- {
- std::cout << "1\n";
- }
- template< typename T >
- void f( T* a)
- {
- std::cout << "2\n";
- }
- template<>
- void f< int* > ( int* a)
- {
- std::cout << "3\n";
- }
- int main(int argc, char const *argv[])
- {
- int* pb;
- f(pb);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment