Advertisement
Guest User

n2liquid

a guest
Sep 28th, 2009
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. int someFunction()
  2. {
  3.     typedef std::vector<std::list<float>::iterator> T;
  4.  
  5.     std::cout << getTypeName<T>() << '\n'; // prints `someFunction()::T'
  6.  
  7.     // Weirdly enough, for function pointer typedefs, that doesn't happen:
  8.     typedef void (*U)(std::vector<std::list<float>::iterator>);
  9.  
  10.     std::cout << getTypeName<U>() << '\n'; // prints
  11.             // `void (*)(std::vector<std::_List_iterator<float>,
  12.             // std::allocator<std::_List_iterator<float> > >)'
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement