Forward declaration of nested enum

后端 未结 3 779
傲寒
傲寒 2020-12-17 14:50

I have code similar to the following:

class B
{
}

class A
{
  enum {
     EOne,
     ETwo
  } EMyEnum;

  B myB;
}

I want to declare a mem

3条回答
  •  Happy的楠姐
    2020-12-17 15:20

    The current C++ standard does not allow forward declarations of enums, although they will be coming in the upcoming C++0x standard.

    See here for more info.

提交回复
热议问题