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

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

okay so bestie, welcome to std::experi...:operator*,(3) from the C++ Standard Libary manual ✨ β€” yes, that’s the manual name right up top, and we’re folding it in here so you don’t have to squint at the header line πŸ’…. This page is all about the std::experimental::propagate_const operators for dereferencing and arrow access, and it is short but highkey important 🫢.


🌸 NAME 🌸

The NAME entry is literally this, comma and all:

std::experimental::propagate_const::operator*, -
std::experimental::propagate_const::operator*,

No cap, we are keeping the whole thing exactly as it appears πŸ’–.


✨ SYNOPSIS ✨

Here are the four overloads, and yes, every one of them is tagged library fundamentals TS v2 🧚:

  1. constexpr element_type& operator*(); β€” (1) (library fundamentals TS v2)
  2. constexpr const element_type& operator*() const; β€” (2) (library fundamentals TS v2)
  3. constexpr element_type* operator->(); β€” (3) (library fundamentals TS v2)
  4. constexpr const element_type* operator->() const; β€” (4) (library fundamentals TS v2)

These functions provide access to the object pointed to by the pointer-like object *this wraps 🌈.

🚨 undefined behavior alert: the behavior of these functions is undefined if get() == nullptr. Like, that is not a vibe, bestie β€” do not do it πŸ˜­πŸ’€.

πŸŽ€ PARAMETERS πŸŽ€

  • (none) β€” literally none, bestie, it’s giving β€œno arguments needed” πŸ’….

πŸ¦‹ RETURN VALUE πŸ¦‹

  1. 1,2) The object pointed to by the wrapped pointer-like object, i.e., *get() πŸ’–
  2. 3,4) A pointer to the object pointed to by the wrapped pointer-like object, i.e., get() ⭐

πŸ“ EXAMPLE πŸ“

This section is incomplete Reason: no example

It’s literally giving β€œno example yet” 😭 β€” that’s what the page says, and we are not inventing one, periodt.


πŸ‘‘ SEE ALSO πŸ‘‘

  • get β€” returns a pointer to the object pointed to by the wrapped pointer (public member function) πŸ’œ

🏷️ CATEGORY 🏷️

Category: * Todo no example


mwah πŸ’‹ that’s the whole page, bestie. Source/version and date from the footer: http://cppreference.com and 2024.06.10, with the title still being std::experi...:operator*,(3) 🌈✨. Now go forth and access your wrapped object responsibly πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from