C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: CWG710 and races during object construction
From: language.lawyer_at_[hidden]
Date: 2021-02-11 23:19:33


On 12/02/2021 06:01, Giuseppe D'Angelo via Std-Discussion wrote:
> Hi,
>
> Il 11/02/21 19:25, Jason Cobb via Std-Discussion ha scritto:
>> Right, if it happened-before the end of the constructor (when not in the
>> "Otherwise" case), [0] applies. But if it doesn't happen-before the end
>> of the constructor, [1] still applies.
>>
>> (Disclaimer: I'm an idiot and this could all be very wrong.)
>>
>> [0]:https://eel.is/c++draft/class.cdtor#5.sentence-2
>>
>> [1]:https://eel.is/c++draft/basic.life#7.4
>
> In other words, are you suggesting that the part about "For an object under construction or destruction" is about establishing two happens-before relationships -- beginning of construction happens-before the usage of the glvalue, and such usage happens-before end of construction -- without which we're falling into the "Otherwise" case?
>
> (Sure, it's a possible reading; but then I'd claim that the text should've also properly used "before" and "after" instead of "under", as per the defect resolution...)

I'd say CWG1517 should resolve this.


STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups