Muokkaa

Jaa


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.

Example

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 {};