This documentation is archived and is not being maintained.

Compiler Error C2904

Error Message

'identifier' : name already used for a template in the current scope

Check the code for duplicate names.

The following sample generates C2904:

// C2904.cpp
// compile with: /c
void X();  // X is declared as a function
template<class T> class X{};  // C2904