SysTutorials

Linux Manual Pages › Section 3

stdexperimentalrangesweaklyequalitycomparablewith(3)

std::experimental::ranges::WeaklyEqualityComparableWith - std::experimental::ranges::WeaklyEqualityComparableWith

Synopsis

Defined in header<experimental / ranges / concepts>
    template <class T, class U>
    concept bool WeaklyEqualityComparableWith =
        requires(const std::remove_reference_t<T> &t,
                 const std::remove_reference_t<U> &u)
{
    {
        t == u
        } -> Boolean &&;
    (ranges TS)
    {
        t != u
        } -> Boolean &&;
    {
        u == t
        } -> Boolean &&;
    {
        u != t
        } -> Boolean &&;
};

The concept WeaklyEqualityComparableWith<T, U> specifies that an object of type T and an object of type U can be compared for equality with each other (in either order) using both == and !=, and the results of the comparisons are consistent. More formally, WeaklyEqualityComparableWith<T, U> is satisfied only if given

See also

                       specifies that operator == is an equivalence relation EqualityComparable (concept) EqualityComparableWith