6#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_COMPARISON_TRAITS_HPP_
7#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_COMPARISON_TRAITS_HPP_
14#include "arene/base/stdlib_choice/declval.hpp"
15#include "arene/base/stdlib_choice/enable_if.hpp"
16#include "arene/base/stdlib_choice/is_convertible.hpp"
27template <
typename T,
typename U = T,
typename = constra
ints<>>
31template <
typename T,
typename U>
44template <
typename T,
typename U = T,
typename = constra
ints<>>
48template <
typename T,
typename U>
59template <
typename T,
typename U = T,
typename = constra
ints<>>
63template <
typename T,
typename U>
76template <
typename T,
typename U = T,
typename = constra
ints<>>
80template <
typename T,
typename U>
93template <
typename T,
typename U = T,
typename = constra
ints<>>
97template <
typename T,
typename U>
110template <
typename T,
typename U = T,
typename = constra
ints<>>
114template <
typename T,
typename U>
125template <
typename T,
typename U = T,
typename = constra
ints<>>
129template <
typename T,
typename U>
142template <
typename T,
typename U = T,
typename = constra
ints<>>
146template <
typename T,
typename U>
153namespace comparison_traits_detail {
155class is_equality_comparable_helper {
158 ARENE_IGNORE_ALL(
"-Wfloat-equal",
"Checking for existence of comparison, not using it");
164 template <typename Lhs, typename Rhs, typename Arg, typename = decltype(std::declval<Lhs>() ==
std::declval<Rhs>())>
165 static constexpr auto test(Arg)
noexcept ->
bool {
174 template <
typename Lhs,
typename Rhs>
175 static constexpr auto test(
void*)
noexcept ->
bool {
187template <
typename Lhs,
typename Rhs = Lhs>
190 comparison_traits_detail::is_equality_comparable_helper::test<Lhs, Rhs>(0)
199template <
typename T,
typename U = T,
typename = constra
ints<>>
205template <
typename T,
typename U>
217template <
typename T,
typename U = T,
typename = constra
ints<>>
221template <
typename T,
typename U>
234template <
typename T,
typename U = T,
typename = constra
ints<>>
238template <
typename T,
typename U>
Provides macros used to disable and enable compiler specific diagnostics using the _Pragma operator.
#define ARENE_IGNORE_END()
Ends a region of a suppressed diagnostic.
Definition diagnostics.hpp:136
#define ARENE_IGNORE_START()
Begins a region of a suppressed diagnostic.
Definition diagnostics.hpp:131
#define ARENE_IGNORE_ALL(s, comment)
Pushes an ignore for a diagnostic into the compiler for any compiler.
Definition diagnostics.hpp:122
Definition accumulate.hpp:37
constexpr bool is_greater_than_or_equal_comparable_v
constexpr bool is_nothrow_less_than_or_equal_comparable_v
constexpr bool is_nothrow_greater_than_or_equal_comparable_v
constexpr bool is_inequality_comparable_v
constexpr bool is_less_than_comparable_v
constexpr bool is_nothrow_greater_than_comparable_v
constexpr bool is_less_than_or_equal_comparable_v
constexpr bool is_nothrow_equality_comparable_v
constexpr bool is_nothrow_inequality_comparable_v
typename constraints_impl::constraints< EnableIfs... >::type constraints
Helper used to express template constraints in a consistent way using std::enable_if_t.
Definition constraints.hpp:51
constexpr bool is_greater_than_comparable_v
constexpr bool is_nothrow_less_than_comparable_v
constexpr bool is_equality_comparable_v
Definition accumulate.hpp:36
auto declval() noexcept -> T &&
A dummy function that is declared but not defined, with a user-specified return type,...