[Bug c++/51242] [C++11] Unable to use strongly typed enums as bit fields
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Nov 20 20:30:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51242
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
CC| |jason at gcc dot gnu.org
Summary|Unable to use strongly |[C++11] Unable to use
|typed enums as bit fields |strongly typed enums as bit
| |fields
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-20 20:26:58 UTC ---
In future please provide a complete testcase, as requested at
http://gcc.gnu.org/bugs
Testcase reduced from the one you posted to the gcc-help list:
enum class MyEnum { A = 1 };
struct MyClass
{
MyEnum Field1 : 3;
};
Jason, the standard seems to say this should work, although I am rather
surprised - is that intended?
More information about the Gcc-bugs
mailing list