Go to the source code of this file.
|
| template<my_size_t First, my_size_t... Rest> |
| consteval bool | all_equal () |
| | Check if all values in a parameter pack are equal.
|
| |
| template<my_size_t N> |
| 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.
|
| |
| template<my_size_t... Vals> |
| consteval my_size_t | max_value () |
| | Compile-time maximum of a non-type parameter pack.
|
| |
| template<my_size_t... Vals> |
| consteval my_size_t | min_value () |
| | Compile-time minimum of a non-type parameter pack.
|
| |
| template<my_size_t... A, my_size_t... B> |
| consteval bool | packs_are_identical (Pack< A... >, Pack< B... >) |
| | Element-wise equality comparison of two packs.
|
| |
| template<my_size_t... A, my_size_t... B> |
| consteval bool | same_min_max (Pack< A... >, Pack< B... >) |
| | Check if two packs have the same min and max values, regardless of order.
|
| |
| template<my_size_t... Vals> |
| consteval bool | all_unique () |
| | Check if all values in a pack are unique.
|
| |
| template<my_size_t... Vals> |
| consteval bool | is_sequential () |
| | Check if a pack forms the identity permutation {0, 1, …, N−1}.
|
| |
◆ all_equal()
| consteval bool all_equal |
( |
| ) |
|
Check if all values in a parameter pack are equal.
- Template Parameters
-
| First | First value in the pack. |
| Rest | Remaining values. |
- Returns
- True if every value equals
First.
◆ all_unique()
template<my_size_t... Vals>
| consteval bool all_unique |
( |
| ) |
|
Check if all values in a pack are unique.
- Template Parameters
-
| Vals | One or more values (static_assert enforced). |
- Returns
- True if no two values are equal (O(N²) comparison).
◆ dims_match()
Element-wise equality check of two compile-time arrays.
- Template Parameters
-
- Parameters
-
| lhs | First array. |
| rhs | Second array. |
- Returns
- True if all corresponding elements match.
◆ is_sequential()
template<my_size_t... Vals>
| consteval bool is_sequential |
( |
| ) |
|
Check if a pack forms the identity permutation {0, 1, …, N−1}.
- Template Parameters
-
| Vals | One or more values (static_assert enforced). |
- Returns
- True if
Vals[i] == i for all i.
◆ max_value()
template<my_size_t... Vals>
Compile-time maximum of a non-type parameter pack.
- Template Parameters
-
| Vals | One or more values (static_assert enforced). |
- Returns
- The largest value in the pack.
◆ min_value()
template<my_size_t... Vals>
Compile-time minimum of a non-type parameter pack.
- Template Parameters
-
| Vals | One or more values (static_assert enforced). |
- Returns
- The smallest value in the pack.
◆ packs_are_identical()
template<my_size_t... A, my_size_t... B>
| consteval bool packs_are_identical |
( |
Pack< A... > |
, |
|
|
Pack< B... > |
|
|
) |
| |
Element-wise equality comparison of two packs.
- Template Parameters
-
| A | Values in the first pack. |
| B | Values in the second pack. |
- Returns
- True if both packs have the same length and identical elements.
◆ same_min_max()
template<my_size_t... A, my_size_t... B>
| consteval bool same_min_max |
( |
Pack< A... > |
, |
|
|
Pack< B... > |
|
|
) |
| |
Check if two packs have the same min and max values, regardless of order.
- Template Parameters
-
| A | Values in the first pack. |
| B | Values in the second pack. |
- Returns
- True if min and max match, false otherwise.