Condividi tramite


Errore del compilatore C2599

'enum': la dichiarazione forward di tipo enum non è consentita

Il compilatore non supporta più la dichiarazione forward di un'enumerazione gestita.

La dichiarazione forward di un tipo enum non è consentita in /Za.

L'esempio seguente genera l'errore 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 };