7#ifndef DUNE_FUNCTIONS_COMMON_STATICFORLOOP_HH
8#define DUNE_FUNCTIONS_COMMON_STATICFORLOOP_HH
13#include <dune/functions/common/type_traits.hh>
14#include <dune/functions/functionspacebases/concepts.hh>
22template<
class ST, ST begin, ST end>
23struct StaticFindInRange
25 template<
class F,
class...Args>
26 static void apply(F&& f, Args&&... args)
28 if (f(std::integral_constant<ST, begin>(), std::forward<Args>(args)...))
30 StaticFindInRange<ST, begin+1, end>::apply(std::forward<F>(f), std::forward<Args>(args)...);
34template<
class ST, ST end>
35struct StaticFindInRange<ST, end, end>
37 template<
class F,
class...Args>
38 static void apply(F&& f, Args&&...)
59template<std::size_t begin_t, std::size_t end_t,
class F,
class... Args>
62 Imp::StaticFindInRange<std::size_t, begin_t, end_t>::apply(std::forward<F>(f), std::forward<Args>(args)...);
Infrastructure for concepts.
void staticFindInRange(F &&f, Args &&... args)
Static find loop.
Definition: staticforloop.hh:60
Dune namespace.
Definition: alignedallocator.hh:13