Title
Incorrect definition of “strict pointer safety”
Status
c++14
Section
_N4885_6.7.5.5.4 [basic.stc.dynamic.safety]
Submitter
Matt Austern

Created on 2012-10-17.00:00:00 last changed 114 months ago

Messages

Date: 2013-09-15.00:00:00

[Moved to DR at the September, 2013 meeting.]

Date: 2013-04-15.00:00:00

Proposed resolution (April, 2013):

Change _N4885_6.7.5.5.4 [basic.stc.dynamic.safety] paragraph 4 as follows:

Alternatively, an implementation may have strict pointer safety, in which case a pointer value referring to an object with dynamic storage duration that is not a safely-derived pointer value is an invalid pointer value unless the referenced complete object is of dynamic storage duration and has previously been declared reachable (_N4885_.20.10.5 [util.dynamic.safety]). [Note:...
Date: 2022-01-06.00:00:00

According to _N4885_6.7.5.5.4 [basic.stc.dynamic.safety] paragraph 4,

an implementation may have strict pointer safety, in which case a pointer value that is not a safely-derived pointer value is an invalid pointer value unless the referenced complete object is of dynamic storage duration and has previously been declared reachable (_N4885_.20.10.5 [util.dynamic.safety]).

“Safely-derived pointer” is defined only with respect to dynamically-allocated storage. Presumably pointers to objects with automatic and static storage duration should also be considered valid.

History
Date User Action Args
2014-11-24 00:00:00adminsetstatus: drwp -> c++14
2014-03-03 00:00:00adminsetstatus: dr -> drwp
2013-10-14 00:00:00adminsetmessages: + msg4680
2013-10-14 00:00:00adminsetstatus: ready -> dr
2013-05-03 00:00:00adminsetmessages: + msg4306
2013-05-03 00:00:00adminsetstatus: open -> ready
2012-10-17 00:00:00admincreate