std::pointer_safety(3)
π NAME π
std::pointer_safety β std::pointer_safety. Yep, the name line is literally the same thing twice, and honestly? iconic. This is the C++ Standard Libary page for the std::pointer_safety(3) manual entry, so buckle up bestie, we're doing pointer safety modes.
β¨ Synopsis β¨
Defined in header <memory>
enum class pointer_safety {
relaxed, (since C++11)
preferred, (removed in C++23)
strict
};
The scoped enumeration type pointer_safety lists the pointer safety modes supported by C++. That's the whole vibe check. π
π Enumeration constants π
pointer_safety::strictβ okay so only safely-derived pointers (pointers to objects allocated withnewor subobjects thereof) may be dereferenced or deallocated. Garbage collector may be active. Strict is strict, bestie, no cap. πpointer_safety::preferredβ all pointers are considered valid and may be dereferenced or deallocated. A reachability-based leak detector may be active. This one is marked(removed in C++23)up in the synopsis, so yeah, it's giving legacy energy. π¦pointer_safety::relaxedβ all pointers are considered valid and may be dereferenced or deallocated. Chill mode activated. πΈ
π See also π
get_pointer_safetyβ returns the current pointer safety model. It's marked(C++11), it's a(function), and it's(removed in C++23). The way this little reference is doing the most. πβ¨
Later, bestie! π This was served fresh from http://cppreference.com on 2024.06.10 for the std::pointer_safety(3) page. Mwah π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms