Created on 2009-04-03.00:00:00 last changed 162 months ago
Proposed resolution:
In [util.dynamic.safety] p16, replace the description of get_pointer_safety() with:
pointer_safety get_pointer_safety();
Returns: an enumeration value indicating the implementation's treatment of pointers that are not safely derived (3.7.4.3). 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.Returns: Returns pointer_safety::strict if the implementation has strict pointer safety ([basic.stc.dynamic.safety]). It is implementation-defined whether get_pointer_safety returns pointer_safety::relaxed or pointer_safety::preferred if the implementation has relaxed pointer safety ([basic.stc.dynamic.safety]).Footnote
Throws: nothing
Footnote) pointer_safety::preferred might be returned to indicate to the program that a leak detector is running so that the program can avoid spurious leak reports.
[ 2009-10 Santa Cruz: ]
The core issue is 853 and is in Ready status.
[ 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.
Addresses DE 18
In [util.dynamic.safety], get_pointer_safety() purports to define behavior for non-safely derived pointers ([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.
History | |||
---|---|---|---|
Date | User | Action | Args |
2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
2010-10-21 18:28:33 | admin | set | messages: + msg713 |
2010-10-21 18:28:33 | admin | set | messages: + msg712 |
2010-10-21 18:28:33 | admin | set | messages: + msg711 |
2009-04-03 00:00:00 | admin | create |