17 #ifndef OPENKALMAN_MAY_HOLD_COMPONENTS_HPP 18 #define OPENKALMAN_MAY_HOLD_COMPONENTS_HPP 25 template<
typename T, std::size_t N, std::size_t...I>
26 constexpr
bool may_hold_components_impl(std::index_sequence<I...>)
28 constexpr
auto dims = ((dynamic_dimension<T, I> ? 1 : index_dimension_of_v<T, I>) * ... * 1);
29 if constexpr (N == 0) return dims == 0;
30 else if constexpr (dims == 0) return false;
31 else return N % dims == 0;
36 template<typename T, typename...Components>
38 concept may_hold_components = indexible<T> and (std::convertible_to<Components,
const scalar_type_of_t<T>> and ...) and
40 constexpr
bool may_hold_components = indexible<T> and (std::is_convertible_v<Components,
const scalar_type_of_t<T>> and ...) and
42 detail::may_hold_components_impl<T,
sizeof...(Components)>(std::make_index_sequence<index_count_v<T>> {});
47 #endif //OPENKALMAN_MAY_HOLD_COMPONENTS_HPP Definition: basics.hpp:48