Export (0) Print
Expand All
Expand Minimize

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

Community Additions

ADD
Show:
© 2014 Microsoft