public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Bit-fields of enum type
@ 2012-11-18 13:51 Владимир Андреев
  0 siblings, 0 replies; only message in thread
From: Владимир Андреев @ 2012-11-18 13:51 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-18 13:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-18 13:51 Bit-fields of enum type Владимир Андреев

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).