regex_traits.qbk 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. [/
  2. Copyright 2006-2007 John Maddock.
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt).
  6. ]
  7. [section:regex_traits regex_traits]
  8. namespace boost{
  9. template <class charT, class implementationT = sensible_default_choice>
  10. struct regex_traits : public implementationT
  11. {
  12. regex_traits() : implementationT() {}
  13. };
  14. template <class charT>
  15. struct c_regex_traits;
  16. template <class charT>
  17. class cpp_regex_traits;
  18. template <class charT>
  19. class w32_regex_traits;
  20. } // namespace boost
  21. [h4 Description]
  22. The class `regex_traits` is just a thin wrapper around an actual implementation
  23. class, which may be one of:
  24. * `c_regex_traits`: 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.
  25. * `cpp_regex_traits`: the default traits class for non-Win32 platforms, allows the regex class to be imbued with a std::locale instance.
  26. * `w32_regex_traits`: the default traits class implementation on Win32 platforms, allows the regex class to be imbued with an LCID.
  27. The default behavior can be altered by defining one of the following
  28. configuration macros in
  29. [@../../../../boost/regex/user.hpp boost/regex/user.hpp]
  30. * BOOST_REGEX_USE_C_LOCALE: makes `c_regex_traits` the default.
  31. * BOOST_REGEX_USE_CPP_LOCALE: makes `cpp_regex_traits` the default.
  32. All these traits classes fulfil the
  33. [link boost_regex.ref.concepts.traits_concept traits class requirements].
  34. [endsect]