enum class

std::pointer_safety

<memory>
enum class pointer_safety { relaxed, preferred, strict };
Pointer safety enum
This enum class type defines the possible pointer safety settings in C++, as returned by function get_pointer_safety.

valuedescription
relaxedThe validity of a pointer value does not depend on whether it is a safely-derived pointer value.
preferredThe validity of a pointer value does not depend on whether it is a safely-derived pointer value.
A leak detector may be running so that the program can avoid spurious leak reports.
strictA 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.

See also