16 #ifndef OPENKALMAN_COUNT_INDICES_HPP 17 #define OPENKALMAN_COUNT_INDICES_HPP 27 template<
typename Mdspan, std::
size_t i = Mdspan::rank()>
28 constexpr
auto remove_trailing_1D_indices()
31 return
std::integral_constant<
std::
size_t, i> {};
32 else if constexpr (Mdspan::static_extent(i - 1_uz) == 1_uz)
33 return remove_trailing_1D_indices<Mdspan, i - 1_uz>();
35 return std::integral_constant<std::size_t, i> {};
48 template<
typename T, std::enable_if_t<indexible<T>,
int> = 0>
53 using Mdspan = std::decay_t<decltype(get_mdspan(std::declval<const T&>()))>;
54 return detail::remove_trailing_1D_indices<Mdspan>();
Header file for code relating to values (e.g., scalars and indices)
constexpr auto count_indices(const T &)
Get the number of indices necessary to address all the components of an indexible object...
Definition: count_indices.hpp:51
The root namespace for OpenKalman.
Definition: basics.hpp:34
Definition of get_mdspan function.
constexpr bool index
T is an index value.
Definition: index.hpp:62
Definition for indexible.