17 #ifndef canvas_Persistency_Common_AssnsAlgorithms_h 18 #define canvas_Persistency_Common_AssnsAlgorithms_h 23 #include "range/v3/algorithm/for_each.hpp" 24 #include "range/v3/view/all.hpp" 25 #include "range/v3/view/chunk_by.hpp" 26 #include "range/v3/view/map.hpp" 27 #include "range/v3/view/transform.hpp" 109 template <
typename A,
typename B,
typename D,
typename F>
113 ::ranges::for_each(assns | ::ranges::views::all |
114 ::ranges::views::chunk_by([](
auto a1,
auto a2) {
115 return a1.first ==
a2.first;
117 ::ranges::views::transform([](
auto pairs) {
139 template <
typename A,
typename B,
typename D,
typename F>
145 auto lefts = rng | ::ranges::views::keys;
151 template <
typename A,
typename B,
typename D,
typename F>
155 ::ranges::for_each(assns | ::ranges::views::all |
156 ::ranges::views::chunk_by([](
auto a1,
auto a2) {
157 return a1.first ==
a2.first;
void for_each_group_with_left(art::Assns< A, B, D > const &assns, F func)
decltype(auto) values(Coll &&coll)
Range-for loop helper iterating across the values of the specified collection.
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
void for_each_group(art::Assns< A, B, D > const &assns, F func)
Helper functions to access associations in order.
void for_each_pair(art::Assns< A, B, D > const &assns, F func)
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.