Compiler Error C3215
'type1' : generic type parameter already constrained by 'type2'
A constraint was specified more than once.
For more information on generics, see Generics.
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 {};
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