reverse.rst

来自「Boost provides free peer-reviewed portab」· RST 代码 · 共 96 行

RST
96
字号
.. Algorithms/Transformation Algorithms//reverse |100.. Copyright Aleksey Gurtovoy, David Abrahams 2007... Distributed under the Boost.. Software License, Version 1.0. (See accompanying.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)reverse=======Synopsis--------.. parsed-literal::        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|.|transformation algorithm disclaimer|Header------.. parsed-literal::        #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``:.. parsed-literal::    typedef reverse<s,in>::type r; :Return type:    A type.:Semantics:    Equivalent to     .. parsed-literal::            typedef reverse_copy<s,in>::type r; Complexity----------Linear.Example-------.. parsed-literal::        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> > ));See also--------|Transformation Algorithms|, |Reversible Algorithm|, |reverse_copy|, |copy|, |copy_if|

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?