We recommend using Visual Studio 2017

Compiler Error C2876

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C2876.

class::symbol' : not all overloads are accessible

All overloaded forms of a function in a base class must be accessible to the derived class.

The following sample generates C2876:

// C2876.cpp  
// compile with: /c  
class A {  
public:     
   double a(double);  
private:  
   int a(int);  
};  
  
class B : public A {  
   using A::a;   // C2876 one overload is private in base class  
};  

Show: