16 #ifndef OPENKALMAN_GET_IS_EUCLIDEAN_HPP 17 #define OPENKALMAN_GET_IS_EUCLIDEAN_HPP 28 #ifndef __cpp_lib_ranges 29 template<
typename T,
typename =
void>
34 : std::bool_constant<values::fixed<decltype(coordinates::internal::get_descriptor_is_euclidean(
35 std::declval<stdex::ranges::range_value_t<T>>()))>> {};
39 template<std::
size_t i = 0,
typename T>
40 static constexpr
auto get_is_euclidean_fixed(
const T& t)
42 if constexpr (i < collections::size_of_v<T>)
46 internal::get_descriptor_is_euclidean(collections::get<i>(t)),
47 get_is_euclidean_fixed<i + 1>(t));
49 else return std::true_type {};
58 template<pattern Arg> requires descriptor<Arg> or collections::sized<Arg> or
59 values::fixed<decltype(internal::get_descriptor_is_euclidean(std::declval<stdex::ranges::range_value_t<Arg>>()))>
61 template<
typename Arg, std::enable_if_t<pattern<Arg> and
67 if constexpr (descriptor<Arg>)
69 return internal::get_descriptor_is_euclidean(arg);
73 return std::true_type {};
77 using C = decltype(internal::get_descriptor_is_euclidean(std::declval<stdex::ranges::range_value_t<Arg>>()));
78 if constexpr (values::fixed<C>)
81 #ifdef __cpp_lib_ranges_fold 83 [](
const auto& a,
const auto& b) {
return a and internal::get_descriptor_is_euclidean(b); });
86 for (
const auto& c : arg)
if (not internal::get_descriptor_is_euclidean(c))
return false;
93 return detail::get_is_euclidean_fixed(arg);
The size of a sized object (including a collection).
Definition: size_of.hpp:33
The fixed value associated with a fixed.
Definition: fixed_value_of.hpp:44
Definition for coordinates::pattern.
constexpr auto get_is_euclidean(const Arg &arg)
Determine, whether coordinates::pattern Arg is euclidean.
Definition: get_is_euclidean.hpp:65
Definition for coordinates::descriptor.
The namespace for features relating to coordinates::pattern object.
Definition: compares_with.hpp:25
constexpr detail::all_closure all
a std::ranges::range_adaptor_closure which returns a view to all members of its collection argument...
Definition: all.hpp:72
Inclusion file for collections.
Definition: get_is_euclidean.hpp:30
constexpr bool fixed_value_compares_with
T has a fixed value that compares with N in a particular way based on parameter comp.
Definition: fixed_value_compares_with.hpp:74
constexpr auto operation(Operation &&op, Args &&...args)
A potentially constant-evaluated operation involving some number of values.
Definition: operation.hpp:98