std::get_pointer_safety(3)
π NAME π
okay so bestie, this is the std::get_pointer_safety(3) page from the C++ Standard Library, and the name is exactly std::get_pointer_safety β like, the function is literally std::get_pointer_safety. No cap. π
β¨ Synopsis β¨
First things first: it lives in header <memory>.
Defined in header <memory>
std::pointer_safety get_pointer_safety() noexcept; (since C++11)
(removed in C++23)
So it obtains the implementation-defined pointer safety model, which is a value of type std::pointer_safety. That's the whole vibe.
β οΈ And yes, removed in C++23 is right there in the signature. This one is gone in C++23, so clock that. π
πΈ Parameters πΈ
(none) β literally none, zero, zilch. It takes no arguments, bestie. π«Ά
π Return value π
The pointer safety used by this implementation. That's it. That's the return value. It gives you back the implementation's pointer safety, full stop. β¨
π¦ Example π¦
The original says // Run this code, so go run it, bestie:
#include <iostream>
#include <memory>
int main()
{
std::cout << "Pointer safety: ";
switch (std::get_pointer_safety())
{
case std::pointer_safety::strict:
std::cout << "strict\n";
break;
case std::pointer_safety::preferred:
std::cout << "preferred\n";
break;
case std::pointer_safety::relaxed:
std::cout << "relaxed\n";
break;
}
}
Possible output:
Pointer safety: relaxed
π See also π
pointer_safetyβ lists pointer safety models;(C++11),(enum), andremoved in C++23
That's the whole page, bestie. Signing off from http://cppreference.com with the date stamp 2024.06.10 on std::get_pointer_safety(3) β love you, bye! ππ¦β¨
π¦ 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