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

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

✨ NAME ✨

okay so bestie, welcome to the std::experi...:operator->(3) page from the C++ Standard Libary manual πŸ’–. Official NAME lineup: std::experimental::shared_ptr::operator*,std::experimental::shared_ptr::operator-> β€” and yes, the original repeats it after the dash too: std::experimental::shared_ptr::operator*,std::experimental::shared_ptr::operator-> - std::experimental::shared_ptr::operator*,std::experimental::shared_ptr::operator->. We're keeping every name, no cap.

This page covers both:

  • std::experimental::shared_ptr::operator*
  • std::experimental::shared_ptr::operator->

It's giving two-for-one icon behavior ✨.

🌸 Synopsis 🌸

T& operator*() const noexcept;  (1) (library fundamentals TS)
T* operator->() const noexcept; (2) (library fundamentals TS)

Both of these dereference the stored pointer. The behavior is undefined if the stored pointer is null β€” like, do not do that, bestie, that's the dangerous part 😭.

πŸŽ€ Parameters πŸŽ€

(none) β€” she takes literally zero parameters, periodt πŸ’….

πŸ’– Return value πŸ’–

  1. Function (1) gives you the result of dereferencing the stored pointer, i.e., *get().
  2. Function (2) gives you the stored pointer, i.e., get().

✨ Remarks ✨

  • When T is an array type or (possibly cv-qualified) void, it is unspecified whether function (1) is declared.
  • When T is an array type, it is unspecified whether function (2) is declared.
  • In either case, if the function is declared, it is unspecified what its return type is, except that the declaration (although not necessarily the definition) of the function is guaranteed to be legal.

πŸ¦‹ Example πŸ¦‹

This section is incomplete.

Reason: no example.

not me showing up with an empty example section 😭 but that's literally what it says, so we move.

πŸ‘‘ See also πŸ‘‘

  • get returns the stored pointer (public member function).

πŸ“ Categories πŸ“

  • Noindexed pages
  • Todo no example

source: http://cppreference.com Β· version/date: 2024.06.10 β€” kisses, bestie, that's the official footer tea πŸ«ΆπŸ’–

πŸ“¦ where this page comes from