Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have the following enum specification:

enum class FaceDirection : int8 {   Down,   Up }; 

g++ 4.8.1 gives the following error:

warning: elaborated-type-specifier for a scoped enum must not use the ‘class’ keyword

What causes this?

like image 230
Drew Noakes Avatar asked Dec 08 '13 21:12

Drew Noakes


1 Answers

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

like image 121
Drew Noakes Avatar answered Sep 21 '22 15:09

Drew Noakes