gcc/libstdc++-v3
Jonathan Wakely 0b3c00ff3c Make std::match_results::_M_resize more useful
As both callers of match_results::_M_resize(unsigned) immediately follow
it with a loop to update the value of each sub_match, that behaviour can
be moved into _M_resize itself. The first caller fills the container
with unmatched subs, which can be done with vector::assign, and the
second caller clears the container to establish a specific state, which
can be provided by a new member function specific to that purpose.

Tangentially, I also noticed that match_results::max_size() doesn't
account for the three special sub_match objects that are always present
in a fully established result state. This patch also fixes that.

	* include/bits/regex.h (match_results::max_size()): Adjust return
	value to account for prefix/suffix/unmatched subs.
	(match_results::_M_resize(unsigned int)): Use _Base_type::assign to
	reset the contained sub matches.
	(match_results::_M_establish_failed_match(_Bi_iter)): Add new member
	function to set result state following a failed match.
	* include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
	sub_match states after _M_resize. Use _M_establish_failed_match.

From-SVN: r271167
2019-05-14 13:19:05 +01:00
..
config Improve API docs for <memory> and <scoped_allocator> 2019-05-02 16:45:04 +01:00
doc Small markup changes to PBDS docs 2019-05-13 21:11:47 +01:00
include Make std::match_results::_M_resize more useful 2019-05-14 13:19:05 +01:00
libsupc++ Improve API docs for <memory> and <new> 2019-05-10 22:41:11 +01:00
po PR libstdc++/89466 avoid slow xsltproc command in configure 2019-02-27 11:25:44 +00:00
python Fix unique_ptr pretty printer for empty classes 2019-05-14 12:17:18 +01:00
scripts Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00
src PR libstdc++/90299 make filesystem::absolute overloads consistent 2019-05-04 15:35:33 +01:00
testsuite PR libstdc++/69724 avoid temporary in std::thread construction 2019-05-14 13:01:15 +01:00
acinclude.m4 PR libstdc++/89466 avoid slow xsltproc command in configure 2019-02-27 11:25:44 +00:00
aclocal.m4
ChangeLog Make std::match_results::_M_resize more useful 2019-05-14 13:19:05 +01:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
config.h.in PR libstdc++/89460 Fix Networking TS test failures on HP-UX 2019-03-11 16:28:11 +00:00
configure PR libstdc++/89460 Fix Networking TS test failures on HP-UX 2019-03-11 16:28:11 +00:00
configure.ac PR libstdc++/89460 Fix Networking TS test failures on HP-UX 2019-03-11 16:28:11 +00:00
configure.host configure.host (abi_baseline_pair): Adjust for SPARC64/Linux. 2019-02-22 07:25:52 +00:00
crossconfig.m4 PR libstdc++/89460 Fix Networking TS test failures on HP-UX 2019-03-11 16:28:11 +00:00
fragment.am
linkage.m4
Makefile.am
Makefile.in PR libstdc++/89466 avoid slow xsltproc command in configure 2019-02-27 11:25:44 +00:00
README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.