Elaborated-type-specifier for a scoped enum must not use the ‘class’ keyword

后端 未结 1 1591
逝去的感伤
逝去的感伤 2021-01-17 09:11

I have the following enum specification:

enum class FaceDirection : int8
{
  Down,
  Up
};

g++ 4.8.1 gives the following error:

相关标签:
1条回答
  • 2021-01-17 09:51

    Check the type you are deriving the enum class from exists. In this case, there was no typedef specified for int8.

    0 讨论(0)
提交回复
热议问题