16 #ifndef OPENKALMAN_COMPATIBLE_SHAPE_WITH_HPP 17 #define OPENKALMAN_COMPATIBLE_SHAPE_WITH_HPP 19 #include "coordinates/coordinates.hpp" 30 template<
typename P,
typename T,
applicability a, std::size_t...i>
32 : std::bool_constant<(... and
33 (coordinates::dimension_of_v<collections::collection_element_t<i, P>> == index_dimension_of_v<T, i> and
34 (i < index_count_v<T> or
35 coordinates::compares_with<collections::collection_element_t<i, P>, coordinates::Dimensions<1>>)))> {};
37 #ifndef __cpp_concepts
38 template<typename P, typename T, applicability a, typename = void>
39 struct compatible_shape_with_impl_cpp17 : std::false_type{};
41 template<typename P, typename T, applicability a>
42 struct compatible_shape_with_impl_cpp17<P, T, a, std::enable_if_t<
43 coordinates::pattern_collection<P> and
45 collections::size_of<P>::value != stdex::dynamic_extent>>
46 : compatible_shape_with_impl<P, T, a> {};
58 template<typename P, typename T, applicability a = applicability::permitted>
60 concept pattern_collection_for =
61 coordinates::pattern_collection<P> and
63 values::fixed_value_compares_with<collections::size_of<P>, std::dynamic_extent, &std::is_neq> and
64 detail::compatible_shape_with_impl<P, T, a>::value;
66 constexpr bool pattern_collection_for = detail::compatible_shape_with_impl_cpp17<P, T, a>::value;
applicability
The applicability of a concept, trait, or restraint.
Definition: constants.hpp:35
constexpr bool value
T is a fixed or dynamic value that is reducible to a number.
Definition: value.hpp:45
The root namespace for OpenKalman.
Definition: basics.hpp:34
Definition for index_dimension_of.
Definition for indexible.
Definition: pattern_collection_for.hpp:28