This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.
match_results
should be moveableSection: 28.6.9.2 [re.results.const] Status: C++11 Submitter: Stephan T. Lavavej Opened: 2009-09-15 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [re.results.const].
View all issues with C++11 status.
Discussion:
In Working Draft
N2914,
match_results
lacks a move constructor and move
assignment operator. Because it owns dynamically allocated memory, it
should be moveable.
As far as I can tell, this isn't tracked by an active issue yet; Library
Issue 723(i) doesn't talk about match_results
.
[ 2009-09-21 Daniel provided wording. ]
[ 2009-11-18: Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]
Proposed resolution:
Add the following member declarations to 28.6.9 [re.results]/3:
// 28.10.1, construct/copy/destroy: explicit match_results(const Allocator& a = Allocator()); match_results(const match_results& m); match_results& operator=(const match_results& m); ~match_results();
Add the following new prototype descriptions to 28.6.9.2 [re.results.const]
using the table numbering of
N3000
(referring to the table titled "match_results
assignment operator effects"):
match_results(const match_results& m);4 Effects: Constructs an object of class
match_results
, as a copy ofm
.
match_results& operator=(const match_results& m);7 Effects: Assigns
m
to*this
. The postconditions of this function are indicated in Table 131.