std::experi...::operator*,(3)

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

πŸ’… std::experi...::operator*,(3) β€” C++ Standard Libary bestie edition

Okay so bestie, this is the C++ Standard Libary manual page for std::experi...::operator*,(3). It’s giving niche observer_ptr energy, and yes the title is abbreviated exactly like that. Let’s get into it. ✨


✨ NAME ✨

Verbatim from the NAME block, duplicate and dash included:

std::experimental::observer_ptr::operator*, -
std::experimental::observer_ptr::operator*,

That’s the NAME section. We move. πŸ’…

🌸 Synopsis 🌸

The signatures, exactly:

          constexpr std::add_lvalue_reference_t<element_type>        (1)
       (library fundamentals
          operator*() const;                                             TS v2)
          constexpr element_type* operator->() const noexcept;       (2)
       (library fundamentals
                                                                         TS v2)

operator* and operator-> provide access to the object watched by *this.

⚠️ Heavy warning, bestie: the behavior of operator* is undefined if get() == nullptr. Like, actual undefined behavior. Do not play with that. πŸ˜­πŸ’€

🫢 Parameters 🫢

  • (none) β€” literally no parameters, she takes nothing.

πŸŽ€ Return value πŸŽ€

  1. Returns the object watched by *this, equivalent to *get().
  2. Returns a pointer to the object watched by *this, i.e. get().

πŸ”₯ Exceptions πŸ”₯

  1. Throws nothing.

πŸ¦‹ Example πŸ¦‹

This section is incomplete Reason: no example

πŸ‘‘ See also πŸ‘‘

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

🌈 Category 🌈

  • Todo no example

That’s the whole page, bestie. Source/version: http://cppreference.com; date: 2024.06.10. Slay, bye. πŸ’–βœ¨

πŸ“¦ where this page comes from