This documentation is archived and is not being maintained.

Compiler Error C3416

Error Message

'function' : an explicit specialization may not be explicitly instantiated

A function cannot be both explicitly specialized and explicitly instantiated.

The following sample generates C3416:

// C3416.cpp
template <class T> 
void f();

template <> 
void f<int>() {}
template void f<int>();   // C3416 delete this or previous line to resolve