source:
downloads/boost_1_34_1/libs/mpl/doc/src/refmanual/reverse.rst
@
29
Last change on this file since 29 was 29, checked in by landauf, 17 years ago | |
---|---|
File size: 1.7 KB |
reverse
Synopsis
template< typename Sequence , typename In = |unspecified| > struct reverse { typedef |unspecified| type; };
Description
Returns a reversed copy of the original sequence. reverse is a synonym for |reverse_copy|.
Header
#include <boost/mpl/reverse.hpp>
Parameters
Parameter | Requirement | Description |
---|---|---|
Sequence | |Forward Sequence| | A sequence to reverse. |
In | |Inserter| | An inserter. |
Expression semantics
For any |Forward Sequence| s, and an |Inserter| in:
typedef reverse<s,in>::type r;
Return type: | A type. |
---|---|
Semantics: | Equivalent to typedef reverse_copy<s,in>::type r; |
Complexity
Linear.
Example
typedef vector_c<int,9,8,7,6,5,4,3,2,1,0> numbers; typedef reverse< numbers >::type result; BOOST_MPL_ASSERT(( equal< result, range_c<int,0,10> > ));
Note: See TracBrowser
for help on using the repository browser.