Compiler Error C3182
Visual Studio 2015
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 C3182.
class' : a member using-declaration or access declaration is illegal within a managed or WinRTtype
A using declaration is invalid within all forms of managed classes.
The following sample generates C3182 and shows how to fix it.
// C3182a.cpp
// compile with: /clr /c
ref struct B {
void mf(int) {
}
};
ref struct D : B {
using B::mf; // C3182, delete to resolve
void mf(char) {
}
};
The following sample generates C3182 and shows how to fix it.
// C3182b.cpp
// compile with: /clr:oldSyntax
#using <mscorlib.dll>
__gc struct B {
void mf(int)
{
}
};
__gc struct D : B {
using B::mf; // C3182, delete to resolve
void mf(char)
{
}
};
int main()
{
}
Show: