std::match_...s::operator=(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

okay so bestie, this is std::match_...s::operator=(3) from the C++ Standard Libary manual β€” manual name folded in right here, and we are about to understand assignment like it’s the group chat πŸ’…

πŸŽ€ NAME πŸŽ€

  • std::match_results::operator= - std::match_results::operator= β€” that’s the name, no cap ✨

✨ Synopsis ✨

Defined in header <regex> 🫢

match_results& operator=( const match_results& other );     (1)

(since C++11)

match_results& operator=( match_results&& other ) noexcept; (2)

(since C++11)

Assigns the contents. that’s the whole assignment vibe πŸ’–

  1. Copy assignment operator. Assigns the contents of other.
  2. Move assignment operator. Assigns the contents of other using move semantics.

Also: other is in a valid, but unspecified state after the operation. valid but unspecified is the standard wording, periodt πŸ’€

🌸 Parameters 🌸

  • other β€” another match results object. that’s the whole parameter list, and it ate πŸŽ€

πŸ¦‹ Return value πŸ¦‹

*this β€” yes, it returns itself. main character energy, honestly πŸ‘‘

🌈 Exceptions 🌈

  1. May throw implementation-defined exceptions.
only overload (1) has this exception note. overload (2) is the noexcept one in the synopsis, so keep that distinction, bestie πŸ’…

source/version drop: http://cppreference.com, dated 2024.06.10 β€” that’s the footer tea, signed with a sparkle πŸ’–

πŸ“¦ where this page comes from