std::filesy...r==,!=,,>=,(3)

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

okay so welcome to the std::filesy...r==,!=,,>=,(3) page from the C++ Standard Libary manual β€” spelling exactly as the manual has it, bestie, we don’t edit history πŸ’…. This is the comparison-operator page for std::filesystem::directory_entry, and it’s giving operator overload realness ✨.

✨ NAME ✨

the official NAME line is exactly this, double comma and all:

       std::filesystem::directory_entry::operator==,!=,,>=, -
       std::filesystem::directory_entry::operator==,!=,,>=,

🌸 Synopsis 🌸

here’s the full synopsis, character-for-character, annotations and all:

          bool operator==( const directory_entry& rhs ) const noexcept;
       (1) (since C++17)
          bool operator!=( const directory_entry& rhs ) const noexcept;
       (2) (since C++17)
                                                                                 (until
       C++20)
          bool operator<( const directory_entry& rhs ) const noexcept;
       (3) (since C++17)
                                                                                 (until
       C++20)
          bool operator<=( const directory_entry& rhs ) const noexcept;
       (4) (since C++17)
                                                                                 (until
       C++20)
          bool operator>( const directory_entry& rhs ) const noexcept;
       (5) (since C++17)
                                                                                 (until
       C++20)
          bool operator>=( const directory_entry& rhs ) const noexcept;
       (6) (since C++17)
                                                                                 (until
       C++20)
          std::strong_ordering operator<=>( const directory_entry& rhs )
       (7) (since C++20)
          const noexcept;

the lore: this compares the path with the directory entry rhs. Quick synthesis note: the <, <=, >, >=, and != operators are synthesized from operator<=> (since C++20) and operator== respectively β€” main character energy for operator<=> and operator==, honestly.

πŸŽ€ Parameters πŸŽ€

  • rhs β€” directory_entry to compare

πŸ’– Return value πŸ’–

  1. true if path() == rhs.path(), false otherwise.
  2. true if path() != rhs.path(), false otherwise.
  3. true if path() < rhs.path(), false otherwise.
  4. true if path() <= rhs.path(), false otherwise.
  5. true if path() > rhs.path(), false otherwise.
  6. true if path() >= rhs.path(), false otherwise.
  7. The result of path() <=> rhs.path().

πŸ‘€ See also πŸ‘€

  • path β€” returns the path the entry refers to
  • operator const path& (public member function)

source/version: http://cppreference.com Β· date: 2024.06.10 Β· page title: std::filesy...r==,!=,,>=,(3). okay bye bestie, go compare those directory entries and stay iconic πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from