------- Comment #3 from redi at gcc dot gnu dot org  2009-11-03 13:32 -------
(In reply to comment #2)
> 
> Is there a sane workaround for this?

Don't use 'const' members of unions.

Union members cannot have a non-trivial copy assignment operator.
The assignment operator for A cannot be implicitly defined, as the const member
would make the program ill-formed.
I'm not sure whether using A in a union causes the implicitly-declared copy
assignment operator to be implicitly defined, but that seems to be what's
happening.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39934

Reply via email to