std::indirectly_comparable(3)
π 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 twoindirectly_readabletypes, 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
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms