]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/mpl/doc/src/refmanual/reverse_remove.rst
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / mpl / doc / src / refmanual / reverse_remove.rst
CommitLineData
7c673cae
FG
1.. Algorithms/Transformation Algorithms//reverse_remove |160
2
3reverse_remove
4==============
5
6Synopsis
7--------
8
9.. parsed-literal::
10
11 template<
12 typename Sequence
13 , typename T
14 , typename In = |unspecified|
15 >
16 struct reverse_remove
17 {
18 typedef |unspecified| type;
19 };
20
21
22
23Description
24-----------
25
26Returns a new sequence that contains all elements from |begin/end<Sequence>|
27range in reverse order except those that are identical to ``T``.
28
29|transformation algorithm disclaimer|
30
31
32Header
33------
34
35.. parsed-literal::
36
37 #include <boost/mpl/remove.hpp>
38
39
40Model of
41--------
42
43|Reversible Algorithm|
44
45
46Parameters
47----------
48
49+---------------+-----------------------------------+-------------------------------+
50| Parameter | Requirement | Description |
51+===============+===================================+===============================+
52| ``Sequence`` | |Forward Sequence| | An original sequence. |
53+---------------+-----------------------------------+-------------------------------+
54| ``T`` | Any type | A type to be removed. |
55+---------------+-----------------------------------+-------------------------------+
56| ``In`` | |Inserter| | An inserter. |
57+---------------+-----------------------------------+-------------------------------+
58
59
60Expression semantics
61--------------------
62
63|Semantics disclaimer...| |Reversible Algorithm|.
64
65For any |Forward Sequence| ``s``, an |Inserter| ``in``, and arbitrary type ``x``:
66
67
68.. parsed-literal::
69
70 typedef reverse_remove<s,x,in>::type r;
71
72:Return type:
73 A type.
74
75:Semantics:
76 Equivalent to
77
78 .. parsed-literal::
79
80 typedef reverse_remove_if< s,is_same<_,x>,in >::type r;
81
82
83Complexity
84----------
85
86Linear. Performs exactly ``size<s>::value`` comparisons for equality, and at
87most ``size<s>::value`` insertions.
88
89
90Example
91-------
92
93.. parsed-literal::
94
95 typedef vector<int,float,char,float,float,double>::type types;
96 typedef reverse_remove< types,float >::type result;
97
98 BOOST_MPL_ASSERT(( equal< result, vector<double,char,int> > ));
99
100
101See also
102--------
103
104|Transformation Algorithms|, |Reversible Algorithm|, |remove|, |reverse_remove_if|,
105|reverse_copy|, |transform|, |replace|
106
107
108