Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 667 Bytes

compiler-error-c2509.md

File metadata and controls

34 lines (27 loc) · 667 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2509
Compiler Error C2509
11/04/2016
C2509
C2509
339c1fcd-ec4a-456c-9f18-a9b24d9921af

Compiler Error C2509

'identifier' : member function not declared in 'class'

The function is not declared in the specified class.

Example

The following sample generates C2509.

// C2509.cpp
// compile with: /c
struct A {
   virtual int vfunc() = 0;
   virtual int vfunc2() = 0;
};

struct B : private A {
   using A::vfunc;
   virtual int vfunc2();
};

int B::vfunc() { return 1; }   // C2509
int B::vfunc2() { return 1; }   // OK