16 #ifndef OPENKALMAN_COLLECTIONS_UNIFORMLY_SETTABLE_HPP 17 #define OPENKALMAN_COLLECTIONS_UNIFORMLY_SETTABLE_HPP 25 #if not defined(__cpp_concepts) or __cpp_generic_lambdas < 201707L 28 template<
typename C,
typename T,
typename = std::make_index_sequence<size_of_v<C>>,
typename =
void>
29 struct uniformly_settable_sized_impl : std::false_type {};
31 template<
typename C,
typename T, std::size_t...i>
32 struct uniformly_settable_sized_impl<C, T,
std::index_sequence<i...>, std::enable_if_t<(... and settable<i, C, T>)>>
36 template<
typename C,
typename T,
typename =
void>
37 struct uniformly_settable_sized : std::false_type {};
39 template<
typename C,
typename T>
40 struct uniformly_settable_sized<C, T, std::enable_if_t<size_of<C>::value != stdex::dynamic_extent>>
41 : uniformly_settable_sized_impl<C, T> {};
50 template<
typename C,
typename T>
51 #if defined(__cpp_concepts) and __cpp_generic_lambdas >= 201707L 53 ((sized<C> and size_of_v<C> != stdex::dynamic_extent) or settable<0_uz, C, T>) and
54 (not sized<C> or size_of_v<C> == stdex::dynamic_extent or
56 (std::make_index_sequence<size_of_v<C>>{}));
58 constexpr
bool uniformly_settable =
59 ((sized<C> and not values::fixed_value_compares_with<size_of<C>, stdex::dynamic_extent>) or settable<0_uz, C, T>) and
60 (not sized<C> or size_of_v<C> == stdex::dynamic_extent or
Namespace for collections.
Definition: collections.hpp:27
Header file for code relating to values (e.g., scalars and indices)
Definition for collections::size_of.
constexpr bool value
T is a fixed or dynamic value that is reducible to a number.
Definition: value.hpp:45
Definition for collections::settable.
Definition: trait_backports.hpp:64
constexpr bool uniformly_settable
C is settable with type C for all indices.
Definition: uniformly_settable.hpp:58