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.77.1">
7 <link rel=
"home" href=
"../../index.html" title=
"Boost.Regex 5.1.2">
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">
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>
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>
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>
31 <span class=
"keyword">template
</span> <span class=
"special"><</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">></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>
37 <span class=
"keyword">template
</span> <span class=
"special"><</span><span class=
"keyword">class
</span> <span class=
"identifier">charT
</span><span class=
"special">></span>
38 <span class=
"keyword">struct
</span> <span class=
"identifier">c_regex_traits
</span><span class=
"special">;
</span>
40 <span class=
"keyword">template
</span> <span class=
"special"><</span><span class=
"keyword">class
</span> <span class=
"identifier">charT
</span><span class=
"special">></span>
41 <span class=
"keyword">class
</span> <span class=
"identifier">cpp_regex_traits
</span><span class=
"special">;
</span>
43 <span class=
"keyword">template
</span> <span class=
"special"><</span><span class=
"keyword">class
</span> <span class=
"identifier">charT
</span><span class=
"special">></span>
44 <span class=
"keyword">class
</span> <span class=
"identifier">w32_regex_traits
</span><span class=
"special">;
</span>
46 <span class=
"special">}
</span> <span class=
"comment">// namespace boost
</span>
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>
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
57 <div class=
"itemizedlist"><ul class=
"itemizedlist" style=
"list-style-type: disc; ">
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
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.
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.
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>
79 <div class=
"itemizedlist"><ul class=
"itemizedlist" style=
"list-style-type: disc; ">
81 BOOST_REGEX_USE_C_LOCALE: makes
<code class=
"computeroutput"><span class=
"identifier">c_regex_traits
</span></code>
85 BOOST_REGEX_USE_CPP_LOCALE: makes
<code class=
"computeroutput"><span class=
"identifier">cpp_regex_traits
</span></code>
90 All these traits classes fulfil the
<a class=
"link" href=
"concepts/traits_concept.html" title=
"Traits Class Requirements">traits
91 class requirements
</a>.
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
© 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>)
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>