Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / regex / v4 / regex_traits_defaults.hpp
index ca13f19..a087d78 100644 (file)
@@ -3,12 +3,12 @@
  * Copyright (c) 2004
  * John Maddock
  *
- * Use, modification and distribution are subject to the 
- * Boost Software License, Version 1.0. (See accompanying file 
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
  * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  *
  */
+
  /*
   *   LOCATION:    see http://www.boost.org for most recent version.
   *   FILE         regex_traits_defaults.hpp
@@ -85,7 +85,7 @@ inline bool is_combining<unsigned char>(unsigned char)
    return false;
 }
 #if !defined(__hpux) && !defined(__WINSCW__) // can't use WCHAR_MAX/MIN in pp-directives
-#ifdef _MSC_VER 
+#ifdef _MSC_VER
 template<>
 inline bool is_combining<wchar_t>(wchar_t c)
 {
@@ -115,11 +115,11 @@ template <class charT>
 inline bool is_separator(charT c)
 {
    return BOOST_REGEX_MAKE_BOOL(
-      (c == static_cast<charT>('\n')) 
-      || (c == static_cast<charT>('\r')) 
-      || (c == static_cast<charT>('\f')) 
-      || (static_cast<boost::uint16_t>(c) == 0x2028u) 
-      || (static_cast<boost::uint16_t>(c) == 0x2029u) 
+      (c == static_cast<charT>('\n'))
+      || (c == static_cast<charT>('\r'))
+      || (c == static_cast<charT>('\f'))
+      || (static_cast<boost::uint16_t>(c) == 0x2028u)
+      || (static_cast<boost::uint16_t>(c) == 0x2029u)
       || (static_cast<boost::uint16_t>(c) == 0x85u));
 }
 template <>
@@ -177,7 +177,7 @@ int get_default_class_id(const charT* p1, const charT* p2)
       'x', 'd', 'i', 'g', 'i', 't',
    };
 
-   static const character_pointer_range<charT> ranges[21] = 
+   static const character_pointer_range<charT> ranges[21] =
    {
       {data+0, data+5,}, // alnum
       {data+5, data+10,}, // alpha
@@ -203,7 +203,7 @@ int get_default_class_id(const charT* p1, const charT* p2)
    };
    static const character_pointer_range<charT>* ranges_begin = ranges;
    static const character_pointer_range<charT>* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0]));
-   
+
    character_pointer_range<charT> t = { p1, p2, };
    const character_pointer_range<charT>* p = std::lower_bound(ranges_begin, ranges_end, t);
    if((p != ranges_end) && (t == *p))
@@ -324,15 +324,15 @@ inline const charT* get_escape_R_string()
 #  pragma warning(push)
 #  pragma warning(disable:4309 4245)
 #endif
-   static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?', 
-      '|', '[', '\x0A', '\x0B', '\x0C', '\x85', '\\', 'x', '{', '2', '0', '2', '8', '}', 
+   static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?',
+      '|', '[', '\x0A', '\x0B', '\x0C', static_cast<unsigned char>('\x85'), '\\', 'x', '{', '2', '0', '2', '8', '}',
                 '\\', 'x', '{', '2', '0', '2', '9', '}', ']', ')', '\0' };
-   static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', 
-      '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' };
+   static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?',
+      '|', '[', '\x0A', '\x0B', '\x0C', static_cast<unsigned char>('\x85'), ']', ')', '\0' };
 
    charT c = static_cast<charT>(0x2029u);
    bool b = (static_cast<unsigned>(c) == 0x2029u);
-   
+
    return (b ? e1 : e2);
 #ifdef BOOST_MSVC
 #  pragma warning(pop)
@@ -346,7 +346,7 @@ inline const char* get_escape_R_string<char>()
 #  pragma warning(push)
 #  pragma warning(disable:4309)
 #endif
-   static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', 
+   static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?',
       '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' };
    return e2;
 #ifdef BOOST_MSVC