std::experi...es::Relation(3)
okay so this is std::experi...es::Relation(3), and we're hanging out in the C++ Standard Libary manual. yes, Libary, that's literally the spelling in the source, bestie π
β¨ NAME β¨
std::experimental::ranges::Relation β std::experimental::ranges::Relation
short, iconic, no notes π
π Synopsis π
okay so the synopsis is literally giving concept-declaration realness, and I'm obsessed:
Defined in header <experimental/ranges/concepts>
template< class R, class T, class U >
concept bool Relation =
Predicate<R, T, T> &&
Predicate<R, U, U> &&
CommonReference<
const std::remove_reference_t<T>&,
const std::remove_reference_t<U>&> &&
Predicate<R, (1) (ranges TS)
ranges::common_reference_t<
const std::remove_reference_t<T>&,
const std::remove_reference_t<U>&>,
ranges::common_reference_t<
const std::remove_reference_t<T>&,
const std::remove_reference_t<U>&>> &&
Predicate<R, T, U> &&
Predicate<R, U, T>;
The concept Relation<R, T, U> specifies that R defines a binary relation over the set of expressions whose type and value category are those encoded by either T or U. no cap, that's the vibe πΈ
Given:
r, an expression such thatdecltype((r))isR,t, an expression such thatdecltype((t))isT,u, an expression such thatdecltype((u))isU,
and let C be ranges::common_reference_t<const std::remove_reference_t<T>&, const std::remove_reference_t<U>&>, then Relation<R, T, U> is satisfied only if:
bool(r(t, u)) == bool(r(C(t), C(u)))andbool(r(u, t)) == bool(r(C(u), C(t))).
that's the whole condition, bestie β both of those bool comparisons have to line up, periodt π₯
okay bye bestie π«Ά this page came from http://cppreference.com, dated 2024.06.10, and the title on it is std::experi...es::Relation(3).
π¦ 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