20 using ParentNames = std::vector<std::string>;
21 using ParentProductIDs = std::vector<ProductID>;
23 std::vector<ParentProductIDs> setsOfParents;
25 std::vector<ParentNames> setsOfParentNames{
26 {
"p1a",
"p1b",
"p1c"}, {
"p2a",
"p2b",
"p2c",
"p2d"}, {
"p3a",
"p3b"}};
28 std::back_inserter(setsOfParents),
29 [](
auto const& parentNames) {
30 ParentProductIDs pids;
33 std::back_inserter(pids),
40 std::vector<Parentage> parentages;
42 std::back_inserter(parentages),
43 [](
auto const& parents) {
return Parentage{parents}; });
47 std::vector<std::function<void()>> tasks;
49 parentages, std::back_inserter(tasks), [](
auto const&
p) {
50 return [&
p] { ParentageRegistry::emplace(
p.id(),
p); };
52 hep::concurrency::simultaneous_function_spawner sfs{tasks};
59 std::vector<Parentage> retrievedParentages(parentages.size());
60 std::vector<std::function<void()>> tasks;
63 [&retrievedParentages, &tasks](std::size_t
const i,
auto const&
h) {
64 auto&
entry = retrievedParentages[i];
65 tasks.push_back([&
h, &
entry] {
71 hep::concurrency::simultaneous_function_spawner sfs{tasks};
72 BOOST_TEST(parentages == retrievedParentages);
void for_all_with_index(FwdCont &, Func)
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
auto transform_all(Container &, OutputIt, UnaryOp)
auto const & get(AssnsNode< L, R, D > const &r)