std::auto_p...:operator->(3)

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

πŸ’… std::auto_p...:operator->(3) πŸ’…

okay so bestie, buckle up: this is the std::auto_p...:operator->(3) page from the C++ Standard Libary manual. Yes, that's the manual name, spelling and all β€” we don't edit the source, we just vibe with it. 🫢 This page is all about std::auto_ptr's operator* and operator->, two little dereference icons that are deprecated in C++11 and removed in C++17. 😭

🌸 NAME 🌸

The NAME section gives us this exact duo: std::auto_ptr::operator*,std::auto_ptr::operator->, and then says the same thing again: std::auto_ptr::operator*,std::auto_ptr::operator->. That's it, that's the name. No extra lore, no hidden meaning. πŸ’…

✨ Synopsis ✨

          T& operator*() const throw();  (1) (deprecated in C++11)
                                             (removed in C++17)
          T* operator->() const throw(); (2) (deprecated in C++11)
                                             (removed in C++17)

So both of these dereference a pointer to the managed object. The first version β€” operator*() β€” has a requirement: get() != 0. Do not ignore that, bestie; it's literally in the text. 🚨

Both overloads are deprecated in C++11 and removed in C++17. That's a big deal, bestie β€” treat this as an old-school page. πŸ’€

πŸŽ€ Parameters πŸŽ€

No parameters, bestie. Zero. (none). Not a single argument is passed here. πŸ’…

πŸ’– Return value πŸ’–

  1. *get().
  2. get().

Version (1) gives you *get(), and version (2) gives you get(). That's the whole return-value tea. 🍡

πŸ¦‹ See also πŸ¦‹

  • get β€” returns a pointer to the managed object (public member function).

And that's the page, bestie. Cute sign-off time: this came from http://cppreference.com, the version/date situation is 2024.06.10, and the page is std::auto_p...:operator->(3). Stay slay, and may your dereferences always pass the get() != 0 vibe check. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from