summaryrefslogtreecommitdiff
path: root/doc/html/boost/xpressive/cpp_regex_traits.html
blob: a1b636504b941e94b3a1ff8cb62aaee2bdeebba5 (plain)
1
2
3
4
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
94
95
96
97
98
99
100
101
102
103
104
105
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct template cpp_regex_traits</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../xpressive/reference.html#header.boost.xpressive.traits.cpp_regex_traits_hpp" title="Header &lt;boost/xpressive/traits/cpp_regex_traits.hpp&gt;">
<link rel="prev" href="has_fold_case_c_regex_t_id1837072.html" title="Struct has_fold_case&lt;c_regex_traits&lt; char &gt;&gt;">
<link rel="next" href="has_fold_case_cpp_regex_id1837890.html" title="Struct has_fold_case&lt;cpp_regex_traits&lt; char &gt;&gt;">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="has_fold_case_c_regex_t_id1837072.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../xpressive/reference.html#header.boost.xpressive.traits.cpp_regex_traits_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_fold_case_cpp_regex_id1837890.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.xpressive.cpp_regex_traits"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template cpp_regex_traits</span></h2>
<p>boost::xpressive::cpp_regex_traits &#8212; Encapsaulates a std::locale for use by the <a class="link" href="basic_regex.html" title="Struct template basic_regex">basic_regex</a>&lt;&gt; class template. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../xpressive/reference.html#header.boost.xpressive.traits.cpp_regex_traits_hpp" title="Header &lt;boost/xpressive/traits/cpp_regex_traits.hpp&gt;">boost/xpressive/traits/cpp_regex_traits.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Char<span class="special">&gt;</span> 
<span class="keyword">struct</span> <a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a> <span class="special">{</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">Char</span>                           <a name="boost.xpressive.cpp_regex_traits.char_type"></a><span class="identifier">char_type</span><span class="special">;</span>      
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <a name="boost.xpressive.cpp_regex_traits.string_type"></a><span class="identifier">string_type</span><span class="special">;</span>    
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">locale</span>                    <a name="boost.xpressive.cpp_regex_traits.locale_type"></a><span class="identifier">locale_type</span><span class="special">;</span>    
  <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span>                    <a name="boost.xpressive.cpp_regex_traits.char_class_type"></a><span class="identifier">char_class_type</span><span class="special">;</span>
  <span class="keyword">typedef</span> <a class="link" href="regex_traits_version_2_tag.html" title="Struct regex_traits_version_2_tag">regex_traits_version_2_tag</a>     <a name="boost.xpressive.cpp_regex_traits.version_tag"></a><span class="identifier">version_tag</span><span class="special">;</span>    
  <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span>                    <a name="boost.xpressive.cpp_regex_traits.base_type"></a><span class="identifier">base_type</span><span class="special">;</span>      

  <span class="comment">// <a class="link" href="cpp_regex_traits.html#boost.xpressive.cpp_regex_traitsconstruct-copy-destruct">construct/copy/destruct</a></span>
  <a class="link" href="cpp_regex_traits.html#id1837761-bb"><span class="identifier">cpp_regex_traits</span></a><span class="special">(</span><span class="identifier">locale_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">locale_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="cpp_regex_traits.html#id1837154-bb">public member functions</a></span>
  <span class="keyword">bool</span> <a class="link" href="cpp_regex_traits.html#id1837157-bb"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="cpp_regex_traits.html#id1837190-bb"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">char_type</span> <a class="link" href="cpp_regex_traits.html#id1837223-bb"><span class="identifier">widen</span></a><span class="special">(</span><span class="keyword">char</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">char_type</span> <a class="link" href="cpp_regex_traits.html#id1837251-bb"><span class="identifier">translate_nocase</span></a><span class="special">(</span><span class="identifier">char_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">char_type</span> <a class="link" href="cpp_regex_traits.html#id1837279-bb"><span class="identifier">tolower</span></a><span class="special">(</span><span class="identifier">char_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">char_type</span> <a class="link" href="cpp_regex_traits.html#id1837307-bb"><span class="identifier">toupper</span></a><span class="special">(</span><span class="identifier">char_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">string_type</span> <a class="link" href="cpp_regex_traits.html#id1837335-bb"><span class="identifier">fold_case</span></a><span class="special">(</span><span class="identifier">char_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="cpp_regex_traits.html#id1837378-bb"><span class="identifier">in_range_nocase</span></a><span class="special">(</span><span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">char_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FwdIter<span class="special">&gt;</span> 
    <span class="identifier">string_type</span> <a class="link" href="cpp_regex_traits.html#id1837434-bb"><span class="identifier">transform_primary</span></a><span class="special">(</span><span class="identifier">FwdIter</span><span class="special">,</span> <span class="identifier">FwdIter</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FwdIter<span class="special">&gt;</span> 
    <span class="identifier">string_type</span> <a class="link" href="cpp_regex_traits.html#id1837474-bb"><span class="identifier">lookup_collatename</span></a><span class="special">(</span><span class="identifier">FwdIter</span><span class="special">,</span> <span class="identifier">FwdIter</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FwdIter<span class="special">&gt;</span> 
    <span class="identifier">char_class_type</span> <a class="link" href="cpp_regex_traits.html#id1837514-bb"><span class="identifier">lookup_classname</span></a><span class="special">(</span><span class="identifier">FwdIter</span><span class="special">,</span> <span class="identifier">FwdIter</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="cpp_regex_traits.html#id1837571-bb"><span class="identifier">isctype</span></a><span class="special">(</span><span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">char_class_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">int</span> <a class="link" href="cpp_regex_traits.html#id1837614-bb"><span class="identifier">value</span></a><span class="special">(</span><span class="identifier">char_type</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">locale_type</span> <a class="link" href="cpp_regex_traits.html#id1837659-bb"><span class="identifier">imbue</span></a><span class="special">(</span><span class="identifier">locale_type</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">locale_type</span> <a class="link" href="cpp_regex_traits.html#id1837686-bb"><span class="identifier">getloc</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <a class="link" href="cpp_regex_traits.html#id1837698-bb"><span class="identifier">hash</span></a><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <a class="link" href="cpp_regex_traits.html#id1837714-bb"><span class="identifier">hash</span></a><span class="special">(</span><span class="keyword">char</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <a class="link" href="cpp_regex_traits.html#id1837729-bb"><span class="identifier">hash</span></a><span class="special">(</span><span class="keyword">signed</span> <span class="keyword">char</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <a class="link" href="cpp_regex_traits.html#id1837745-bb"><span class="identifier">hash</span></a><span class="special">(</span><span class="keyword">wchar_t</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="cpp_regex_traits.html#id1837782-bb">public static functions</a></span>
  <span class="keyword">static</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <a class="link" href="cpp_regex_traits.html#id1837785-bb"><span class="identifier">hash</span></a><span class="special">(</span><span class="identifier">char_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">char_type</span> <a class="link" href="cpp_regex_traits.html#id1837813-bb"><span class="identifier">translate</span></a><span class="special">(</span><span class="identifier">char_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="cpp_regex_traits.html#id1837840-bb"><span class="identifier">in_range</span></a><span class="special">(</span><span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">char_type</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id3837609"></a><h2>Description</h2>
<div class="refsect2">
<a name="id3837612"></a><h3>
<a name="boost.xpressive.cpp_regex_traitsconstruct-copy-destruct"></a><code class="computeroutput">cpp_regex_traits</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><a name="id1837761-bb"></a><span class="identifier">cpp_regex_traits</span><span class="special">(</span><span class="identifier">locale_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> loc <span class="special">=</span> <span class="identifier">locale_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Initialize a <code class="computeroutput"><a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a></code> object to use the specified std::locale, or the global std::locale if none is specified. </p>
</li></ol></div>
</div>
<div class="refsect2">
<a name="id3837713"></a><h3>
<a name="id1837154-bb"></a><code class="computeroutput">cpp_regex_traits</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="id1837157-bb"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Checks two <code class="computeroutput"><a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a></code> objects for equality</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>this-&gt;getloc() == that.getloc(). </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="id1837190-bb"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Checks two <code class="computeroutput"><a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a></code> objects for inequality</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>this-&gt;getloc() != that.getloc(). </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">char_type</span> <a name="id1837223-bb"></a><span class="identifier">widen</span><span class="special">(</span><span class="keyword">char</span> ch<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Convert a char to a Char</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>std::use_facet&lt;std::ctype&lt;char_type&gt; &gt;(this-&gt;getloc()).widen(ch). </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">char_type</span> <a name="id1837251-bb"></a><span class="identifier">translate_nocase</span><span class="special">(</span><span class="identifier">char_type</span> ch<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Converts a character to lower-case using the internally-stored std::locale.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>std::tolower(ch, this-&gt;getloc()). </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">char_type</span> <a name="id1837279-bb"></a><span class="identifier">tolower</span><span class="special">(</span><span class="identifier">char_type</span> ch<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Converts a character to lower-case using the internally-stored std::locale.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>std::tolower(ch, this-&gt;getloc()). </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">char_type</span> <a name="id1837307-bb"></a><span class="identifier">toupper</span><span class="special">(</span><span class="identifier">char_type</span> ch<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Converts a character to upper-case using the internally-stored std::locale.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>std::toupper(ch, this-&gt;getloc()). </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">string_type</span> <a name="id1837335-bb"></a><span class="identifier">fold_case</span><span class="special">(</span><span class="identifier">char_type</span> ch<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Returns a string_type containing all the characters that compare equal disregrarding case to the one passed in. This function can only be called if <code class="computeroutput"><a class="link" href="has_fold_case.html" title="Struct template has_fold_case">has_fold_case</a></code>&lt;<code class="computeroutput"><a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a></code>&lt;Char&gt; &gt;::value is true.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>string_type containing all chars which are equal to ch when disregarding case </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="id1837378-bb"></a><span class="identifier">in_range_nocase</span><span class="special">(</span><span class="identifier">char_type</span> first<span class="special">,</span> <span class="identifier">char_type</span> last<span class="special">,</span> <span class="identifier">char_type</span> ch<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Checks to see if a character is within a character range, irregardless of case.</p>
<p>

</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>The default implementation doesn't do proper Unicode case folding, but this is the best we can do with the standard ctype facet. </p></td></tr>
</table></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
<td><p>The bottom of the range, inclusive. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">last</code></span></p></td>
<td><p>The top of the range, inclusive. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>in_range(first, last, ch) || in_range(first, last, tolower(ch, this-&gt;getloc())) || in_range(first, last, toupper(ch, this-&gt;getloc())) </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FwdIter<span class="special">&gt;</span> 
  <span class="identifier">string_type</span> <a name="id1837434-bb"></a><span class="identifier">transform_primary</span><span class="special">(</span><span class="identifier">FwdIter</span> begin<span class="special">,</span> <span class="identifier">FwdIter</span> end<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>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).</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>Not currently used </p></td></tr>
</table></div>
<p>
</p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FwdIter<span class="special">&gt;</span> 
  <span class="identifier">string_type</span> <a name="id1837474-bb"></a><span class="identifier">lookup_collatename</span><span class="special">(</span><span class="identifier">FwdIter</span> begin<span class="special">,</span> <span class="identifier">FwdIter</span> end<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>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.</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>Not currently used </p></td></tr>
</table></div>
<p>
</p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FwdIter<span class="special">&gt;</span> 
  <span class="identifier">char_class_type</span> 
  <a name="id1837514-bb"></a><span class="identifier">lookup_classname</span><span class="special">(</span><span class="identifier">FwdIter</span> begin<span class="special">,</span> <span class="identifier">FwdIter</span> end<span class="special">,</span> <span class="keyword">bool</span> icase<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>For the character class name represented by the specified character sequence, return the corresponding bitmask representation.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">begin</code></span></p></td>
<td><p>A forward iterator to the start of the character sequence representing the name of the character class. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">end</code></span></p></td>
<td><p>The end of the character sequence. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">icase</code></span></p></td>
<td><p>Specifies whether the returned bitmask should represent the case-insensitive version of the character class. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A bitmask representing the character class. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="id1837571-bb"></a><span class="identifier">isctype</span><span class="special">(</span><span class="identifier">char_type</span> ch<span class="special">,</span> <span class="identifier">char_class_type</span> mask<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Tests a character against a character class bitmask.</p>
<p>


</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The character to test. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">mask</code></span></p></td>
<td><p>The character class bitmask against which to test. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>mask is a bitmask returned by lookup_classname, or is several such masks bit-or'ed together. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>true if the character is a member of any of the specified character classes, false otherwise. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">int</span> <a name="id1837614-bb"></a><span class="identifier">value</span><span class="special">(</span><span class="identifier">char_type</span> ch<span class="special">,</span> <span class="keyword">int</span> radix<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Convert a digit character into the integer it represents.</p>
<p>


</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The digit character. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">radix</code></span></p></td>
<td><p>The radix to use for the conversion. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>radix is one of 8, 10, or 16. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>-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. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">locale_type</span> <a name="id1837659-bb"></a><span class="identifier">imbue</span><span class="special">(</span><span class="identifier">locale_type</span> loc<span class="special">)</span><span class="special">;</span></pre>
<p>Imbues *this with loc</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">loc</code></span></p></td>
<td><p>A std::locale. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>the previous std::locale used by *this. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">locale_type</span> <a name="id1837686-bb"></a><span class="identifier">getloc</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Returns the current std::locale used by *this. </p>
</li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <a name="id1837698-bb"></a><span class="identifier">hash</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">char</span> ch<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <a name="id1837714-bb"></a><span class="identifier">hash</span><span class="special">(</span><span class="keyword">char</span> ch<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <a name="id1837729-bb"></a><span class="identifier">hash</span><span class="special">(</span><span class="keyword">signed</span> <span class="keyword">char</span> ch<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <a name="id1837745-bb"></a><span class="identifier">hash</span><span class="special">(</span><span class="keyword">wchar_t</span> ch<span class="special">)</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="id3839465"></a><h3>
<a name="id1837782-bb"></a><code class="computeroutput">cpp_regex_traits</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <a name="id1837785-bb"></a><span class="identifier">hash</span><span class="special">(</span><span class="identifier">char_type</span> ch<span class="special">)</span><span class="special">;</span></pre>
<p>Returns a hash value for a Char in the range [0, UCHAR_MAX]</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>a value between 0 and UCHAR_MAX, inclusive. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">char_type</span> <a name="id1837813-bb"></a><span class="identifier">translate</span><span class="special">(</span><span class="identifier">char_type</span> ch<span class="special">)</span><span class="special">;</span></pre>
<p>No-op</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>ch </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="id1837840-bb"></a><span class="identifier">in_range</span><span class="special">(</span><span class="identifier">char_type</span> first<span class="special">,</span> <span class="identifier">char_type</span> last<span class="special">,</span> <span class="identifier">char_type</span> ch<span class="special">)</span><span class="special">;</span></pre>
<p>Checks to see if a character is within a character range.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
<td><p>The bottom of the range, inclusive. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">last</code></span></p></td>
<td><p>The top of the range, inclusive. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>first &lt;= ch &amp;&amp; ch &lt;= last. </p></td>
</tr>
</tbody>
</table></div>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2007 Eric Niebler<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="has_fold_case_c_regex_t_id1837072.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../xpressive/reference.html#header.boost.xpressive.traits.cpp_regex_traits_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_fold_case_cpp_regex_id1837890.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>