Edit

Share via


Compiler Error C2946

explicit instantiation; 'class' is not a template-class specialization

You cannot explicitly instantiate a nontemplated class.

Example

The following sample generates C2946.

// C2946.cpp
class C {};
template C;  // C2946
int main() {}