16 #ifndef OPENKALMAN_COORDINATES_GET_DIMENSION_HPP 17 #define OPENKALMAN_COORDINATES_GET_DIMENSION_HPP 20 #include "../../../basics/compatibility/language-features.hpp" 31 template<std::
size_t i = 0,
typename Tup>
32 static constexpr
auto get_dimension_tuple(
const Tup& tup)
34 if constexpr (i < std::tuple_size_v<Tup>)
37 internal::get_descriptor_dimension(OpenKalman::internal::generalized_std_get<i>(tup)),
38 get_dimension_tuple<i + 1>(tup)};
40 else return std::integral_constant<std::size_t, 0_uz>{};
52 template<
typename Arg, std::enable_if_t<pattern<Arg>,
int> = 0>
57 if constexpr (descriptor<Arg>)
59 return internal::get_descriptor_dimension(arg);
61 else if constexpr (collections::tuple_like<Arg>)
63 return detail::get_dimension_tuple(arg);
67 std::size_t ret = 0_uz;
68 for (
auto& c : arg) ret += internal::get_descriptor_dimension(c);
77 #endif //OPENKALMAN_COORDINATES_GET_DIMENSION_HPP Definition for collections::tuple_like.
Definition for coordinates::pattern.
constexpr auto get_dimension(const Arg &arg)
Get the vector dimension of coordinates::pattern Arg.
Definition: get_dimension.hpp:55
Definition for coordinates::descriptor.
Definition: compares_with.hpp:28
constexpr bool index
T is an index value.
Definition: index.hpp:56
operation(const Operation &, const Args &...) -> operation< Operation, Args... >
Deduction guide.