• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" standalone="yes"?>
2<library-reference><header name="boost/xpressive/basic_regex.hpp">
3<para>Contains the definition of the basic_regex&lt;&gt; class template and its associated helper functions. </para><namespace name="boost">
4<namespace name="xpressive">
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93<function name="swap"><type>void</type><template>
94          <template-type-parameter name="BidiIter"/>
95        </template><parameter name="left"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>The first <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object. </para></description></parameter><parameter name="right"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>The second <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object. </para></description></parameter><purpose>Swaps the contents of two <classname alt="boost::xpressive::basic_regex">basic_regex</classname> objects. </purpose><description><para>
96<note><para>This is a shallow swap that does not do reference tracking. If you embed a <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object by reference in another regular expression and then swap its contents with another <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object, the change will not be visible to the enclosing regular expression. It is done this way to ensure that swap() cannot throw. </para>
97</note>
98
99</para></description><throws><simpara>Will not throw.</simpara></throws></function>
100</namespace>
101</namespace>
102</header>
103<header name="boost/xpressive/match_results.hpp">
104<para>Contains the definition of the match_results type and associated helpers. The match_results type holds the results of a regex_match() or regex_search() operation. </para><namespace name="boost">
105<namespace name="xpressive">
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195</namespace>
196</namespace>
197</header>
198<header name="boost/xpressive/regex_actions.hpp">
199<para>Defines the syntax elements of xpressive's action expressions. </para><namespace name="boost">
200<namespace name="xpressive">
201<struct name="function"><template>
202      <template-type-parameter name="PolymorphicFunctionObject"/>
203    </template><purpose>A unary metafunction that turns an ordinary function object type into the type of a deferred function object for use in xpressive semantic actions. </purpose><description><para>Use <computeroutput><classname alt="boost::xpressive::function">xpressive::function</classname>&lt;&gt;</computeroutput> to turn an ordinary polymorphic function object type into a type that can be used to declare an object for use in xpressive semantic actions.</para><para>For example, the global object <computeroutput>xpressive::push_back</computeroutput> can be used to create deferred actions that have the effect of pushing a value into a container. It is defined with <computeroutput><classname alt="boost::xpressive::function">xpressive::function</classname>&lt;&gt;</computeroutput> as follows:<programlisting language="c++">xpressive::function&lt;xpressive::op::push_back&gt;::type const push_back = {};
204</programlisting>where <computeroutput><classname alt="boost::xpressive::op::push_back">op::push_back</classname></computeroutput> is an ordinary function object that pushes its second argument into its first. Thus defined, <computeroutput>xpressive::push_back</computeroutput> can be used in semantic actions as follows:<programlisting language="c++">namespace xp = boost::xpressive;
205using xp::_;
206std::list&lt;int&gt; result;
207std::string str("1 23 456 7890");
208xp::sregex rx = (+_d)[ xp::push_back(xp::ref(result), xp::as&lt;int&gt;(_) ]
209    &gt;&gt; *(' ' &gt;&gt; (+_d)[ xp::push_back(xp::ref(result), xp::as&lt;int&gt;(_) ) ]);
210</programlisting> </para></description><typedef name="type"><type>proto::terminal&lt; PolymorphicFunctionObject &gt;::type</type></typedef>
211</struct><namespace name="op">
212<struct name="at"><purpose><computeroutput>at</computeroutput> is a PolymorphicFunctionObject for indexing into a sequence </purpose><struct name="result"><template>
213      <template-type-parameter name="Sig"/>
214    </template></struct><struct-specialization name="result"><template>
215      <template-type-parameter name="This"/>
216      <template-type-parameter name="Cont"/>
217      <template-type-parameter name="Idx"/>
218    </template><specialization><template-arg>This(Cont &amp;</template-arg><template-arg>Idx)</template-arg></specialization><typedef name="type"><type>Cont::reference</type></typedef>
219</struct-specialization><struct-specialization name="result"><template>
220      <template-type-parameter name="This"/>
221      <template-type-parameter name="Cont"/>
222      <template-type-parameter name="Idx"/>
223    </template><specialization><template-arg>This(Cont const &amp;</template-arg><template-arg>Idx)</template-arg></specialization><typedef name="type"><type>Cont::const_reference</type></typedef>
224</struct-specialization><struct-specialization name="result"><template>
225      <template-type-parameter name="This"/>
226      <template-type-parameter name="Cont"/>
227      <template-type-parameter name="Idx"/>
228    </template><specialization><template-arg>This(Cont</template-arg><template-arg>Idx)</template-arg></specialization><typedef name="type"><type>Cont::const_reference</type></typedef>
229</struct-specialization><method-group name="public member functions">
230<method name="operator()" cv="const"><type>Cont::reference</type><template>
231          <template-type-parameter name="Cont"/>
232          <template-type-parameter name="Idx"/>
233        </template><parameter name="c"><paramtype>Cont &amp;</paramtype><description><para>The RandomAccessSequence to index into </para></description></parameter><parameter name="idx"><paramtype>Idx</paramtype><description><para>The index </para></description></parameter><description><para>
234
235
236</para></description><requires><para><computeroutput>Cont</computeroutput> is a model of RandomAccessSequence </para>
237</requires><returns><para><computeroutput>c[idx]</computeroutput> </para>
238</returns></method>
239<method name="operator()" cv="const"><type>Cont::const_reference</type><template>
240          <template-type-parameter name="Cont"/>
241          <template-type-parameter name="Idx"/>
242        </template><parameter name="c"><paramtype>Cont const &amp;</paramtype></parameter><parameter name="idx"><paramtype>Idx</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
243</method-group>
244</struct><struct name="back"><purpose><computeroutput>back</computeroutput> is a PolymorphicFunctionObject for fetching the back element of a container. </purpose><struct name="result"><template>
245      <template-type-parameter name="Sig"/>
246    </template></struct><struct-specialization name="result"><template>
247      <template-type-parameter name="This"/>
248      <template-type-parameter name="Sequence"/>
249    </template><specialization><template-arg>This(Sequence)</template-arg></specialization><typedef name="sequence_type"><type>remove_reference&lt; Sequence &gt;::type</type></typedef>
250<typedef name="type"><type>mpl::if_c&lt; is_const&lt; sequence_type &gt;::<classname>value</classname>, typename sequence_type::const_reference, typename sequence_type::reference &gt;::type</type></typedef>
251</struct-specialization><method-group name="public member functions">
252<method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>back</classname>(Sequence &amp;)&gt;::type</type><template>
253          <template-type-parameter name="Sequence"/>
254        </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence from which to fetch the back. </para></description></parameter><description><para>
255
256</para></description><returns><para><computeroutput>seq.back()</computeroutput> </para>
257</returns></method>
258</method-group>
259</struct><struct name="first"><purpose><computeroutput>first</computeroutput> is a PolymorphicFunctionObject for fetching the first element of a pair. </purpose><struct name="result"><template>
260      <template-type-parameter name="Sig"/>
261    </template></struct><struct-specialization name="result"><template>
262      <template-type-parameter name="This"/>
263      <template-type-parameter name="Pair"/>
264    </template><specialization><template-arg>This(Pair)</template-arg></specialization><typedef name="type"><type>remove_reference&lt; Pair &gt;::type::first_type</type></typedef>
265</struct-specialization><method-group name="public member functions">
266<method name="operator()" cv="const"><type>Pair::first_type</type><template>
267          <template-type-parameter name="Pair"/>
268        </template><parameter name="p"><paramtype>Pair const &amp;</paramtype><description><para>The pair from which to fetch the first element. </para></description></parameter><description><para>
269
270</para></description><returns><para><computeroutput>p.first</computeroutput> </para>
271</returns></method>
272</method-group>
273</struct><struct name="front"><purpose><computeroutput>front</computeroutput> is a PolymorphicFunctionObject for fetching the front element of a container. </purpose><struct name="result"><template>
274      <template-type-parameter name="Sig"/>
275    </template></struct><struct-specialization name="result"><template>
276      <template-type-parameter name="This"/>
277      <template-type-parameter name="Sequence"/>
278    </template><specialization><template-arg>This(Sequence)</template-arg></specialization><typedef name="sequence_type"><type>remove_reference&lt; Sequence &gt;::type</type></typedef>
279<typedef name="type"><type>mpl::if_c&lt; is_const&lt; sequence_type &gt;::<classname>value</classname>, typename sequence_type::const_reference, typename sequence_type::reference &gt;::type</type></typedef>
280</struct-specialization><method-group name="public member functions">
281<method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>front</classname>(Sequence &amp;)&gt;::type</type><template>
282          <template-type-parameter name="Sequence"/>
283        </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence from which to fetch the front. </para></description></parameter><description><para>
284
285</para></description><returns><para><computeroutput>seq.front()</computeroutput> </para>
286</returns></method>
287</method-group>
288</struct><struct name="insert"><purpose><computeroutput>insert</computeroutput> is a PolymorphicFunctionObject for inserting a value or a sequence of values into a sequence container, an associative container, or a string. </purpose><struct name="result"><template>
289      <template-type-parameter name="Sig"/>
290    </template><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef>
291</struct><method-group name="public member functions">
292<method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>insert</classname>(Cont &amp;, A0 const &amp;)&gt;::type</type><template>
293          <template-type-parameter name="Cont"/>
294          <template-type-parameter name="A0"/>
295        </template><parameter name="cont"><paramtype>Cont &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
296<method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>insert</classname>(Cont &amp;, A0 const &amp;, A1 const &amp;)&gt;::type</type><template>
297          <template-type-parameter name="Cont"/>
298          <template-type-parameter name="A0"/>
299          <template-type-parameter name="A1"/>
300        </template><parameter name="cont"><paramtype>Cont &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
301<method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>insert</classname>(Cont &amp;, A0 const &amp;, A1 const &amp;, A2 const &amp;)&gt;::type</type><template>
302          <template-type-parameter name="Cont"/>
303          <template-type-parameter name="A0"/>
304          <template-type-parameter name="A1"/>
305          <template-type-parameter name="A2"/>
306        </template><parameter name="cont"><paramtype>Cont &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype></parameter><parameter name="a2"><paramtype>A2 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
307<method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>insert</classname>(Cont &amp;, A0 const &amp;, A1 const &amp;, A2 const &amp;, A3 const &amp;)&gt;::type</type><template>
308          <template-type-parameter name="Cont"/>
309          <template-type-parameter name="A0"/>
310          <template-type-parameter name="A1"/>
311          <template-type-parameter name="A2"/>
312          <template-type-parameter name="A3"/>
313        </template><parameter name="cont"><paramtype>Cont &amp;</paramtype><description><para>The container into which to insert the element(s) </para></description></parameter><parameter name="a0"><paramtype>A0 const &amp;</paramtype><description><para>A value, iterator, or count </para></description></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype><description><para>A value, iterator, string, count, or character </para></description></parameter><parameter name="a2"><paramtype>A2 const &amp;</paramtype><description><para>A value, iterator, or count </para></description></parameter><parameter name="a3"><paramtype>A3 const &amp;</paramtype><description><para>A count </para></description></parameter><description><para>
314
315</para></description><returns><para><itemizedlist>
316<listitem><para>For the form <computeroutput>insert()(cont, a0)</computeroutput>, return <computeroutput>cont.insert(a0)</computeroutput>. </para>
317</listitem>
318<listitem><para>For the form <computeroutput>insert()(cont, a0, a1)</computeroutput>, return <computeroutput>cont.insert(a0, a1)</computeroutput>. </para>
319</listitem>
320<listitem><para>For the form <computeroutput>insert()(cont, a0, a1, a2)</computeroutput>, return <computeroutput>cont.insert(a0, a1, a2)</computeroutput>. </para>
321</listitem>
322<listitem><para>For the form <computeroutput>insert()(cont, a0, a1, a2, a3)</computeroutput>, return <computeroutput>cont.insert(a0, a1, a2, a3)</computeroutput>. </para>
323</listitem>
324</itemizedlist>
325</para>
326</returns></method>
327</method-group>
328</struct><struct name="length"><purpose><computeroutput>length</computeroutput> is a PolymorphicFunctionObject for fetching the length of <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput>. </purpose><struct name="result"><template>
329      <template-type-parameter name="Sig"/>
330    </template></struct><struct-specialization name="result"><template>
331      <template-type-parameter name="This"/>
332      <template-type-parameter name="Sub"/>
333    </template><specialization><template-arg>This(Sub)</template-arg></specialization><typedef name="type"><type>remove_reference&lt; Sub &gt;::type::difference_type</type></typedef>
334</struct-specialization><method-group name="public member functions">
335<method name="operator()" cv="const"><type>Sub::difference_type</type><template>
336          <template-type-parameter name="Sub"/>
337        </template><parameter name="sub"><paramtype>Sub const &amp;</paramtype><description><para>The <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput> object. </para></description></parameter><description><para>
338
339</para></description><returns><para><computeroutput>sub.length()</computeroutput> </para>
340</returns></method>
341</method-group>
342</struct><struct name="make_pair"><purpose><computeroutput><classname alt="boost::xpressive::op::make_pair">make_pair</classname></computeroutput> is a PolymorphicFunctionObject for building a <computeroutput><classname alt="std::pair">std::pair</classname></computeroutput> out of two parameters </purpose><struct name="result"><template>
343      <template-type-parameter name="Sig"/>
344    </template></struct><struct-specialization name="result"><template>
345      <template-type-parameter name="This"/>
346      <template-type-parameter name="First"/>
347      <template-type-parameter name="Second"/>
348    </template><specialization><template-arg>This(First</template-arg><template-arg>Second)</template-arg></specialization><typedef name="first_type"><purpose>For exposition only. </purpose><type>decay&lt; First &gt;::type</type></typedef>
349<typedef name="second_type"><purpose>For exposition only. </purpose><type>decay&lt; Second &gt;::type</type></typedef>
350<typedef name="type"><type><classname>std::pair</classname>&lt; first_type, second_type &gt;</type></typedef>
351</struct-specialization><method-group name="public member functions">
352<method name="operator()" cv="const"><type><classname>std::pair</classname>&lt; First, Second &gt;</type><template>
353          <template-type-parameter name="First"/>
354          <template-type-parameter name="Second"/>
355        </template><parameter name="first"><paramtype>First const &amp;</paramtype><description><para>The first element of the pair </para></description></parameter><parameter name="second"><paramtype>Second const &amp;</paramtype><description><para>The second element of the pair </para></description></parameter><description><para>
356
357</para></description><returns><para><computeroutput>std::make_pair(first, second)</computeroutput> </para>
358</returns></method>
359</method-group>
360</struct><struct name="matched"><purpose><computeroutput>matched</computeroutput> is a PolymorphicFunctionObject for assessing whether a <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput> object matched or not. </purpose><typedef name="result_type"><type>bool</type></typedef>
361<method-group name="public member functions">
362<method name="operator()" cv="const"><type>bool</type><template>
363          <template-type-parameter name="Sub"/>
364        </template><parameter name="sub"><paramtype>Sub const &amp;</paramtype><description><para>The <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput> object. </para></description></parameter><description><para>
365
366</para></description><returns><para><computeroutput>sub.matched</computeroutput> </para>
367</returns></method>
368</method-group>
369</struct><struct name="pop"><purpose><computeroutput>pop</computeroutput> is a PolymorphicFunctionObject for popping an element from a container. </purpose><typedef name="result_type"><type>void</type></typedef>
370<method-group name="public member functions">
371<method name="operator()" cv="const"><type>void</type><template>
372          <template-type-parameter name="Sequence"/>
373        </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence from which to pop. </para></description></parameter><purpose>Equivalent to <computeroutput>seq.pop()</computeroutput>. </purpose><description><para>
374
375</para></description><returns><para><computeroutput>void</computeroutput> </para>
376</returns></method>
377</method-group>
378</struct><struct name="pop_back"><purpose><computeroutput><classname alt="boost::xpressive::op::pop_back">pop_back</classname></computeroutput> is a PolymorphicFunctionObject for popping an element from the back of a container. </purpose><typedef name="result_type"><type>void</type></typedef>
379<method-group name="public member functions">
380<method name="operator()" cv="const"><type>void</type><template>
381          <template-type-parameter name="Sequence"/>
382        </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence from which to pop. </para></description></parameter><purpose>Equivalent to <computeroutput>seq.pop_back()</computeroutput>. </purpose><description><para>
383
384</para></description><returns><para><computeroutput>void</computeroutput> </para>
385</returns></method>
386</method-group>
387</struct><struct name="pop_front"><purpose><computeroutput><classname alt="boost::xpressive::op::pop_front">pop_front</classname></computeroutput> is a PolymorphicFunctionObject for popping an element from the front of a container. </purpose><typedef name="result_type"><type>void</type></typedef>
388<method-group name="public member functions">
389<method name="operator()" cv="const"><type>void</type><template>
390          <template-type-parameter name="Sequence"/>
391        </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence from which to pop. </para></description></parameter><purpose>Equivalent to <computeroutput>seq.pop_front()</computeroutput>. </purpose><description><para>
392
393</para></description><returns><para><computeroutput>void</computeroutput> </para>
394</returns></method>
395</method-group>
396</struct><struct name="push"><purpose><computeroutput>push</computeroutput> is a PolymorphicFunctionObject for pushing an element into a container. </purpose><typedef name="result_type"><type>void</type></typedef>
397<method-group name="public member functions">
398<method name="operator()" cv="const"><type>void</type><template>
399          <template-type-parameter name="Sequence"/>
400          <template-type-parameter name="Value"/>
401        </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence into which the value should be pushed. </para></description></parameter><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to push into the sequence. </para></description></parameter><purpose>Equivalent to <computeroutput>seq.push(val)</computeroutput>. </purpose><description><para>
402
403</para></description><returns><para><computeroutput>void</computeroutput> </para>
404</returns></method>
405</method-group>
406</struct><struct name="push_back"><purpose><computeroutput><classname alt="boost::xpressive::op::push_back">push_back</classname></computeroutput> is a PolymorphicFunctionObject for pushing an element into the back of a container. </purpose><typedef name="result_type"><type>void</type></typedef>
407<method-group name="public member functions">
408<method name="operator()" cv="const"><type>void</type><template>
409          <template-type-parameter name="Sequence"/>
410          <template-type-parameter name="Value"/>
411        </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence into which the value should be pushed. </para></description></parameter><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to push into the sequence. </para></description></parameter><purpose>Equivalent to <computeroutput>seq.push_back(val)</computeroutput>. </purpose><description><para>
412
413</para></description><returns><para><computeroutput>void</computeroutput> </para>
414</returns></method>
415</method-group>
416</struct><struct name="push_front"><purpose><computeroutput><classname alt="boost::xpressive::op::push_front">push_front</classname></computeroutput> is a PolymorphicFunctionObject for pushing an element into the front of a container. </purpose><typedef name="result_type"><type>void</type></typedef>
417<method-group name="public member functions">
418<method name="operator()" cv="const"><type>void</type><template>
419          <template-type-parameter name="Sequence"/>
420          <template-type-parameter name="Value"/>
421        </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence into which the value should be pushed. </para></description></parameter><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to push into the sequence. </para></description></parameter><purpose>Equivalent to <computeroutput>seq.push_front(val)</computeroutput>. </purpose><description><para>
422
423</para></description><returns><para><computeroutput>void</computeroutput> </para>
424</returns></method>
425</method-group>
426</struct><struct name="second"><purpose><computeroutput>second</computeroutput> is a PolymorphicFunctionObject for fetching the second element of a pair. </purpose><struct name="result"><template>
427      <template-type-parameter name="Sig"/>
428    </template></struct><struct-specialization name="result"><template>
429      <template-type-parameter name="This"/>
430      <template-type-parameter name="Pair"/>
431    </template><specialization><template-arg>This(Pair)</template-arg></specialization><typedef name="type"><type>remove_reference&lt; Pair &gt;::type::second_type</type></typedef>
432</struct-specialization><method-group name="public member functions">
433<method name="operator()" cv="const"><type>Pair::second_type</type><template>
434          <template-type-parameter name="Pair"/>
435        </template><parameter name="p"><paramtype>Pair const &amp;</paramtype><description><para>The pair from which to fetch the second element. </para></description></parameter><description><para>
436
437</para></description><returns><para><computeroutput>p.second</computeroutput> </para>
438</returns></method>
439</method-group>
440</struct><struct name="str"><purpose><computeroutput>str</computeroutput> is a PolymorphicFunctionObject for turning a <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput> into an equivalent <computeroutput>std::string</computeroutput>. </purpose><struct name="result"><template>
441      <template-type-parameter name="Sig"/>
442    </template></struct><struct-specialization name="result"><template>
443      <template-type-parameter name="This"/>
444      <template-type-parameter name="Sub"/>
445    </template><specialization><template-arg>This(Sub)</template-arg></specialization><typedef name="type"><type>remove_reference&lt; Sub &gt;::type::string_type</type></typedef>
446</struct-specialization><method-group name="public member functions">
447<method name="operator()" cv="const"><type>Sub::string_type</type><template>
448          <template-type-parameter name="Sub"/>
449        </template><parameter name="sub"><paramtype>Sub const &amp;</paramtype><description><para>The <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput> object. </para></description></parameter><description><para>
450
451</para></description><returns><para><computeroutput>sub.str()</computeroutput> </para>
452</returns></method>
453</method-group>
454</struct><struct name="top"><purpose><computeroutput>top</computeroutput> is a PolymorphicFunctionObject for fetching the top element of a stack. </purpose><struct name="result"><template>
455      <template-type-parameter name="Sig"/>
456    </template></struct><struct-specialization name="result"><template>
457      <template-type-parameter name="This"/>
458      <template-type-parameter name="Sequence"/>
459    </template><specialization><template-arg>This(Sequence)</template-arg></specialization><typedef name="sequence_type"><type>remove_reference&lt; Sequence &gt;::type</type></typedef>
460<typedef name="type"><type>mpl::if_c&lt; is_const&lt; sequence_type &gt;::<classname>value</classname>, typename sequence_type::value_type const &amp;, typename sequence_type::value_type &amp; &gt;::type</type></typedef>
461</struct-specialization><method-group name="public member functions">
462<method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>top</classname>(Sequence &amp;)&gt;::type</type><template>
463          <template-type-parameter name="Sequence"/>
464        </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence from which to fetch the top. </para></description></parameter><description><para>
465
466</para></description><returns><para><computeroutput>seq.top()</computeroutput> </para>
467</returns></method>
468</method-group>
469</struct><struct name="unwrap_reference"><purpose><computeroutput><classname alt="boost::xpressive::op::unwrap_reference">unwrap_reference</classname></computeroutput> is a PolymorphicFunctionObject for unwrapping a <computeroutput>boost::reference_wrapper&lt;&gt;</computeroutput>. </purpose><struct name="result"><template>
470      <template-type-parameter name="Sig"/>
471    </template></struct><struct-specialization name="result"><template>
472      <template-type-parameter name="This"/>
473      <template-type-parameter name="Ref"/>
474    </template><specialization><template-arg>This(Ref &amp;)</template-arg></specialization><typedef name="type"><type>boost::unwrap_reference&lt; Ref &gt;::type &amp;</type></typedef>
475</struct-specialization><struct-specialization name="result"><template>
476      <template-type-parameter name="This"/>
477      <template-type-parameter name="Ref"/>
478    </template><specialization><template-arg>This(Ref)</template-arg></specialization><typedef name="type"><type>boost::unwrap_reference&lt; Ref &gt;::type &amp;</type></typedef>
479</struct-specialization><method-group name="public member functions">
480<method name="operator()" cv="const"><type>T &amp;</type><template>
481          <template-type-parameter name="T"/>
482        </template><parameter name="r"><paramtype>boost::reference_wrapper&lt; T &gt;</paramtype><description><para>The <computeroutput>boost::reference_wrapper&lt;T&gt;</computeroutput> to unwrap. </para></description></parameter><description><para>
483
484</para></description><returns><para><computeroutput>static_cast&lt;T &amp;&gt;(r)</computeroutput> </para>
485</returns></method>
486</method-group>
487</struct></namespace>
488<data-member name="at"><type><classname>function</classname>&lt; <classname>op::at</classname> &gt;::type const</type><purpose><computeroutput>at</computeroutput> is a lazy PolymorphicFunctionObject for indexing into a sequence in an xpressive semantic action. </purpose></data-member>
489<data-member name="push"><type><classname>function</classname>&lt; <classname>op::push</classname> &gt;::type const</type><purpose><computeroutput>push</computeroutput> is a lazy PolymorphicFunctionObject for pushing a value into a container in an xpressive semantic action. </purpose></data-member>
490<data-member name="push_back"><type><classname>function</classname>&lt; <classname>op::push_back</classname> &gt;::type const</type><purpose><computeroutput>push_back</computeroutput> is a lazy PolymorphicFunctionObject for pushing a value into a container in an xpressive semantic action. </purpose></data-member>
491<data-member name="push_front"><type><classname>function</classname>&lt; <classname>op::push_front</classname> &gt;::type const</type><purpose><computeroutput>push_front</computeroutput> is a lazy PolymorphicFunctionObject for pushing a value into a container in an xpressive semantic action. </purpose></data-member>
492<data-member name="pop"><type><classname>function</classname>&lt; <classname>op::pop</classname> &gt;::type const</type><purpose><computeroutput>pop</computeroutput> is a lazy PolymorphicFunctionObject for popping the top element from a sequence in an xpressive semantic action. </purpose></data-member>
493<data-member name="pop_back"><type><classname>function</classname>&lt; <classname>op::pop_back</classname> &gt;::type const</type><purpose><computeroutput>pop_back</computeroutput> is a lazy PolymorphicFunctionObject for popping the back element from a sequence in an xpressive semantic action. </purpose></data-member>
494<data-member name="pop_front"><type><classname>function</classname>&lt; <classname>op::pop_front</classname> &gt;::type const</type><purpose><computeroutput>pop_front</computeroutput> is a lazy PolymorphicFunctionObject for popping the front element from a sequence in an xpressive semantic action. </purpose></data-member>
495<data-member name="top"><type><classname>function</classname>&lt; <classname>op::top</classname> &gt;::type const</type><purpose><computeroutput>top</computeroutput> is a lazy PolymorphicFunctionObject for accessing the top element from a stack in an xpressive semantic action. </purpose></data-member>
496<data-member name="back"><type><classname>function</classname>&lt; <classname>op::back</classname> &gt;::type const</type><purpose><computeroutput>back</computeroutput> is a lazy PolymorphicFunctionObject for fetching the back element of a sequence in an xpressive semantic action. </purpose></data-member>
497<data-member name="front"><type><classname>function</classname>&lt; <classname>op::front</classname> &gt;::type const</type><purpose><computeroutput>front</computeroutput> is a lazy PolymorphicFunctionObject for fetching the front element of a sequence in an xpressive semantic action. </purpose></data-member>
498<data-member name="first"><type><classname>function</classname>&lt; <classname>op::first</classname> &gt;::type const</type><purpose><computeroutput>first</computeroutput> is a lazy PolymorphicFunctionObject for accessing the first element of a <computeroutput><classname alt="std::pair">std::pair</classname>&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
499<data-member name="second"><type><classname>function</classname>&lt; <classname>op::second</classname> &gt;::type const</type><purpose><computeroutput>second</computeroutput> is a lazy PolymorphicFunctionObject for accessing the second element of a <computeroutput><classname alt="std::pair">std::pair</classname>&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
500<data-member name="matched"><type><classname>function</classname>&lt; <classname>op::matched</classname> &gt;::type const</type><purpose><computeroutput>matched</computeroutput> is a lazy PolymorphicFunctionObject for accessing the <computeroutput>matched</computeroutput> member of a <computeroutput><classname alt="boost::xpressive::sub_match">xpressive::sub_match</classname>&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
501<data-member name="length"><type><classname>function</classname>&lt; <classname>op::length</classname> &gt;::type const</type><purpose><computeroutput>length</computeroutput> is a lazy PolymorphicFunctionObject for computing the length of a <computeroutput><classname alt="boost::xpressive::sub_match">xpressive::sub_match</classname>&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
502<data-member name="str"><type><classname>function</classname>&lt; <classname>op::str</classname> &gt;::type const</type><purpose><computeroutput>str</computeroutput> is a lazy PolymorphicFunctionObject for converting a <computeroutput><classname alt="boost::xpressive::sub_match">xpressive::sub_match</classname>&lt;&gt;</computeroutput> to a <computeroutput>std::basic_string&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
503<data-member name="insert"><type><classname>function</classname>&lt; <classname>op::insert</classname> &gt;::type const</type><purpose><computeroutput>insert</computeroutput> is a lazy PolymorphicFunctionObject for inserting a value or a range of values into a sequence in an xpressive semantic action. </purpose></data-member>
504<data-member name="make_pair"><type><classname>function</classname>&lt; <classname>op::make_pair</classname> &gt;::type const</type><purpose><computeroutput>make_pair</computeroutput> is a lazy PolymorphicFunctionObject for making a <computeroutput><classname alt="std::pair">std::pair</classname>&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
505<data-member name="unwrap_reference"><type><classname>function</classname>&lt; <classname>op::unwrap_reference</classname> &gt;::type const</type><purpose><computeroutput>unwrap_reference</computeroutput> is a lazy PolymorphicFunctionObject for unwrapping a <computeroutput>boost::reference_wrapper&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584<function name="as"><type><emphasis>unspecified</emphasis></type><template>
585          <template-type-parameter name="T"><purpose><para>The type to which to lexically cast the parameter. </para></purpose></template-type-parameter>
586          <template-type-parameter name="A"/>
587        </template><parameter name="a"><paramtype>A const &amp;</paramtype><description><para>The lazy value to lexically cast. </para></description></parameter><purpose><computeroutput>as()</computeroutput> is a lazy funtion for lexically casting a parameter to a different type. </purpose><description><para>
588
589
590</para></description><returns><para>A lazy object that, when evaluated, lexically casts its argument to the desired type. </para>
591</returns></function>
592<function name="static_cast_"><type><emphasis>unspecified</emphasis></type><template>
593          <template-type-parameter name="T"><purpose><para>The type to which to statically cast the parameter. </para></purpose></template-type-parameter>
594          <template-type-parameter name="A"/>
595        </template><parameter name="a"><paramtype>A const &amp;</paramtype><description><para>The lazy value to statically cast. </para></description></parameter><purpose><computeroutput>static_cast_</computeroutput> is a lazy funtion for statically casting a parameter to a different type. </purpose><description><para>
596
597
598</para></description><returns><para>A lazy object that, when evaluated, statically casts its argument to the desired type. </para>
599</returns></function>
600<function name="dynamic_cast_"><type><emphasis>unspecified</emphasis></type><template>
601          <template-type-parameter name="T"><purpose><para>The type to which to dynamically cast the parameter. </para></purpose></template-type-parameter>
602          <template-type-parameter name="A"/>
603        </template><parameter name="a"><paramtype>A const &amp;</paramtype><description><para>The lazy value to dynamically cast. </para></description></parameter><purpose><computeroutput>dynamic_cast_</computeroutput> is a lazy funtion for dynamically casting a parameter to a different type. </purpose><description><para>
604
605
606</para></description><returns><para>A lazy object that, when evaluated, dynamically casts its argument to the desired type. </para>
607</returns></function>
608<function name="const_cast_"><type><emphasis>unspecified</emphasis></type><template>
609          <template-type-parameter name="T"><purpose><para>The type to which to const-cast the parameter. </para></purpose></template-type-parameter>
610          <template-type-parameter name="A"/>
611        </template><parameter name="a"><paramtype>A const &amp;</paramtype><description><para>The lazy value to const-cast. </para></description></parameter><purpose><computeroutput>dynamic_cast_</computeroutput> is a lazy funtion for const-casting a parameter to a different type. </purpose><description><para>
612
613
614</para></description><returns><para>A lazy object that, when evaluated, const-casts its argument to the desired type. </para>
615</returns></function>
616<function name="val"><type><classname>value</classname>&lt; T &gt; const</type><template>
617          <template-type-parameter name="T"/>
618        </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter><purpose>Helper for constructing <computeroutput>value&lt;&gt;</computeroutput> objects. </purpose><description><para>
619</para></description><returns><para><computeroutput>value&lt;T&gt;(t)</computeroutput> </para>
620</returns></function>
621<function name="ref"><type><classname>reference</classname>&lt; T &gt; const</type><template>
622          <template-type-parameter name="T"/>
623        </template><parameter name="t"><paramtype>T &amp;</paramtype></parameter><purpose>Helper for constructing <computeroutput>reference&lt;&gt;</computeroutput> objects. </purpose><description><para>
624</para></description><returns><para><computeroutput>reference&lt;T&gt;(t)</computeroutput> </para>
625</returns></function>
626<function name="cref"><type><classname>reference</classname>&lt; T const  &gt; const</type><template>
627          <template-type-parameter name="T"/>
628        </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter><purpose>Helper for constructing <computeroutput>reference&lt;&gt;</computeroutput> objects that store a reference to const. </purpose><description><para>
629</para></description><returns><para><computeroutput>reference&lt;T const&gt;(t)</computeroutput> </para>
630</returns></function>
631<function name="check"><type><emphasis>unspecified</emphasis></type><template>
632          <template-type-parameter name="T"/>
633        </template><parameter name="t"><paramtype>T const &amp;</paramtype><description><para>The UnaryPredicate object or Boolean semantic action.</para></description></parameter><purpose>For adding user-defined assertions to your regular expressions. </purpose><description><para>
634A <link linkend="boost_xpressive.user_s_guide.semantic_actions_and_user_defined_assertions.user_defined_assertions">user-defined assertion</link> is a kind of semantic action that evaluates a Boolean lambda and, if it evaluates to false, causes the match to fail at that location in the string. This will cause backtracking, so the match may ultimately succeed.</para><para>To use <computeroutput>check()</computeroutput> to specify a user-defined assertion in a regex, use the following syntax:<programlisting language="c++">sregex s = (_d &gt;&gt; _d)[check( XXX )]; // XXX is a custom assertion
635</programlisting>The assertion is evaluated with a <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> object that delineates what part of the string matched the sub-expression to which the assertion was attached.</para><para><computeroutput>check()</computeroutput> can be used with an ordinary predicate that takes a <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> object as follows:<programlisting language="c++">// A predicate that is true IFF a sub-match is
636// either 3 or 6 characters long.
637struct three_or_six
638{
639    bool operator()(ssub_match const &amp;sub) const
640    {
641        return sub.length() == 3 || sub.length() == 6;
642    }
643};
644
645// match words of 3 characters or 6 characters.
646sregex rx = (bow &gt;&gt; +_w &gt;&gt; eow)[ check(three_or_six()) ] ;
647</programlisting>Alternately, <computeroutput>check()</computeroutput> can be used to define inline custom assertions with the same syntax as is used to define semantic actions. The following code is equivalent to above:<programlisting language="c++">// match words of 3 characters or 6 characters.
648sregex rx = (bow &gt;&gt; +_w &gt;&gt; eow)[ check(length(_)==3 || length(_)==6) ] ;
649</programlisting>Within a custom assertion, <computeroutput>_</computeroutput> is a placeholder for the <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> That delineates the part of the string matched by the sub-expression to which the custom assertion was attached. </para></description></function>
650<function name="let"><type><emphasis>unspecified</emphasis></type><template>
651          <template-nontype-parameter name="ArgBindings"><type>typename...</type></template-nontype-parameter>
652        </template><parameter name="args"><paramtype>ArgBindings const &amp;...</paramtype><description><para>A set of argument bindings, where each argument binding is an assignment expression, the left hand side of which must be an instance of <computeroutput>placeholder&lt;X&gt;</computeroutput> for some <computeroutput>X</computeroutput>, and the right hand side is an lvalue of type <computeroutput>X</computeroutput>.</para></description></parameter><purpose>For binding local variables to placeholders in semantic actions when constructing a <computeroutput><classname alt="boost::xpressive::regex_iterator">regex_iterator</classname></computeroutput> or a <computeroutput><classname alt="boost::xpressive::regex_token_iterator">regex_token_iterator</classname></computeroutput>. </purpose><description><para>
653<computeroutput>xpressive::let()</computeroutput> serves the same purpose as <computeroutput>match_results::let()</computeroutput>; that is, it binds a placeholder to a local value. The purpose is to allow a regex with semantic actions to be defined that refers to objects that do not yet exist. Rather than referring directly to an object, a semantic action can refer to a placeholder, and the value of the placeholder can be specified later with a <emphasis>let expression</emphasis>. The <emphasis>let expression</emphasis> created with <computeroutput>let()</computeroutput> is passed to the constructor of either <computeroutput><classname alt="boost::xpressive::regex_iterator">regex_iterator</classname></computeroutput> or <computeroutput><classname alt="boost::xpressive::regex_token_iterator">regex_token_iterator</classname></computeroutput>.</para><para>See the section <link linkend="boost_xpressive.user_s_guide.semantic_actions_and_user_defined_assertions.referring_to_non_local_variables"> "Referring to Non-Local Variables"</link> in the Users' Guide for more discussion.</para><para><emphasis>Example:@code</emphasis>  // Define a placeholder for a map object: placeholder&lt;std::map&lt;std::string, int&gt; &gt; _map;</para><para>// Match a word and an integer, separated by =&gt;, // and then stuff the result into a std::map&lt;&gt; sregex pair = ( (s1= +_w) &gt;&gt; "=&gt;" &gt;&gt; (s2= +_d) ) [ _map[s1] = as&lt;int&gt;(s2) ];</para><para>// The string to parse std::string str("aaa=&gt;1 bbb=&gt;23 ccc=&gt;456");</para><para>// Here is the actual map to fill in: std::map&lt;std::string, int&gt; result;</para><para>// Create a <classname alt="boost::xpressive::regex_iterator">regex_iterator</classname> to find all the matches sregex_iterator it(str.begin(), str.end(), pair, let(_map=result)); sregex_iterator end;</para><para>// step through all the matches, and fill in // the result map while(it != end) ++it;</para><para>std::cout &lt;&lt; result["aaa"] &lt;&lt; '<sbr/>
654'; std::cout &lt;&lt; result["bbb"] &lt;&lt; '<sbr/>
655'; std::cout &lt;&lt; result["ccc"] &lt;&lt; '<sbr/>
656'; \endcodeThe above code displays:<programlisting language="c++">1
65723
658456
659</programlisting> </para></description></function>
660<function name="construct"><type><emphasis>unspecified</emphasis></type><template>
661          <template-type-parameter name="T"><purpose><para>The type of object to construct. </para></purpose></template-type-parameter>
662          <template-nontype-parameter name="Args"><type>typename ...</type></template-nontype-parameter>
663        </template><parameter name="args"><paramtype>Args const &amp;...</paramtype><description><para>The arguments to the constructor. </para></description></parameter><purpose>A lazy funtion for constructing objects objects of the specified type. </purpose><description><para>
664
665
666</para></description><returns><para>A lazy object that, when evaluated, returns <computeroutput>T(xs...)</computeroutput>, where <computeroutput>xs...</computeroutput> is the result of evaluating the lazy arguments <computeroutput>args...</computeroutput>. </para>
667</returns></function>
668
669</namespace>
670</namespace>
671</header>
672<header name="boost/xpressive/regex_algorithms.hpp">
673<para>Contains the regex_match(), regex_search() and regex_replace() algorithms. </para><namespace name="boost">
674<namespace name="xpressive">
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729<overloaded-function name="regex_match"><signature><type>bool</type><template>
730          <template-type-parameter name="BidiIter"/>
731        </template><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the sequence. </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the sequence. </para></description></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>The <computeroutput><classname alt="boost::xpressive::match_results">match_results</classname></computeroutput> struct into which the sub_matches will be written </para></description></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regular expression object to use </para></description></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default><description><para>Optional match flags, used to control how the expression is matched against the sequence. (See <computeroutput>match_flag_type</computeroutput>.) </para></description></parameter></signature><signature><type>bool</type><template>
732          <template-type-parameter name="BidiIter"/>
733        </template><parameter name="begin"><paramtype>BidiIter</paramtype></parameter><parameter name="end"><paramtype>BidiIter</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>bool</type><template>
734          <template-type-parameter name="Char"/>
735        </template><parameter name="begin"><paramtype>Char *</paramtype></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; Char * &gt; &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; Char * &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>bool</type><template>
736          <template-type-parameter name="BidiRange"/>
737          <template-type-parameter name="BidiIter"/>
738        </template><parameter name="rng"><paramtype>BidiRange &amp;</paramtype></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>bool</type><template>
739          <template-type-parameter name="BidiRange"/>
740          <template-type-parameter name="BidiIter"/>
741        </template><parameter name="rng"><paramtype>BidiRange const &amp;</paramtype></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>bool</type><template>
742          <template-type-parameter name="Char"/>
743        </template><parameter name="begin"><paramtype>Char *</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; Char * &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>bool</type><template>
744          <template-type-parameter name="BidiRange"/>
745          <template-type-parameter name="BidiIter"/>
746        </template><parameter name="rng"><paramtype>BidiRange &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>bool</type><template>
747          <template-type-parameter name="BidiRange"/>
748          <template-type-parameter name="BidiIter"/>
749        </template><parameter name="rng"><paramtype>BidiRange const &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><purpose>See if a regex matches a sequence from beginning to end. </purpose><description><para>Determines whether there is an exact match between the regular expression <computeroutput>re</computeroutput>, and all of the sequence <computeroutput>[begin, end)</computeroutput>.</para><para>
750
751
752
753
754</para></description><requires><para>Type <computeroutput>BidiIter</computeroutput> meets the requirements of a Bidirectional Iterator (24.1.4). </para>
755</requires><requires><para><computeroutput>[begin,end)</computeroutput> denotes a valid iterator range. </para>
756</requires><returns><para><computeroutput>true</computeroutput> if a match is found, <computeroutput>false</computeroutput> otherwise </para>
757</returns><throws><simpara><classname>regex_error</classname> on stack exhaustion </simpara></throws></overloaded-function>
758
759
760
761
762
763
764
765<overloaded-function name="regex_search"><signature><type>bool</type><template>
766          <template-type-parameter name="BidiIter"/>
767        </template><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the sequence </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the sequence </para></description></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>The <computeroutput><classname alt="boost::xpressive::match_results">match_results</classname></computeroutput> struct into which the sub_matches will be written </para></description></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regular expression object to use </para></description></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default><description><para>Optional match flags, used to control how the expression is matched against the sequence. (See <computeroutput>match_flag_type</computeroutput>.) </para></description></parameter></signature><signature><type>bool</type><template>
768          <template-type-parameter name="BidiIter"/>
769        </template><parameter name="begin"><paramtype>BidiIter</paramtype></parameter><parameter name="end"><paramtype>BidiIter</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>bool</type><template>
770          <template-type-parameter name="Char"/>
771        </template><parameter name="begin"><paramtype>Char *</paramtype></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; Char * &gt; &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; Char * &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>bool</type><template>
772          <template-type-parameter name="BidiRange"/>
773          <template-type-parameter name="BidiIter"/>
774        </template><parameter name="rng"><paramtype>BidiRange &amp;</paramtype></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>bool</type><template>
775          <template-type-parameter name="BidiRange"/>
776          <template-type-parameter name="BidiIter"/>
777        </template><parameter name="rng"><paramtype>BidiRange const &amp;</paramtype></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>bool</type><template>
778          <template-type-parameter name="Char"/>
779        </template><parameter name="begin"><paramtype>Char *</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; Char * &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>bool</type><template>
780          <template-type-parameter name="BidiRange"/>
781          <template-type-parameter name="BidiIter"/>
782        </template><parameter name="rng"><paramtype>BidiRange &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>bool</type><template>
783          <template-type-parameter name="BidiRange"/>
784          <template-type-parameter name="BidiIter"/>
785        </template><parameter name="rng"><paramtype>BidiRange const &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><purpose>Determines whether there is some sub-sequence within <computeroutput>[begin,end)</computeroutput> that matches the regular expression <computeroutput>re</computeroutput>. </purpose><description><para>Determines whether there is some sub-sequence within <computeroutput>[begin,end)</computeroutput> that matches the regular expression <computeroutput>re</computeroutput>.</para><para>
786
787
788
789
790</para></description><requires><para>Type <computeroutput>BidiIter</computeroutput> meets the requirements of a Bidirectional Iterator (24.1.4). </para>
791</requires><requires><para><computeroutput>[begin,end)</computeroutput> denotes a valid iterator range. </para>
792</requires><returns><para><computeroutput>true</computeroutput> if a match is found, <computeroutput>false</computeroutput> otherwise </para>
793</returns><throws><simpara><classname>regex_error</classname> on stack exhaustion </simpara></throws></overloaded-function>
794
795
796
797
798
799
800
801<overloaded-function name="regex_replace"><signature><type>OutIter</type><template>
802          <template-type-parameter name="OutIter"/>
803          <template-type-parameter name="BidiIter"/>
804          <template-type-parameter name="Formatter"/>
805        </template><parameter name="out"><paramtype>OutIter</paramtype><description><para>An output iterator into which the output sequence is written. </para></description></parameter><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the input sequence. </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the input sequence. </para></description></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regular expression object to use. </para></description></parameter><parameter name="format"><paramtype>Formatter const &amp;</paramtype><description><para>The format string used to format the replacement sequence, or a formatter function, function object, or expression. </para></description></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default><description><para>Optional match flags, used to control how the expression is matched against the sequence. (See <computeroutput>match_flag_type</computeroutput>.) </para></description></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>OutIter</type><template>
806          <template-type-parameter name="OutIter"/>
807          <template-type-parameter name="BidiIter"/>
808        </template><parameter name="out"><paramtype>OutIter</paramtype></parameter><parameter name="begin"><paramtype>BidiIter</paramtype></parameter><parameter name="end"><paramtype>BidiIter</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>BidiContainer</type><template>
809          <template-type-parameter name="BidiContainer"/>
810          <template-type-parameter name="BidiIter"/>
811          <template-type-parameter name="Formatter"/>
812        </template><parameter name="str"><paramtype>BidiContainer &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>Formatter const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>BidiContainer</type><template>
813          <template-type-parameter name="BidiContainer"/>
814          <template-type-parameter name="BidiIter"/>
815          <template-type-parameter name="Formatter"/>
816        </template><parameter name="str"><paramtype>BidiContainer const &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>Formatter const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>std::basic_string&lt; typename remove_const&lt; Char &gt;::type &gt;</type><template>
817          <template-type-parameter name="Char"/>
818          <template-type-parameter name="Formatter"/>
819        </template><parameter name="str"><paramtype>Char *</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; Char * &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>Formatter const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>BidiContainer</type><template>
820          <template-type-parameter name="BidiContainer"/>
821          <template-type-parameter name="BidiIter"/>
822        </template><parameter name="str"><paramtype>BidiContainer &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>BidiContainer</type><template>
823          <template-type-parameter name="BidiContainer"/>
824          <template-type-parameter name="BidiIter"/>
825        </template><parameter name="str"><paramtype>BidiContainer const &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>std::basic_string&lt; typename remove_const&lt; Char &gt;::type &gt;</type><template>
826          <template-type-parameter name="Char"/>
827        </template><parameter name="str"><paramtype>Char *</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; Char * &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>typename add_const&lt; Char &gt;::type *</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><purpose>Build an output sequence given an input sequence, a regex, and a format string or a formatter object, function, or expression. </purpose><description><para>Constructs a <computeroutput><classname alt="boost::xpressive::regex_iterator">regex_iterator</classname></computeroutput> object: <computeroutput><classname alt="boost::xpressive::regex_iterator">regex_iterator</classname>&lt; BidiIter &gt; i(begin, end, re, flags)</computeroutput>, and uses <computeroutput>i</computeroutput> to enumerate through all of the matches m of type <computeroutput><classname alt="boost::xpressive::match_results">match_results</classname>&lt; BidiIter &gt;</computeroutput> that occur within the sequence <computeroutput>[begin, end)</computeroutput>. If no such matches are found and <computeroutput>!(flags &amp; format_no_copy)</computeroutput> then calls <computeroutput>std::copy(begin, end, out)</computeroutput>. Otherwise, for each match found, if <computeroutput>!(flags &amp; format_no_copy)</computeroutput> calls <computeroutput>std::copy(m.prefix().first, m.prefix().second, out)</computeroutput>, and then calls <computeroutput>m.format(out, format, flags)</computeroutput>. Finally if <computeroutput>!(flags &amp; format_no_copy)</computeroutput> calls <computeroutput>std::copy(last_m.suffix().first, last_m.suffix().second, out)</computeroutput> where <computeroutput>last_m</computeroutput> is a copy of the last match found.</para><para>If <computeroutput>flags &amp; format_first_only</computeroutput> is non-zero then only the first match found is replaced.</para><para>
828
829
830
831
832
833
834</para></description><requires><para>Type <computeroutput>BidiIter</computeroutput> meets the requirements of a Bidirectional Iterator (24.1.4). </para>
835</requires><requires><para>Type <computeroutput>OutIter</computeroutput> meets the requirements of an Output Iterator (24.1.2). </para>
836</requires><requires><para>Type <computeroutput>Formatter</computeroutput> models <computeroutput>ForwardRange</computeroutput>, <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt; &gt;</computeroutput>, <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt;, OutIter&gt;</computeroutput>, or <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt;, OutIter, regex_constants::match_flag_type&gt;</computeroutput>; or else it is a null-terminated format string, or an expression template representing a formatter lambda expression. </para>
837</requires><requires><para><computeroutput>[begin,end)</computeroutput> denotes a valid iterator range. </para>
838</requires><returns><para>The value of the output iterator after the output sequence has been written to it. </para>
839</returns><throws><simpara><classname>regex_error</classname> on stack exhaustion or invalid format string. </simpara></throws></overloaded-function>
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858</namespace>
859</namespace>
860</header>
861<header name="boost/xpressive/regex_compiler.hpp">
862<para>Contains the definition of regex_compiler, a factory for building regex objects from strings. </para><namespace name="boost">
863<namespace name="xpressive">
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953</namespace>
954</namespace>
955</header>
956<header name="boost/xpressive/regex_constants.hpp">
957<para>Contains definitions for the syntax_option_type, match_flag_type and error_type enumerations. </para><namespace name="boost">
958<namespace name="xpressive">
959<namespace name="regex_constants">
960<enum name="syntax_option_type"><enumvalue name="ECMAScript"><default>= 0</default><description><para>Specifies that the grammar recognized by the regular expression engine uses its normal semantics: that is the same as that given in the ECMA-262, ECMAScript Language Specification, Chapter 15 part 10, RegExp (Regular Expression) Objects (FWD.1). </para></description></enumvalue><enumvalue name="icase"><default>= 1 &lt;&lt; 1</default><description><para>Specifies that matching of regular expressions against a character container sequence shall be performed without regard to case. </para></description></enumvalue><enumvalue name="nosubs"><default>= 1 &lt;&lt; 2</default><description><para>Specifies that when a regular expression is matched against a character container sequence, then no sub-expression matches are to be stored in the supplied <classname alt="boost::xpressive::match_results">match_results</classname> structure. </para></description></enumvalue><enumvalue name="optimize"><default>= 1 &lt;&lt; 3</default><description><para>Specifies that the regular expression engine should pay more attention to the speed with which regular expressions are matched, and less to the speed with which regular expression objects are constructed. Otherwise it has no detectable effect on the program output. </para></description></enumvalue><enumvalue name="collate"><default>= 1 &lt;&lt; 4</default><description><para>Specifies that character ranges of the form "[a-b]" should be locale sensitive. </para></description></enumvalue><enumvalue name="single_line"><default>= 1 &lt;&lt; 10</default><description><para>Specifies that the ^ and $ metacharacters DO NOT match at internal line breaks. Note that this is the opposite of the perl default. It is the inverse of perl's /m (multi-line) modifier. </para></description></enumvalue><enumvalue name="not_dot_null"><default>= 1 &lt;&lt; 11</default><description><para>Specifies that the . metacharacter does not match the null character \0. </para></description></enumvalue><enumvalue name="not_dot_newline"><default>= 1 &lt;&lt; 12</default><description><para>Specifies that the . metacharacter does not match the newline character \n. </para></description></enumvalue><enumvalue name="ignore_white_space"><default>= 1 &lt;&lt; 13</default><description><para>Specifies that non-escaped white-space is not significant. </para></description></enumvalue><description><para>Flags used to customize the regex syntax </para></description></enum>
961<enum name="match_flag_type"><enumvalue name="match_default"><default>= 0</default><description><para>Specifies that matching of regular expressions proceeds without any modification of the normal rules used in ECMA-262, ECMAScript Language Specification, Chapter 15 part 10, RegExp (Regular Expression) Objects (FWD.1) </para></description></enumvalue><enumvalue name="match_not_bol"><default>= 1 &lt;&lt; 1</default><description><para>Specifies that the expression "^" should not be matched against the sub-sequence [first,first). </para></description></enumvalue><enumvalue name="match_not_eol"><default>= 1 &lt;&lt; 2</default><description><para>Specifies that the expression "\$" should not be matched against the sub-sequence [last,last). </para></description></enumvalue><enumvalue name="match_not_bow"><default>= 1 &lt;&lt; 3</default><description><para>Specifies that the expression "\\b" should not be matched against the sub-sequence [first,first). </para></description></enumvalue><enumvalue name="match_not_eow"><default>= 1 &lt;&lt; 4</default><description><para>Specifies that the expression "\\b" should not be matched against the sub-sequence [last,last). </para></description></enumvalue><enumvalue name="match_any"><default>= 1 &lt;&lt; 7</default><description><para>Specifies that if more than one match is possible then any match is an acceptable result. </para></description></enumvalue><enumvalue name="match_not_null"><default>= 1 &lt;&lt; 8</default><description><para>Specifies that the expression can not be matched against an empty sequence. </para></description></enumvalue><enumvalue name="match_continuous"><default>= 1 &lt;&lt; 10</default><description><para>Specifies that the expression must match a sub-sequence that begins at first. </para></description></enumvalue><enumvalue name="match_partial"><default>= 1 &lt;&lt; 11</default><description><para>Specifies that if no match can be found, then it is acceptable to return a match [from, last) where from != last, if there exists some sequence of characters [from,to) of which [from,last) is a prefix, and which would result in a full match. </para></description></enumvalue><enumvalue name="match_prev_avail"><default>= 1 &lt;&lt; 12</default><description><para>Specifies that –first is a valid iterator position, when this flag is set then the flags match_not_bol and match_not_bow are ignored by the regular expression algorithms (RE.7) and iterators (RE.8). </para></description></enumvalue><enumvalue name="format_default"><default>= 0</default><description><para>Specifies that when a regular expression match is to be replaced by a new string, that the new string is constructed using the rules used by the ECMAScript replace function in ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11 String.prototype.replace. (FWD.1). In addition during search and replace operations then all non-overlapping occurrences of the regular expression are located and replaced, and sections of the input that did not match the expression, are copied unchanged to the output string. </para></description></enumvalue><enumvalue name="format_sed"><default>= 1 &lt;&lt; 13</default><description><para>Specifies that when a regular expression match is to be replaced by a new string, that the new string is constructed using the rules used by the Unix sed utility in IEEE Std 1003.1-2001, Portable Operating SystemInterface (POSIX), Shells and Utilities. </para></description></enumvalue><enumvalue name="format_perl"><default>= 1 &lt;&lt; 14</default><description><para>Specifies that when a regular expression match is to be replaced by a new string, that the new string is constructed using an implementation defined superset of the rules used by the ECMAScript replace function in ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11 String.prototype.replace (FWD.1). </para></description></enumvalue><enumvalue name="format_no_copy"><default>= 1 &lt;&lt; 15</default><description><para>When specified during a search and replace operation, then sections of the character container sequence being searched that do match the regular expression, are not copied to the output string. </para></description></enumvalue><enumvalue name="format_first_only"><default>= 1 &lt;&lt; 16</default><description><para>When specified during a search and replace operation, then only the first occurrence of the regular expression is replaced. </para></description></enumvalue><enumvalue name="format_literal"><default>= 1 &lt;&lt; 17</default><description><para>Treat the format string as a literal. </para></description></enumvalue><enumvalue name="format_all"><default>= 1 &lt;&lt; 18</default><description><para>Specifies that all syntax extensions are enabled, including conditional (?ddexpression1:expression2) replacements. </para></description></enumvalue><description><para>Flags used to customize the behavior of the regex algorithms </para></description></enum>
962<enum name="error_type"><enumvalue name="error_collate"><description><para>The expression contained an invalid collating element name. </para></description></enumvalue><enumvalue name="error_ctype"><description><para>The expression contained an invalid character class name. </para></description></enumvalue><enumvalue name="error_escape"><description><para>The expression contained an invalid escaped character, or a trailing escape. </para></description></enumvalue><enumvalue name="error_subreg"><description><para>The expression contained an invalid back-reference. </para></description></enumvalue><enumvalue name="error_brack"><description><para>The expression contained mismatched [ and ]. </para></description></enumvalue><enumvalue name="error_paren"><description><para>The expression contained mismatched ( and ). </para></description></enumvalue><enumvalue name="error_brace"><description><para>The expression contained mismatched { and }. </para></description></enumvalue><enumvalue name="error_badbrace"><description><para>The expression contained an invalid range in a {} expression. </para></description></enumvalue><enumvalue name="error_range"><description><para>The expression contained an invalid character range, for example [b-a]. </para></description></enumvalue><enumvalue name="error_space"><description><para>There was insufficient memory to convert the expression into a finite state machine. </para></description></enumvalue><enumvalue name="error_badrepeat"><description><para>One of *?+{ was not preceded by a valid regular expression. </para></description></enumvalue><enumvalue name="error_complexity"><description><para>The complexity of an attempted match against a regular expression exceeded a pre-set level. </para></description></enumvalue><enumvalue name="error_stack"><description><para>There was insufficient memory to determine whether the regular expression could match the specified character sequence. </para></description></enumvalue><enumvalue name="error_badref"><description><para>An nested regex is uninitialized. </para></description></enumvalue><enumvalue name="error_badmark"><description><para>An invalid use of a named capture. </para></description></enumvalue><enumvalue name="error_badlookbehind"><description><para>An attempt to create a variable-width look-behind assertion was detected. </para></description></enumvalue><enumvalue name="error_badrule"><description><para>An invalid use of a rule was detected. </para></description></enumvalue><enumvalue name="error_badarg"><description><para>An argument to an action was unbound. </para></description></enumvalue><enumvalue name="error_badattr"><description><para>Tried to read from an uninitialized attribute. </para></description></enumvalue><enumvalue name="error_internal"><description><para>An internal error has occurred. </para></description></enumvalue><description><para>Error codes used by the <classname alt="boost::xpressive::regex_error">regex_error</classname> type </para></description></enum>
963</namespace>
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053</namespace>
1054</namespace>
1055</header>
1056<header name="boost/xpressive/regex_error.hpp">
1057<para>Contains the definition of the regex_error exception class. </para><namespace name="boost">
1058<namespace name="xpressive">
1059<struct name="regex_error"><inherit access="public">std::runtime_error</inherit><inherit access="public">exception</inherit><purpose>The class <classname alt="boost::xpressive::regex_error">regex_error</classname> defines the type of objects thrown as exceptions to report errors during the conversion from a string representing a regular expression to a finite state machine. </purpose><method-group name="public member functions">
1060<method name="code" cv="const"><type>regex_constants::error_type</type><description><para>Accessor for the error_type value
1061
1062</para></description><returns><para>the error_type code passed to the constructor </para>
1063</returns><throws><simpara>Will not throw.</simpara></throws></method>
1064</method-group>
1065<constructor specifiers="explicit"><parameter name="code"><paramtype>regex_constants::error_type</paramtype><description><para>The error_type this <classname alt="boost::xpressive::regex_error">regex_error</classname> represents. </para></description></parameter><parameter name="str"><paramtype>char const *</paramtype><default>""</default><description><para>The message string of this <classname alt="boost::xpressive::regex_error">regex_error</classname>. </para></description></parameter><description><para>Constructs an object of class <classname alt="boost::xpressive::regex_error">regex_error</classname>.
1066
1067</para></description><postconditions><para>code() == code </para>
1068</postconditions></constructor>
1069<destructor><description><para>Destructor for class <classname alt="boost::xpressive::regex_error">regex_error</classname>
1070</para></description><throws><simpara>Will not throw.</simpara></throws></destructor>
1071</struct>
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160</namespace>
1161</namespace>
1162<macro name="BOOST_XPR_ENSURE_" kind="functionlike"><macro-parameter name="pred"/><macro-parameter name="code"/><macro-parameter name="msg"/></macro>
1163</header>
1164<header name="boost/xpressive/regex_iterator.hpp">
1165<para>Contains the definition of the regex_iterator type, an STL-compatible iterator for stepping through all the matches in a sequence. </para><namespace name="boost">
1166<namespace name="xpressive">
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256</namespace>
1257</namespace>
1258</header>
1259<header name="boost/xpressive/regex_primitives.hpp">
1260<para>Contains the syntax elements for writing static regular expressions. </para><namespace name="boost">
1261<namespace name="xpressive">
1262<struct name="mark_tag"><purpose>Sub-match placeholder type, used to create named captures in static regexes. </purpose><description><para><computeroutput><classname alt="boost::xpressive::mark_tag">mark_tag</classname></computeroutput> is the type of the global sub-match placeholders <computeroutput>s0</computeroutput>, <computeroutput>s1</computeroutput>, etc.. You can use the <computeroutput><classname alt="boost::xpressive::mark_tag">mark_tag</classname></computeroutput> type to create your own sub-match placeholders with more meaningful names. This is roughly equivalent to the "named capture" feature of dynamic regular expressions.</para><para>To create a named sub-match placeholder, initialize it with a unique integer. The integer must only be unique within the regex in which the placeholder is used. Then you can use it within static regexes to created sub-matches by assigning a sub-expression to it, or to refer back to already created sub-matches.</para><para><programlisting language="c++">mark_tag number(1); // "number" is now equivalent to "s1"
1263// Match a number, followed by a space and the same number again
1264sregex rx = (number = +_d) &gt;&gt; ' ' &gt;&gt; number;
1265</programlisting></para><para>After a successful <computeroutput>regex_match()</computeroutput> or <computeroutput>regex_search()</computeroutput>, the sub-match placeholder can be used to index into the <computeroutput><classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt;</computeroutput> object to retrieve the corresponding sub-match. </para></description><method-group name="private static functions">
1266<method name="make_tag" specifiers="static"><type><emphasis>unspecified</emphasis></type><parameter name="mark_nbr"><paramtype>int</paramtype></parameter></method>
1267</method-group>
1268<method-group name="public member functions">
1269</method-group>
1270<constructor><parameter name="mark_nbr"><paramtype>int</paramtype><description><para>An integer that uniquely identifies this <computeroutput><classname alt="boost::xpressive::mark_tag">mark_tag</classname></computeroutput> within the static regexes in which this <computeroutput><classname alt="boost::xpressive::mark_tag">mark_tag</classname></computeroutput> will be used. </para></description></parameter><purpose>Initialize a <classname alt="boost::xpressive::mark_tag">mark_tag</classname> placeholder. </purpose><description><para>
1271
1272</para></description><requires><para><computeroutput>mark_nbr &gt; 0</computeroutput> </para>
1273</requires></constructor>
1274</struct><data-member name="inf"><type>unsigned int const</type><purpose>For infinite repetition of a sub-expression. </purpose><description><para>Magic value used with the repeat&lt;&gt;() function template to specify an unbounded repeat. Use as: repeat&lt;17, inf&gt;('a'). The equivalent in perl is /a{17,}/. </para></description></data-member>
1275<data-member name="nil"><type><emphasis>unspecified</emphasis></type><purpose>Successfully matches nothing. </purpose><description><para>Successfully matches a zero-width sequence. nil always succeeds and never consumes any characters. </para></description></data-member>
1276<data-member name="alnum"><type><emphasis>unspecified</emphasis></type><purpose>Matches an alpha-numeric character. </purpose><description><para>The regex traits are used to determine which characters are alpha-numeric. To match any character that is not alpha-numeric, use ~alnum.</para><para><note><para>alnum is equivalent to /[[:alnum:]]/ in perl. ~alnum is equivalent to /[[:^alnum:]]/ in perl. </para>
1277</note>
1278</para></description></data-member>
1279<data-member name="alpha"><type><emphasis>unspecified</emphasis></type><purpose>Matches an alphabetic character. </purpose><description><para>The regex traits are used to determine which characters are alphabetic. To match any character that is not alphabetic, use ~alpha.</para><para><note><para>alpha is equivalent to /[[:alpha:]]/ in perl. ~alpha is equivalent to /[[:^alpha:]]/ in perl. </para>
1280</note>
1281</para></description></data-member>
1282<data-member name="blank"><type><emphasis>unspecified</emphasis></type><purpose>Matches a blank (horizonal white-space) character. </purpose><description><para>The regex traits are used to determine which characters are blank characters. To match any character that is not blank, use ~blank.</para><para><note><para>blank is equivalent to /[[:blank:]]/ in perl. ~blank is equivalent to /[[:^blank:]]/ in perl. </para>
1283</note>
1284</para></description></data-member>
1285<data-member name="cntrl"><type><emphasis>unspecified</emphasis></type><purpose>Matches a control character. </purpose><description><para>The regex traits are used to determine which characters are control characters. To match any character that is not a control character, use ~cntrl.</para><para><note><para>cntrl is equivalent to /[[:cntrl:]]/ in perl. ~cntrl is equivalent to /[[:^cntrl:]]/ in perl. </para>
1286</note>
1287</para></description></data-member>
1288<data-member name="digit"><type><emphasis>unspecified</emphasis></type><purpose>Matches a digit character. </purpose><description><para>The regex traits are used to determine which characters are digits. To match any character that is not a digit, use ~digit.</para><para><note><para>digit is equivalent to /[[:digit:]]/ in perl. ~digit is equivalent to /[[:^digit:]]/ in perl. </para>
1289</note>
1290</para></description></data-member>
1291<data-member name="graph"><type><emphasis>unspecified</emphasis></type><purpose>Matches a graph character. </purpose><description><para>The regex traits are used to determine which characters are graphable. To match any character that is not graphable, use ~graph.</para><para><note><para>graph is equivalent to /[[:graph:]]/ in perl. ~graph is equivalent to /[[:^graph:]]/ in perl. </para>
1292</note>
1293</para></description></data-member>
1294<data-member name="lower"><type><emphasis>unspecified</emphasis></type><purpose>Matches a lower-case character. </purpose><description><para>The regex traits are used to determine which characters are lower-case. To match any character that is not a lower-case character, use ~lower.</para><para><note><para>lower is equivalent to /[[:lower:]]/ in perl. ~lower is equivalent to /[[:^lower:]]/ in perl. </para>
1295</note>
1296</para></description></data-member>
1297<data-member name="print"><type><emphasis>unspecified</emphasis></type><purpose>Matches a printable character. </purpose><description><para>The regex traits are used to determine which characters are printable. To match any character that is not printable, use ~print.</para><para><note><para>print is equivalent to /[[:print:]]/ in perl. ~print is equivalent to /[[:^print:]]/ in perl. </para>
1298</note>
1299</para></description></data-member>
1300<data-member name="punct"><type><emphasis>unspecified</emphasis></type><purpose>Matches a punctuation character. </purpose><description><para>The regex traits are used to determine which characters are punctuation. To match any character that is not punctuation, use ~punct.</para><para><note><para>punct is equivalent to /[[:punct:]]/ in perl. ~punct is equivalent to /[[:^punct:]]/ in perl. </para>
1301</note>
1302</para></description></data-member>
1303<data-member name="space"><type><emphasis>unspecified</emphasis></type><purpose>Matches a space character. </purpose><description><para>The regex traits are used to determine which characters are space characters. To match any character that is not white-space, use ~space.</para><para><note><para>space is equivalent to /[[:space:]]/ in perl. ~space is equivalent to /[[:^space:]]/ in perl. </para>
1304</note>
1305</para></description></data-member>
1306<data-member name="upper"><type><emphasis>unspecified</emphasis></type><purpose>Matches an upper-case character. </purpose><description><para>The regex traits are used to determine which characters are upper-case. To match any character that is not upper-case, use ~upper.</para><para><note><para>upper is equivalent to /[[:upper:]]/ in perl. ~upper is equivalent to /[[:^upper:]]/ in perl. </para>
1307</note>
1308</para></description></data-member>
1309<data-member name="xdigit"><type><emphasis>unspecified</emphasis></type><purpose>Matches a hexadecimal digit character. </purpose><description><para>The regex traits are used to determine which characters are hex digits. To match any character that is not a hex digit, use ~xdigit.</para><para><note><para>xdigit is equivalent to /[[:xdigit:]]/ in perl. ~xdigit is equivalent to /[[:^xdigit:]]/ in perl. </para>
1310</note>
1311</para></description></data-member>
1312<data-member name="bos"><type><emphasis>unspecified</emphasis></type><purpose>Beginning of sequence assertion. </purpose><description><para>For the character sequence [begin, end), 'bos' matches the zero-width sub-sequence [begin, begin). </para></description></data-member>
1313<data-member name="eos"><type><emphasis>unspecified</emphasis></type><purpose>End of sequence assertion. </purpose><description><para>For the character sequence [begin, end), 'eos' matches the zero-width sub-sequence [end, end).</para><para><note><para>Unlike the perl end of sequence assertion $, 'eos' will not match at the position [end-1, end-1) if *(end-1) is '\n'. To get that behavior, use (!_n &gt;&gt; eos). </para>
1314</note>
1315</para></description></data-member>
1316<data-member name="bol"><type><emphasis>unspecified</emphasis></type><purpose>Beginning of line assertion. </purpose><description><para>'bol' matches the zero-width sub-sequence immediately following a logical newline sequence. The regex traits is used to determine what constitutes a logical newline sequence. </para></description></data-member>
1317<data-member name="eol"><type><emphasis>unspecified</emphasis></type><purpose>End of line assertion. </purpose><description><para>'eol' matches the zero-width sub-sequence immediately preceeding a logical newline sequence. The regex traits is used to determine what constitutes a logical newline sequence. </para></description></data-member>
1318<data-member name="bow"><type><emphasis>unspecified</emphasis></type><purpose>Beginning of word assertion. </purpose><description><para>'bow' matches the zero-width sub-sequence immediately following a non-word character and preceeding a word character. The regex traits are used to determine what constitutes a word character. </para></description></data-member>
1319<data-member name="eow"><type><emphasis>unspecified</emphasis></type><purpose>End of word assertion. </purpose><description><para>'eow' matches the zero-width sub-sequence immediately following a word character and preceeding a non-word character. The regex traits are used to determine what constitutes a word character. </para></description></data-member>
1320<data-member name="_b"><type><emphasis>unspecified</emphasis></type><purpose>Word boundary assertion. </purpose><description><para>'_b' matches the zero-width sub-sequence at the beginning or the end of a word. It is equivalent to (bow | eow). The regex traits are used to determine what constitutes a word character. To match a non-word boundary, use ~_b.</para><para><note><para>_b is like \b in perl. ~_b is like \B in perl. </para>
1321</note>
1322</para></description></data-member>
1323<data-member name="_w"><type><emphasis>unspecified</emphasis></type><purpose>Matches a word character. </purpose><description><para>'_w' matches a single word character. The regex traits are used to determine which characters are word characters. Use ~_w to match a character that is not a word character.</para><para><note><para>_w is like \w in perl. ~_w is like \W in perl. </para>
1324</note>
1325</para></description></data-member>
1326<data-member name="_d"><type><emphasis>unspecified</emphasis></type><purpose>Matches a digit character. </purpose><description><para>'_d' matches a single digit character. The regex traits are used to determine which characters are digits. Use ~_d to match a character that is not a digit character.</para><para><note><para>_d is like \d in perl. ~_d is like \D in perl. </para>
1327</note>
1328</para></description></data-member>
1329<data-member name="_s"><type><emphasis>unspecified</emphasis></type><purpose>Matches a space character. </purpose><description><para>'_s' matches a single space character. The regex traits are used to determine which characters are space characters. Use ~_s to match a character that is not a space character.</para><para><note><para>_s is like \s in perl. ~_s is like \S in perl. </para>
1330</note>
1331</para></description></data-member>
1332<data-member name="_n"><type>proto::terminal&lt; char &gt;::type const</type><purpose>Matches a literal newline character, '\n'. </purpose><description><para>'_n' matches a single newline character, '\n'. Use ~_n to match a character that is not a newline.</para><para><note><para>~_n is like '.' in perl without the /s modifier. </para>
1333</note>
1334</para></description></data-member>
1335<data-member name="_ln"><type><emphasis>unspecified</emphasis></type><purpose>Matches a logical newline sequence. </purpose><description><para>'_ln' matches a logical newline sequence. This can be any character in the line separator class, as determined by the regex traits, or the '\r\n' sequence. For the purpose of back-tracking, '\r\n' is treated as a unit. To match any one character that is not a logical newline, use ~_ln. </para></description></data-member>
1336<data-member name="_"><type><emphasis>unspecified</emphasis></type><purpose>Matches any one character. </purpose><description><para>Match any character, similar to '.' in perl syntax with the /s modifier. '_' matches any one character, including the newline.</para><para><note><para>To match any character except the newline, use ~_n </para>
1337</note>
1338</para></description></data-member>
1339<data-member name="self"><type><emphasis>unspecified</emphasis></type><purpose>Reference to the current regex object. </purpose><description><para>Useful when constructing recursive regular expression objects. The 'self' identifier is a short-hand for the current regex object. For instance, sregex rx = '(' &gt;&gt; (self | nil) &gt;&gt; ')'; will create a regex object that matches balanced parens such as "((()))". </para></description></data-member>
1340<data-member name="set"><type><emphasis>unspecified</emphasis></type><purpose>Used to create character sets. </purpose><description><para>There are two ways to create character sets with the 'set' identifier. The easiest is to create a comma-separated list of the characters in the set, as in (set= 'a','b','c'). This set will match 'a', 'b', or 'c'. The other way is to define the set as an argument to the set subscript operator. For instance, set[ 'a' | range('b','c') | digit ] will match an 'a', 'b', 'c' or a digit character.</para><para>To complement a set, apply the '~' operator. For instance, ~(set= 'a','b','c') will match any character that is not an 'a', 'b', or 'c'.</para><para>Sets can be composed of other, possibly complemented, sets. For instance, set[ ~digit | ~(set= 'a','b','c') ]. </para></description></data-member>
1341<data-member name="s0"><type><classname>mark_tag</classname> const</type><purpose>Sub-match placeholder, like $&amp; in Perl. </purpose></data-member>
1342<data-member name="s1"><type><classname>mark_tag</classname> const</type><purpose>Sub-match placeholder, like $1 in perl. </purpose><description><para>To create a sub-match, assign a sub-expression to the sub-match placeholder. For instance, (s1= _) will match any one character and remember which character was matched in the 1st sub-match. Later in the pattern, you can refer back to the sub-match. For instance, (s1= _) &gt;&gt; s1 will match any character, and then match the same character again.</para><para>After a successful regex_match() or regex_search(), the sub-match placeholders can be used to index into the <classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt; object to retrieve the Nth sub-match. </para></description></data-member>
1343<data-member name="s2"><type><classname>mark_tag</classname> const</type></data-member>
1344<data-member name="s3"><type><classname>mark_tag</classname> const</type></data-member>
1345<data-member name="s4"><type><classname>mark_tag</classname> const</type></data-member>
1346<data-member name="s5"><type><classname>mark_tag</classname> const</type></data-member>
1347<data-member name="s6"><type><classname>mark_tag</classname> const</type></data-member>
1348<data-member name="s7"><type><classname>mark_tag</classname> const</type></data-member>
1349<data-member name="s8"><type><classname>mark_tag</classname> const</type></data-member>
1350<data-member name="s9"><type><classname>mark_tag</classname> const</type></data-member>
1351<data-member name="a1"><type><emphasis>unspecified</emphasis></type></data-member>
1352<data-member name="a2"><type><emphasis>unspecified</emphasis></type></data-member>
1353<data-member name="a3"><type><emphasis>unspecified</emphasis></type></data-member>
1354<data-member name="a4"><type><emphasis>unspecified</emphasis></type></data-member>
1355<data-member name="a5"><type><emphasis>unspecified</emphasis></type></data-member>
1356<data-member name="a6"><type><emphasis>unspecified</emphasis></type></data-member>
1357<data-member name="a7"><type><emphasis>unspecified</emphasis></type></data-member>
1358<data-member name="a8"><type><emphasis>unspecified</emphasis></type></data-member>
1359<data-member name="a9"><type><emphasis>unspecified</emphasis></type></data-member>
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402<function name="icase"><type><emphasis>unspecified</emphasis></type><template>
1403          <template-type-parameter name="Expr"/>
1404        </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><purpose>Makes a sub-expression case-insensitive. </purpose><description><para>Use icase() to make a sub-expression case-insensitive. For instance, "foo" &gt;&gt; icase(set['b'] &gt;&gt; "ar") will match "foo" exactly followed by "bar" irrespective of case. </para></description></function>
1405<function name="as_xpr"><type><emphasis>unspecified</emphasis></type><template>
1406          <template-type-parameter name="Literal"/>
1407        </template><parameter name="literal"><paramtype>Literal const &amp;</paramtype></parameter><purpose>Makes a literal into a regular expression. </purpose><description><para>Use as_xpr() to turn a literal into a regular expression. For instance, "foo" &gt;&gt; "bar" will not compile because both operands to the right-shift operator are const char*, and no such operator exists. Use as_xpr("foo") &gt;&gt; "bar" instead.</para><para>You can use as_xpr() with character literals in addition to string literals. For instance, as_xpr('a') will match an 'a'. You can also complement a character literal, as with ~as_xpr('a'). This will match any one character that is not an 'a'. </para></description></function>
1408<function name="by_ref"><type>proto::terminal&lt; reference_wrapper&lt; <classname>basic_regex</classname>&lt; BidiIter &gt; const  &gt; &gt;::type const</type><template>
1409          <template-type-parameter name="BidiIter"/>
1410        </template><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object to embed by reference. </para></description></parameter><purpose>Embed a regex object by reference. </purpose><description><para>
1411</para></description></function>
1412<function name="range"><type><emphasis>unspecified</emphasis></type><template>
1413          <template-type-parameter name="Char"/>
1414        </template><parameter name="ch_min"><paramtype>Char</paramtype><description><para>The lower end of the range to match. </para></description></parameter><parameter name="ch_max"><paramtype>Char</paramtype><description><para>The upper end of the range to match. </para></description></parameter><purpose>Match a range of characters. </purpose><description><para>Match any character in the range [ch_min, ch_max].</para><para>
1415</para></description></function>
1416<function name="optional"><type>proto::result_of::make_expr&lt; proto::tag::logical_not, proto::default_domain, Expr const &amp; &gt;::type const</type><template>
1417          <template-type-parameter name="Expr"/>
1418        </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The sub-expression to make optional. </para></description></parameter><purpose>Make a sub-expression optional. Equivalent to !as_xpr(expr). </purpose><description><para>
1419</para></description></function>
1420<overloaded-function name="repeat"><signature><type><emphasis>unspecified</emphasis></type><template>
1421          <template-nontype-parameter name="Min"><type>unsigned int</type></template-nontype-parameter>
1422          <template-nontype-parameter name="Max"><type>unsigned int</type></template-nontype-parameter>
1423          <template-type-parameter name="Expr"/>
1424        </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The sub-expression to repeat. </para></description></parameter></signature><signature><type><emphasis>unspecified</emphasis></type><template>
1425          <template-nontype-parameter name="Count"><type>unsigned int</type></template-nontype-parameter>
1426          <template-type-parameter name="Expr2"/>
1427        </template><parameter name="expr2"><paramtype>Expr2 const &amp;</paramtype></parameter></signature><purpose>Repeat a sub-expression multiple times. </purpose><description><para>There are two forms of the repeat&lt;&gt;() function template. To match a sub-expression N times, use repeat&lt;N&gt;(expr). To match a sub-expression from M to N times, use repeat&lt;M,N&gt;(expr).</para><para>The repeat&lt;&gt;() function creates a greedy quantifier. To make the quantifier non-greedy, apply the unary minus operator, as in -repeat&lt;M,N&gt;(expr).</para><para>
1428</para></description></overloaded-function>
1429
1430<function name="keep"><type><emphasis>unspecified</emphasis></type><template>
1431          <template-type-parameter name="Expr"/>
1432        </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The sub-expression to modify. </para></description></parameter><purpose>Create an independent sub-expression. </purpose><description><para>Turn off back-tracking for a sub-expression. Any branches or repeats within the sub-expression will match only one way, and no other alternatives are tried.</para><para><note><para>keep(expr) is equivalent to the perl (?&gt;...) extension.</para>
1433</note>
1434
1435</para></description></function>
1436<function name="before"><type><emphasis>unspecified</emphasis></type><template>
1437          <template-type-parameter name="Expr"/>
1438        </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The sub-expression to put in the look-ahead assertion. </para></description></parameter><purpose>Look-ahead assertion. </purpose><description><para>before(expr) succeeds if the expr sub-expression would match at the current position in the sequence, but expr is not included in the match. For instance, before("foo") succeeds if we are before a "foo". Look-ahead assertions can be negated with the bit-compliment operator.</para><para><note><para>before(expr) is equivalent to the perl (?=...) extension. ~before(expr) is a negative look-ahead assertion, equivalent to the perl (?!...) extension.</para>
1439</note>
1440
1441</para></description></function>
1442<function name="after"><type><emphasis>unspecified</emphasis></type><template>
1443          <template-type-parameter name="Expr"/>
1444        </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The sub-expression to put in the look-ahead assertion.</para></description></parameter><purpose>Look-behind assertion. </purpose><description><para>after(expr) succeeds if the expr sub-expression would match at the current position minus N in the sequence, where N is the width of expr. expr is not included in the match. For instance, after("foo") succeeds if we are after a "foo". Look-behind assertions can be negated with the bit-complement operator.</para><para><note><para>after(expr) is equivalent to the perl (?&lt;=...) extension. ~after(expr) is a negative look-behind assertion, equivalent to the perl (?&lt;!...) extension.</para>
1445</note>
1446
1447
1448</para></description><requires><para>expr cannot match a variable number of characters. </para>
1449</requires></function>
1450<function name="imbue"><type><emphasis>unspecified</emphasis></type><template>
1451          <template-type-parameter name="Locale"/>
1452        </template><parameter name="loc"><paramtype>Locale const &amp;</paramtype><description><para>The std::locale or regex traits object. </para></description></parameter><purpose>Specify a regex traits or a std::locale. </purpose><description><para>imbue() instructs the regex engine to use the specified traits or locale when matching the regex. The entire expression must use the same traits/locale. For instance, the following specifies a locale for use with a regex: std::locale loc; sregex rx = imbue(loc)(+digit);</para><para>
1453</para></description></function>
1454<function name="skip"><type><emphasis>unspecified</emphasis></type><template>
1455          <template-type-parameter name="Skip"/>
1456        </template><parameter name="skip"><paramtype>Skip const &amp;</paramtype><description><para>A regex that specifies which characters to skip. </para></description></parameter><purpose>Specify which characters to skip when matching a regex. </purpose><description><para><computeroutput>skip()</computeroutput> instructs the regex engine to skip certain characters when matching a regex. It is most useful for writing regexes that ignore whitespace. For instance, the following specifies a regex that skips whitespace and punctuation:</para><para><programlisting language="c++">// A sentence is one or more words separated by whitespace
1457// and punctuation.
1458sregex word = +alpha;
1459sregex sentence = skip(set[_s | punct])( +word );
1460</programlisting></para><para>The way it works in the above example is to insert <computeroutput>keep(*set[_s | punct])</computeroutput> before each primitive within the regex. A "primitive" includes terminals like strings, character sets and nested regexes. A final <computeroutput>*set[_s | punct]</computeroutput> is added to the end of the regex. The regex <computeroutput>sentence</computeroutput> specified above is equivalent to the following:</para><para><programlisting language="c++">sregex sentence = +( keep(*set[_s | punct]) &gt;&gt; word )
1461                       &gt;&gt; *set[_s | punct];
1462</programlisting></para><para><note><para>Skipping does not affect how nested regexes are handled because they are treated atomically. String literals are also treated atomically; that is, no skipping is done within a string literal. So <computeroutput>skip(_s)("this that")</computeroutput> is not the same as <computeroutput>skip(_s)("this" &gt;&gt; as_xpr("that"))</computeroutput>. The first will only match when there is only one space between "this" and "that". The second will skip any and all whitespace between "this" and "that".</para>
1463</note>
1464
1465</para></description></function>
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501</namespace>
1502</namespace>
1503</header>
1504<header name="boost/xpressive/regex_token_iterator.hpp">
1505<para>Contains the definition of regex_token_iterator, and STL-compatible iterator for tokenizing a string using a regular expression. </para><namespace name="boost">
1506<namespace name="xpressive">
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596</namespace>
1597</namespace>
1598</header>
1599<header name="boost/xpressive/regex_traits.hpp">
1600<para>Includes the C regex traits or the CPP regex traits header file depending on the BOOST_XPRESSIVE_USE_C_TRAITS macro. </para><namespace name="boost">
1601<namespace name="xpressive">
1602<struct name="regex_traits_version_1_tag"><description><para>Tag used to denote that a traits class conforms to the version 1 traits interface. </para></description></struct><struct name="regex_traits_version_2_tag"><inherit access="public">boost::xpressive::regex_traits_version_1_tag</inherit><description><para>Tag used to denote that a traits class conforms to the version 2 traits interface. </para></description></struct>
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691</namespace>
1692</namespace>
1693</header>
1694<header name="boost/xpressive/sub_match.hpp">
1695<para>Contains the definition of the class template sub_match&lt;&gt; and associated helper functions </para><namespace name="boost">
1696<namespace name="xpressive">
1697<overloaded-function name="range_begin"><signature><type>BidiIter</type><template>
1698          <template-type-parameter name="BidiIter"/>
1699        </template><parameter name="sub"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>the <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> object denoting the range </para></description></parameter></signature><signature><type>BidiIter</type><template>
1700          <template-type-parameter name="BidiIter"/>
1701        </template><parameter name="sub"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></signature><purpose><computeroutput>range_begin()</computeroutput> to make <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> a valid range </purpose><description><para>
1702
1703
1704</para></description><requires><para><computeroutput>sub.first</computeroutput> is not singular </para>
1705</requires><returns><para><computeroutput>sub.first</computeroutput> </para>
1706</returns></overloaded-function>
1707
1708<overloaded-function name="range_end"><signature><type>BidiIter</type><template>
1709          <template-type-parameter name="BidiIter"/>
1710        </template><parameter name="sub"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>the <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> object denoting the range </para></description></parameter></signature><signature><type>BidiIter</type><template>
1711          <template-type-parameter name="BidiIter"/>
1712        </template><parameter name="sub"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></signature><purpose><computeroutput>range_end()</computeroutput> to make <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> a valid range </purpose><description><para>
1713
1714
1715</para></description><requires><para><computeroutput>sub.second</computeroutput> is not singular </para>
1716</requires><returns><para><computeroutput>sub.second</computeroutput> </para>
1717</returns></overloaded-function>
1718
1719<function name="operator&lt;&lt;"><type>std::basic_ostream&lt; Char, Traits &gt; &amp;</type><template>
1720          <template-type-parameter name="BidiIter"/>
1721          <template-type-parameter name="Char"/>
1722          <template-type-parameter name="Traits"/>
1723        </template><parameter name="sout"><paramtype>std::basic_ostream&lt; Char, Traits &gt; &amp;</paramtype><description><para>output stream. </para></description></parameter><parameter name="sub"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para><classname alt="boost::xpressive::sub_match">sub_match</classname> object to be written to the stream. </para></description></parameter><purpose>insertion operator for sending sub-matches to ostreams </purpose><description><para>
1724
1725</para></description><returns><para>sout &lt;&lt; sub.str() </para>
1726</returns></function>
1727<function name="operator=="><type>bool</type><template>
1728          <template-type-parameter name="BidiIter"/>
1729        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1730<function name="operator!="><type>bool</type><template>
1731          <template-type-parameter name="BidiIter"/>
1732        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1733<function name="operator&lt;"><type>bool</type><template>
1734          <template-type-parameter name="BidiIter"/>
1735        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1736<function name="operator&lt;="><type>bool</type><template>
1737          <template-type-parameter name="BidiIter"/>
1738        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1739<function name="operator&gt;="><type>bool</type><template>
1740          <template-type-parameter name="BidiIter"/>
1741        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1742<function name="operator&gt;"><type>bool</type><template>
1743          <template-type-parameter name="BidiIter"/>
1744        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1745<function name="operator=="><type>bool</type><template>
1746          <template-type-parameter name="BidiIter"/>
1747        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1748<function name="operator!="><type>bool</type><template>
1749          <template-type-parameter name="BidiIter"/>
1750        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1751<function name="operator&lt;"><type>bool</type><template>
1752          <template-type-parameter name="BidiIter"/>
1753        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1754<function name="operator&gt;"><type>bool</type><template>
1755          <template-type-parameter name="BidiIter"/>
1756        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1757<function name="operator&gt;="><type>bool</type><template>
1758          <template-type-parameter name="BidiIter"/>
1759        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1760<function name="operator&lt;="><type>bool</type><template>
1761          <template-type-parameter name="BidiIter"/>
1762        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1763<function name="operator=="><type>bool</type><template>
1764          <template-type-parameter name="BidiIter"/>
1765        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
1766<function name="operator!="><type>bool</type><template>
1767          <template-type-parameter name="BidiIter"/>
1768        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
1769<function name="operator&lt;"><type>bool</type><template>
1770          <template-type-parameter name="BidiIter"/>
1771        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
1772<function name="operator&gt;"><type>bool</type><template>
1773          <template-type-parameter name="BidiIter"/>
1774        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
1775<function name="operator&gt;="><type>bool</type><template>
1776          <template-type-parameter name="BidiIter"/>
1777        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
1778<function name="operator&lt;="><type>bool</type><template>
1779          <template-type-parameter name="BidiIter"/>
1780        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
1781<function name="operator=="><type>bool</type><template>
1782          <template-type-parameter name="BidiIter"/>
1783        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1784<function name="operator!="><type>bool</type><template>
1785          <template-type-parameter name="BidiIter"/>
1786        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1787<function name="operator&lt;"><type>bool</type><template>
1788          <template-type-parameter name="BidiIter"/>
1789        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1790<function name="operator&gt;"><type>bool</type><template>
1791          <template-type-parameter name="BidiIter"/>
1792        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1793<function name="operator&gt;="><type>bool</type><template>
1794          <template-type-parameter name="BidiIter"/>
1795        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1796<function name="operator&lt;="><type>bool</type><template>
1797          <template-type-parameter name="BidiIter"/>
1798        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1799<function name="operator=="><type>bool</type><template>
1800          <template-type-parameter name="BidiIter"/>
1801        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
1802<function name="operator!="><type>bool</type><template>
1803          <template-type-parameter name="BidiIter"/>
1804        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
1805<function name="operator&lt;"><type>bool</type><template>
1806          <template-type-parameter name="BidiIter"/>
1807        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
1808<function name="operator&gt;"><type>bool</type><template>
1809          <template-type-parameter name="BidiIter"/>
1810        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
1811<function name="operator&gt;="><type>bool</type><template>
1812          <template-type-parameter name="BidiIter"/>
1813        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
1814<function name="operator&lt;="><type>bool</type><template>
1815          <template-type-parameter name="BidiIter"/>
1816        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
1817<function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
1818          <template-type-parameter name="BidiIter"/>
1819        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1820<function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
1821          <template-type-parameter name="BidiIter"/>
1822        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
1823<function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
1824          <template-type-parameter name="BidiIter"/>
1825        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1826<function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
1827          <template-type-parameter name="BidiIter"/>
1828        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
1829<function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
1830          <template-type-parameter name="BidiIter"/>
1831        </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1832<function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
1833          <template-type-parameter name="BidiIter"/>
1834        </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename <classname>sub_match</classname>&lt; BidiIter &gt;::string_type const &amp;</paramtype></parameter></function>
1835<function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
1836          <template-type-parameter name="BidiIter"/>
1837        </template><parameter name="lhs"><paramtype>typename <classname>sub_match</classname>&lt; BidiIter &gt;::string_type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885</namespace>
1886</namespace>
1887</header>
1888<header name="boost/xpressive/traits/c_regex_traits.hpp">
1889<para>Contains the definition of the c_regex_traits&lt;&gt; template, which is a wrapper for the C locale functions that can be used to customize the behavior of static and dynamic regexes. </para><namespace name="boost">
1890<namespace name="xpressive">
1891<struct-specialization name="has_fold_case"><template>
1892    </template><specialization><template-arg>c_regex_traits&lt; char &gt;</template-arg></specialization><inherit access="public">true_</inherit></struct-specialization>
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981</namespace>
1982</namespace>
1983</header>
1984<header name="boost/xpressive/traits/cpp_regex_traits.hpp">
1985<para>Contains the definition of the cpp_regex_traits&lt;&gt; template, which is a wrapper for std::locale that can be used to customize the behavior of static and dynamic regexes. </para><namespace name="boost">
1986<namespace name="xpressive">
1987<struct-specialization name="has_fold_case"><template>
1988    </template><specialization><template-arg>cpp_regex_traits&lt; char &gt;</template-arg></specialization><inherit access="public">true_</inherit></struct-specialization>
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077</namespace>
2078</namespace>
2079</header>
2080<header name="boost/xpressive/traits/null_regex_traits.hpp">
2081<para>Contains the definition of the null_regex_traits&lt;&gt; template, which is a stub regex traits implementation that can be used by static and dynamic regexes for searching non-character data. </para><namespace name="boost">
2082<namespace name="xpressive">
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172</namespace>
2173</namespace>
2174</header>
2175<header name="boost/xpressive/xpressive.hpp">
2176<para>Includes all of xpressive including support for both static and dynamic regular expressions. </para></header>
2177<header name="boost/xpressive/xpressive_dynamic.hpp">
2178<para>Includes everything you need to write and use dynamic regular expressions. </para></header>
2179<header name="boost/xpressive/xpressive_fwd.hpp">
2180<para>Forward declarations for all of xpressive's public data types. </para><namespace name="boost">
2181<namespace name="xpressive">
2182<struct name="basic_regex"><template>
2183      <template-type-parameter name="BidiIter"/>
2184    </template><purpose>Class template <classname alt="boost::xpressive::basic_regex">basic_regex</classname>&lt;&gt; is a class for holding a compiled regular expression. </purpose><method-group name="public member functions">
2185<method name="mark_count" cv="const"><type>std::size_t</type><description><para>Returns the count of capturing sub-expressions in this regular expression </para></description></method>
2186<method name="regex_id" cv="const"><type>regex_id_type</type><description><para>Returns a token which uniquely identifies this regular expression. </para></description></method>
2187<method name="swap"><type>void</type><parameter name="that"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>The other <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object. </para></description></parameter><description><para>Swaps the contents of this <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object with another.</para><para>
2188<note><para>This is a shallow swap that does not do reference tracking. If you embed a <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object by reference in another regular expression and then swap its contents with another <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object, the change will not be visible to the enclosing regular expression. It is done this way to ensure that swap() cannot throw. </para>
2189</note>
2190
2191</para></description><throws><simpara>Will not throw.</simpara></throws></method>
2192</method-group>
2193<constructor><description><para>
2194
2195</para></description><postconditions><para>regex_id() == 0 </para>
2196</postconditions><postconditions><para>mark_count() == 0 </para>
2197</postconditions></constructor>
2198<constructor><parameter name="that"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object to copy. </para></description></parameter><description><para>
2199
2200
2201</para></description><postconditions><para>regex_id() == that.regex_id() </para>
2202</postconditions><postconditions><para>mark_count() == that.mark_count() </para>
2203</postconditions></constructor>
2204<copy-assignment><type><classname>basic_regex</classname>&lt; BidiIter &gt; &amp;</type><parameter name="that"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object to copy. </para></description></parameter><description><para>
2205
2206
2207
2208</para></description><postconditions><para>regex_id() == that.regex_id() </para>
2209</postconditions><postconditions><para>mark_count() == that.mark_count() </para>
2210</postconditions><returns><para>*this </para>
2211</returns></copy-assignment>
2212<constructor><template>
2213          <template-type-parameter name="Expr"/>
2214        </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The static regular expression </para></description></parameter><description><para>Construct from a static regular expression.</para><para>
2215
2216
2217
2218</para></description><requires><para>Expr is the type of a static regular expression. </para>
2219</requires><postconditions><para>regex_id() != 0 </para>
2220</postconditions><postconditions><para>mark_count() &gt;= 0 </para>
2221</postconditions></constructor>
2222<copy-assignment><type><classname>basic_regex</classname>&lt; BidiIter &gt; &amp;</type><template>
2223          <template-type-parameter name="Expr"/>
2224        </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The static regular expression. </para></description></parameter><description><para>Construct from a static regular expression.</para><para>
2225
2226
2227
2228
2229
2230</para></description><requires><para>Expr is the type of a static regular expression. </para>
2231</requires><postconditions><para>regex_id() != 0 </para>
2232</postconditions><postconditions><para>mark_count() &gt;= 0 </para>
2233</postconditions><returns><para>*this </para>
2234</returns><throws><simpara><classname>std::bad_alloc</classname> on out of memory </simpara></throws></copy-assignment>
2235<method-group name="public static functions">
2236<method name="compile" specifiers="static"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><template>
2237          <template-type-parameter name="InputIter"/>
2238        </template><parameter name="begin"><paramtype>InputIter</paramtype><description><para>The beginning of a range of characters representing the regular expression to compile. </para></description></parameter><parameter name="end"><paramtype>InputIter</paramtype><description><para>The end of a range of characters representing the regular expression to compile. </para></description></parameter><parameter name="flags"><paramtype>flag_type</paramtype><default>regex_constants::ECMAScript</default><description><para>Optional bitmask that determines how the pat string is interpreted. (See syntax_option_type.) </para></description></parameter><description><para>Factory method for building a regex object from a range of characters. Equivalent to <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname>&lt; BidiIter &gt;().compile(begin, end, flags);</para><para>
2239
2240
2241
2242
2243</para></description><requires><para>[begin,end) is a valid range. </para>
2244</requires><requires><para>The range of characters specified by [begin,end) contains a valid string-based representation of a regular expression. </para>
2245</requires><returns><para>A <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object corresponding to the regular expression represented by the character range. </para>
2246</returns><throws><simpara><classname>regex_error</classname> when the range of characters has invalid regular expression syntax. </simpara></throws></method>
2247<method name="compile" specifiers="static"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><template>
2248          <template-type-parameter name="InputRange"/>
2249        </template><parameter name="pat"><paramtype>InputRange const &amp;</paramtype></parameter><parameter name="flags"><paramtype>flag_type</paramtype><default>regex_constants::ECMAScript</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2250<method name="compile" specifiers="static"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><parameter name="begin"><paramtype>char_type const *</paramtype></parameter><parameter name="flags"><paramtype>flag_type</paramtype><default>regex_constants::ECMAScript</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2251<method name="compile" specifiers="static"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><parameter name="begin"><paramtype>char_type const *</paramtype></parameter><parameter name="len"><paramtype>std::size_t</paramtype></parameter><parameter name="flags"><paramtype>flag_type</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2252</method-group>
2253<method-group name="private member functions">
2254</method-group>
2255</struct><struct name="c_regex_traits"><template>
2256      <template-type-parameter name="Char"/>
2257    </template><purpose>Encapsaulates the standard C locale functions for use by the <computeroutput><classname alt="boost::xpressive::basic_regex">basic_regex</classname>&lt;&gt;</computeroutput> class template. </purpose><method-group name="public member functions">
2258<method name="operator==" cv="const"><type>bool</type><parameter name=""><paramtype><classname>c_regex_traits</classname>&lt; char_type &gt; const &amp;</paramtype></parameter><description><para>Checks two <classname alt="boost::xpressive::c_regex_traits">c_regex_traits</classname> objects for equality</para><para>
2259</para></description><returns><para>true. </para>
2260</returns></method>
2261<method name="operator !=" cv="const"><type>bool</type><parameter name=""><paramtype><classname>c_regex_traits</classname>&lt; char_type &gt; const &amp;</paramtype></parameter><description><para>Checks two <classname alt="boost::xpressive::c_regex_traits">c_regex_traits</classname> objects for inequality</para><para>
2262</para></description><returns><para>false. </para>
2263</returns></method>
2264<method name="fold_case" cv="const"><type>string_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Returns a <computeroutput>string_type</computeroutput> containing all the characters that compare equal disregrarding case to the one passed in. This function can only be called if <computeroutput><classname alt="boost::xpressive::has_fold_case">has_fold_case</classname>&lt;<classname alt="boost::xpressive::c_regex_traits">c_regex_traits</classname>&lt;Char&gt; &gt;::value</computeroutput> is <computeroutput>true</computeroutput>.</para><para>
2265
2266</para></description><returns><para><computeroutput>string_type</computeroutput> containing all chars which are equal to <computeroutput>ch</computeroutput> when disregarding case </para>
2267</returns></method>
2268<method name="imbue"><type>locale_type</type><parameter name="loc"><paramtype>locale_type</paramtype></parameter><description><para>No-op </para></description></method>
2269</method-group>
2270<constructor><parameter name="loc"><paramtype>locale_type const &amp;</paramtype><default>locale_type()</default></parameter><description><para>Initialize a <classname alt="boost::xpressive::c_regex_traits">c_regex_traits</classname> object to use the global C locale. </para></description></constructor>
2271<method-group name="public static functions">
2272<method name="widen" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char</paramtype><description><para>The source character. </para></description></parameter><description><para>Convert a char to a Char</para><para>
2273
2274</para></description><returns><para>ch if Char is char, std::btowc(ch) if Char is wchar_t. </para>
2275</returns></method>
2276<method name="hash" specifiers="static"><type>unsigned char</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Returns a hash value for a Char in the range [0, UCHAR_MAX]</para><para>
2277
2278</para></description><returns><para>a value between 0 and UCHAR_MAX, inclusive. </para>
2279</returns></method>
2280<method name="translate" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>No-op</para><para>
2281
2282</para></description><returns><para>ch </para>
2283</returns></method>
2284<method name="translate_nocase" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Converts a character to lower-case using the current global C locale.</para><para>
2285
2286</para></description><returns><para>std::tolower(ch) if Char is char, std::towlower(ch) if Char is wchar_t. </para>
2287</returns></method>
2288<method name="tolower" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Converts a character to lower-case using the current global C locale.</para><para>
2289
2290</para></description><returns><para>std::tolower(ch) if Char is char, std::towlower(ch) if Char is wchar_t. </para>
2291</returns></method>
2292<method name="toupper" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Converts a character to upper-case using the current global C locale.</para><para>
2293
2294</para></description><returns><para>std::toupper(ch) if Char is char, std::towupper(ch) if Char is wchar_t. </para>
2295</returns></method>
2296<method name="in_range" specifiers="static"><type>bool</type><parameter name="first"><paramtype>char_type</paramtype><description><para>The bottom of the range, inclusive. </para></description></parameter><parameter name="last"><paramtype>char_type</paramtype><description><para>The top of the range, inclusive. </para></description></parameter><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Checks to see if a character is within a character range.</para><para>
2297
2298</para></description><returns><para>first &lt;= ch &amp;&amp; ch &lt;= last. </para>
2299</returns></method>
2300<method name="in_range_nocase" specifiers="static"><type>bool</type><parameter name="first"><paramtype>char_type</paramtype><description><para>The bottom of the range, inclusive. </para></description></parameter><parameter name="last"><paramtype>char_type</paramtype><description><para>The top of the range, inclusive. </para></description></parameter><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Checks to see if a character is within a character range, irregardless of case.</para><para>
2301
2302<note><para>The default implementation doesn't do proper Unicode case folding, but this is the best we can do with the standard C locale functions. </para>
2303</note>
2304</para></description><returns><para>in_range(first, last, ch) || in_range(first, last, tolower(ch)) || in_range(first, last, toupper(ch)) </para>
2305</returns></method>
2306<method name="transform" specifiers="static"><type>string_type</type><template>
2307          <template-type-parameter name="FwdIter"/>
2308        </template><parameter name="begin"><paramtype>FwdIter</paramtype></parameter><parameter name="end"><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) then v.transform(G1, G2) &lt; v.transform(H1, H2).</para><para><note><para>Not currently used </para>
2309</note>
2310</para></description></method>
2311<method name="transform_primary" specifiers="static"><type>string_type</type><template>
2312          <template-type-parameter name="FwdIter"/>
2313        </template><parameter name="begin"><paramtype>FwdIter</paramtype></parameter><parameter name="end"><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) when character case is not considered then v.transform_primary(G1, G2) &lt; v.transform_primary(H1, H2).</para><para><note><para>Not currently used </para>
2314</note>
2315</para></description></method>
2316<method name="lookup_collatename" specifiers="static"><type>string_type</type><template>
2317          <template-type-parameter name="FwdIter"/>
2318        </template><parameter name="begin"><paramtype>FwdIter</paramtype></parameter><parameter name="end"><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range [F1, F2). Returns an empty string if the character sequence is not a valid collating element.</para><para><note><para>Not currently used </para>
2319</note>
2320</para></description></method>
2321<method name="lookup_classname" specifiers="static"><type>char_class_type</type><template>
2322          <template-type-parameter name="FwdIter"/>
2323        </template><parameter name="begin"><paramtype>FwdIter</paramtype><description><para>A forward iterator to the start of the character sequence representing the name of the character class. </para></description></parameter><parameter name="end"><paramtype>FwdIter</paramtype><description><para>The end of the character sequence. </para></description></parameter><parameter name="icase"><paramtype>bool</paramtype><description><para>Specifies whether the returned bitmask should represent the case-insensitive version of the character class. </para></description></parameter><description><para>For the character class name represented by the specified character sequence, return the corresponding bitmask representation.</para><para>
2324
2325</para></description><returns><para>A bitmask representing the character class. </para>
2326</returns></method>
2327<method name="isctype" specifiers="static"><type>bool</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The character to test. </para></description></parameter><parameter name="mask"><paramtype>char_class_type</paramtype><description><para>The character class bitmask against which to test. </para></description></parameter><description><para>Tests a character against a character class bitmask.</para><para>
2328
2329
2330</para></description><requires><para>mask is a bitmask returned by lookup_classname, or is several such masks bit-or'ed together. </para>
2331</requires><returns><para>true if the character is a member of any of the specified character classes, false otherwise. </para>
2332</returns></method>
2333<method name="value" specifiers="static"><type>int</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The digit character. </para></description></parameter><parameter name="radix"><paramtype>int</paramtype><description><para>The radix to use for the conversion. </para></description></parameter><description><para>Convert a digit character into the integer it represents.</para><para>
2334
2335
2336</para></description><requires><para>radix is one of 8, 10, or 16. </para>
2337</requires><returns><para>-1 if ch is not a digit character, the integer value of the character otherwise. If char_type is char, std::strtol is used for the conversion. If char_type is wchar_t, std::wcstol is used. </para>
2338</returns></method>
2339<method name="getloc" specifiers="static"><type>locale_type</type><description><para>No-op </para></description></method>
2340</method-group>
2341</struct><struct name="compiler_traits"><template>
2342      <template-type-parameter name="RegexTraits"/>
2343    </template></struct><struct name="cpp_regex_traits"><template>
2344      <template-type-parameter name="Char"/>
2345    </template><purpose>Encapsaulates a <computeroutput>std::locale</computeroutput> for use by the <computeroutput><classname alt="boost::xpressive::basic_regex">basic_regex</classname>&lt;&gt;</computeroutput> class template. </purpose><method-group name="public member functions">
2346<method name="operator==" cv="const"><type>bool</type><parameter name="that"><paramtype><classname>cpp_regex_traits</classname>&lt; char_type &gt; const &amp;</paramtype></parameter><description><para>Checks two <classname alt="boost::xpressive::cpp_regex_traits">cpp_regex_traits</classname> objects for equality</para><para>
2347</para></description><returns><para>this-&gt;getloc() == that.getloc(). </para>
2348</returns></method>
2349<method name="operator !=" cv="const"><type>bool</type><parameter name="that"><paramtype><classname>cpp_regex_traits</classname>&lt; char_type &gt; const &amp;</paramtype></parameter><description><para>Checks two <classname alt="boost::xpressive::cpp_regex_traits">cpp_regex_traits</classname> objects for inequality</para><para>
2350</para></description><returns><para>this-&gt;getloc() != that.getloc(). </para>
2351</returns></method>
2352<method name="widen" cv="const"><type>char_type</type><parameter name="ch"><paramtype>char</paramtype><description><para>The source character. </para></description></parameter><description><para>Convert a char to a Char</para><para>
2353
2354</para></description><returns><para>std::use_facet&lt;std::ctype&lt;char_type&gt; &gt;(this-&gt;getloc()).widen(ch). </para>
2355</returns></method>
2356<method name="translate_nocase" cv="const"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Converts a character to lower-case using the internally-stored std::locale.</para><para>
2357
2358</para></description><returns><para>std::tolower(ch, this-&gt;getloc()). </para>
2359</returns></method>
2360<method name="tolower" cv="const"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Converts a character to lower-case using the internally-stored std::locale.</para><para>
2361
2362</para></description><returns><para>std::tolower(ch, this-&gt;getloc()). </para>
2363</returns></method>
2364<method name="toupper" cv="const"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Converts a character to upper-case using the internally-stored std::locale.</para><para>
2365
2366</para></description><returns><para>std::toupper(ch, this-&gt;getloc()). </para>
2367</returns></method>
2368<method name="fold_case" cv="const"><type>string_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Returns a <computeroutput>string_type</computeroutput> containing all the characters that compare equal disregrarding case to the one passed in. This function can only be called if <computeroutput><classname alt="boost::xpressive::has_fold_case">has_fold_case</classname>&lt;<classname alt="boost::xpressive::cpp_regex_traits">cpp_regex_traits</classname>&lt;Char&gt; &gt;::value</computeroutput> is <computeroutput>true</computeroutput>.</para><para>
2369
2370</para></description><returns><para><computeroutput>string_type</computeroutput> containing all chars which are equal to <computeroutput>ch</computeroutput> when disregarding case </para>
2371</returns></method>
2372<method name="in_range_nocase" cv="const"><type>bool</type><parameter name="first"><paramtype>char_type</paramtype><description><para>The bottom of the range, inclusive. </para></description></parameter><parameter name="last"><paramtype>char_type</paramtype><description><para>The top of the range, inclusive. </para></description></parameter><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Checks to see if a character is within a character range, irregardless of case.</para><para>
2373
2374<note><para>The default implementation doesn't do proper Unicode case folding, but this is the best we can do with the standard ctype facet. </para>
2375</note>
2376</para></description><returns><para>in_range(first, last, ch) || in_range(first, last, tolower(ch, this-&gt;getloc())) || in_range(first, last, toupper(ch, this-&gt;getloc())) </para>
2377</returns></method>
2378<method name="transform_primary" cv="const"><type>string_type</type><template>
2379          <template-type-parameter name="FwdIter"/>
2380        </template><parameter name=""><paramtype>FwdIter</paramtype></parameter><parameter name=""><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) when character case is not considered then v.transform_primary(G1, G2) &lt; v.transform_primary(H1, H2).</para><para><note><para>Not currently used </para>
2381</note>
2382</para></description></method>
2383<method name="lookup_collatename" cv="const"><type>string_type</type><template>
2384          <template-type-parameter name="FwdIter"/>
2385        </template><parameter name=""><paramtype>FwdIter</paramtype></parameter><parameter name=""><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range [F1, F2). Returns an empty string if the character sequence is not a valid collating element.</para><para><note><para>Not currently used </para>
2386</note>
2387</para></description></method>
2388<method name="lookup_classname" cv="const"><type>char_class_type</type><template>
2389          <template-type-parameter name="FwdIter"/>
2390        </template><parameter name="begin"><paramtype>FwdIter</paramtype><description><para>A forward iterator to the start of the character sequence representing the name of the character class. </para></description></parameter><parameter name="end"><paramtype>FwdIter</paramtype><description><para>The end of the character sequence. </para></description></parameter><parameter name="icase"><paramtype>bool</paramtype><description><para>Specifies whether the returned bitmask should represent the case-insensitive version of the character class. </para></description></parameter><description><para>For the character class name represented by the specified character sequence, return the corresponding bitmask representation.</para><para>
2391
2392</para></description><returns><para>A bitmask representing the character class. </para>
2393</returns></method>
2394<method name="isctype" cv="const"><type>bool</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The character to test. </para></description></parameter><parameter name="mask"><paramtype>char_class_type</paramtype><description><para>The character class bitmask against which to test. </para></description></parameter><description><para>Tests a character against a character class bitmask.</para><para>
2395
2396
2397</para></description><requires><para>mask is a bitmask returned by lookup_classname, or is several such masks bit-or'ed together. </para>
2398</requires><returns><para>true if the character is a member of any of the specified character classes, false otherwise. </para>
2399</returns></method>
2400<method name="value" cv="const"><type>int</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The digit character. </para></description></parameter><parameter name="radix"><paramtype>int</paramtype><description><para>The radix to use for the conversion. </para></description></parameter><description><para>Convert a digit character into the integer it represents.</para><para>
2401
2402
2403</para></description><requires><para>radix is one of 8, 10, or 16. </para>
2404</requires><returns><para>-1 if ch is not a digit character, the integer value of the character otherwise. The conversion is performed by imbueing a std::stringstream with this-&gt;getloc(); setting the radix to one of oct, hex or dec; inserting ch into the stream; and extracting an int. </para>
2405</returns></method>
2406<method name="imbue"><type>locale_type</type><parameter name="loc"><paramtype>locale_type</paramtype><description><para>A std::locale. </para></description></parameter><description><para>Imbues *this with loc</para><para>
2407
2408</para></description><returns><para>the previous std::locale used by *this. </para>
2409</returns></method>
2410<method name="getloc" cv="const"><type>locale_type</type><description><para>Returns the current std::locale used by *this. </para></description></method>
2411<method name="hash"><type>unsigned char</type><template>
2412        </template><parameter name="ch"><paramtype>unsigned char</paramtype></parameter></method>
2413<method name="hash"><type>unsigned char</type><template>
2414        </template><parameter name="ch"><paramtype>char</paramtype></parameter></method>
2415<method name="hash"><type>unsigned char</type><template>
2416        </template><parameter name="ch"><paramtype>signed char</paramtype></parameter></method>
2417<method name="hash"><type>unsigned char</type><template>
2418        </template><parameter name="ch"><paramtype>wchar_t</paramtype></parameter></method>
2419</method-group>
2420<constructor><parameter name="loc"><paramtype>locale_type const &amp;</paramtype><default>locale_type()</default></parameter><description><para>Initialize a <classname alt="boost::xpressive::cpp_regex_traits">cpp_regex_traits</classname> object to use the specified std::locale, or the global std::locale if none is specified. </para></description></constructor>
2421<method-group name="public static functions">
2422<method name="hash" specifiers="static"><type>unsigned char</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Returns a hash value for a Char in the range [0, UCHAR_MAX]</para><para>
2423
2424</para></description><returns><para>a value between 0 and UCHAR_MAX, inclusive. </para>
2425</returns></method>
2426<method name="translate" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>No-op</para><para>
2427
2428</para></description><returns><para>ch </para>
2429</returns></method>
2430<method name="in_range" specifiers="static"><type>bool</type><parameter name="first"><paramtype>char_type</paramtype><description><para>The bottom of the range, inclusive. </para></description></parameter><parameter name="last"><paramtype>char_type</paramtype><description><para>The top of the range, inclusive. </para></description></parameter><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Checks to see if a character is within a character range.</para><para>
2431
2432</para></description><returns><para>first &lt;= ch &amp;&amp; ch &lt;= last. </para>
2433</returns></method>
2434</method-group>
2435<method-group name="private static functions">
2436</method-group>
2437</struct><struct name="has_fold_case"><template>
2438      <template-type-parameter name="Traits"/>
2439    </template><inherit access="public">is_convertible&lt; Traits::version_tag *, regex_traits_version_1_case_fold_tag * &gt;</inherit><purpose>Trait used to denote that a traits class has the fold_case member function. </purpose></struct><struct name="local"><template>
2440      <template-type-parameter name="T"><purpose><para>The type of the local variable.</para></purpose></template-type-parameter>
2441    </template><inherit access="public">proto::terminal::type&lt; reference_wrapper&lt; T &gt; &gt;</inherit><purpose><computeroutput>local&lt;&gt;</computeroutput> is a lazy wrapper for a reference to a value that is stored within the local itself. It is for use within xpressive semantic actions. </purpose><description><para>
2442Below is an example of how to use <computeroutput>local&lt;&gt;</computeroutput> in semantic actions.<programlisting language="c++">using namespace boost::xpressive;
2443local&lt;int&gt; i(0);
2444std::string str("1!2!3?");
2445// count the exciting digits, but not the
2446// questionable ones.
2447sregex rex = +( _d [ ++i ] &gt;&gt; '!' );
2448regex_search(str, rex);
2449assert( i.get() == 2 );
2450</programlisting><note><para>As the name "local" suggests, <computeroutput>local&lt;&gt;</computeroutput> objects and the regexes that refer to them should never leave the local scope. The value stored within the local object will be destroyed at the end of the <computeroutput>local&lt;&gt;'s</computeroutput> lifetime, and any regex objects still holding the <computeroutput>local&lt;&gt;</computeroutput> will be left with a dangling reference. </para>
2451</note>
2452</para></description><method-group name="public member functions">
2453<method name="get"><type>T &amp;</type><purpose>Fetch the wrapped value. </purpose></method>
2454<method name="get" cv="const"><type>T const  &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2455</method-group>
2456<constructor><purpose>Store a default-constructed value of type <computeroutput>T</computeroutput>. </purpose></constructor>
2457<constructor specifiers="explicit"><parameter name="t"><paramtype>T const &amp;</paramtype><description><para>The initial value. </para></description></parameter><purpose>Store a default-constructed value of type <computeroutput>T</computeroutput>. </purpose><description><para>
2458</para></description></constructor>
2459</struct><struct name="match_results"><template>
2460      <template-type-parameter name="BidiIter"/>
2461    </template><purpose>Class template <classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt; holds the results of a regex_match() or a regex_search() as a collection of <classname alt="boost::xpressive::sub_match">sub_match</classname> objects. </purpose><description><para>Class template <classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt; denotes a collection of sequences representing the result of a regular expression match. Storage for the collection is allocated and freed as necessary by the member functions of class <classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt;.</para><para>The class template <classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt; conforms to the requirements of a Sequence, as specified in (lib.sequence.reqmts), except that only operations defined for const-qualified Sequences are supported. </para></description><method-group name="public member functions">
2462<method name="size" cv="const"><type>size_type</type><description><para>Returns one plus the number of marked sub-expressions in the regular expression that was matched if *this represents the result of a successful match. Otherwise returns 0. </para></description></method>
2463<method name="empty" cv="const"><type>bool</type><description><para>Returns size() == 0. </para></description></method>
2464<method name="length" cv="const"><type>difference_type</type><parameter name="sub"><paramtype>size_type</paramtype><default>0</default></parameter><description><para>Returns (*this)[sub].length(). </para></description></method>
2465<method name="position" cv="const"><type>difference_type</type><parameter name="sub"><paramtype>size_type</paramtype><default>0</default></parameter><description><para>If !(*this)[sub].matched then returns -1. Otherwise returns std::distance(base, (*this)[sub].first), where base is the start iterator of the sequence that was searched. [Note - unless this is part of a repeated search with a <classname alt="boost::xpressive::regex_iterator">regex_iterator</classname> then base is the same as prefix().first - end note] </para></description></method>
2466<method name="str" cv="const"><type>string_type</type><parameter name="sub"><paramtype>size_type</paramtype><default>0</default></parameter><description><para>Returns (*this)[sub].str(). </para></description></method>
2467<method name="operator []" cv="const"><type>const_reference</type><template>
2468          <template-type-parameter name="Sub"/>
2469        </template><parameter name="sub"><paramtype>Sub const &amp;</paramtype></parameter><description><para>Returns a reference to the <classname alt="boost::xpressive::sub_match">sub_match</classname> object representing the sequence that matched marked sub-expression sub. If sub == 0 then returns a reference to a <classname alt="boost::xpressive::sub_match">sub_match</classname> object representing the sequence that matched the whole regular expression. If sub &gt;= size() then returns a <classname alt="boost::xpressive::sub_match">sub_match</classname> object representing an unmatched sub-expression. </para></description></method>
2470<method name="prefix" cv="const"><type>const_reference</type><description><para>Returns a reference to the <classname alt="boost::xpressive::sub_match">sub_match</classname> object representing the character sequence from the start of the string being matched/searched, to the start of the match found.</para><para>
2471</para></description><requires><para>(*this)[0].matched is true </para>
2472</requires></method>
2473<method name="suffix" cv="const"><type>const_reference</type><description><para>Returns a reference to the <classname alt="boost::xpressive::sub_match">sub_match</classname> object representing the character sequence from the end of the match found to the end of the string being matched/searched.</para><para>
2474</para></description><requires><para>(*this)[0].matched is true </para>
2475</requires></method>
2476<method name="begin" cv="const"><type>const_iterator</type><description><para>Returns a starting iterator that enumerates over all the marked sub-expression matches stored in *this. </para></description></method>
2477<method name="end" cv="const"><type>const_iterator</type><description><para>Returns a terminating iterator that enumerates over all the marked sub-expression matches stored in *this. </para></description></method>
2478<method name="conversion-operator" cv="const"><type>bool_type</type><description><para>Returns a true value if (*this)[0].matched, else returns a false value. </para></description></method>
2479<method name="operator !" cv="const"><type>bool</type><description><para>Returns true if empty() || !(*this)[0].matched, else returns false. </para></description></method>
2480<method name="regex_id" cv="const"><type>regex_id_type</type><description><para>Returns the id of the <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object most recently used with this <classname alt="boost::xpressive::match_results">match_results</classname> object. </para></description></method>
2481<method name="nested_results" cv="const"><type>nested_results_type const  &amp;</type><description><para>Returns a Sequence of nested <classname alt="boost::xpressive::match_results">match_results</classname> elements. </para></description></method>
2482<method name="format" cv="const"><type>OutputIterator</type><template>
2483          <template-type-parameter name="Format"/>
2484          <template-type-parameter name="OutputIterator"/>
2485        </template><parameter name="out"><paramtype>OutputIterator</paramtype></parameter><parameter name="fmt"><paramtype>Format const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::format_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter><description><para>If <computeroutput>Format</computeroutput> models <computeroutput>ForwardRange</computeroutput> or is a null-terminated string, this function copies the character sequence in <computeroutput>fmt</computeroutput> to <computeroutput>OutputIterator</computeroutput> <computeroutput>out</computeroutput>. For each format specifier or escape sequence in <computeroutput>fmt</computeroutput>, replace that sequence with either the character(s) it represents, or the sequence within <computeroutput>*this</computeroutput> to which it refers. The bitmasks specified in flags determines what format specifiers or escape sequences are recognized. By default, this is the format used by ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11 String.prototype.replace.</para><para>Otherwise, if <computeroutput>Format</computeroutput> models <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt;, OutputIterator, regex_constants::match_flag_type&gt;</computeroutput>, this function returns <computeroutput>fmt(*this, out, flags)</computeroutput>.</para><para>Otherwise, if <computeroutput>Format</computeroutput> models <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt;, OutputIterator&gt;</computeroutput>, this function returns <computeroutput>fmt(*this, out)</computeroutput>.</para><para>Otherwise, if <computeroutput>Format</computeroutput> models <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt; &gt;</computeroutput>, this function returns <computeroutput>std::copy(x.begin(), x.end(), out)</computeroutput>, where <computeroutput>x</computeroutput> is the result of calling <computeroutput>fmt(*this)</computeroutput>. </para></description></method>
2486<method name="format" cv="const"><type>OutputIterator</type><template>
2487          <template-type-parameter name="OutputIterator"/>
2488        </template><parameter name="out"><paramtype>OutputIterator</paramtype></parameter><parameter name="fmt"><paramtype>char_type const *</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::format_default</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2489<method name="format" cv="const"><type>string_type</type><template>
2490          <template-type-parameter name="Format"/>
2491          <template-type-parameter name="OutputIterator"/>
2492        </template><parameter name="fmt"><paramtype>Format const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::format_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter><description><para>If <computeroutput>Format</computeroutput> models <computeroutput>ForwardRange</computeroutput> or is a null-terminated string, this function returns a copy of the character sequence <computeroutput>fmt</computeroutput>. For each format specifier or escape sequence in <computeroutput>fmt</computeroutput>, replace that sequence with either the character(s) it represents, or the sequence within <computeroutput>*this</computeroutput> to which it refers. The bitmasks specified in <computeroutput>flags</computeroutput> determines what format specifiers or escape sequences are recognized. By default this is the format used by ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11 String.prototype.replace.</para><para>Otherwise, if <computeroutput>Format</computeroutput> models <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt;, OutputIterator, regex_constants::match_flag_type&gt;</computeroutput>, this function returns a <computeroutput>string_type</computeroutput> object <computeroutput>x</computeroutput> populated by calling <computeroutput>fmt(*this, out, flags)</computeroutput>, where <computeroutput>out</computeroutput> is a <computeroutput>back_insert_iterator</computeroutput> into <computeroutput>x</computeroutput>.</para><para>Otherwise, if <computeroutput>Format</computeroutput> models <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt;, OutputIterator&gt;</computeroutput>, this function returns a <computeroutput>string_type</computeroutput> object <computeroutput>x</computeroutput> populated by calling <computeroutput>fmt(*this, out)</computeroutput>, where <computeroutput>out</computeroutput> is a <computeroutput>back_insert_iterator</computeroutput> into <computeroutput>x</computeroutput>.</para><para>Otherwise, if <computeroutput>Format</computeroutput> models <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt; &gt;</computeroutput>, this function returns <computeroutput>fmt(*this)</computeroutput>. </para></description></method>
2493<method name="format" cv="const"><type>string_type</type><parameter name="fmt"><paramtype>char_type const *</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::format_default</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2494<method name="swap"><type>void</type><parameter name="that"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>The <classname alt="boost::xpressive::match_results">match_results</classname> object to swap with. </para></description></parameter><description><para>Swaps the contents of two <classname alt="boost::xpressive::match_results">match_results</classname> objects. Guaranteed not to throw.
2495
2496
2497</para></description><postconditions><para>*this contains the sequence of matched sub-expressions that were in that, that contains the sequence of matched sub-expressions that were in *this. </para>
2498</postconditions><throws><simpara>Will not throw.</simpara></throws></method>
2499<method name="let"><type><classname>match_results</classname>&lt; BidiIter &gt; &amp;</type><template>
2500          <template-type-parameter name="Arg"/>
2501        </template><parameter name="arg"><paramtype>Arg const &amp;</paramtype></parameter><description><para>TODO document me </para></description></method>
2502</method-group>
2503<constructor><description><para>
2504
2505
2506
2507</para></description><postconditions><para>regex_id() == 0 </para>
2508</postconditions><postconditions><para>size() == 0 </para>
2509</postconditions><postconditions><para>empty() == true </para>
2510</postconditions><postconditions><para>str() == string_type() </para>
2511</postconditions></constructor>
2512<constructor><parameter name="that"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The <classname alt="boost::xpressive::match_results">match_results</classname> object to copy </para></description></parameter><description><para>
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522</para></description><postconditions><para>regex_id() == that.regex_id(). </para>
2523</postconditions><postconditions><para>size() == that.size(). </para>
2524</postconditions><postconditions><para>empty() == that.empty(). </para>
2525</postconditions><postconditions><para>str(n) == that.str(n) for all positive integers n &lt; that.size(). </para>
2526</postconditions><postconditions><para>prefix() == that.prefix(). </para>
2527</postconditions><postconditions><para>suffix() == that.suffix(). </para>
2528</postconditions><postconditions><para>(*this)[n] == that[n] for all positive integers n &lt; that.size(). </para>
2529</postconditions><postconditions><para>length(n) == that.length(n) for all positive integers n &lt; that.size(). </para>
2530</postconditions><postconditions><para>position(n) == that.position(n) for all positive integers n &lt; that.size(). </para>
2531</postconditions></constructor>
2532<destructor/>
2533<copy-assignment><type><classname>match_results</classname>&lt; BidiIter &gt; &amp;</type><parameter name="that"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The <classname alt="boost::xpressive::match_results">match_results</classname> object to copy. </para></description></parameter><description><para>
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543</para></description><postconditions><para>regex_id() == that.regex_id(). </para>
2544</postconditions><postconditions><para>size() == that.size(). </para>
2545</postconditions><postconditions><para>empty() == that.empty(). </para>
2546</postconditions><postconditions><para>str(n) == that.str(n) for all positive integers n &lt; that.size(). </para>
2547</postconditions><postconditions><para>prefix() == that.prefix(). </para>
2548</postconditions><postconditions><para>suffix() == that.suffix(). </para>
2549</postconditions><postconditions><para>(*this)[n] == that[n] for all positive integers n &lt; that.size(). </para>
2550</postconditions><postconditions><para>length(n) == that.length(n) for all positive integers n &lt; that.size(). </para>
2551</postconditions><postconditions><para>position(n) == that.position(n) for all positive integers n &lt; that.size(). </para>
2552</postconditions></copy-assignment>
2553</struct><struct name="null_regex_traits"><template>
2554      <template-type-parameter name="Elem"/>
2555    </template><purpose>stub <classname alt="boost::xpressive::regex_traits">regex_traits</classname> for non-char data </purpose><method-group name="public member functions">
2556<method name="operator==" cv="const"><type>bool</type><parameter name="that"><paramtype><classname>null_regex_traits</classname>&lt; char_type &gt; const &amp;</paramtype></parameter><description><para>Checks two <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> objects for equality</para><para>
2557</para></description><returns><para>true. </para>
2558</returns></method>
2559<method name="operator !=" cv="const"><type>bool</type><parameter name="that"><paramtype><classname>null_regex_traits</classname>&lt; char_type &gt; const &amp;</paramtype></parameter><description><para>Checks two <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> objects for inequality</para><para>
2560</para></description><returns><para>false. </para>
2561</returns></method>
2562<method name="widen" cv="const"><type>char_type</type><parameter name="ch"><paramtype>char</paramtype><description><para>The source character. </para></description></parameter><description><para>Convert a char to a Elem</para><para>
2563
2564</para></description><returns><para>Elem(ch). </para>
2565</returns></method>
2566</method-group>
2567<constructor><parameter name=""><paramtype>locale_type</paramtype><default>locale_type()</default></parameter><description><para>Initialize a <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> object. </para></description></constructor>
2568<method-group name="public static functions">
2569<method name="hash" specifiers="static"><type>unsigned char</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Returns a hash value for a Elem in the range [0, UCHAR_MAX]</para><para>
2570
2571</para></description><returns><para>a value between 0 and UCHAR_MAX, inclusive. </para>
2572</returns></method>
2573<method name="translate" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>No-op</para><para>
2574
2575</para></description><returns><para>ch </para>
2576</returns></method>
2577<method name="translate_nocase" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>No-op</para><para>
2578
2579</para></description><returns><para>ch </para>
2580</returns></method>
2581<method name="in_range" specifiers="static"><type>bool</type><parameter name="first"><paramtype>char_type</paramtype><description><para>The bottom of the range, inclusive. </para></description></parameter><parameter name="last"><paramtype>char_type</paramtype><description><para>The top of the range, inclusive. </para></description></parameter><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Checks to see if a character is within a character range.</para><para>
2582
2583</para></description><returns><para>first &lt;= ch &amp;&amp; ch &lt;= last. </para>
2584</returns></method>
2585<method name="in_range_nocase" specifiers="static"><type>bool</type><parameter name="first"><paramtype>char_type</paramtype><description><para>The bottom of the range, inclusive. </para></description></parameter><parameter name="last"><paramtype>char_type</paramtype><description><para>The top of the range, inclusive. </para></description></parameter><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Checks to see if a character is within a character range.</para><para>
2586
2587<note><para>Since the <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> does not do case-folding, this function is equivalent to in_range(). </para>
2588</note>
2589</para></description><returns><para>first &lt;= ch &amp;&amp; ch &lt;= last. </para>
2590</returns></method>
2591<method name="transform" specifiers="static"><type>string_type</type><template>
2592          <template-type-parameter name="FwdIter"/>
2593        </template><parameter name="begin"><paramtype>FwdIter</paramtype></parameter><parameter name="end"><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) then v.transform(G1, G2) &lt; v.transform(H1, H2).</para><para><note><para>Not currently used </para>
2594</note>
2595</para></description></method>
2596<method name="transform_primary" specifiers="static"><type>string_type</type><template>
2597          <template-type-parameter name="FwdIter"/>
2598        </template><parameter name="begin"><paramtype>FwdIter</paramtype></parameter><parameter name="end"><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) when character case is not considered then v.transform_primary(G1, G2) &lt; v.transform_primary(H1, H2).</para><para><note><para>Not currently used </para>
2599</note>
2600</para></description></method>
2601<method name="lookup_collatename" specifiers="static"><type>string_type</type><template>
2602          <template-type-parameter name="FwdIter"/>
2603        </template><parameter name="begin"><paramtype>FwdIter</paramtype></parameter><parameter name="end"><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range [F1, F2). Returns an empty string if the character sequence is not a valid collating element.</para><para><note><para>Not currently used </para>
2604</note>
2605</para></description></method>
2606<method name="lookup_classname" specifiers="static"><type>char_class_type</type><template>
2607          <template-type-parameter name="FwdIter"/>
2608        </template><parameter name="begin"><paramtype>FwdIter</paramtype><description><para>not used </para></description></parameter><parameter name="end"><paramtype>FwdIter</paramtype><description><para>not used </para></description></parameter><parameter name="icase"><paramtype>bool</paramtype><description><para>not used </para></description></parameter><description><para>The <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> does not have character classifications, so lookup_classname() is unused.</para><para>
2609
2610</para></description><returns><para>static_cast&lt;char_class_type&gt;(0) </para>
2611</returns></method>
2612<method name="isctype" specifiers="static"><type>bool</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>not used </para></description></parameter><parameter name="mask"><paramtype>char_class_type</paramtype><description><para>not used </para></description></parameter><description><para>The <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> does not have character classifications, so isctype() is unused.</para><para>
2613
2614</para></description><returns><para>false </para>
2615</returns></method>
2616<method name="value" specifiers="static"><type>int</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>not used </para></description></parameter><parameter name="radix"><paramtype>int</paramtype><description><para>not used </para></description></parameter><description><para>The <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> recognizes no elements as digits, so value() is unused.</para><para>
2617
2618</para></description><returns><para>-1 </para>
2619</returns></method>
2620<method name="imbue" specifiers="static"><type>locale_type</type><parameter name="loc"><paramtype>locale_type</paramtype><description><para>not used </para></description></parameter><description><para>Not used</para><para>
2621
2622</para></description><returns><para>loc </para>
2623</returns></method>
2624<method name="getloc" specifiers="static"><type>locale_type</type><description><para>Returns locale_type().</para><para>
2625</para></description><returns><para>locale_type() </para>
2626</returns></method>
2627</method-group>
2628</struct><struct name="placeholder"><template>
2629      <template-type-parameter name="T"><purpose><para>The type of the object for which this placeholder stands in. </para></purpose></template-type-parameter>
2630      <template-nontype-parameter name="I"><type>int</type><default>0</default><purpose><para>An optional identifier that can be used to distinguish this placeholder from others that may be used in the same semantic action that happen to have the same type.</para></purpose></template-nontype-parameter>
2631    </template><purpose>For defining a placeholder to stand in for a variable a semantic action. </purpose><description><para>Use <computeroutput>placeholder&lt;&gt;</computeroutput> to define a placeholder for use in semantic actions to stand in for real objects. The use of placeholders allows regular expressions with actions to be defined once and reused in many contexts to read and write from objects which were not available when the regex was defined.</para><para>
2632You can use <computeroutput>placeholder&lt;&gt;</computeroutput> by creating an object of type <computeroutput>placeholder&lt;T&gt;</computeroutput> and using that object in a semantic action exactly as you intend an object of type <computeroutput>T</computeroutput> to be used.<programlisting language="c++">placeholder&lt;int&gt; _i;
2633placeholder&lt;double&gt; _d;
2634
2635sregex rex = ( some &gt;&gt; regex &gt;&gt; here )
2636    [ ++_i, _d *= _d ];
2637</programlisting>Then, when doing a pattern match with either <computeroutput>regex_search()</computeroutput>, <computeroutput>regex_match()</computeroutput> or <computeroutput>regex_replace()</computeroutput>, pass a <computeroutput><classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt;</computeroutput> object that contains bindings for the placeholders used in the regex object's semantic actions. You can create the bindings by calling <computeroutput>match_results::let</computeroutput> as follows:<programlisting language="c++">int i = 0;
2638double d = 3.14;
2639
2640smatch what;
2641what.let(_i = i)
2642    .let(_d = d);
2643
2644if(regex_match("some string", rex, what))
2645   // i and d mutated here
2646</programlisting>If a semantic action executes that contains an unbound placeholder, a exception of type <computeroutput><classname alt="boost::xpressive::regex_error">regex_error</classname></computeroutput> is thrown.</para><para>See the discussion for <computeroutput>xpressive::let()</computeroutput> and the  <link linkend="boost_xpressive.user_s_guide.semantic_actions_and_user_defined_assertions.referring_to_non_local_variables"> "Referring to Non-Local Variables"</link> section in the Users' Guide for more information.</para><para><emphasis>Example:</emphasis><programlisting language="c++">// Define a placeholder for a map object:
2647placeholder&lt;std::map&lt;std::string, int&gt; &gt; _map;
2648
2649// Match a word and an integer, separated by =&gt;,
2650// and then stuff the result into a std::map&lt;&gt;
2651sregex pair = ( (s1= +_w) &gt;&gt; "=&gt;" &gt;&gt; (s2= +_d) )
2652    [ _map[s1] = as&lt;int&gt;(s2) ];
2653
2654// Match one or more word/integer pairs, separated
2655// by whitespace.
2656sregex rx = pair &gt;&gt; *(+_s &gt;&gt; pair);
2657
2658// The string to parse
2659std::string str("aaa=&gt;1 bbb=&gt;23 ccc=&gt;456");
2660
2661// Here is the actual map to fill in:
2662std::map&lt;std::string, int&gt; result;
2663
2664// Bind the _map placeholder to the actual map
2665smatch what;
2666what.let( _map = result );
2667
2668// Execute the match and fill in result map
2669if(regex_match(str, what, rx))
2670{
2671    std::cout &lt;&lt; result["aaa"] &lt;&lt; '\n';
2672    std::cout &lt;&lt; result["bbb"] &lt;&lt; '\n';
2673    std::cout &lt;&lt; result["ccc"] &lt;&lt; '\n';
2674}
2675</programlisting> </para></description><method-group name="public member functions">
2676</method-group>
2677<copy-assignment cv="const"><type><emphasis>unspecified</emphasis></type><parameter name="t"><paramtype>T &amp;</paramtype><description><para>The object to associate with this placeholder </para></description></parameter><description><para>
2678
2679</para></description><returns><para>An object of unspecified type that records the association of <computeroutput>t</computeroutput> with <computeroutput>*this</computeroutput>. </para>
2680</returns></copy-assignment>
2681<copy-assignment cv="const"><type><emphasis>unspecified</emphasis></type><parameter name="t"><paramtype>T const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment>
2682</struct><struct name="reference"><template>
2683      <template-type-parameter name="T"><purpose><para>The type of the referent.</para></purpose></template-type-parameter>
2684    </template><inherit access="public">proto::extends&lt; proto::terminal&lt; reference_wrapper&lt; T &gt; &gt;::type, reference&lt; T &gt; &gt;</inherit><purpose><computeroutput>reference&lt;&gt;</computeroutput> is a lazy wrapper for a reference that can be used in xpressive semantic actions. </purpose><description><para>
2685Here is an example of how to use <computeroutput>reference&lt;&gt;</computeroutput> to create a lazy reference to an existing object so it can be read and written in an xpressive semantic action.<programlisting language="c++">using namespace boost::xpressive;
2686std::map&lt;std::string, int&gt; result;
2687reference&lt;std::map&lt;std::string, int&gt; &gt; result_ref(result);
2688
2689// Match a word and an integer, separated by =&gt;,
2690// and then stuff the result into a std::map&lt;&gt;
2691sregex pair = ( (s1= +_w) &gt;&gt; "=&gt;" &gt;&gt; (s2= +_d) )
2692    [ result_ref[s1] = as&lt;int&gt;(s2) ];
2693</programlisting> </para></description><method-group name="public member functions">
2694<method name="get" cv="const"><type>T &amp;</type><purpose>Fetch the stored value. </purpose></method>
2695</method-group>
2696<constructor specifiers="explicit"><parameter name="t"><paramtype>T &amp;</paramtype><description><para>Reference to object </para></description></parameter><purpose>Store a reference to <computeroutput>t</computeroutput>. </purpose><description><para>
2697</para></description></constructor>
2698</struct><struct name="regex_compiler"><template>
2699      <template-type-parameter name="BidiIter"/>
2700      <template-type-parameter name="RegexTraits"/>
2701      <template-type-parameter name="CompilerTraits"/>
2702    </template><purpose>Class template <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> is a factory for building <classname alt="boost::xpressive::basic_regex">basic_regex</classname> objects from a string. </purpose><description><para>Class template <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> is used to construct a <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object from a string. The string should contain a valid regular expression. You can imbue a <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> object with a locale, after which all <classname alt="boost::xpressive::basic_regex">basic_regex</classname> objects created with that <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> object will use that locale. After creating a <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> object, and optionally imbueing it with a locale, you can call the compile() method to construct a <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object, passing it the string representing the regular expression. You can call compile() multiple times on the same <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> object. Two <classname alt="boost::xpressive::basic_regex">basic_regex</classname> objects compiled from the same string will have different regex_id's. </para></description><method-group name="public member functions">
2703<method name="imbue"><type>locale_type</type><parameter name="loc"><paramtype>locale_type</paramtype><description><para>The locale that this <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> should use. </para></description></parameter><description><para>Specify the locale to be used by a <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname>.</para><para>
2704
2705</para></description><returns><para>The previous locale. </para>
2706</returns></method>
2707<method name="getloc" cv="const"><type>locale_type</type><description><para>Get the locale used by a <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname>.</para><para>
2708</para></description><returns><para>The locale used by this <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname>. </para>
2709</returns></method>
2710<method name="compile"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><template>
2711          <template-type-parameter name="InputIter"/>
2712        </template><parameter name="begin"><paramtype>InputIter</paramtype><description><para>The beginning of a range of characters representing the regular expression to compile. </para></description></parameter><parameter name="end"><paramtype>InputIter</paramtype><description><para>The end of a range of characters representing the regular expression to compile. </para></description></parameter><parameter name="flags"><paramtype>flag_type</paramtype><default>regex_constants::ECMAScript</default><description><para>Optional bitmask that determines how the pat string is interpreted. (See syntax_option_type.) </para></description></parameter><description><para>Builds a <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object from a range of characters.</para><para>
2713
2714
2715
2716
2717
2718</para></description><requires><para>InputIter is a model of the InputIterator concept. </para>
2719</requires><requires><para>[begin,end) is a valid range. </para>
2720</requires><requires><para>The range of characters specified by [begin,end) contains a valid string-based representation of a regular expression. </para>
2721</requires><returns><para>A <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object corresponding to the regular expression represented by the character range. </para>
2722</returns><throws><simpara><classname>regex_error</classname> when the range of characters has invalid regular expression syntax. </simpara></throws></method>
2723<method name="compile"><type>disable_if&lt; is_pointer&lt; InputRange &gt;, <classname>basic_regex</classname>&lt; BidiIter &gt; &gt;::type</type><template>
2724          <template-type-parameter name="InputRange"/>
2725        </template><parameter name="pat"><paramtype>InputRange const &amp;</paramtype></parameter><parameter name="flags"><paramtype>flag_type</paramtype><default>regex_constants::ECMAScript</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2726<method name="compile"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><parameter name="begin"><paramtype>char_type const *</paramtype></parameter><parameter name="flags"><paramtype>flag_type</paramtype><default>regex_constants::ECMAScript</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2727<method name="compile"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><parameter name="begin"><paramtype>char_type const *</paramtype></parameter><parameter name="size"><paramtype>std::size_t</paramtype></parameter><parameter name="flags"><paramtype>flag_type</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2728<method name="operator []"><type><classname>basic_regex</classname>&lt; BidiIter &gt; &amp;</type><parameter name="name"><paramtype>string_type const &amp;</paramtype><description><para>A std::string containing the name of the regular expression. </para></description></parameter><description><para>Return a reference to the named regular expression. If no such named regular expression exists, create a new regular expression and return a reference to it.</para><para>
2729
2730
2731</para></description><requires><para>The string is not empty. </para>
2732</requires><throws><simpara><classname>bad_alloc</classname> on allocation failure. </simpara></throws></method>
2733<method name="operator []" cv="const"><type><classname>basic_regex</classname>&lt; BidiIter &gt; const  &amp;</type><parameter name="name"><paramtype>string_type const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2734</method-group>
2735<constructor specifiers="explicit"><parameter name="traits"><paramtype>RegexTraits const &amp;</paramtype><default>RegexTraits()</default></parameter></constructor>
2736<method-group name="private member functions">
2737<method name="is_upper_" cv="const"><type>bool</type><parameter name="ch"><paramtype>char_type</paramtype></parameter></method>
2738</method-group>
2739</struct><struct name="regex_id_filter_predicate"><template>
2740      <template-type-parameter name="BidiIter"/>
2741    </template><method-group name="public member functions">
2742<method name="operator()" cv="const"><type>bool</type><parameter name="res"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></method>
2743</method-group>
2744<constructor><parameter name="regex_id"><paramtype>regex_id_type</paramtype></parameter></constructor>
2745</struct><struct name="regex_iterator"><template>
2746      <template-type-parameter name="BidiIter"/>
2747    </template><method-group name="public member functions">
2748<method name="operator *" cv="const"><type>value_type const  &amp;</type></method>
2749<method name="operator -&gt;" cv="const"><type>value_type const  *</type></method>
2750<method name="operator++"><type><classname>regex_iterator</classname>&lt; BidiIter &gt; &amp;</type><description><para>If what.prefix().first != what[0].second and if the element match_prev_avail is not set in flags then sets it. Then behaves as if by calling regex_search(what[0].second, end, what, *pre, flags), with the following variation: in the event that the previous match found was of zero length (what[0].length() == 0) then attempts to find a non-zero length match starting at what[0].second, only if that fails and provided what[0].second != suffix().second does it look for a (possibly zero length) match starting from what[0].second + 1. If no further match is found then sets *this equal to the end of sequence iterator.
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765</para></description><postconditions><para>(*this)-&gt;size() == pre-&gt;mark_count() + 1 </para>
2766</postconditions><postconditions><para>(*this)-&gt;empty() == false </para>
2767</postconditions><postconditions><para>(*this)-&gt;prefix().first == An iterator denoting the end point of the previous match found </para>
2768</postconditions><postconditions><para>(*this)-&gt;prefix().last == (**this)[0].first </para>
2769</postconditions><postconditions><para>(*this)-&gt;prefix().matched == (*this)-&gt;prefix().first != (*this)-&gt;prefix().second </para>
2770</postconditions><postconditions><para>(*this)-&gt;suffix().first == (**this)[0].second </para>
2771</postconditions><postconditions><para>(*this)-&gt;suffix().last == end </para>
2772</postconditions><postconditions><para>(*this)-&gt;suffix().matched == (*this)-&gt;suffix().first != (*this)-&gt;suffix().second </para>
2773</postconditions><postconditions><para>(**this)[0].first == The starting iterator for this match. </para>
2774</postconditions><postconditions><para>(**this)[0].second == The ending iterator for this match. </para>
2775</postconditions><postconditions><para>(**this)[0].matched == true if a full match was found, and false if it was a partial match (found as a result of the match_partial flag being set). </para>
2776</postconditions><postconditions><para>(**this)[n].first == For all integers n &lt; (*this)-&gt;size(), the start of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then end. </para>
2777</postconditions><postconditions><para>(**this)[n].second == For all integers n &lt; (*this)-&gt;size(), the end of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then end. </para>
2778</postconditions><postconditions><para>(**this)[n].matched == For all integers n &lt; (*this)-&gt;size(), true if sub-expression n participated in the match, false otherwise. </para>
2779</postconditions><postconditions><para>(*this)-&gt;position() == The distance from the start of the original sequence being iterated, to the start of this match. </para>
2780</postconditions></method>
2781<method name="operator++"><type><classname>regex_iterator</classname>&lt; BidiIter &gt;</type><parameter name=""><paramtype>int</paramtype></parameter></method>
2782</method-group>
2783<constructor/>
2784<constructor><parameter name="begin"><paramtype>BidiIter</paramtype></parameter><parameter name="end"><paramtype>BidiIter</paramtype></parameter><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></constructor>
2785<constructor><template>
2786          <template-type-parameter name="LetExpr"/>
2787        </template><parameter name="begin"><paramtype>BidiIter</paramtype></parameter><parameter name="end"><paramtype>BidiIter</paramtype></parameter><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="args"><paramtype><emphasis>unspecified</emphasis></paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></constructor>
2788<constructor><parameter name="that"><paramtype><classname>regex_iterator</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></constructor>
2789<copy-assignment><type><classname>regex_iterator</classname>&lt; BidiIter &gt; &amp;</type><parameter name="that"><paramtype><classname>regex_iterator</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></copy-assignment>
2790<method-group name="private member functions">
2791</method-group>
2792</struct><struct name="regex_token_iterator"><template>
2793      <template-type-parameter name="BidiIter"/>
2794    </template><method-group name="public member functions">
2795<method name="operator *" cv="const"><type>value_type const  &amp;</type></method>
2796<method name="operator -&gt;" cv="const"><type>value_type const  *</type></method>
2797<method name="operator++"><type><classname>regex_token_iterator</classname>&lt; BidiIter &gt; &amp;</type><description><para>If N == -1 then sets *this equal to the end of sequence iterator. Otherwise if N+1 &lt; subs.size(), then increments N and sets result equal to ((subs[N] == -1) ? value_type(what.prefix().str()) : value_type(what[subs[N]].str())). Otherwise if what.prefix().first != what[0].second and if the element match_prev_avail is not set in flags then sets it. Then locates the next match as if by calling regex_search(what[0].second, end, what, *pre, flags), with the following variation: in the event that the previous match found was of zero length (what[0].length() == 0) then attempts to find a non-zero length match starting at what[0].second, only if that fails and provided what[0].second != suffix().second does it look for a (possibly zero length) match starting from what[0].second + 1. If such a match is found then sets N equal to zero, and sets result equal to ((subs[N] == -1) ? value_type(what.prefix().str()) : value_type(what[subs[N]].str())). Otherwise if no further matches were found, then let last_end be the endpoint of the last match that was found. Then if last_end != end and subs[0] == -1 sets N equal to -1 and sets result equal to value_type(last_end, end). Otherwise sets *this equal to the end of sequence iterator. </para></description></method>
2798<method name="operator++"><type><classname>regex_token_iterator</classname>&lt; BidiIter &gt;</type><parameter name=""><paramtype>int</paramtype></parameter></method>
2799</method-group>
2800<constructor><description><para>
2801</para></description><postconditions><para><computeroutput>*this</computeroutput> is the end of sequence iterator. </para>
2802</postconditions></constructor>
2803<constructor><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the character range to search. </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the character range to search. </para></description></parameter><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regex pattern to search for. </para></description></parameter><description><para>
2804
2805</para></description><requires><para><computeroutput/>[begin,end) is a valid range. </para>
2806</requires></constructor>
2807<constructor><template>
2808          <template-type-parameter name="LetExpr"/>
2809        </template><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the character range to search. </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the character range to search. </para></description></parameter><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regex pattern to search for. </para></description></parameter><parameter name="args"><paramtype><emphasis>unspecified</emphasis></paramtype><description><para>A let() expression with argument bindings for semantic actions. </para></description></parameter><description><para>
2810
2811</para></description><requires><para><computeroutput/>[begin,end) is a valid range. </para>
2812</requires></constructor>
2813<constructor><template>
2814          <template-type-parameter name="Subs"/>
2815        </template><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the character range to search. </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the character range to search. </para></description></parameter><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regex pattern to search for. </para></description></parameter><parameter name="subs"><paramtype>Subs const &amp;</paramtype><description><para>A range of integers designating sub-matches to be treated as tokens. </para></description></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default><description><para>Optional match flags, used to control how the expression is matched against the sequence. (See match_flag_type.) </para></description></parameter><description><para>
2816
2817
2818</para></description><requires><para><computeroutput/>[begin,end) is a valid range. </para>
2819</requires><requires><para><computeroutput>subs</computeroutput> is either an integer greater or equal to -1, or else an array or non-empty <computeroutput>std::vector&lt;&gt;</computeroutput> of such integers. </para>
2820</requires></constructor>
2821<constructor><template>
2822          <template-type-parameter name="Subs"/>
2823          <template-type-parameter name="LetExpr"/>
2824        </template><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the character range to search. </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the character range to search. </para></description></parameter><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regex pattern to search for. </para></description></parameter><parameter name="subs"><paramtype>Subs const &amp;</paramtype><description><para>A range of integers designating sub-matches to be treated as tokens. </para></description></parameter><parameter name="args"><paramtype><emphasis>unspecified</emphasis></paramtype><description><para>A let() expression with argument bindings for semantic actions. </para></description></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default><description><para>Optional match flags, used to control how the expression is matched against the sequence. (See match_flag_type.) </para></description></parameter><description><para>
2825
2826
2827</para></description><requires><para><computeroutput/>[begin,end) is a valid range. </para>
2828</requires><requires><para><computeroutput>subs</computeroutput> is either an integer greater or equal to -1, or else an array or non-empty <computeroutput>std::vector&lt;&gt;</computeroutput> of such integers. </para>
2829</requires></constructor>
2830<constructor><parameter name="that"><paramtype><classname>regex_token_iterator</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><description><para>
2831</para></description><postconditions><para><computeroutput>*this == that</computeroutput> </para>
2832</postconditions></constructor>
2833<copy-assignment><type><classname>regex_token_iterator</classname>&lt; BidiIter &gt; &amp;</type><parameter name="that"><paramtype><classname>regex_token_iterator</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><description><para>
2834</para></description><postconditions><para><computeroutput>*this == that</computeroutput> </para>
2835</postconditions></copy-assignment>
2836<method-group name="private member functions">
2837</method-group>
2838</struct><struct name="regex_traits"><template>
2839      <template-type-parameter name="Char"/>
2840      <template-type-parameter name="Impl"/>
2841    </template><inherit access="public">Impl</inherit><description><para>Thin wrapper around the default <classname alt="boost::xpressive::regex_traits">regex_traits</classname> implementation, either <classname alt="boost::xpressive::cpp_regex_traits">cpp_regex_traits</classname> or <classname alt="boost::xpressive::c_regex_traits">c_regex_traits</classname> </para></description><method-group name="public member functions">
2842</method-group>
2843<constructor/>
2844<constructor specifiers="explicit"><parameter name="loc"><paramtype>locale_type const &amp;</paramtype></parameter></constructor>
2845</struct><struct name="sub_match"><template>
2846      <template-type-parameter name="BidiIter"/>
2847    </template><inherit access="public">std::pair&lt; BidiIter, BidiIter &gt;</inherit><purpose>Class template <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput> denotes the sequence of characters matched by a particular marked sub-expression. </purpose><description><para>When the marked sub-expression denoted by an object of type <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> participated in a regular expression match then member <computeroutput>matched</computeroutput> evaluates to <computeroutput>true</computeroutput>, and members <computeroutput>first</computeroutput> and <computeroutput>second</computeroutput> denote the range of characters <computeroutput>[first,second)</computeroutput> which formed that match. Otherwise <computeroutput>matched</computeroutput> is <computeroutput>false</computeroutput>, and members <computeroutput>first</computeroutput> and <computeroutput>second</computeroutput> contained undefined values.</para><para>If an object of type <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> represents sub-expression 0 - that is to say the whole match - then member <computeroutput>matched</computeroutput> is always <computeroutput>true</computeroutput>, unless a partial match was obtained as a result of the flag <computeroutput>match_partial</computeroutput> being passed to a regular expression algorithm, in which case member <computeroutput>matched</computeroutput> is <computeroutput>false</computeroutput>, and members <computeroutput>first</computeroutput> and <computeroutput>second</computeroutput> represent the character range that formed the partial match. </para></description><method-group name="public member functions">
2848<method name="str" cv="const"><type>string_type</type></method>
2849<method name="conversion-operator" cv="const"><type>string_type</type></method>
2850<method name="length" cv="const"><type>difference_type</type></method>
2851<method name="conversion-operator" cv="const"><type>bool_type</type></method>
2852<method name="operator !" cv="const"><type>bool</type></method>
2853<method name="compare" cv="const"><type>int</type><parameter name="str"><paramtype>string_type const &amp;</paramtype><description><para>the string against which to compare </para></description></parameter><purpose>Performs a lexicographic string comparison. </purpose><description><para>
2854
2855</para></description><returns><para>the results of <computeroutput>(*this).str().compare(str)</computeroutput> </para>
2856</returns></method>
2857<method name="compare" cv="const"><type>int</type><parameter name="sub"><paramtype><classname>sub_match</classname> const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2858<method name="compare" cv="const"><type>int</type><parameter name="ptr"><paramtype>value_type const *</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2859</method-group>
2860<constructor/>
2861<constructor><parameter name="first"><paramtype>BidiIter</paramtype></parameter><parameter name="second"><paramtype>BidiIter</paramtype></parameter><parameter name="matched_"><paramtype>bool</paramtype><default>false</default></parameter></constructor>
2862</struct><struct name="value"><template>
2863      <template-type-parameter name="T"><purpose><para>The type of the value to store.</para></purpose></template-type-parameter>
2864    </template><inherit access="public">proto::extends&lt; proto::terminal&lt; T &gt;::type, value&lt; T &gt; &gt;</inherit><purpose><computeroutput>value&lt;&gt;</computeroutput> is a lazy wrapper for a value that can be used in xpressive semantic actions. </purpose><description><para>
2865Below is an example that shows where <computeroutput><computeroutput>value&lt;&gt;</computeroutput></computeroutput> is useful.<programlisting language="c++">sregex good_voodoo(boost::shared_ptr&lt;int&gt; pi)
2866{
2867    using namespace boost::xpressive;
2868    // Use val() to hold the shared_ptr by value:
2869    sregex rex = +( _d [ ++*val(pi) ] &gt;&gt; '!' );
2870    // OK, rex holds a reference count to the integer.
2871    return rex;
2872}
2873</programlisting>In the above code, <computeroutput>xpressive::val()</computeroutput> is a function that returns a <computeroutput>value&lt;&gt;</computeroutput> object. Had <computeroutput>val()</computeroutput> not been used here, the operation <computeroutput>++*pi</computeroutput> would have been evaluated eagerly once, instead of lazily when the regex match happens. </para></description><method-group name="public member functions">
2874<method name="get"><type>T &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2875<method name="get" cv="const"><type>T const  &amp;</type><purpose>Fetch the stored value. </purpose></method>
2876</method-group>
2877<constructor><purpose>Store a default-constructed <computeroutput>T</computeroutput>. </purpose></constructor>
2878<constructor specifiers="explicit"><parameter name="t"><paramtype>T const &amp;</paramtype><description><para>The initial value. </para></description></parameter><purpose>Store a copy of <computeroutput>t</computeroutput>. </purpose><description><para>
2879</para></description></constructor>
2880</struct><namespace name="op">
2881<struct name="as"><template>
2882      <template-type-parameter name="T"><purpose><para>The type to which to lexically cast the parameter. </para></purpose></template-type-parameter>
2883    </template><purpose><computeroutput>as&lt;&gt;</computeroutput> is a PolymorphicFunctionObject for lexically casting a parameter to a different type. </purpose><description><para>
2884</para></description><method-group name="public member functions">
2885<method name="operator()" cv="const"><type>T</type><template>
2886          <template-type-parameter name="Value"/>
2887        </template><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to lexically cast. </para></description></parameter><description><para>
2888
2889</para></description><returns><para><computeroutput>boost::lexical_cast&lt;T&gt;(val)</computeroutput> </para>
2890</returns></method>
2891</method-group>
2892<method-group name="private member functions">
2893</method-group>
2894</struct><struct name="const_cast_"><template>
2895      <template-type-parameter name="T"><purpose><para>The type to which to const-cast the parameter. </para></purpose></template-type-parameter>
2896    </template><purpose><computeroutput><classname alt="boost::xpressive::op::const_cast_">const_cast_</classname>&lt;&gt;</computeroutput> is a PolymorphicFunctionObject for const-casting a parameter to a cv qualification. </purpose><description><para>
2897</para></description><method-group name="public member functions">
2898<method name="operator()" cv="const"><type>T</type><template>
2899          <template-type-parameter name="Value"/>
2900        </template><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to const-cast. </para></description></parameter><description><para>
2901
2902
2903</para></description><requires><para>Types <computeroutput>T</computeroutput> and <computeroutput>Value</computeroutput> differ only in cv-qualification. </para>
2904</requires><returns><para><computeroutput>const_cast&lt;T&gt;(val)</computeroutput> </para>
2905</returns></method>
2906</method-group>
2907</struct><struct name="construct"><template>
2908      <template-type-parameter name="T"><purpose><para>The type of the object to construct. </para></purpose></template-type-parameter>
2909    </template><purpose><computeroutput>construct&lt;&gt;</computeroutput> is a PolymorphicFunctionObject for constructing a new object. </purpose><description><para>
2910</para></description><method-group name="public member functions">
2911<method name="operator()" cv="const"><type>T</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2912<method name="operator()" cv="const"><type>T</type><template>
2913          <template-type-parameter name="A0"/>
2914        </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2915<method name="operator()" cv="const"><type>T</type><template>
2916          <template-type-parameter name="A0"/>
2917          <template-type-parameter name="A1"/>
2918        </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2919<method name="operator()" cv="const"><type>T</type><template>
2920          <template-type-parameter name="A0"/>
2921          <template-type-parameter name="A1"/>
2922          <template-type-parameter name="A2"/>
2923        </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype><description><para>The first argument to the constructor </para></description></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype><description><para>The second argument to the constructor </para></description></parameter><parameter name="a2"><paramtype>A2 const &amp;</paramtype><description><para>The third argument to the constructor </para></description></parameter><description><para>
2924
2925</para></description><returns><para><computeroutput>T(a0,a1,...)</computeroutput> </para>
2926</returns></method>
2927</method-group>
2928</struct><struct name="dynamic_cast_"><template>
2929      <template-type-parameter name="T"><purpose><para>The type to which to dynamically cast the parameter. </para></purpose></template-type-parameter>
2930    </template><purpose><computeroutput><classname alt="boost::xpressive::op::dynamic_cast_">dynamic_cast_</classname>&lt;&gt;</computeroutput> is a PolymorphicFunctionObject for dynamically casting a parameter to a different type. </purpose><description><para>
2931</para></description><method-group name="public member functions">
2932<method name="operator()" cv="const"><type>T</type><template>
2933          <template-type-parameter name="Value"/>
2934        </template><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to dynamically cast. </para></description></parameter><description><para>
2935
2936</para></description><returns><para><computeroutput>dynamic_cast&lt;T&gt;(val)</computeroutput> </para>
2937</returns></method>
2938</method-group>
2939</struct><struct name="static_cast_"><template>
2940      <template-type-parameter name="T"><purpose><para>The type to which to statically cast the parameter. </para></purpose></template-type-parameter>
2941    </template><purpose><computeroutput><classname alt="boost::xpressive::op::static_cast_">static_cast_</classname>&lt;&gt;</computeroutput> is a PolymorphicFunctionObject for statically casting a parameter to a different type. </purpose><description><para>
2942</para></description><method-group name="public member functions">
2943<method name="operator()" cv="const"><type>T</type><template>
2944          <template-type-parameter name="Value"/>
2945        </template><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to statically cast. </para></description></parameter><description><para>
2946
2947</para></description><returns><para><computeroutput>static_cast&lt;T&gt;(val)</computeroutput> </para>
2948</returns></method>
2949</method-group>
2950</struct><struct name="throw_"><template>
2951      <template-type-parameter name="Except"><purpose><para>The type of the object to throw. </para></purpose></template-type-parameter>
2952    </template><purpose><computeroutput><classname alt="boost::xpressive::op::throw_">throw_</classname>&lt;&gt;</computeroutput> is a PolymorphicFunctionObject for throwing an exception. </purpose><description><para>
2953</para></description><method-group name="public member functions">
2954<method name="operator()" cv="const"><type>void</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2955<method name="operator()" cv="const"><type>void</type><template>
2956          <template-type-parameter name="A0"/>
2957        </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2958<method name="operator()" cv="const"><type>void</type><template>
2959          <template-type-parameter name="A0"/>
2960          <template-type-parameter name="A1"/>
2961        </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
2962<method name="operator()" cv="const"><type>void</type><template>
2963          <template-type-parameter name="A0"/>
2964          <template-type-parameter name="A1"/>
2965          <template-type-parameter name="A2"/>
2966        </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype><description><para>The first argument to the constructor </para></description></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype><description><para>The second argument to the constructor </para></description></parameter><parameter name="a2"><paramtype>A2 const &amp;</paramtype><description><para>The third argument to the constructor </para></description></parameter><description><para>
2967
2968<note><para>This function makes use of the <computeroutput>BOOST_THROW_EXCEPTION</computeroutput> macro to actually throw the exception. See the documentation for the Boost.Exception library. </para>
2969</note>
2970</para></description><throws><simpara><classname>&lt;tt&gt;Except(a0</classname> </simpara></throws></method>
2971</method-group>
2972</struct></namespace>
2973<typedef name="regex_id_type"><type>void const  *</type></typedef>
2974<typedef name="sregex"><type><classname>basic_regex</classname>&lt; std::string::const_iterator &gt;</type></typedef>
2975<typedef name="cregex"><type><classname>basic_regex</classname>&lt; char const * &gt;</type></typedef>
2976<typedef name="wsregex"><type><classname>basic_regex</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
2977<typedef name="wcregex"><type><classname>basic_regex</classname>&lt; wchar_t const * &gt;</type></typedef>
2978<typedef name="ssub_match"><type><classname>sub_match</classname>&lt; std::string::const_iterator &gt;</type></typedef>
2979<typedef name="csub_match"><type><classname>sub_match</classname>&lt; char const * &gt;</type></typedef>
2980<typedef name="wssub_match"><type><classname>sub_match</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
2981<typedef name="wcsub_match"><type><classname>sub_match</classname>&lt; wchar_t const * &gt;</type></typedef>
2982<typedef name="sregex_compiler"><type><classname>regex_compiler</classname>&lt; std::string::const_iterator &gt;</type></typedef>
2983<typedef name="cregex_compiler"><type><classname>regex_compiler</classname>&lt; char const * &gt;</type></typedef>
2984<typedef name="wsregex_compiler"><type><classname>regex_compiler</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
2985<typedef name="wcregex_compiler"><type><classname>regex_compiler</classname>&lt; wchar_t const * &gt;</type></typedef>
2986<typedef name="sregex_iterator"><type><classname>regex_iterator</classname>&lt; std::string::const_iterator &gt;</type></typedef>
2987<typedef name="cregex_iterator"><type><classname>regex_iterator</classname>&lt; char const * &gt;</type></typedef>
2988<typedef name="wsregex_iterator"><type><classname>regex_iterator</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
2989<typedef name="wcregex_iterator"><type><classname>regex_iterator</classname>&lt; wchar_t const * &gt;</type></typedef>
2990<typedef name="sregex_token_iterator"><type><classname>regex_token_iterator</classname>&lt; std::string::const_iterator &gt;</type></typedef>
2991<typedef name="cregex_token_iterator"><type><classname>regex_token_iterator</classname>&lt; char const * &gt;</type></typedef>
2992<typedef name="wsregex_token_iterator"><type><classname>regex_token_iterator</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
2993<typedef name="wcregex_token_iterator"><type><classname>regex_token_iterator</classname>&lt; wchar_t const * &gt;</type></typedef>
2994<typedef name="smatch"><type><classname>match_results</classname>&lt; std::string::const_iterator &gt;</type></typedef>
2995<typedef name="cmatch"><type><classname>match_results</classname>&lt; char const * &gt;</type></typedef>
2996<typedef name="wsmatch"><type><classname>match_results</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
2997<typedef name="wcmatch"><type><classname>match_results</classname>&lt; wchar_t const * &gt;</type></typedef>
2998<typedef name="sregex_id_filter_predicate"><type><classname>regex_id_filter_predicate</classname>&lt; std::string::const_iterator &gt;</type></typedef>
2999<typedef name="cregex_id_filter_predicate"><type><classname>regex_id_filter_predicate</classname>&lt; char const * &gt;</type></typedef>
3000<typedef name="wsregex_id_filter_predicate"><type><classname>regex_id_filter_predicate</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
3001<typedef name="wcregex_id_filter_predicate"><type><classname>regex_id_filter_predicate</classname>&lt; wchar_t const * &gt;</type></typedef>
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091</namespace>
3092</namespace>
3093<macro name="BOOST_PROTO_FUSION_V2"/>
3094<macro name="BOOST_XPRESSIVE_HAS_MS_STACK_GUARD"/>
3095</header>
3096<header name="boost/xpressive/xpressive_static.hpp">
3097<para>Includes everything you need to write static regular expressions and use them. </para></header>
3098<header name="boost/xpressive/xpressive_typeof.hpp">
3099<para>Type registrations so that xpressive can be used with the Boost.Typeof library. </para></header>
3100</library-reference>