Loading...
Searching...
No Matches
Dune::Std::three_way_comparable_with Concept Reference

The concept std::three_way_comparable_with specifies that the three way comparison operator <=> on (possibly mixed) T and U operands yield results consistent with the comparison category implied by Cat. Comparing mixed operands yields results equivalent to comparing the operands converted to their common type. More...

`#include <dune/common/std/compare.hh>`

## Concept definition

template<class T, class U, class Cat std::partial_ordering>
concept Dune::Std::three_way_comparable_with =
Std::three_way_comparable<T, Cat> &&
Std::three_way_comparable<U, Cat> &&
Impl::comparisonCommonTypeWith<T, U> &&
Std::three_way_comparable<
std::common_reference_t<
const std::remove_reference_t<T>&,
const std::remove_reference_t<U>&>, Cat> &&
Impl::weaklyEqualityComparableWith<T, U> &&
Impl::partiallyOrderedWith<T, U> &&
requires(const std::remove_reference_t<T>& t,
const std::remove_reference_t<U>& u)
{
{ t <=> u } -> Impl::comparesAs<Cat>;
{ u <=> t } -> Impl::comparesAs<Cat>;
}
Dune::Std::three_way_comparable
The concept std::three_way_comparable specifies that the three way comparison operator <=> on T yield...
Definition compare.hh:80
Dune::Std::three_way_comparable_with
The concept std::three_way_comparable_with specifies that the three way comparison operator <=> on (p...
Definition compare.hh:100

## Detailed Description

The concept std::three_way_comparable_with specifies that the three way comparison operator <=> on (possibly mixed) T and U operands yield results consistent with the comparison category implied by Cat. Comparing mixed operands yields results equivalent to comparing the operands converted to their common type.

The standard implementation is available in libstdc++ >= 10 and libc++ >= 14.