std::basic_...::operator=(3)

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

🌸 NAME 🌸

std::basic_stringstream::operator= β€” std::basic_stringstream::operator=

Okay bestie, welcome to std::basic_...::operator=(3) from the C++ Standard Libary β€” yes, that’s the manual-name vibe, and we’re moving right along πŸ’…βœ¨


✨ Synopsis ✨

basic_stringstream& operator=( basic_stringstream&& other );  (since C++11)

So this is the move-assignment girlie for std::basic_stringstream, and she has main character energy since C++11 🫢

Move assigns the string stream other to *this, effectively move-assigning both the std::basic_iostream base class and the associated std::basic_stringbuf.

Note that the base class move assignment swaps all stream state variables (except rdbuf) between *this and other. Yes, swaps β€” that part is literally the tea β˜•πŸ‘€


🫢 Parameters 🫢

  • other β€” string stream to move from πŸ¦‹

πŸ’– Return value πŸ’–

*this β€” that’s it, that’s the whole return value, periodt πŸ’…


😭 Example 😭

This section is incomplete.

Reason: no example.

Not me showing up to the example section and it’s just vibes and a TODO πŸ˜­πŸ’€ It’s giving β€œthe example is on vacation,” fr fr.


πŸ‘€ See also πŸ‘€

  • swap β€” swaps two string streams. (C++11) (public member function) ✨
  • operator= β€” assigns a basic_stringbuf object. (C++11) (public member function of std::basic_stringbuf<CharT,Traits,Allocator>) πŸŽ€
  • operator= β€” move-assigns another basic_iostream. (C++11) (protected member function) πŸ”₯

πŸ’€ Category πŸ’€

Category: Todo β€” no example 😭


Source/version and date, cutely sign-off style: this page came from http://cppreference.com, dated 2024.06.10. Byeee, bestie β€” go move-assign something iconic πŸ¦‹πŸ’–

πŸ“¦ where this page comes from