This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Bit-fields of enum type


Hello, All!

Some months ago I already wrote, I have an error while compilling
programs, which uses structs with bit-fields of strongly typed enums.

For example:

enum class E1: char
{
  V1 = 5, V2 = 10
};

enum class E2: char
{
  V1 = 7, V2 = 15
};

struct A
{
  E1 f1: 5;
  E2 f2: 3;
};

GCC writes:

error: bit-field 'f1' with non-integral type

error: bit-field 'f2' with non-integral type


Will GCC support such features of C++11?

--
With best regards, Vladimir


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]