Re: [PATCH] Make std::match_results::_M_resize more useful

2019-05-14 Thread Jonathan Wakely
On 04/12/18 14:30 +, Jonathan Wakely wrote: 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

[PATCH] Make std::match_results::_M_resize more useful

2018-12-04 Thread Jonathan Wakely
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