mirror of git://gcc.gnu.org/git/gcc.git
re PR libstdc++/64441 (A match_results returns an incorrect sub_match if the sub_match::matched is false)
PR libstdc++/64441 * include/bits/regex.tcc (__regex_algo_impl): s/auto/auto&/. * include/bits/regex_executor.tcc (_Executor<>::_M_dfs): Likewise. From-SVN: r219121
This commit is contained in:
parent
54ba5c5c67
commit
ec5f010299
|
|
@ -1,3 +1,9 @@
|
||||||
|
2014-12-31 Tim Shen <timshen@google.com>
|
||||||
|
|
||||||
|
PR libstdc++/64441
|
||||||
|
* include/bits/regex.tcc (__regex_algo_impl): s/auto/auto&/.
|
||||||
|
* include/bits/regex_executor.tcc (_Executor<>::_M_dfs): Likewise.
|
||||||
|
|
||||||
2014-12-28 David Edelsohn <dje.gcc@gmail.com>
|
2014-12-28 David Edelsohn <dje.gcc@gmail.com>
|
||||||
|
|
||||||
* testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
|
* testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
}
|
}
|
||||||
if (__ret)
|
if (__ret)
|
||||||
{
|
{
|
||||||
for (auto __it : __res)
|
for (auto& __it : __res)
|
||||||
if (!__it.matched)
|
if (!__it.matched)
|
||||||
__it.first = __it.second = __e;
|
__it.first = __it.second = __e;
|
||||||
auto& __pre = __res[__res.size()-2];
|
auto& __pre = __res[__res.size()-2];
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
if (!__submatch.matched)
|
if (!__submatch.matched)
|
||||||
break;
|
break;
|
||||||
auto __last = _M_current;
|
auto __last = _M_current;
|
||||||
for (auto __tmp = __submatch.first;
|
for (auto& __tmp = __submatch.first;
|
||||||
__last != _M_end && __tmp != __submatch.second;
|
__last != _M_end && __tmp != __submatch.second;
|
||||||
++__tmp)
|
++__tmp)
|
||||||
++__last;
|
++__last;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue