Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/regex/regex error/operator="

From cppreference.com
< cpp‎ | regex‎ | regex error
([exception]/2 copy assignment)
 
m (Example)
Line 18: Line 18:
 
{{example}}
 
{{example}}
  
{{langlinks|es|ja|zh}}
+
{{langlinks|es|ja|ru|zh}}

Revision as of 21:34, 21 August 2023

regex_error& operator=( const regex_error& other ) noexcept;
(since C++11)

Assigns the contents with those of other. If *this and other both have dynamic type std::regex_error then std::strcmp(what(), other.what()) == 0 after assignment.

Parameters

other - another regex_error object to assign with

Return value

*this

Example