Edit

Share via


Compiler Error C3394

syntax error in constraint clause: found 'identifier' expected a type

A constraint was ill formed. For more information, see Constraints on Generic Type Parameters (C++/CLI).

Example

The following sample generates C3394:

// C3394.cpp
// compile with: /clr /c
ref class MyClass {};
ref class R {
   generic<typename T>
   where T : static   // C3394
   // try the following line instead
   // where T : MyClass
   void f() {}
};