“ISO C++ forbids forward references to ‘enum’ types” when specifying enum underlying type

Specifying the underlying type for an enum is a C++11 language feature. To get the code to compile, you must add the switch -std=c++11. This works for both GCC and Clang.

For enums in C++03, the underlying integral type is implementation-defined, unless the values of the enumerator cannot fit in an int or unsigned int. (However, Microsoft’s compiler has allowed specifying the underlying type of an enum as a proprietary extension since VSĀ 2005.)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)