Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 823 Bytes

compiler-error-c2599.md

File metadata and controls

34 lines (25 loc) · 823 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2599
Compiler Error C2599
11/04/2016
C2599
C2599
88515f36-7589-47e2-862e-0de8b18d6668

Compiler Error C2599

'enum' : forward declaration of enum type is not allowed

The compiler no longer supports forward declaration of a managed enumeration.

Forward declaration of an enum type is not allowed under /Za.

The following sample generates C2599:

// C2599.cpp
// compile with: /clr /c
enum class Status;   // C2599

enum class Status2 { stop2, hold2, go2};

ref struct MyStruct {
   // Delete the following line to resolve.
   Status m_status;

   Status2 m_status2;   // OK
};

enum class Status { stop, hold, go };