]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/mpl/doc/src/refmanual/front_inserter.rst
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / mpl / doc / src / refmanual / front_inserter.rst
CommitLineData
7c673cae
FG
1.. Algorithms/Inserters//front_inserter
2
3front_inserter
4==============
5
6Synopsis
7--------
8
9.. parsed-literal::
10
11 template<
12 typename Seq
13 >
14 struct front_inserter
15 {
16 // |unspecified|
17 // |...|
18 };
19
20
21Description
22-----------
23
24Inserts elements at the beginning of the sequence.
25
26Header
27------
28
29.. parsed-literal::
30
31 #include <boost/mpl/front_inserter.hpp>
32
33Model of
34--------
35
36|Inserter|
37
38
39Parameters
40----------
41
42+---------------+-------------------------------+---------------------------------------+
43| Parameter | Requirement | Description |
44+===============+===============================+=======================================+
45| ``Seq`` | |Front Extensible Sequence| | A sequence to bind the inserter to. |
46+---------------+-------------------------------+---------------------------------------+
47
48
49Expression semantics
50--------------------
51
52|Semantics disclaimer...| |Inserter|.
53
54For any |Front Extensible Sequence| ``s``:
55
56+---------------------------+-------------------------------------------------------+
57| Expression | Semantics |
58+===========================+=======================================================+
59| ``front_inserter<s>`` | An |Inserter| ``in``, equivalent to |
60| | |
61| | .. parsed-literal:: |
62| | |
63| | struct in : inserter<s,push_front<_1,_2> > {}; |
64+---------------------------+-------------------------------------------------------+
65
66
67Complexity
68----------
69
70Amortized constant time.
71
72
73Example
74-------
75
76.. parsed-literal::
77
78 typedef reverse_copy<
79 range_c<int,0,5>
80 , front_inserter< vector_c<int,5,6,7,8,9> >
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]|, |back_inserter|, |push_front|
90
91
92