
n2liquid
By: a guest on
Sep 28th, 2009 | syntax:
C++ | size: 0.47 KB | hits: 51 | expires: Never
int someFunction()
{
typedef std::vector<std::list<float>::iterator> T;
std::cout << getTypeName<T>() << '\n'; // prints `someFunction()::T'
// Weirdly enough, for function pointer typedefs, that doesn't happen:
typedef void (*U)(std::vector<std::list<float>::iterator>);
std::cout << getTypeName<U>() << '\n'; // prints
// `void (*)(std::vector<std::_List_iterator<float>,
// std::allocator<std::_List_iterator<float> > >)'
}