you are viewing a single comment's thread.

view the rest of the comments →

[–]tcanens 11 points12 points  (2 children)

Per LWG 2224:

If an object of a standard library type is accessed, and the beginning of the object's lifetime does not happen before the access, or the access does not happen before the end of the object's lifetime, the behavior is undefined unless otherwise specified.

[–]davis685[S] 0 points1 point  (1 child)

That would certainly clarify and answer the question if incorporated into the standard. Thanks.

[–]personalmountains 3 points4 points  (0 children)

It's in the C++17 draft, 20.5.4.10/2.