Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.