std::indire...ce_relation(3)

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

πŸ’– NAME πŸ’–

std::indirect_equivalence_relation β€” std::indirect_equivalence_relation

okay so welcome to the std::indire...ce_relation(3) page, bestie! The manual name up top is C++ Standard Libary β€” yes, spelled exactly like that, typo and all, we are not fixing it πŸ’…. This whole page is giving very specific C++20 concept energy, and honestly? Obsessed.

✨ Synopsis ✨

Defined in header <iterator> πŸ“š

          template< class F, class I1, class I2 = I1 >

          concept indirect_equivalence_relation =
              std::indirectly_readable<I1> &&
              std::indirectly_readable<I2> &&
              std::copy_constructible<F> &&
              std::equivalence_relation<F&, std::iter_value_t<I1>&,
          std::iter_value_t<I2>&> &&
              std::equivalence_relation<F&, std::iter_value_t<I1>&,
       (since C++20)
          std::iter_reference_t<I2>> &&
              std::equivalence_relation<F&, std::iter_reference_t<I1>,
          std::iter_value_t<I2>&> &&
              std::equivalence_relation<F&, std::iter_reference_t<I1>,
          std::iter_reference_t<I2>> &&
              std::equivalence_relation<F&, std::iter_common_reference_t<I1>,

                                            std::iter_common_reference_t<I2>>;

The concept indirect_equivalence_relation specifies requirements for algorithms that call equivalence relations as their arguments. The key difference between this concept and std::equivalence_relation is that it is applied to the types that I1 and I2 reference, rather than I1 and I2 themselves. It’s literally the same relationship vibe, just pointed at the referenced types instead of the iterator types β€” iykyk 🌸.

🌸 Semantic requirements 🌸

F, I1, and I2 model indirect_equivalence_relation only if all the concepts it subsumes are modeled. That’s the whole vibe check β€” every single subsumed concept has to be modeled, no shortcuts, periodt πŸ’….

bestie note: β€œonly if all concepts it subsumes are modeled” is not a suggestion, it’s the rule 😭✨

okay bye bestie 🫢 this cutie came from http://cppreference.com, dated 2024.06.10, and it’s the std::indire...ce_relation(3) page β€” go model those concepts and slay, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from