Date: Tue, 20 Aug 2019 01:48:45 +0300
On 20/08/2019 01:23, Brian Bi wrote:
> Sorry, my fault for not understanding what you wrote previously. But are
> you sure this interpretation is sensible?
If you need an authority, AFAIR you may find R. Smith explaining this in the old std-discussion list.
But IMO this is clear enough, at least after you've learned it ;)
> I think it's impossible to say
> that the lifetime of an array does not end while the lifetimes of its
> elements end.
Why???
The Standard seem to know about objects whose subobjects may not be alive, like in [intro.object]/2:
> If an object is created in storage associated with a member subobject or array element e (which may or may not be within its lifetime)
It is even possible, for some types (not array types, though), to end the lifetime of a containing object without ending the lifetimes of all (or even any!) of its subobjects...
>> (I'd say it always was undefined)
>>
>
> CWG thought it was well-defined in 2011.
Fortunately, they realized quickly enough that they were wrong and did not close a similar issue in 2013.
> Sorry, my fault for not understanding what you wrote previously. But are
> you sure this interpretation is sensible?
If you need an authority, AFAIR you may find R. Smith explaining this in the old std-discussion list.
But IMO this is clear enough, at least after you've learned it ;)
> I think it's impossible to say
> that the lifetime of an array does not end while the lifetimes of its
> elements end.
Why???
The Standard seem to know about objects whose subobjects may not be alive, like in [intro.object]/2:
> If an object is created in storage associated with a member subobject or array element e (which may or may not be within its lifetime)
It is even possible, for some types (not array types, though), to end the lifetime of a containing object without ending the lifetimes of all (or even any!) of its subobjects...
>> (I'd say it always was undefined)
>>
>
> CWG thought it was well-defined in 2011.
Fortunately, they realized quickly enough that they were wrong and did not close a similar issue in 2013.
Received on 2019-08-19 17:50:50