Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work

源代码在线查看: reverse.rst

软件大小: 35482 K
上传用户: sinba
关键词: libraries peer-reviewed emphasize provides
下载地址: 免注册下载 普通下载 VIP

相关代码

				.. 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 												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::type r; 								:Return type:				    A type.								:Semantics:				    Equivalent to 								    .. parsed-literal::				    				        typedef reverse_copy::type r; 												Complexity				----------								Linear.												Example				-------								.. parsed-literal::				    				    typedef vector_c numbers;				    typedef reverse< numbers >::type result;				    				    BOOST_MPL_ASSERT(( equal< result, range_c > ));												See also				--------								|Transformation Algorithms|, |Reversible Algorithm|, |reverse_copy|, |copy|, |copy_if|							

相关资源