Export (0) Print
Expand All
Expand Minimize

Compiler Error C3215

Error Message

'type1' : generic type parameter already constrained by 'type2'

A constraint was specified more than once.

For more information on generics, see Generics (Visual C++).

The following sample generates C3215:

// C3215.cpp
// compile with: /clr
interface struct A {};

generic <class T>
where T : A,A
ref class C {};   // C3215

Possible resolution:

// C3215b.cpp
// compile with: /clr /c
interface struct A {};

generic <class T>
where T : A
ref class C {};

Community Additions

ADD
Show:
© 2014 Microsoft