re PR libstdc++/64239 (regex_iterator::operator= should copy match_results::position)
authorTim Shen <timshen@google.com>
Sat, 13 Dec 2014 22:19:18 +0000 (22:19 +0000)
committerTim Shen <timshen@gcc.gnu.org>
Sat, 13 Dec 2014 22:19:18 +0000 (22:19 +0000)
commitbc2738455bf4e405cf0ad3d61482b49cd4382113
tree8fbd14b1bfca1e100c674f1a08fca314b98923e6
parent6554581713da6cc9bb96cf86cf7a0cece80a448e
re PR libstdc++/64239 (regex_iterator::operator= should copy match_results::position)

PR libstdc++/64239
* include/bits/regex.h (match_results<>::match_results,
match_results<>::operator=, match_results<>::position,
match_results<>::swap): Remove match_results::_M_in_iterator.
Fix ctor/assign/swap.
* include/bits/regex.tcc: (__regex_algo_impl<>,
regex_iterator<>::operator++): Set match_results::_M_begin as
"start position".
* testsuite/28_regex/iterators/regex_iterator/char/
string_position_01.cc: Test cases.

From-SVN: r218710
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/regex.h
libstdc++-v3/include/bits/regex.tcc
libstdc++-v3/testsuite/28_regex/iterators/regex_iterator/char/string_position_01.cc