Dune Core Modules (2.9.1)
#include <dune/common/tupleutility.hh>
Detailed Description
class Dune::TransformTupleFunctor< TE, Args >
- Template Parameters
-
TE TypeEvaluator class template. An Type of extra arguments to pass to TE<T>::apply()
.void
means "no argument". Only trailing arguments may be void.
This class stores references to a number of arguments it receives in the constructor. Later, its function call operator operator()
may be called with a parameter t
of type T
. operator()
will then call the static method TE<T>::apply(t,args...)
, where args
... is the sequence of arguments the object was constructed with. operator()
will convert the result to type TE<T>::Type
and return it.
TE
should be an extended version of the TypeEvaluator
class template parameter of ForEachType, for instance:
In this example, for the value transformation, it takes a reference to a value of type T and return the pointer to that value, unless the value evaluates to false in boolean context. If the value evaluates to false, it will instead return the pointer from the extra argument.
The documentation for this class was generated from the following file:
- dune/common/tupleutility.hh