Created on 2020-09-07.00:00:00 last changed 17 months ago
Proposed resolution:
Change in 6.7.3 [basic.life] paragraph 6 as follows:
For an object under construction or destruction, see 11.9.5 [class.cdtor]. Otherwise,such a pointer refers to allocated storage (6.7.5.5.2 [basic.stc.dynamic.allocation]), andusingthesuch a pointer as if the pointer were of type void* is well-defined.
Change in 6.7.3 [basic.life] paragraph 7 as follows:
For an object under construction or destruction, see 11.9.5 [class.cdtor]. Otherwise,such a glvalue refers to allocated storage (6.7.5.5.2 [basic.stc.dynamic.allocation]), andusing the properties ofthesuch a glvalue that do not depend on its value is well-defined.
6.7.3 [basic.life] paragraph 6 specifies:
Before the lifetime of an object has started but after the storage which the object will occupy has been allocated or, after the lifetime of an object has ended and before the storage which the object occupied is reused or released, any pointer that represents the address of the storage location where the object will be or was located may be used but only in limited ways. For an object under construction or destruction, see 11.9.5 [class.cdtor]. Otherwise, such a pointer refers to allocated storage (6.7.5.5.2 [basic.stc.dynamic.allocation]), and using the pointer as if the pointer were of type void* is well-defined.
Similarly, 6.7.3 [basic.life] paragraph 7 specifies:
Similarly, before the lifetime of an object has started but after the storage which the object will occupy has been allocated or, after the lifetime of an object has ended and before the storage which the object occupied is reused or released, any glvalue that refers to the original object may be used but only in limited ways. For an object under construction or destruction, see 11.9.5 [class.cdtor]. Otherwise, such a glvalue refers to allocated storage (6.7.5.5.2 [basic.stc.dynamic.allocation]), and using the properties of the glvalue that do not depend on its value is well-defined.
In either case, it is unclear what "refers to allocated storage" means, beyond the properties ascribed to an object in 6.7.2 [intro.object].
See also issue 1853.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-06-15 20:01:37 | admin | set | status: open -> review |
2022-03-16 22:19:28 | admin | set | messages: + msg6766 |
2020-09-07 00:00:00 | admin | create |