Upraviť

Zdieľať cez


Compiler Error C2756

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

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

The following sample generates C2756 and shows how to fix it:

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

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