r248230 - in /branches/gcc-5-branch/libstdc++-v...

redi@gcc.gnu.org redi@gcc.gnu.org
Thu May 18 15:30:00 GMT 2017


Author: redi
Date: Thu May 18 15:30:42 2017
New Revision: 248230

URL: https://gcc.gnu.org/viewcvs?rev=248230&root=gcc&view=rev
Log:
libstdc++/78236 fix past-the-end std::regex_iterator

Backport from mainline
2016-11-09  Tim Shen  <timshen@google.com>

	PR libstdc++/78236
	* libstdc++-v3/include/bits/regex.h (regex_iterator::regex_iterator()):
	Define end() as _M_pregex == nullptr.
	* libstdc++-v3/include/bits/regex.tcc (regex_iterator::operator==(),
	regex_iterator::operator++()): Fix operator==() and operator++() to
	look at null-ness of _M_pregex on both sides.
	* testsuite/28_regex/regression.cc: New testcase.

Modified:
    branches/gcc-5-branch/libstdc++-v3/ChangeLog
    branches/gcc-5-branch/libstdc++-v3/include/bits/regex.h
    branches/gcc-5-branch/libstdc++-v3/include/bits/regex.tcc
    branches/gcc-5-branch/libstdc++-v3/testsuite/28_regex/regression.cc



More information about the Libstdc++-cvs mailing list