5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_IS_INTEGRAL_CONSTANT_LIKE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_IS_INTEGRAL_CONSTANT_LIKE_HPP_
13#include "arene/base/stdlib_choice/enable_if.hpp"
14#include "arene/base/stdlib_choice/integral_constant.hpp"
15#include "arene/base/stdlib_choice/is_convertible.hpp"
16#include "arene/base/stdlib_choice/is_default_constructible.hpp"
17#include "arene/base/stdlib_choice/is_integral.hpp"
18#include "arene/base/stdlib_choice/is_member_object_pointer.hpp"
19#include "arene/base/stdlib_choice/is_same.hpp"
27namespace is_integral_constant_like_detail {
31template <
class T,
class = arene::base::constra
ints<>>
32extern constexpr bool is_integral_constant_like_v =
false;
35ARENE_IGNORE_ALL(
"-Wfloat-equal",
"Floats are rejected without the use of their comparison.");
40extern constexpr bool is_integral_constant_like_v<
46 std::is_convertible<T,
decltype(T::value)>::value &&
48 !std::is_member_object_pointer<
decltype(&T::value)>::value &&
50 std::integral_constant<
bool, (
static_cast<decltype(T::value)
>(T()),
true)>::value>
52 > = std::integral_constant<
bool, (T() == T::value)>::value &&
53 std::integral_constant<
bool, (
static_cast<decltype(T::value)
>(T()) == T::value)>::value;
A helper class to represent a compile-time constant with the specified type and value....
Definition integral_constant.hpp:23
static constexpr value_type value
Definition integral_constant.hpp:34
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
std::integral_constant< bool, is_integral_constant_like_v< T > > is_integral_constant_like
Backport for the C++26 exposition-only integral-constant-like concept.
Definition is_integral_constant_like.hpp:86
constexpr bool is_integral_constant_like_v
Backport for the C++26 exposition-only integral-constant-like concept.
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
remove_cv_t< remove_reference_t< T > > remove_cvref_t
Backport of std::remove_cvref_t.
Definition remove_cvref.hpp:35
constexpr bool is_equality_comparable_v
Definition accumulate.hpp:36
bool
Check if element Idx and all subsequent elements of the two tuples are equal.
Definition tuple.hpp:649
typename enable_if< Condition, Type >::type enable_if_t
Type alias to support constraining templates. Is an alias for the specified type if the Condition is ...
Definition enable_if.hpp:41