Files
2025-10-25 03:02:53 +03:00

4.7 KiB
Raw Permalink Blame History

[re.regex.assign]

28 Text processing library [text]

28.6 Regular expressions library [re]

28.6.7 Class template basic_regex [re.regex]

28.6.7.3 Assignment [re.regex.assign]

🔗

basic_regex& operator=(const basic_regex& e);

1

#

Postconditions: flags() and mark_count() returne.flags() and e.mark_count(), respectively.

🔗

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

2

#

Postconditions: flags() and mark_count() return the values thate.flags() and e.mark_count(), respectively, had before assignment.

e is in a valid state with unspecified value.

🔗

basic_regex& operator=(const charT* p);

3

#

Effects: Equivalent to: return assign(p);

🔗

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

4

#

Effects: Equivalent to: return assign(il.begin(), il.end());

🔗

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

5

#

Effects: Equivalent to: return assign(s);

🔗

basic_regex& assign(const basic_regex& e);

6

#

Effects: Equivalent to: return *this = e;

🔗

basic_regex& assign(basic_regex&& e) noexcept;

7

#

Effects: Equivalent to: return *this = std::move(e);

🔗

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

8

#

Effects: Equivalent to: return assign(string_type(p), f);

🔗

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

9

#

Effects: Equivalent to: return assign(string_type(p, len), f);

🔗

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

10

#

Effects: Assigns the regular expression contained in the strings, interpreted according the flags specified in f.

If an exception is thrown, *this is unchanged.

11

#

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

12

#

Returns: *this.

13

#

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

🔗

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

14

#

Effects: Equivalent to: return assign(string_type(first, last), f);

🔗

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

15

#

Effects: Equivalent to: return assign(il.begin(), il.end(), f);