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

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

okay so bestie, we're deep in the C++ Standard Libary man page (yes, that's the manual name, keep up πŸ’…), and today's main characters are std::experimental::filesystem::directory_iterator::operator* and std::experimental::filesystem::directory_iterator::operator->. they're literally the same vibe, just star vs arrow. let's get into it ✨

🌸 NAME 🌸

std::experimental::filesystem::directory_iterator::operator*, std::experimental::filesystem::directory_iterator::operator-> β€” and then literally the same thing again: std::experimental::filesystem::directory_iterator::operator*, std::experimental::filesystem::directory_iterator::operator-> πŸ’…

πŸ’« Synopsis πŸ’«

const directory_entry& operator*() const;

(filesystem TS) β€” that's the tag, bestie, keep it moving πŸŽ€

const directory_entry* operator->() const;

what it does: accesses the pointed-to directory_entry. slay. πŸ¦‹

⚠️ undefined behavior alert ⚠️ the result of operator* or operator-> on the end iterator is undefined behavior. do not do it. not even ironically. πŸ’€

πŸŽ€ Parameters πŸŽ€

  • (none) β€” literally no parameters, bestie. zero. nada. 🫢

πŸ’– Return value πŸ’–

  1. Value of the directory_entry referred to by this iterator.
  2. Pointer to the directory_entry referred to by this iterator.

like, 1) gives you the value, 2) gives you the pointer β€” iconic behavior, no notes 🌈

😭 Exceptions 😭

May throw implementation-defined exceptions. so like, the implementation gets to decide, no cap. 🧚

πŸ” See also πŸ”

  • operator* β€” accesses the pointed-to entry
  • operator-> (public member function of std::experimental::filesystem::recursive_directory_iterator)

Category:

  • * Noindexed pages

okay that's the whole page, bestie. source is cppreference.com, version/date 2024.06.10, and the page is literally std::experi...*,operator->(3). go forth and dereference responsibly (but not the end iterator, never the end iterator) πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from