2002-09-16 19:25:33 +00:00
<!doctype html public "-//ietf//dtd html//en">
2003-03-12 13:29:12 +00:00
< html >< head >< title > boost::mpl::reverse</ title >
2002-09-16 19:25:33 +00:00
< link rel = "stylesheet" href = "../mpl_wiki.css" >
</ head >< body bgcolor = "white" >
2003-03-12 13:29:12 +00:00
< h1 >< a href = "../Table_of_Contents.html" >< img src = "../mpl_logo.jpg" alt = "[Home]" border = 0 align = "right" ></ a > reverse</ h1 >< h3 > Synopsis</ h3 >
2002-09-16 19:25:33 +00:00
< p >
< pre >
template<
typename Sequence
>
struct reverse
{
typedef < em > implementation-defined</ em > type;
};
</ pre >
< p >
2003-03-12 13:29:12 +00:00
< h3 > Description</ h3 >
2002-09-16 19:25:33 +00:00
< p >
2003-03-12 13:29:12 +00:00
Reverses a sequence. The result sequence preserves all the functional and performance characteristics of the original < code > Sequence</ code > , including its size, but not identity.
2002-09-16 19:25:33 +00:00
< p >
2003-03-12 13:29:12 +00:00
< h3 > Definition</ h3 >
2002-09-16 19:25:33 +00:00
< p >
< pre >
2003-03-12 13:29:12 +00:00
#include "< a href = "../../../../../boost/mpl/reverse.hpp" > boost/mpl/reverse.hpp</ a > "
2002-09-16 19:25:33 +00:00
</ pre >
< p >
2003-03-12 13:29:12 +00:00
< h3 > Parameters</ h3 >
2002-09-16 19:25:33 +00:00
< table border = "1" >
2003-03-12 13:29:12 +00:00
< tr >< th > Parameter </ th >< th > Requirement </ th >< th > Description </ th ></ tr >
< tr >< td >< code > Sequence</ code ></ td >< td > A model of < a href = "../Extensible_Sequence.html" > Extensible Sequence</ a ></ td >< td > The original sequence. </ td ></ tr >
2002-09-16 19:25:33 +00:00
</ table >
< p >
2003-03-12 13:29:12 +00:00
< h3 > Expression semantics</ h3 >
< p >
2002-09-16 19:25:33 +00:00
< table border = "1" >
2003-03-12 13:29:12 +00:00
< tr >< th > Expression </ th >< th > Expression type </ th >< th > Precondition </ th >< th > Semantics </ th >< th > Postcondition </ th ></ tr >
< tr >< td >< code > typedef reverse< Sequence> ::type s;</ code ></ td >< td > A model of < a href = "../Extensible_Sequence.html" > Extensible Sequence</ a ></ td >< td ></ td >< td ></ td >< td >< code > size< s> ::type::value == size< Sequence> ::type::value</ code > . </ td ></ tr >
2002-09-16 19:25:33 +00:00
</ table >
< p >
2003-03-12 13:29:12 +00:00
< h3 > Complexity</ h3 >
2002-09-16 19:25:33 +00:00
< p >
2003-03-12 13:29:12 +00:00
Linear.
2002-09-16 19:25:33 +00:00
< p >
2003-03-12 13:29:12 +00:00
< h3 > Example</ h3 >
2002-09-16 19:25:33 +00:00
< p >
< pre >
2003-03-12 13:29:12 +00:00
typedef < a href = "../Reference/list_c.html" > list_c</ a > < int,9,8,7,6,5,4,3,2,1,0> ::type numbers;
typedef reverse< numbers > ::type result;
< p >
typedef < a href = "../Reference/range_c.html" > range_c</ a > < int,0,10> answer;
BOOST_STATIC_ASSERT((< a href = "../Reference/equal.html" > equal</ a > < result,answer> ::type::value));
2002-09-16 19:25:33 +00:00
</ pre >
< p >
2003-03-12 13:29:12 +00:00
< h3 > See also</ h3 >
2002-09-16 19:25:33 +00:00
< p >
2003-03-12 13:29:12 +00:00
< a href = "../Algorithms.html" > Algorithms</ a > , < code >< a href = "../Reference/transform.html" > transform</ a ></ code > , < code >< a href = "../Reference/remove.html" > remove</ a ></ code > , < code >< a href = "../Reference/remove_if.html" > remove_if</ a ></ code >
2002-09-16 19:25:33 +00:00
< p >< hr >
2003-03-12 13:29:12 +00:00
< a href = "../Table_of_Contents.html" > Table of Contents</ a >< br > Last edited March 10, 2003 6:13 am</ body ></ html >