]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- | |
3 | Copyright 2012 Eric Niebler | |
4 | ||
5 | Distributed under the Boost | |
6 | Software License, Version 1.0. (See accompanying | |
7 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
8 | --> | |
9 | <header name="boost/proto/functional/std/utility.hpp"> | |
10 | <para>Defines Proto callables <computeroutput><classname>boost::proto::functional::make_pair</classname></computeroutput>, | |
11 | <computeroutput><classname>boost::proto::functional::first</classname></computeroutput> and | |
12 | <computeroutput><classname>boost::proto::functional::second</classname></computeroutput>.</para> | |
13 | ||
14 | <namespace name="boost"> | |
15 | <namespace name="proto"> | |
16 | <namespace name="functional"> | |
17 | ||
18 | <!-- proto::functional::make_pair --> | |
19 | <struct name="make_pair"> | |
20 | <purpose>A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes | |
21 | <computeroutput>std::make_pair()</computeroutput> on its arguments.</purpose> | |
22 | <description> | |
23 | <para> | |
24 | A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes | |
25 | <computeroutput>std::make_pair()</computeroutput> on its arguments.</para> | |
26 | </description> | |
27 | <inherit> | |
28 | <type><classname>proto::callable</classname></type> | |
29 | </inherit> | |
30 | <struct-specialization name="result"> | |
31 | <template> | |
32 | <template-type-parameter name="This"/> | |
33 | <template-type-parameter name="First"/> | |
34 | <template-type-parameter name="Second"/> | |
35 | </template> | |
36 | <specialization> | |
37 | <template-arg>This(First, Second)</template-arg> | |
38 | </specialization> | |
39 | <typedef name="type"> | |
40 | <type>std::pair< | |
41 | typename boost::remove_const<typename boost::remove_reference<First>::type>::type | |
42 | , typename boost::remove_const<typename boost::remove_reference<Second>::type>::type | |
43 | ></type> | |
44 | </typedef> | |
45 | </struct-specialization> | |
46 | <method-group name="public member functions"> | |
47 | <method name="operator()" cv="const"> | |
48 | <type>typename std::pair< First, Second ></type> | |
49 | <template> | |
50 | <template-type-parameter name="First"/> | |
51 | <template-type-parameter name="Second"/> | |
52 | </template> | |
53 | <parameter name="first"> | |
54 | <paramtype>First const &</paramtype> | |
55 | </parameter> | |
56 | <parameter name="second"> | |
57 | <paramtype>Second const &</paramtype> | |
58 | </parameter> | |
59 | <returns> | |
60 | <para><computeroutput>std::make_pair(first, second)</computeroutput></para> | |
61 | </returns> | |
62 | </method> | |
63 | </method-group> | |
64 | </struct> | |
65 | ||
66 | <!-- proto::functional::first --> | |
67 | <struct name="first"> | |
68 | <purpose> | |
69 | A <conceptname>PolymorphicFunctionObject</conceptname> type that returns | |
70 | the first element of a <computeroutput>std::pair<></computeroutput>. | |
71 | </purpose> | |
72 | <description> | |
73 | <para> | |
74 | A <conceptname>PolymorphicFunctionObject</conceptname> type that returns | |
75 | the first element of a <computeroutput>std::pair<></computeroutput>.</para> | |
76 | </description> | |
77 | <inherit><type><classname>proto::callable</classname></type> | |
78 | </inherit> | |
79 | <struct-specialization name="result"> | |
80 | <template> | |
81 | <template-type-parameter name="This"/> | |
82 | <template-type-parameter name="Pair"/> | |
83 | </template> | |
84 | <specialization> | |
85 | <template-arg>This(Pair)</template-arg> | |
86 | </specialization> | |
87 | <typedef name="type"> | |
88 | <type>typename Pair::first_type</type> | |
89 | </typedef> | |
90 | </struct-specialization> | |
91 | <struct-specialization name="result"> | |
92 | <template> | |
93 | <template-type-parameter name="This"/> | |
94 | <template-type-parameter name="Pair"/> | |
95 | </template> | |
96 | <specialization> | |
97 | <template-arg>This(Pair &)</template-arg> | |
98 | </specialization> | |
99 | <typedef name="type"> | |
100 | <type>typename Pair::first_type &</type> | |
101 | </typedef> | |
102 | </struct-specialization> | |
103 | <struct-specialization name="result"> | |
104 | <template> | |
105 | <template-type-parameter name="This"/> | |
106 | <template-type-parameter name="Pair"/> | |
107 | </template> | |
108 | <specialization> | |
109 | <template-arg>This(Pair const &)</template-arg> | |
110 | </specialization> | |
111 | <typedef name="type"> | |
112 | <type>typename Pair::first_type const &</type> | |
113 | </typedef> | |
114 | </struct-specialization> | |
115 | <method-group name="public member functions"> | |
116 | <method name="operator()" cv="const"> | |
117 | <type>typename Pair::first_type &</type> | |
118 | <template> | |
119 | <template-type-parameter name="Pair"/> | |
120 | </template> | |
121 | <parameter name="pair"> | |
122 | <paramtype>Pair &</paramtype> | |
123 | </parameter> | |
124 | <returns> | |
125 | <para> | |
126 | <computeroutput>pair.first</computeroutput> | |
127 | </para> | |
128 | </returns> | |
129 | </method> | |
130 | <method name="operator()" cv="const"> | |
131 | <type>typename Pair::first_type const &</type> | |
132 | <template> | |
133 | <template-type-parameter name="Pair"/> | |
134 | </template> | |
135 | <parameter name="pair"> | |
136 | <paramtype>Pair const &</paramtype> | |
137 | </parameter> | |
138 | <returns> | |
139 | <para> | |
140 | <computeroutput>pair.first</computeroutput> | |
141 | </para> | |
142 | </returns> | |
143 | </method> | |
144 | </method-group> | |
145 | </struct> | |
146 | ||
147 | <!-- proto::functional::second --> | |
148 | <struct name="second"> | |
149 | <purpose> | |
150 | A <conceptname>PolymorphicFunctionObject</conceptname> type that returns | |
151 | the second element of a <computeroutput>std::pair<></computeroutput>. | |
152 | </purpose> | |
153 | <description> | |
154 | <para> | |
155 | A <conceptname>PolymorphicFunctionObject</conceptname> type that returns | |
156 | the second element of a <computeroutput>std::pair<></computeroutput>. | |
157 | </para> | |
158 | </description> | |
159 | <inherit><type><classname>proto::callable</classname></type></inherit> | |
160 | <struct-specialization name="result"> | |
161 | <template> | |
162 | <template-type-parameter name="This"/> | |
163 | <template-type-parameter name="Pair"/> | |
164 | </template> | |
165 | <specialization> | |
166 | <template-arg>This(Pair)</template-arg> | |
167 | </specialization> | |
168 | <typedef name="type"> | |
169 | <type>typename Pair::second_type</type> | |
170 | </typedef> | |
171 | </struct-specialization> | |
172 | <struct-specialization name="result"> | |
173 | <template> | |
174 | <template-type-parameter name="This"/> | |
175 | <template-type-parameter name="Pair"/> | |
176 | </template> | |
177 | <specialization> | |
178 | <template-arg>This(Pair &)</template-arg> | |
179 | </specialization> | |
180 | <typedef name="type"> | |
181 | <type>typename Pair::second_type &</type> | |
182 | </typedef> | |
183 | </struct-specialization> | |
184 | <struct-specialization name="result"> | |
185 | <template> | |
186 | <template-type-parameter name="This"/> | |
187 | <template-type-parameter name="Pair"/> | |
188 | </template> | |
189 | <specialization> | |
190 | <template-arg>This(Pair const &)</template-arg> | |
191 | </specialization> | |
192 | <typedef name="type"> | |
193 | <type>typename Pair::second_type const &</type> | |
194 | </typedef> | |
195 | </struct-specialization> | |
196 | <method-group name="public member functions"> | |
197 | <method name="operator()" cv="const"> | |
198 | <type>typename Pair::second_type &</type> | |
199 | <template> | |
200 | <template-type-parameter name="Pair"/> | |
201 | </template> | |
202 | <parameter name="pair"> | |
203 | <paramtype>Pair &</paramtype> | |
204 | </parameter> | |
205 | <returns> | |
206 | <para> | |
207 | <computeroutput>pair.second</computeroutput> | |
208 | </para> | |
209 | </returns> | |
210 | </method> | |
211 | <method name="operator()" cv="const"> | |
212 | <type>typename Pair::second_type const &</type> | |
213 | <template> | |
214 | <template-type-parameter name="Pair"/> | |
215 | </template> | |
216 | <parameter name="pair"> | |
217 | <paramtype>Pair const &</paramtype> | |
218 | </parameter> | |
219 | <returns> | |
220 | <para> | |
221 | <computeroutput>pair.second</computeroutput> | |
222 | </para> | |
223 | </returns> | |
224 | </method> | |
225 | </method-group> | |
226 | </struct> | |
227 | ||
228 | </namespace> | |
229 | </namespace> | |
230 | </namespace> | |
231 | ||
232 | </header> |