This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]