https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64303
--- Comment #2 from Tim Shen <timshen at gcc dot gnu.org> --- Author: timshen Date: Wed Dec 17 10:27:21 2014 New Revision: 218814 URL: https://gcc.gnu.org/viewcvs?rev=218814&root=gcc&view=rev Log: 2014-12-17 Tim Shen <tims...@google.com> PR libstdc++/64302 PR libstdc++/64303 Backported form mainline 2014-12-17 Tim Shen <tims...@google.com> * include/bits/regex.h (match_results::cbegin, match_results::cend, regex_token_iterator::regex_token_iterator, regex_token_iterator::_M_normalize_result): Fix match_results cbegin and cend and regex_token_iterator::_M_result invariant. * include/bits/regex.tcc: Fix regex_token_iterator::_M_result invariant. * testsuite/28_regex/iterators/regex_token_iterator/64303.cc: Testcase. Added: branches/gcc-4_9-branch/libstdc++-v3/testsuite/28_regex/iterators/regex_token_iterator/64303.cc Modified: branches/gcc-4_9-branch/libstdc++-v3/ChangeLog branches/gcc-4_9-branch/libstdc++-v3/include/bits/regex.h branches/gcc-4_9-branch/libstdc++-v3/include/bits/regex.tcc