This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR libstdc++/83600 fix end iterator for unready std::match_results


match_results::begin() and match_results::end() are required to work
even when the object is not ready, so the current definition of end()
is broken (it performs an undefined subtraction to return an invalid
iterator).

	PR libstdc++/83600
	* include/bits/regex.h (match_results::end()): Return valid iterator
	when not ready.
	* testsuite/28_regex/match_results/ctors/char/default.cc: Check that
	unready objects are empty and have equal begin and end iterators.
	* testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.

Tested powerpc64le-linux, committed to trunk. Backports to follow.


Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]