Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 9 additions & 19 deletions source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4762,16 +4762,6 @@
for use primarily in connection with
the three-way comparison operator\iref{expr.spaceship}.

\indexlibraryglobal{is_eq}%
\indexlibraryglobal{is_neq}%
\indexlibraryglobal{is_lt}%
\indexlibraryglobal{is_lteq}%
\indexlibraryglobal{is_gt}%
\indexlibraryglobal{is_geq}%
\indexlibraryglobal{is_gteq}%
\indexlibraryglobal{common_comparison_category_t}%
\indexlibraryglobal{compare_three_way_result_t}%
\indexlibraryglobal{type_order_v}%
\begin{codeblock}
// all freestanding
namespace std {
Expand All @@ -4781,20 +4771,20 @@
class strong_ordering;

// named comparison functions
constexpr bool is_eq (partial_ordering cmp) noexcept { return cmp == 0; }
constexpr bool is_neq (partial_ordering cmp) noexcept { return cmp != 0; }
constexpr bool is_lt (partial_ordering cmp) noexcept { return cmp < 0; }
constexpr bool is_lteq(partial_ordering cmp) noexcept { return cmp <= 0; }
constexpr bool is_gt (partial_ordering cmp) noexcept { return cmp > 0; }
constexpr bool is_gteq(partial_ordering cmp) noexcept { return cmp >= 0; }
constexpr bool @\libglobal{is_eq}@ (partial_ordering cmp) noexcept { return cmp == 0; }
constexpr bool @\libglobal{is_neq}@ (partial_ordering cmp) noexcept { return cmp != 0; }
constexpr bool @\libglobal{is_lt}@ (partial_ordering cmp) noexcept { return cmp < 0; }
constexpr bool @\libglobal{is_lteq}@(partial_ordering cmp) noexcept { return cmp <= 0; }
constexpr bool @\libglobal{is_gt}@ (partial_ordering cmp) noexcept { return cmp > 0; }
constexpr bool @\libglobal{is_gteq}@(partial_ordering cmp) noexcept { return cmp >= 0; }

// \ref{cmp.common}, common comparison category type
template<class... Ts>
struct common_comparison_category {
using type = @\seebelow@;
};
template<class... Ts>
using common_comparison_category_t = common_comparison_category<Ts...>::type;
using @\libglobal{common_comparison_category_t}@ = common_comparison_category<Ts...>::type;

// \ref{cmp.concept}, concept \libconcept{three_way_comparable}
template<class T, class Cat = partial_ordering>
Expand All @@ -4806,7 +4796,7 @@
template<class T, class U = T> struct compare_three_way_result;

template<class T, class U = T>
using compare_three_way_result_t = compare_three_way_result<T, U>::type;
using @\libglobal{compare_three_way_result_t}@ = compare_three_way_result<T, U>::type;

// \ref{comparisons.three.way}, class \tcode{compare_three_way}
struct compare_three_way;
Expand All @@ -4826,7 +4816,7 @@
struct type_order;

template<class T, class U>
constexpr strong_ordering type_order_v = type_order<T, U>::value;
constexpr strong_ordering @\libglobal{type_order_v}@ = type_order<T, U>::value;
}
\end{codeblock}

Expand Down
Loading