std::basic_...x::operator=(3)
π std::basic_...x::operator=(3) π
okay so bestie, welcome to the C++ Standard Libary manual page for std::basic_regex::operator= π
yes, that's the manual name, spelled Libary right on the page, and we are keeping the icon exactly as found π
πΈ NAME πΈ
std::basic_regex::operator= - std::basic_regex::operator=
It's literally the assignment operator for std::basic_regex. slay.
β¨ Synopsis β¨
Defined in header <regex>.
basic_regex& operator=( const basic_regex& other );
(1) (since C++11)
basic_regex& operator=( basic_regex&& other ) noexcept;
(2) (since C++11)
basic_regex& operator=( const CharT* ptr );
(3) (since C++11)
basic_regex& operator=( std::initializer_list<CharT> il );
(4) (since C++11)
template< class ST, class SA >
(5) (since C++11)
basic_regex& operator=( const std::basic_string<CharT,ST,SA>& p );
Assigns the contents. Here's the overload-by-overload tea π«β¨
- Copy assignment operator. Assigns the contents of
other. Equivalent toassign(other);. - Move assignment operator. Assigns the contents of
otherusing move semantics. After the operation,otheris in a valid, but unspecified state. Equivalent toassign(other);. - Assigns a null-terminated character string pointed to by
ptr. Equivalent toassign(ptr);. - Assigns characters contained in initializer list
il. Equivalent toassign(il);. - Assigns the contents of the string
p. Equivalent toassign(p);.
π Parameters π
otherβ another regex object.ptrβ pointer to a null-terminated character string.ilβ initializer list containing characters to assign.pβ string containing characters to assign.
π Return value π
*this β that's the whole return value, no cap π
π₯ Exceptions π₯
1)β may throw implementation-defined exceptions.3-5)βstd::regex_errorif the supplied regular expression is not valid. The object is not modified in that case.
bestie, if the regex is invalid you get std::regex_error, and the object stays unmodified β no sneaky half-assignment energy π
π¦ See also π¦
assignβ assigns the contents (public member function).
Catch you later, bestie! This page came from http://cppreference.com, dated 2024.06.10, and it's the std::basic_...x::operator=(3) manual page. mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms