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_
11#include "arene/base/compiler_support/diagnostics.hpp"
12#include "arene/base/constraints/constraints.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"
22#include "arene/base/type_traits/comparison_traits.hpp"
23#include "arene/base/type_traits/remove_cvref.hpp"
27namespace is_integral_constant_like_detail {
31template <
class T,
class = arene::base::constraints<>>
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<
42 arene::base::constraints<
44 std::is_integral<remove_cvref_t<
decltype(T::value)>>::value &&
45 !std::is_same<
bool, remove_cvref_t<
decltype(T::value)>>::value &&
46 std::is_convertible<T,
decltype(T::value)>::value &&
47 is_equality_comparable_v<T,
decltype(T::value)> &&
48 !std::is_member_object_pointer<
decltype(&T::value)>::value &&
49 std::is_default_constructible<T>::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;
Definition array_exceptions_disabled.cpp:11
constexpr bool is_integral_constant_like_v
Backport for the C++26 exposition-only integral-constant-like concept.
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10