Want more features on Pastebin? Sign Up, it's FREE!
Guest

n2liquid

By: a guest on Sep 28th, 2009  |  syntax: C++  |  size: 0.47 KB  |  views: 75  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data