Defines a template (primary) class is_vector<T>, and then partially specializes in T = std::vector<U>.
The general rule is pretty simple:
The main template:
template <something here> class someName /*no angle barckets here */ { ... }
Partial specialization:
template <something here> class someName<otherThing here> { ... }
Explicit specialization:
template <> class someName<something here> { ... }
There is no short part of the standard for citation, but you can refer to the subsection C++11[temp.class.spec]. There is nothing in this chapter that limits partial specialization to pointers and references. Please note that the MSDN link you provided does not limit their scope; he says “for example” before the examples, which does not mean that there are no other possibilities.
Angew source
share