This documentation is archived and is not being maintained.

Compiler Error C2756

Error Message

'template type' : default arguments not allowed on a partial specialization

The template for a partial specialization may not contain a default argument.

The following sample generates C2756:

// C2756.cpp
template <class T>
struct S {};

template <class T=int>
// try the following line instead
// template <class T>
struct S<T*> {};   // C2756
Show: