This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: assignment operators for union member classes
- From: John Love-Jensen <eljay at adobe dot com>
- To: Mike Welsen <mikewelsen at hotmail dot com>, GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 19 Feb 2008 09:22:42 -0600
- Subject: Re: assignment operators for union member classes
Hi Mike,
> Does anyone know why asignment operators are not allowed for union class
> members ?
Yes, I know why.
Because the assignment operator won't be executed.
(Besides that, a non-POD / non-aggregate object violates the constraints of
what can be in a union.)
HTH,
--Eljay