std::indirectly_comparable(3)

πŸ“¦
version 2024.07.05 Β· 3 versions
, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay so bestie, this is the std::indirectly_comparable page β€” title and all: std::indirectly_comparable(3) ✨. It's from the C++ Standard Libary manual (yes, β€œLibary” with one r, we are not fixing it, it's part of the lore πŸ’…). The NAME entry is literally std::indirectly_comparable - std::indirectly_comparable, so if you came here looking for a different std::indirectly_comparable, congrats, you're in the right group chat 🫢.

✨ Synopsis ✨

Defined in header <iterator> β€” and this whole thing is since C++20 ⭐.

The original had (since C++20) floating in the middle of the declaration, which is a little unhinged but valid; here's the code straight up:

template< class I1, class I2, class Comp,

          class Proj1 = std::identity, class Proj2 = std::identity >
concept indirectly_comparable =

    std::indirect_binary_predicate<Comp, std::projected<I1, Proj1>,
          std::projected<I2, Proj2>>;

The concept indirectly_comparable specifies the fundamental algorithm requirement for comparing values across two independent ranges. Lowkey that's the whole vibe: it's the concept for that fundamental algorithm requirement, no cap πŸ’–.

🌸 Semantic requirements 🌸

indirectly_comparable is modeled only if all concepts it subsumes are modeled. Like, every concept it subsumes has to be modeled too β€” no skipping the prerequisites, bestie πŸ™ˆ.

πŸ‘€ See also πŸ‘€

  • indirect_binary_predicate (C++20) β€” specifies that a callable type, when invoked with the result of dereferencing two indirectly_readable types, satisfies predicate (concept). That's the concept energy doing the actual predicate-checking in the synopsis up there πŸ”₯.

okay that's the page! source: http://cppreference.com Β· version/date: 2024.06.10 Β· page title: std::indirectly_comparable(3) β€” mwah, bye bestie, hydrate and stay iconic πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from