Skip to content

Instantly share code, notes, and snippets.

@zhangyuchi
Created November 13, 2014 13:48
Show Gist options
  • Save zhangyuchi/f1349fbe5d5ba9ef6ebf to your computer and use it in GitHub Desktop.
Save zhangyuchi/f1349fbe5d5ba9ef6ebf to your computer and use it in GitHub Desktop.
alias of template
//c++98
template<typename T>
class SomeClass;
template<typename T>
struct MyTypeDef
{
typedef SomeClass<T> type;
};
MyTypeDef<T>::type
//c++11
template<typename T>
using MyType = SomeClass<T>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment