Bit-fields of enum type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux