1.. Algorithms/Inserters//back_inserter 2 3back_inserter 4============= 5 6Synopsis 7-------- 8 9.. parsed-literal:: 10 11 template< 12 typename Seq 13 > 14 struct back_inserter 15 { 16 // |unspecified| 17 // |...| 18 }; 19 20 21Description 22----------- 23 24Inserts elements at the end of the sequence. 25 26Header 27------ 28 29.. parsed-literal:: 30 31 #include <boost/mpl/back_inserter.hpp> 32 33Model of 34-------- 35 36|Inserter| 37 38 39Parameters 40---------- 41 42+---------------+-------------------------------+---------------------------------------+ 43| Parameter | Requirement | Description | 44+===============+===============================+=======================================+ 45| ``Seq`` | |Back Extensible Sequence| | A sequence to bind the inserter to. | 46+---------------+-------------------------------+---------------------------------------+ 47 48 49Expression semantics 50-------------------- 51 52|Semantics disclaimer...| |Inserter|. 53 54For any |Back Extensible Sequence| ``s``: 55 56+---------------------------+-------------------------------------------------------+ 57| Expression | Semantics | 58+===========================+=======================================================+ 59| ``back_inserter<s>`` | An |Inserter| ``in``, equivalent to | 60| | | 61| | .. parsed-literal:: | 62| | | 63| | struct in : inserter<s,push_back<_1,_2> > {}; | 64+---------------------------+-------------------------------------------------------+ 65 66 67Complexity 68---------- 69 70Amortized constant time. 71 72 73Example 74------- 75 76.. parsed-literal:: 77 78 typedef copy< 79 range_c<int,5,10> 80 , back_inserter< vector_c<int,0,1,2,3,4> > 81 >::type range; 82 83 BOOST_MPL_ASSERT(( equal< range, range_c<int,0,10> > )); 84 85 86See also 87-------- 88 89|Algorithms|, |Inserter|, |Reversible Algorithm|, |[inserter]|, |front_inserter|, |push_back| 90 91 92.. copyright:: Copyright � 2001-2009 Aleksey Gurtovoy and David Abrahams 93 Distributed under the Boost Software License, Version 1.0. (See accompanying 94 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 95