<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>regex_traits</title> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.74.0"> <link rel="home" href="../../index.html" title="Boost.Regex"> <link rel="up" href="../ref.html" title="Reference"> <link rel="prev" href="error_type.html" title="error_type"> <link rel="next" href="non_std_strings.html" title="Interfacing With Non-Standard String Types"> </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="error_type.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="non_std_strings.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a> </div> <div class="section" lang="en"> <div class="titlepage"><div><div><h3 class="title"> <a name="boost_regex.ref.regex_traits"></a><a class="link" href="regex_traits.html" title="regex_traits"> regex_traits</a> </h3></div></div></div> <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <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> <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> <span class="special">{</span> <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> <span class="special">};</span> <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">struct</span> <span class="identifier">c_regex_traits</span><span class="special">;</span> <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">cpp_regex_traits</span><span class="special">;</span> <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">w32_regex_traits</span><span class="special">;</span> <span class="special">}</span> <span class="comment">// namespace boost </span></pre> <a name="boost_regex.ref.regex_traits.description"></a><h5> <a name="id897539"></a> <a class="link" href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a> </h5> <p> The class <code class="computeroutput"><span class="identifier">regex_traits</span></code> is just a thin wrapper around an actual implemention class, which may be one of: </p> <div class="itemizedlist"><ul type="disc"> <li> <code class="computeroutput"><span class="identifier">c_regex_traits</span></code>: this class is deprecated, it wraps the C locale, and is used as the default implementation when the platform is not Win32, and the C++ locale is not available. </li> <li> <code class="computeroutput"><span class="identifier">cpp_regex_traits</span></code>: the default traits class for non-Win32 platforms, allows the regex class to be imbued with a std::locale instance. </li> <li> <code class="computeroutput"><span class="identifier">w32_regex_traits</span></code>: the default traits class implementation on Win32 platforms, allows the regex class to be imbued with an LCID. </li> </ul></div> <p> The default behavior can be altered by defining one of the following configuration macros in <a href="../../../../../../boost/regex/user.hpp" target="_top">boost/regex/user.hpp</a> </p> <div class="itemizedlist"><ul type="disc"> <li> BOOST_REGEX_USE_C_LOCALE: makes <code class="computeroutput"><span class="identifier">c_regex_traits</span></code> the default. </li> <li> BOOST_REGEX_USE_CPP_LOCALE: makes <code class="computeroutput"><span class="identifier">cpp_regex_traits</span></code> the default. </li> </ul></div> <p> All these traits classes fulfil the <a class="link" href="concepts/traits_concept.html" title="Traits Class Requirements">traits class requirements</a>. </p> </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 © 1998 -2007 John Maddock<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="error_type.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="non_std_strings.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a> </div> </body> </html>