.working ======= <<<<<<< .working >>>>>>> .merge-right.r57125 ======= >>>>>>> .merge-right.r58299
![]() |
Home | Libraries | People | FAQ | More |
Returns a new sequence with the elements of the original in reverse order.
template< typename Sequence > typename result_of::reverse<Sequence const>::type reverse(Sequence const& seq);
Table 1.61. Parameters
Parameter |
Requirement |
Description |
|---|---|---|
seq |
A model of Bidirectional Sequence |
Operation's argument |
reverse(seq);
<<<<<<< .working Return type: A model of Bidirectional Sequence. ======= Return type: >>>>>>> .merge-right.r57242
seq
is a Bidirectional
Sequence else, Random
Access Sequence if seq
is a Random
Access Sequence.
seq
implements the Associative
Sequence model.
Semantics: Returns a new sequence containing all the elements of seq in reverse order.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/reverse.hpp> #include <boost/fusion/include/reverse.hpp>
assert(reverse(make_vector(1,2,3)) == make_vector(3,2,1));