A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue3530 below:

BUILTIN-PTR-MEOW should not opt the type out of syntactic checks

-1- In this subclause, BUILTIN-PTR-CMP(T, op, U) for types T and U and where op is an equality (7.6.10 [expr.eq]) or relational operator (7.6.9 [expr.rel]) is a boolean constant expression. BUILTIN-PTR-CMP(T, op, U) is true if and only if op in the expression declval<T>() op declval<U>() resolves to a built-in operator comparing pointers.

struct ranges::equal_to {
  template<class T, class U>
    requires equality_comparable_with<T, U> || BUILTIN-PTR-CMP(T, ==, U)
  constexpr bool operator()(T&& t, U&& u) const;

  using is_transparent = unspecified;
};
template<class T, class U>
  requires equality_comparable_with<T, U> || BUILTIN-PTR-CMP(T, ==, U)
constexpr bool operator()(T&& t, U&& u) const;

-?- Constraints: T and U satisfy equality_comparable_with.

-2- Preconditions: If the expression std​::​forward<T>(t) == std​::​forward<U>(u) results in a call to a built-in operator == comparing pointers of type P, the conversion sequences from both T and U to P are equality-preserving (18.2 [concepts.equality]) ; otherwise, T and U model equality_comparable_with. -3- Effects:
  1. (3.1) — If the expression std​::​forward<T>(t) == std​::​forward<U>(u) results in a call to a built-in operator == comparing pointers of type P, returns false if either (the converted value of) t precedes u or u precedes t in the implementation-defined strict total order over pointers (3.28 [defns.order.ptr]) and otherwise true.

  2. (3.2) — Otherwise, equivalent to: return std​::​forward<T>(t) == std​::​forward<U>(u);

struct ranges::not_equal_to {
    template<class T, class U>
        requires equality_comparable_with<T, U> || BUILTIN-PTR-CMP(T, ==, U)
    constexpr bool operator()(T&& t, U&& u) const;

    using is_transparent = unspecified;
};
template<class T, class U>
constexpr bool operator()(T&& t, U&& u) const;

-?- Constraints: T and U satisfy equality_comparable_with.

-4- operator() has effects e Effects: Equivalent to:
return !ranges::equal_to{}(std::forward<T>(t), std::forward<U>(u));
struct ranges::greater {
  template<class T, class U>
    requires totally_ordered_with<T, U> || BUILTIN-PTR-CMP(T, <, U)
  constexpr bool operator()(T&& t, U&& u) const;

  using is_transparent = unspecified;
};
template<class T, class U>
constexpr bool operator()(T&& t, U&& u) const;

-?- Constraints: T and U satisfy totally_ordered_with.

-5- operator() has effects e Effects: Equivalent to:
return ranges::less{}(std::forward<U>(u), std::forward<T>(t));
struct ranges::less {
  template<class T, class U>
    requires totally_ordered_with<T, U> || BUILTIN-PTR-CMP(T, <, U)
  constexpr bool operator()(T&& t, U&& u) const;

  using is_transparent = unspecified;
};
template<class T, class U>
  requires totally_ordered_with<T, U> || BUILTIN-PTR-CMP(T, <, U)
constexpr bool operator()(T&& t, U&& u) const;

-?- Constraints: T and U satisfy totally_ordered_with.

-6- Preconditions: If the expression std​::​forward<T>(t) < std​::​forward<U>(u) results in a call to a built-in operator < comparing pointers of type P, the conversion sequences from both T and U to P are equality-preserving (18.2 [concepts.equality]) ; otherwise, T and U model totally_ordered_with. For any expressions ET and EU such that decltype((ET)) is T and decltype((EU)) is U, exactly one of ranges::less{}(ET, EU), ranges::less{}(EU, ET), or ranges::equal_to{}(ET, EU) is true. -7- Effects:
  1. (7.1) — If the expression std​::​forward<T>(t) < std​::​forward<U>(u) results in a call to a built-in operator < comparing pointers of type P, returns true if (the converted value of) t precedes u in the implementation-defined strict total order over pointers (3.28 [defns.order.ptr]) and otherwise false.

  2. (7.2) — Otherwise, equivalent to: return std​::​forward<T>(t) < std​::​forward<U>(u);

struct ranges::greater_equal {
  template<class T, class U>
    requires totally_ordered_with<T, U> || BUILTIN-PTR-CMP(T, <, U)
  constexpr bool operator()(T&& t, U&& u) const;

  using is_transparent = unspecified;
};
template<class T, class U>
constexpr bool operator()(T&& t, U&& u) const;

-?- Constraints: T and U satisfy totally_ordered_with.

-8- operator() has effects e Effects: Equivalent to:
return !ranges::less{}(std::forward<T>(t), std::forward<U>(u));
struct ranges::less_equal {
  template<class T, class U>
    requires totally_ordered_with<T, U> || BUILTIN-PTR-CMP(T, <, U)
  constexpr bool operator()(T&& t, U&& u) const;

  using is_transparent = unspecified;
};
template<class T, class U>
constexpr bool operator()(T&& t, U&& u) const;

-?- Constraints: T and U satisfy totally_ordered_with.

-9- operator() has effects e Effects: Equivalent to:
return !ranges::less{}(std::forward<U>(u), std::forward<T>(t));

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4