...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Returns the result type of fold
.
template< typename Sequence, typename State, typename F> struct fold { typedef unspecified type; };
Table 1.46. Parameters
Parameter |
Requirement |
Description |
---|---|---|
|
A model of Forward Sequence |
The sequence to iterate |
|
Any type |
The initial state for the first application of |
|
|
The operation to be applied on traversal |
fold<Sequence, State, F>::type
Return type: Any type
Semantics: Returns the result of applying
fold
to a sequence of type
Sequence
, with an initial
state of type State
and
binary function object or function pointer of type F
.
Linear, exactly
applications of result_of::size
<Sequence>::valueF
.
#include <boost/fusion/algorithm/iteration/fold.hpp> #include <boost/fusion/include/fold.hpp>