diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-04 02:49:30 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-04 02:49:30 +0000 |
commit | 6e0bb7e642dfdcc7d94eaa37e1af87579004a09f (patch) | |
tree | b36c8c58f387a360eeb06e28a8aff068a9c2c5a9 | |
parent | 345dccbf94dbdb90ebf1fb16a66e630ac4d7bead (diff) | |
download | gcc-6e0bb7e642dfdcc7d94eaa37e1af87579004a09f.tar.gz |
Use ctype_base::blank in regex_traits.
* include/bits/regex.h (regex_traits::_RegexMask): Remove _S_blank and
adjust _S_valid_mask.
* include/bits/regex.tcc (regex_traits::lookup_classname): Use
ctype_base::blank.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217066 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/regex.h | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/regex.tcc | 8 |
3 files changed, 9 insertions, 11 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c8e2ef28365..19a86a08cf5 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -6,6 +6,11 @@ * include/std/functional (_Bind_simple): Simplify construction. + * include/bits/regex.h (regex_traits::_RegexMask): Remove _S_blank and + adjust _S_valid_mask. + * include/bits/regex.tcc (regex_traits::lookup_classname): Use + ctype_base::blank. + 2014-11-03 Paolo Carlini <paolo.carlini@oracle.com> * include/parallel/algo.h: Do not use default arguments in function diff --git a/libstdc++-v3/include/bits/regex.h b/libstdc++-v3/include/bits/regex.h index 4244f2e5419..30189e3645f 100644 --- a/libstdc++-v3/include/bits/regex.h +++ b/libstdc++-v3/include/bits/regex.h @@ -97,14 +97,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION private: struct _RegexMask { - typedef typename std::ctype<char_type>::mask _BaseType; + typedef std::ctype_base::mask _BaseType; _BaseType _M_base; unsigned char _M_extended; static constexpr unsigned char _S_under = 1 << 0; - // FIXME: _S_blank should be removed in the future, - // when locale's complete. - static constexpr unsigned char _S_blank = 1 << 1; - static constexpr unsigned char _S_valid_mask = 0x3; + static constexpr unsigned char _S_valid_mask = 0x1; constexpr _RegexMask(_BaseType __base = 0, unsigned char __extended = 0) diff --git a/libstdc++-v3/include/bits/regex.tcc b/libstdc++-v3/include/bits/regex.tcc index 3322379a5b8..94cbbfaceaf 100644 --- a/libstdc++-v3/include/bits/regex.tcc +++ b/libstdc++-v3/include/bits/regex.tcc @@ -335,7 +335,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION {"s", ctype_base::space}, {"alnum", ctype_base::alnum}, {"alpha", ctype_base::alpha}, - {"blank", {0, _RegexMask::_S_blank}}, + {"blank", ctype_base::blank}, {"cntrl", ctype_base::cntrl}, {"digit", ctype_base::digit}, {"graph", ctype_base::graph}, @@ -377,11 +377,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __fctyp.is(__f._M_base, __c) // [[:w:]] || ((__f._M_extended & _RegexMask::_S_under) - && __c == __fctyp.widen('_')) - // [[:blank:]] - || ((__f._M_extended & _RegexMask::_S_blank) - && (__c == __fctyp.widen(' ') - || __c == __fctyp.widen('\t'))); + && __c == __fctyp.widen('_')); } template<typename _Ch_type> |