char_regex_traits.hpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. *
  3. * Copyright (c) 2002
  4. * John Maddock
  5. *
  6. * Use, modification and distribution are subject to the
  7. * Boost Software License, Version 1.0. (See accompanying file
  8. * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. *
  10. */
  11. /*
  12. * LOCATION: see http://www.boost.org for most recent version.
  13. * FILE char_regex_traits.cpp
  14. * VERSION see <boost/version.hpp>
  15. * DESCRIPTION: Declares deprecated traits classes char_regex_traits<>.
  16. */
  17. #ifndef BOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP
  18. #define BOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP
  19. #ifdef BOOST_MSVC
  20. #pragma warning(push)
  21. #pragma warning(disable: 4103)
  22. #endif
  23. #ifdef BOOST_HAS_ABI_HEADERS
  24. # include BOOST_ABI_PREFIX
  25. #endif
  26. #ifdef BOOST_MSVC
  27. #pragma warning(pop)
  28. #endif
  29. namespace boost{
  30. namespace deprecated{
  31. //
  32. // class char_regex_traits_i
  33. // provides case insensitive traits classes (deprecated):
  34. template <class charT>
  35. class char_regex_traits_i : public regex_traits<charT> {};
  36. template<>
  37. class char_regex_traits_i<char> : public regex_traits<char>
  38. {
  39. public:
  40. typedef char char_type;
  41. typedef unsigned char uchar_type;
  42. typedef unsigned int size_type;
  43. typedef regex_traits<char> base_type;
  44. };
  45. #ifndef BOOST_NO_WREGEX
  46. template<>
  47. class char_regex_traits_i<wchar_t> : public regex_traits<wchar_t>
  48. {
  49. public:
  50. typedef wchar_t char_type;
  51. typedef unsigned short uchar_type;
  52. typedef unsigned int size_type;
  53. typedef regex_traits<wchar_t> base_type;
  54. };
  55. #endif
  56. } // namespace deprecated
  57. } // namespace boost
  58. #ifdef BOOST_MSVC
  59. #pragma warning(push)
  60. #pragma warning(disable: 4103)
  61. #endif
  62. #ifdef BOOST_HAS_ABI_HEADERS
  63. # include BOOST_ABI_SUFFIX
  64. #endif
  65. #ifdef BOOST_MSVC
  66. #pragma warning(pop)
  67. #endif
  68. #endif // include