description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||
---|---|---|---|---|---|---|---|
Learn more about: Compiler Error C2906 |
Compiler Error C2906 |
11/04/2016 |
|
|
30f652f1-6af6-4a2f-a69e-a1a4876cc8c6 |
'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