![]() |
Home | Libraries | People | FAQ | More |
Moves an iterator 1 position backwards.
template<
typename I
>
typename result_of::prior
<I>::type prior(I const& i);
Table 1.3. Parameters
Parameter |
Requirement |
Description |
---|---|---|
|
Model of Bidirectional Iterator |
Operation's argument |
prior
(i);
Return type: A model of the same iterator
concept as i
.
Semantics: Returns an iterator to the
element prior to i
.
#include <boost/fusion/iterator/prior.hpp> #include <boost/fusion/include/prior.hpp>
typedefvector
<int,int> vec; vec v(1,2); assert(deref
(next
(begin
(v))) == 2); assert(deref
(prior
(next
(begin
(v)))) == 1);