RSS
Follow Us
Contribute
 
 
 
 

Error C2995: (function) : function template has already been defined

 
We need YOUR SKILLS in this collaborative work, to build the largest solution center for error messages.

From $1

Table of contents
  1. 1. Cause
  2. 2. Solution
  3. 3. About This Article

Cause

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

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

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

Solution

Possible resolution:

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

template <class T> void Test2(T x){}   

About This Article

This article is a derivative work based on Compiler Error C2995 which is provided by MSDN Community Content - Visual C++.

 
 
 
 
Comments