Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 808 Bytes

compiler-error-c3063.md

File metadata and controls

29 lines (23 loc) · 808 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C3063
Compiler Error C3063
11/04/2016
C3063
C3063
0ecf6f1f-e4a7-487a-9fd5-79d8ac470001

Compiler Error C3063

operator 'operator': all operands must have the same enumeration type

When using operators on enumerators, both operands must be of the enumeration type. For more information, see How to: Define and consume enums in C++/CLI.

Example

The following sample generates C3063 and shows how to fix it:

// C3063.cpp
// compile with: /clr
enum class E { a, b } e, mask;
int main() {
   if ( ( e & mask ) != 0 ) ;   // C3063 no operator!= (E, int)

   if ( ( e & mask ) != E() )   // OK
      ;
}