std::pointer_safety(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ 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 with new or 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