Imported Upstream version 1.64.0
[platform/upstream/boost.git] / libs / regex / doc / html / boost_regex / ref / regex_traits.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>regex_traits</title>
5 <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../index.html" title="Boost.Regex 5.1.3">
8 <link rel="up" href="../ref.html" title="Reference">
9 <link rel="prev" href="error_type.html" title="error_type">
10 <link rel="next" href="non_std_strings.html" title="Interfacing With Non-Standard String Types">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="error_type.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><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="non_std_strings.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h3 class="title">
27 <a name="boost_regex.ref.regex_traits"></a><a class="link" href="regex_traits.html" title="regex_traits">regex_traits</a>
28 </h3></div></div></div>
29 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
30
31 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">implementationT</span> <span class="special">=</span> <span class="identifier">sensible_default_choice</span><span class="special">&gt;</span>
32 <span class="keyword">struct</span> <span class="identifier">regex_traits</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">implementationT</span>
33 <span class="special">{</span>
34    <span class="identifier">regex_traits</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">implementationT</span><span class="special">()</span> <span class="special">{}</span>
35 <span class="special">};</span>
36
37 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
38 <span class="keyword">struct</span> <span class="identifier">c_regex_traits</span><span class="special">;</span>
39
40 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
41 <span class="keyword">class</span> <span class="identifier">cpp_regex_traits</span><span class="special">;</span>
42
43 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
44 <span class="keyword">class</span> <span class="identifier">w32_regex_traits</span><span class="special">;</span>
45
46 <span class="special">}</span> <span class="comment">// namespace boost</span>
47 </pre>
48 <h5>
49 <a name="boost_regex.ref.regex_traits.h0"></a>
50         <span class="phrase"><a name="boost_regex.ref.regex_traits.description"></a></span><a class="link" href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a>
51       </h5>
52 <p>
53         The class <code class="computeroutput"><span class="identifier">regex_traits</span></code> is
54         just a thin wrapper around an actual implementation class, which may be one
55         of:
56       </p>
57 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
58 <li class="listitem">
59             <code class="computeroutput"><span class="identifier">c_regex_traits</span></code>: this
60             class is deprecated, it wraps the C locale, and is used as the default
61             implementation when the platform is not Win32, and the C++ locale is
62             not available.
63           </li>
64 <li class="listitem">
65             <code class="computeroutput"><span class="identifier">cpp_regex_traits</span></code>: the
66             default traits class for non-Win32 platforms, allows the regex class
67             to be imbued with a std::locale instance.
68           </li>
69 <li class="listitem">
70             <code class="computeroutput"><span class="identifier">w32_regex_traits</span></code>: the
71             default traits class implementation on Win32 platforms, allows the regex
72             class to be imbued with an LCID.
73           </li>
74 </ul></div>
75 <p>
76         The default behavior can be altered by defining one of the following configuration
77         macros in <a href="../../../../../../boost/regex/user.hpp" target="_top">boost/regex/user.hpp</a>
78       </p>
79 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
80 <li class="listitem">
81             BOOST_REGEX_USE_C_LOCALE: makes <code class="computeroutput"><span class="identifier">c_regex_traits</span></code>
82             the default.
83           </li>
84 <li class="listitem">
85             BOOST_REGEX_USE_CPP_LOCALE: makes <code class="computeroutput"><span class="identifier">cpp_regex_traits</span></code>
86             the default.
87           </li>
88 </ul></div>
89 <p>
90         All these traits classes fulfil the <a class="link" href="concepts/traits_concept.html" title="Traits Class Requirements">traits
91         class requirements</a>.
92       </p>
93 </div>
94 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
95 <td align="left"></td>
96 <td align="right"><div class="copyright-footer">Copyright &#169; 1998-2013 John Maddock<p>
97         Distributed under the Boost Software License, Version 1.0. (See accompanying
98         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>)
99       </p>
100 </div></td>
101 </tr></table>
102 <hr>
103 <div class="spirit-nav">
104 <a accesskey="p" href="error_type.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><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="non_std_strings.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
105 </div>
106 </body>
107 </html>