std::ranges...ange::empty(3)

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

πŸ’… std::ranges...ange::empty(3) πŸ’…

okay so this little icon is from the C++ Standard Libary manual (yes, that's the manual name exactly, spelling and all β€” don't come for me, bestie). It's section 3, and the vibe is β€œdoes this subrange have literally nothing in it?” πŸ’€


πŸŽ€ NAME πŸŽ€

std::ranges::subrange::empty β€” std::ranges::subrange::empty. That's the whole name, twice, because the original said it twice and I'm not about to ghost a detail. 🫢


✨ Synopsis ✨

constexpr bool empty() const;  (since C++20)

This one checks whether the subrange is empty β€” i.e. the stored iterator and sentinel compare equal. No cap. πŸ”₯


🫢 Parameters 🫢

  • (none) β€” literally no parameters, bestie. πŸ“

πŸ’– Return value πŸ’–

  • true if the stored iterator and sentinel compare equal.
  • false otherwise.

So it's giving β€œare these two equal?” energy, and that's the whole answer. 🌸


🌸 Example 🌸

This section is incomplete Reason: no example

not me reading a whole Example section just to find out there's no example 😭


πŸ¦‹ See also πŸ¦‹

  • size (C++20) β€” obtains the size of the subrange (public member function). πŸ“
  • empty (C++17) β€” checks whether the container is empty (function template). πŸ«™
  • ranges::empty (C++20) β€” checks whether a range is empty (customization point object). 🌈

🧚 Category 🧚

  • Todo no example β€” the original category is literally * Todo no example. πŸ“

okay that's the whole page, bestie! source: http://cppreference.com, dated 2024.06.10, and the title again for the road: std::ranges...ange::empty(3). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from