I recently looked up std::remove_reference and found the following "possible implementation":
Code:
template<class T> struct remove_reference { typedef T type; };
template<class T> struct remove_reference<T&> { typedef T type; };
template<class T> struct remove_reference<T&&> { typedef T type; };
I'm familiar with:
Code:
template<class T> struct S { T member; }; // regular template
template<> struct S<int> { int members[5]; }; // specialization thereof
So what is this trailing type syntax called and by what rule is it able to determine what (reference-)type it has been passed?