Compiler Error C2898
TOC
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

Compiler Error C2898

Error Message

'declaration' : member function templates cannot be virtual

The following sample generates C2898:

// C2898.cpp
// compile with: /c
class X {
public:
   template<typename T> virtual void f(T t) {}   // C2898
};
Show:
© 2016 Microsoft