Advertisement
elvman

Untitled

Oct 2nd, 2014
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. template<class R, class X, class Y> void test(R(*a)(X, Y))
  2. {
  3.     printf("Type: %s, %s, %s\n", typeid(X).name(), typeid(Y).name(), typeid(R).name());
  4. }
  5.  
  6. void foo(long a, int b)
  7. {
  8.    
  9. }
  10.  
  11. int main(int argc, const char * argv[])
  12. {
  13.     test(foo);
  14.    
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement