22 return ((Rest == First) && ...);
51 static_assert(
sizeof...(Vals) > 0,
"max_value requires at least one value");
54 for (
my_size_t i = 1; i <
sizeof...(Vals); ++i)
70 static_assert(
sizeof...(Vals) > 0,
"min_value requires at least one value");
73 for (
my_size_t i = 1; i <
sizeof...(Vals); ++i)
102 if constexpr (
sizeof...(A) !=
sizeof...(B))
108 return ((A == B) && ...);
121 if constexpr (
sizeof...(A) !=
sizeof...(B))
124 return (max_value<A...>() ==
max_value<B...>()) && (
min_value<A...>() == min_value<B...>());
135 static_assert(
sizeof...(Vals) > 0,
"all_unique requires at least one value");
137 for (
my_size_t i = 0; i <
sizeof...(Vals); ++i)
139 for (
my_size_t j = i + 1; j <
sizeof...(Vals); ++j)
141 if (arr[i] == arr[j])
156 static_assert(
sizeof...(Vals) > 0,
"is_sequential requires at least one value");
158 for (
my_size_t i = 0; i <
sizeof...(Vals); ++i)
#define my_size_t
Size/index type used throughout the library.
Definition config.h:126
consteval bool packs_are_identical(Pack< A... >, Pack< B... >)
Element-wise equality comparison of two packs.
Definition helper_traits.h:100
consteval bool dims_match(const my_size_t lhs[N], const my_size_t rhs[N])
Element-wise equality check of two compile-time arrays.
Definition helper_traits.h:33
consteval my_size_t max_value()
Compile-time maximum of a non-type parameter pack.
Definition helper_traits.h:49
consteval bool all_equal()
Check if all values in a parameter pack are equal.
Definition helper_traits.h:20
consteval bool same_min_max(Pack< A... >, Pack< B... >)
Check if two packs have the same min and max values, regardless of order.
Definition helper_traits.h:119
consteval bool is_sequential()
Check if a pack forms the identity permutation {0, 1, …, N−1}.
Definition helper_traits.h:154
consteval my_size_t min_value()
Compile-time minimum of a non-type parameter pack.
Definition helper_traits.h:68
consteval bool all_unique()
Check if all values in a pack are unique.
Definition helper_traits.h:133
Wrapper struct for carrying a non-type parameter pack.
Definition helper_traits.h:90
Compile-time index sequence (lightweight std::index_sequence alternative).
Definition helper_traits.h:172
Recursive generator for index_seq<0, 1, …, N−1>.
Definition helper_traits.h:184