Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 586 Bytes

compiler-error-c2906.md

File metadata and controls

23 lines (19 loc) · 586 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2906
Compiler Error C2906
11/04/2016
C2906
C2906
30f652f1-6af6-4a2f-a69e-a1a4876cc8c6

Compiler Error C2906

'specialization' : explicit specialization requires 'template <>'

You must use the new syntax for explicit specialization of templates.

The following sample generates C2906:

// C2906.cpp
// compile with: /c
template<class T> class X{};   // primary template
class X<int> { }   // C2906
template<> class X<int> { };   // new syntax