16 #ifndef OPENKALMAN_COLLECTIONS_APPLY_HPP 17 #define OPENKALMAN_COLLECTIONS_APPLY_HPP 28 template<
typename F,
typename T, std::size_t...i>
29 constexpr decltype(
auto)
30 apply_impl(F&& f, T&& t,
std::index_sequence<i...>)
32 return stdex::invoke(std::forward<F>(f), get<i>(std::forward<T>(t))...);
42 template<
typename F, collection T>
43 requires values::fixed_value_compares_with<size_of<T>, stdex::dynamic_extent, &std::is_neq>
45 template<
typename F,
typename T, std::enable_if_t<
46 collection<T> and values::fixed_value_compares_with<size_of<T>, stdex::dynamic_extent, &stdex::is_neq>,
int> = 0>
48 constexpr decltype(
auto)
51 return detail::apply_impl(std::forward<F>(f), std::forward<T>(t), std::make_index_sequence<size_of_v<T>>{});
Namespace for collections.
Definition: collections.hpp:27
Definition for collections::get.
Definition for collections::collection.
Header file for code relating to values (e.g., scalars and indices)
Definition for collections::size_of.
decltype(auto) constexpr apply(F &&f, T &&t)
A generalization of std::apply.
Definition: apply.hpp:49