16 #ifndef OPENKALMAN_PATTERN_COLLECTION_HPP 17 #define OPENKALMAN_PATTERN_COLLECTION_HPP 24 #if not defined(__cpp_concepts) or __cpp_generic_lambdas < 201707L 27 template<
typename T, std::size_t...Ix>
30 return (... and
sized_pattern<collections::collection_element_t<Ix, T>>);
34 template<
typename T,
typename =
void>
35 struct is_pattern_iter : std::false_type {};
38 struct is_pattern_iter<T,
std::enable_if_t<collections::uniformly_gettable<T>>>
39 : std::bool_constant<is_pattern_iter_impl<T>(std::make_index_sequence<collections::size_of_v<T>>{})> {};
42 template<
typename T,
typename =
void>
43 struct is_pattern_range : std::false_type {};
46 struct is_pattern_range<T, std::enable_if_t<sized_pattern<stdex::ranges::range_value_t<T>>>>
56 #if defined(__cpp_concepts) and __cpp_generic_lambdas >= 201707L 58 collections::collection<T> and
59 ( ( std::ranges::random_access_range<T> and
62 {
return (... and
sized_pattern<collections::collection_element_t<Ix, T>>); }
63 (std::make_index_sequence<collections::size_of<T>::value>{})
66 constexpr
bool pattern_collection =
67 collections::collection<T> and
68 ( ( stdex::ranges::random_access_range<T> and
constexpr bool pattern_collection
An object describing a sized collection of /ref sized_pattern objects.
Definition: pattern_collection.hpp:66
constexpr bool sized_pattern
An object describing the set of coordinates associated with a tensor index.
Definition: sized_pattern.hpp:32
Definition for patterns::sized_pattern.
constexpr bool value
T is a fixed or dynamic value that is reducible to a number.
Definition: value.hpp:45
The namespace for features relating to patterns::pattern object.
Definition: collection_compares_with.hpp:24
Inclusion file for collections.
Definition: trait_backports.hpp:64