.. Algorithms/Transformation Algorithms//reverse_copy |110 reverse_copy ============ Synopsis -------- .. parsed-literal:: template< typename Sequence , typename In = |unspecified| > struct reverse_copy { typedef |unspecified| type; }; Description ----------- Returns a reversed copy of the original sequence. |transformation algorithm disclaimer| Header ------ .. parsed-literal:: #include Model of -------- |Reversible Algorithm| Parameters ---------- +---------------+-----------------------------------+-------------------------------+ | Parameter | Requirement | Description | +===============+===================================+===============================+ | ``Sequence`` | |Forward Sequence| | A sequence to copy. | +---------------+-----------------------------------+-------------------------------+ | ``In`` | |Inserter| | An inserter. | +---------------+-----------------------------------+-------------------------------+ Expression semantics -------------------- |Semantics disclaimer...| |Reversible Algorithm|. For any |Forward Sequence| ``s``, and an |Inserter| ``in``: .. parsed-literal:: typedef reverse_copy::type r; :Return type: A type. :Semantics: Equivalent to .. parsed-literal:: typedef reverse_fold< s,in::state,in::operation >::type r; Complexity ---------- Linear. Exactly ``size::value`` applications of ``in::operation``. Example ------- .. parsed-literal:: typedef list_c::type numbers; typedef reverse_copy< range_c , front_inserter< numbers > >::type result; BOOST_MPL_ASSERT_RELATION( size::value, ==, 20 ); BOOST_MPL_ASSERT(( equal< result,range_c > )); See also -------- |Transformation Algorithms|, |Reversible Algorithm|, |copy|, |reverse_copy_if|, |reverse_transform|