summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/bits/regex_executor.tcc
diff options
context:
space:
mode:
authortimshen <timshen@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-29 18:33:07 +0000
committertimshen <timshen@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-29 18:33:07 +0000
commit8cf691c41f48b629e9bf6d96e277852f242861e9 (patch)
tree47953718d312ebb6f609c71919a39de4a22c5f23 /libstdc++-v3/include/bits/regex_executor.tcc
parentb3521e4b13778020b7c1c6f09421f8cb983f9dd0 (diff)
downloadppe42-gcc-8cf691c41f48b629e9bf6d96e277852f242861e9.tar.gz
ppe42-gcc-8cf691c41f48b629e9bf6d96e277852f242861e9.zip
2013-08-29 Tim Shen <timshen91@gmail.com>
* include/bits/regex.h (basic_regex<>::assign): Don't lose _M_traits. (regex_iterator<>::regex_iterator): Return nullptr when regex_search failed. (regex_token_iterator<>::_M_end_of_seq): Should be defined true when _M_result is(not isn't) nullptr. * include/bits/regex_compiler.h: Store _Compiler::_M_traits by reference instead of by value. * include/bits/regex_executor.h (_DFSExecutor<>::_DFSExecutor): Add _M_traits to _DFSExecutor. * include/bits/regex_executor.tcc (__get_executor<>): Pass traits to _DFSExecutor too. * testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc: New. * testsuite/28_regex/iterators/regex_token_iterator/wchar_t/ wstring_02.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202082 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/regex_executor.tcc')
-rw-r--r--libstdc++-v3/include/bits/regex_executor.tcc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/regex_executor.tcc b/libstdc++-v3/include/bits/regex_executor.tcc
index edfd0b649ff..788d65e54de 100644
--- a/libstdc++-v3/include/bits/regex_executor.tcc
+++ b/libstdc++-v3/include/bits/regex_executor.tcc
@@ -320,7 +320,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
auto __p = std::static_pointer_cast<_NFA<_CharT, _TraitsT>>
(__re._M_automaton);
if (__p->_M_has_backref)
- return _ExecutorPtr(new _DFSExecutorT(__b, __e, __m, *__p, __flags));
+ return _ExecutorPtr(new _DFSExecutorT(__b, __e, __m, *__p,
+ __re._M_traits, __flags));
return _ExecutorPtr(new _BFSExecutorT(__b, __e, __m, *__p, __flags));
}
OpenPOWER on IntegriCloud