9#include <dune/common/tuplevector.hh>
10#include <amdis/common/ForEach.hpp>
11#include <amdis/common/TypeTraits.hpp>
27template <
class Container,
class F>
28void forEach (Container&& container, F&& f)
30 ForEach<TYPEOF(container)>::impl(container,f);
42 template <
class Vec,
class F,
43 class =
decltype(std::begin(std::declval<Vec>())),
44 class =
decltype(std::end(std::declval<Vec>()))>
45 static void impl2 (Dune::PriorityTag<2>, Vec&& vec, F&& f)
48 Recursive::forEach(v, f);
52 template <
class Vec,
class F,
53 class =
decltype(std::get<0>(std::declval<Vec>()))>
54 static void impl2 (Dune::PriorityTag<1>, Vec&& vec, F&& f)
56 Ranges::forEach(vec, [&](
auto&& v) {
57 Recursive::forEach(v, f);
62 template <
class Value,
class F>
63 static void impl2 (Dune::PriorityTag<0>, Value&& value, F&& f)
69 template <
class Vec,
class F>
70 static void impl (Vec&& vec, F&& f)
72 impl2(Dune::PriorityTag<5>{}, vec, f);
Definition: ForEach.hpp:39