re PR libstdc++/64475 (FAIL: 28_regex/algorithms/regex_match/ecma/char/backref.cc)
authorTim Shen <timshen@google.com>
Fri, 2 Jan 2015 22:33:04 +0000 (22:33 +0000)
committerTim Shen <timshen@gcc.gnu.org>
Fri, 2 Jan 2015 22:33:04 +0000 (22:33 +0000)
PR libstdc++/64475
* include/bits/regex_executor.tcc (_Executor<>::_M_dfs): Copy the
iterator, since the original one shouldn't be mutated.

From-SVN: r219151

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/regex_executor.tcc

index 121ac771e64d8c9aed5ca8ff85bf2170deabb9f4..4c9dc052244ddbabbb19bbbbb572247bf7f76f7b 100644 (file)
@@ -1,3 +1,9 @@
+2015-01-02  Tim Shen  <timshen@google.com>
+
+       PR libstdc++/64475
+       * include/bits/regex_executor.tcc (_Executor<>::_M_dfs): Copy the
+       iterator, since the original one shouldn't be mutated.
+
 2015-01-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
 
        PR libstdc++/64422
index 7954d06eb3ff5183f667578b9b15a131d5ced845..a9736675bf60a70164b108fe8e5f3d05078ec58f 100644 (file)
@@ -310,7 +310,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
            if (!__submatch.matched)
              break;
            auto __last = _M_current;
-           for (auto& __tmp = __submatch.first;
+           for (auto __tmp = __submatch.first;
                 __last != _M_end && __tmp != __submatch.second;
                 ++__tmp)
              ++__last;