re PR libstdc++/64140 (match_results.prefix() returns an incorrect result if regex_it...
authorTim Shen <timshen@google.com>
Thu, 4 Dec 2014 04:25:12 +0000 (04:25 +0000)
committerTim Shen <timshen@gcc.gnu.org>
Thu, 4 Dec 2014 04:25:12 +0000 (04:25 +0000)
commit9b9c2a974a93393b3993bb84d244844e8a527da9
treeea70d254be8eb35eb50f02db8797b7f6e9b63f1e
parentddff61d69b48b6962dc925d5835f86aef34da136
re PR libstdc++/64140 (match_results.prefix() returns an incorrect result if regex_iterator holds a zero-length match)

PR libstdc++/64140
* include/bits/regex.tcc (regex_iterator<>::operator++): Update
prefix.matched after modifying prefix.first.
* testsuite/28_regex/iterators/regex_iterator/char/64140.cc: New
testcase.

From-SVN: r218340
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/regex.tcc
libstdc++-v3/testsuite/28_regex/iterators/regex_iterator/char/64140.cc [new file with mode: 0644]