17 #ifndef OPENKALMAN_CHECK_BLOCK_LIMITS_HPP 18 #define OPENKALMAN_CHECK_BLOCK_LIMITS_HPP 25 template<std::size_t limit_ix, std::size_t
index,
typename Arg,
typename...Limits>
26 constexpr
void check_block_limit(
const Arg& arg,
const Limits&...)
28 if constexpr (((limit_ix >= collections::size_of_v<Limits>) or ...))
return;
29 else if constexpr (((
values::fixed<collections::collection_element_t<limit_ix, Limits>>) and ...) and not dynamic_dimension<Arg, index>)
31 constexpr std::size_t block_limit = (
static_cast<std::size_t
>(std::decay_t<collections::collection_element_t<limit_ix, Limits>>
::value) + ... + 0_uz);
32 static_assert(block_limit <= index_dimension_of_v<Arg, index>,
"Block limits must be in range");
49 template<std::size_t...limit_ix, std::size_t...indices,
typename Arg,
typename...Limits>
50 constexpr
void check_block_limits(
53 (detail::check_block_limit<limit_ix, indices>(arg, limits...), ...);
constexpr bool value
T is a fixed or dynamic value that is reducible to a number.
Definition: value.hpp:45
Definition: trait_backports.hpp:64
constexpr bool fixed
T is a value that is determinable at compile time.
Definition: fixed.hpp:66
Definition: basics.hpp:48
constexpr bool index
An object describing a collection of /ref values::index objects.
Definition: index.hpp:77