This documentation is archived and is not being maintained.

Compiler Error C3082

Error Message

'operator' : this operator cannot be applied to a variable whose type is generic

Certain operations are not allowed on generic types. For example, you cannot dereference a generic type parameter.

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


The following sample generates C3082.

// C3082.cpp
// compile with: /clr
ref class R {};

generic<typename T>
where T : R
ref class GR {
   void mf(T t) {
      R r = *t;   // C3082