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;
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for