最佳答案
How should I typedef
a template class
? Something like:
typedef std::vector myVector; // <--- compiler error
I know of 2 ways:
(1) #define myVector std::vector // not so good
(2) template<typename T>
struct myVector { typedef std::vector<T> type; }; // verbose
Do we have anything better in C++0x ?