Union redux

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 2 14:57:38 PDT 2015


On 06/02/2015 09:48 PM, Andrei Alexandrescu wrote:
> 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

OK. What about copying in instead of out?


More information about the Digitalmars-d mailing list