Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 648 Bytes

compiler-error-c2875.md

File metadata and controls

34 lines (27 loc) · 648 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2875
Compiler Error C2875
11/04/2016
C2875
C2875
d589fc0c-08b2-4a79-bc0e-dca5eb80bdd5

Compiler Error C2875

using-declaration causes a multiple declaration of 'class::identifier'

The declaration causes the same item to be defined twice.

This error is obsolete in Visual Studio 2022 and later versions.

The following sample generates C2875:

// C2875.cpp
struct A {
   void f(int*);
};

struct B {
   void f(double*);
};

struct AB : A, B {
   using A::f;
   using A::f;   // C2875
   using B::f;
};