28 Regular expressions library [re]

28.10 Class template match_results [re.results]

28.10.1 match_results constructors [re.results.const]

In all match_results constructors, a copy of the Allocator argument shall be used for any memory allocation performed by the constructor or member functions during the lifetime of the object.

match_results(const Allocator& a = Allocator());

Effects: Constructs an object of class match_results.

Postconditions: ready() returns false. size() returns 0.

match_results(const match_results& m);

Effects: Constructs an object of class match_results, as a copy of m.

match_results(match_results&& m) noexcept;

Effects: Move-constructs an object of class match_results from m satisfying the same postconditions as Table [tab:re:results:assign]. Additionally, the stored Allocator value is move constructed from m.get_allocator().

Throws: Nothing if the allocator's move constructor throws nothing.

match_results& operator=(const match_results& m);

Effects: Assigns m to *this. The postconditions of this function are indicated in Table [tab:re:results:assign].

match_results& operator=(match_results&& m);

Effects: Move-assigns m to *this. The postconditions of this function are indicated in Table [tab:re:results:assign].

Table 141match_results assignment operator effects
ElementValue
ready() m.ready()
size() m.size()
str(n) m.str(n) for all integers n < m.size()
prefix() m.prefix()
suffix() m.suffix()
(*this)[n] m[n] for all integers n < m.size()
length(n) m.length(n) for all integers n < m.size()
position(n) m.position(n) for all integers n < m.size()