This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Bit-fields of enum type
- From: ÐÐÐÐÐÐÐÑ ÐÐÐÑÐÐÐ <volodya at netfolder dot ru>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 18 Nov 2012 17:51:34 +0400
- Subject: 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