This documentation is archived and is not being maintained.

Compiler Error C2995

Error Message

'function' : function template has already been defined

Make sure that there is only one definition for each member function of a templated class.

The following sample generates C2995:

// C2995.cpp
// compile with: /c
template <class T>
void Test(T x){}

template <class T> void Test(T x){}   // C2995
template <class T> void Test2(T x){}   // OK