4#ifndef DUNE_COMMON_FORLOOP_HH
5#define DUNE_COMMON_FORLOOP_HH
20 template<
template<
class,
class >
class Operation,
template<
int >
class Value,
int first,
int last >
22 :
public Operation< Value< first >, GenericForLoop< Operation, Value, first+1, last > >
24 static_assert( (first <= last),
"GenericForLoop: first > last" );
27 template<
template<
class,
class >
class Operation,
template<
int >
class Value,
int last >
28 class GenericForLoop< Operation, Value, last, last >
29 :
public Value< last >
35 namespace ForLoopHelper
38 template<
class A,
class B >
42 template<
typename... Params >
43 static void apply ( Params&&... params )
45 A::apply( std::forward<Params>(params)... );
46 B::apply( std::forward<Params>(params)... );
107 template<
template<
int >
class Operation,
int first,
int last >
109 :
public GenericForLoop< ForLoopHelper::Apply, Operation, first, last >
111 static_assert( (first <= last),
"ForLoop: first > last" );
Dune namespace.
Definition alignment.hh:11
decltype(auto) apply(F &&f, ArgTuple &&args)
Apply function with arguments given as tuple.
Definition apply.hh:54
A static loop using TMP.
Definition forloop.hh:110