A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/basic.stc.dynamic.safety below:

[basic.stc.dynamic.safety]

6 Basic concepts [basic] 6.7 Storage duration [basic.stc] 6.7.4 Dynamic storage duration [basic.stc.dynamic] 6.7.4.3 Safely-derived pointers [basic.stc.dynamic.safety]

A pointer value is a safely-derived pointer to a dynamic object only if it has an object pointer type and it is one of the following:

An integer value is an integer representation of a safely-derived pointer only if its type is at least as large as std​::​intptr_­t and it is one of the following:

An implementation may have relaxed pointer safety, in which case the validity of a pointer value does not depend on whether it is a safely-derived pointer value. 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 has previously been declared reachable ([util.dynamic.safety]). [Note: The effect of using an invalid pointer value (including passing it to a deallocation function) is undefined, see [basic.stc.dynamic.deallocation]. This is true even if the unsafely-derived pointer value might compare equal to some safely-derived pointer value. end note] It is implementation-defined whether an implementation has relaxed or strict pointer safety.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4