This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.
Section: 19.10.5 [util.dynamic.safety] Status: C++11 Submitter: Jens Maurer Opened: 2009-04-03 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [util.dynamic.safety].
View all issues with C++11 status.
Addresses DE 18
In 19.10.5 [util.dynamic.safety], get_pointer_safety() purports to define behavior for non-safely derived pointers (188.8.131.52.3 [basic.stc.dynamic.safety]). However, the cited core-language section in paragraph 4 specifies undefined behavior for the use of such pointer values. This seems an unfortunate near-contradiction. I suggest to specify the term relaxed pointer safety in the core language section and refer to it from the library description. This issue deals with the library part, the corresponding core issue (c++std-core-13940) deals with the core modifications.
See also N2693.
[ Batavia (2009-05): ]
We recommend if this issue is to be moved, the issue be moved concurrently with the cited Core issue.
We agree with the intent of the proposed resolution. We would like input from garbage collection specialists.
Move to Open.
[ 2009-10 Santa Cruz: ]
The core issue is 853 and is in Ready status.
In 19.10.5 [util.dynamic.safety] p16, replace the description of get_pointer_safety() with:
Returns: an enumeration value indicating the implementation's treatment of pointers that are not safely derived (184.108.40.206). Returns pointer_safety::relaxed if pointers that are not safely derived will be treated the same as pointers that are safely derived for the duration of the program. Returns pointer_safety::preferred if pointers that are not safely derived will be treated the same as pointers that are safely derived for the duration of the program but allows the implementation to hint that it could be desirable to avoid dereferencing pointers that are not safely derived as described. [Example: pointer_safety::preferred might be returned to detect if a leak detector is running to avoid spurious leak reports. -- end note] Returns pointer_safety::strict if pointers that are not safely derived might be treated differently than pointers that are safely derived.