Union redux

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 2 12:48:51 PDT 2015


On 6/2/15 3:43 AM, Timon Gehr wrote:
> On 06/02/2015 01:55 AM, Andrei Alexandrescu wrote:
>> On 6/1/15 2:40 PM, Steven Schveighoffer wrote:
>>> So what happens on destruction?
>>
>> Nothing happens.
>>
>>> What about postblit?
>>
>> Nothing happens.
>>
>>
>> Andrei
>>
>
> Is there an official way to invoke them manually?

destroy calls the dtor. Just copying out the appropriate member invokes 
postblit on the target. Also emplace is good for construction. -- Andrei


More information about the Digitalmars-d mailing list