На этот вопрос уже есть ответ здесь:
Как мне typedef
a template class
? Примерно так:
typedef std::vector myVector; // <--- compiler error
Я знаю два способа:
(1) #define myVector std::vector // not so good
(2) template
struct myVector { typedef std::vector type; }; // verbose
Есть ли у нас что-нибудь лучшее в C ++ 0x?