[Issue 4421] Union propagates copy constructors and destructors over all members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 18 13:39:27 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=4421


Maxim Fomin <maxim at maxim-fomin.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxim at maxim-fomin.ru
           Severity|normal                      |major


--- Comment #4 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-05-18 13:39:25 PDT ---
In the first order unions and structs both belong to aggregate type category.
Normally they should share few common characteristics, but currently in D they
are very close to each other so that when you use a union, you use a struct
except ctor ability and member storage. Following futures are supported by
unions:

* postblits
* dtors
* member functions
* operator overloading
* shared static constructors 
* invariants
* and other features...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list