Compiler Error C3388
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 C3388.
type' : not allowed as a constraint, assuming 'ref class' to continue parsing
A constraint was specified on a generic type, but the constraint was not specified correctly. See Constraints on Generic Type Parameters (C++/CLI) for more information.
The following sample generates C3388.
// C3388.cpp
// compile with: /clr /c
interface class AA {};
generic <class T>
where T : interface class // C3388
ref class C {};
// OK
generic <class T>
where T : AA
ref class D {};
Show: