28 Regular expressions library [re]

28.8 Class template basic_regex [re.regex]

28.8.3 basic_regex assign [re.regex.assign]

basic_regex& operator=(const basic_regex& e);

Effects: returns assign(e).

basic_regex& operator=(basic_regex&& e) noexcept;

Effects: returns assign(std::move(e)).

basic_regex& operator=(const charT* ptr);

Requires: ptr shall not be a null pointer.

Effects: returns assign(ptr).

basic_regex& operator=(initializer_list<charT> il);

Effects: returns assign(il.begin(), il.end()).

template <class ST, class SA> basic_regex& operator=(const basic_string<charT, ST, SA>& p);

Effects: returns assign(p).

basic_regex& assign(const basic_regex& that);

Effects: copies that into *this and returns *this.

Postconditions: flags() and mark_count() return that.flags() and that.mark_count(), respectively.

basic_regex& assign(basic_regex&& that) noexcept;

Effects: move assigns from that into *this and returns *this.

Postconditions: flags() and mark_count() return the values that that.flags() and that.mark_count(), respectively, had before assignment. that is in a valid state with unspecified value.

basic_regex& assign(const charT* ptr, flag_type f = regex_constants::ECMAScript);

Returns: assign(string_type(ptr), f).

basic_regex& assign(const charT* ptr, size_t len, flag_type f = regex_constants::ECMAScript);

Returns: assign(string_type(ptr, len), f).

template <class string_traits, class A> basic_regex& assign(const basic_string<charT, string_traits, A>& s, flag_type f = regex_constants::ECMAScript);

Throws: regex_error if s is not a valid regular expression.

Returns: *this.

Effects: Assigns the regular expression contained in the string s, interpreted according the flags specified in f. If an exception is thrown, *this is unchanged.

Postconditions: If no exception is thrown, flags() returns f and mark_count() returns the number of marked sub-expressions within the expression.

template <class InputIterator> basic_regex& assign(InputIterator first, InputIterator last, flag_type f = regex_constants::ECMAScript);

Requires: The type InputIterator shall satisfy the requirements for an Input Iterator ([input.iterators]).

Returns: assign(string_type(first, last), f).

basic_regex& assign(initializer_list<charT> il, flag_type f = regex_constants::ECMAScript);

Effects: Same as assign(il.begin(), il.end(), f).

Returns: *this.