Union redux
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 1 14:36:08 PDT 2015
On 6/1/15 2:22 PM, Steven Schveighoffer wrote:
> I would make it clear here what you mean. I can't tell what "the rule"
> is (there may be 2 rules, or 1, but I can't tell), and whether Andrei
> agrees we should do it or not.
Unions should accept all types, including those with @disabled or
elaborated constructors/postblits/dtors. Essentially a union is
appropriate storage for any type mentioned in its members, whilst
leaving it to its user to write and read the needed values. -- Andrei
More information about the Digitalmars-d
mailing list