https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123752

--- Comment #6 from John Drouhard <john at drouhard dot dev> ---
(In reply to Boris Staletic from comment #3)
> > test.cpp:7:3: error: uncaught exception of type 'std::meta::exception'; 
> > 'what()': 'neither name nor bit_width specified'
> 
> That's expected. It's a later change in the proposal that clang-p2996 fork
> has not implemented.
> 
> An empty name implies an anonymous bit field. An empty bit_width implies a
> non-bit field.

Ok, that seems like an invalid assumption. An empty name doesn’t imply an
anonymous bit field. How would you define an aggregate with fields you don’t
need to access by name but aren’t bit fields? For instance, defining a struct,
or union you’d pair with an index and only access the fields by that index (to
implement tuple or a tagged union/variant)?

What was the reason for the change to the proposal to require on over the
other?

Reply via email to