SysTutorials

Linux Manual Pages › Section 3

stdexperimentalrangesstricttotallyordered(3)

std::experimental::ranges::StrictTotallyOrdered,std::experimental::ranges::StrictTotallyOrderedWith - std::experimental::ranges::StrictTotallyOrdered,std::experimental::ranges::StrictTotallyOrderedWith

Synopsis

Defined in header<experimental / ranges / concepts>
    template <class T>
    concept bool StrictTotallyOrdered =
        EqualityComparable<T> &&
        requires(const std::remove_reference_t<T> &a,
                 const std::remove_reference_t<T> &b)
{
    (1)(ranges TS)
    {
        a < b
        } -> Boolean &&;
    {
        a > b
        } -> Boolean &&;
    {
        a <= b
        } -> Boolean &&;
    {
        a >= b
        } -> Boolean &&;
};
template <class T, class U>
concept bool StrictTotallyOrderedWith =
    StrictTotallyOrdered<T> &&
        StrictTotallyOrdered<U> &&
            CommonReference<
                const std::remove_reference_t<T> &,
                const std::remove_reference_t<U> &> &&
                StrictTotallyOrdered<
                    ranges::common_reference_t<
                        const std::remove_reference_t<T> &,
                        const std::remove_reference_t<U> &>> &&
                    EqualityComparableWith<T, U> &&
    (2)(ranges TS)
        requires(const std::remove_reference_t<T> &t,
                 const std::remove_reference_t<U> &u)
{
    {
        t < u
        } -> Boolean &&;
    {
        t > u
        } -> Boolean &&;
    {
        t <= u
        } -> Boolean &&;
    {
        t >= u
        } -> Boolean &&;
    {
        u < t
        } -> Boolean &&;
    {
        u > t
        } -> Boolean &&;
    {
        u <= t
        } -> Boolean &&;
    {
        u >= t
        } -> Boolean &&;
};
  1. The concept StrictTotallyOrdered<T> specifies that the comparison operators ==,!=,<,>,<=,>= on T yield results consistent with a strict_total_order on T. StrictTotallyOrdered<T> is satisfied only if, given lvalues a, b and c of type const std::remove_reference_t<T>:
  1. The concept StrictTotallyOrderedWith<T, U> specifies that the comparison operators ==,!=,<,>,<=,>= on (possibly mixed) T and U operands yield results consistent with a strict total order. Comparing mixed operands yields results equivalent to comparing the operands converted to their common type. Formally, StrictTotallyOrderedWith<T, U> is satisfied only if, given any lvalue t of type const std::remove_reference_t<T> and any lvalue u of type const std::remove_reference_t<U>, and let C be ranges::common_reference_t<const std::remove_reference_t<T>&, const std::remove_reference_t<U>&> :