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

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

πŸ’… std::basic_...::operator=(3) πŸ’…

okay bestie, this one is straight from the C++ Standard Libary and it's all about the move-assignment glow-up for std::basic_ifstream. periodt ✨


πŸŽ€ NAME πŸŽ€

std::basic_ifstream::operator= - std::basic_ifstream::operator=

✨ Synopsis ✨

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

Move assigns the file stream other to *this, effectively move-assigning both the std::basic_istream base class and the associated std::basic_filebuf. 🫢

other is left with no associated file. note that the base class move assignment swaps all stream state variables (except for rdbuf) between *this and other. no cap, that detail matters πŸ’…

🌸 Parameters 🌸

  • other β€” file stream to move

πŸ¦‹ Return value πŸ¦‹

*this β€” iconic, returns itself πŸ’–

πŸŽ€ Example πŸŽ€

This section is incomplete.

Reason: no example.

not me finding zero example energy here 😭 it literally says no example, bestie. that's the whole tea.

πŸ‘‘ See also πŸ‘‘

  • swap β€” swaps two file streams (C++11) (public member function)
  • operator= β€” assigns a basic_filebuf object (C++11) (public member function of std::basic_filebuf<CharT,Traits>)
  • operator= β€” move-assigns from another basic_istream (C++11) (protected member function)

🌈 Category 🌈

  • * Todo no example

source/version and date, bestie: http://cppreference.com Β· 2024.06.10 Β· page std::basic_...::operator=(3) πŸ’œπŸ«Ά

πŸ“¦ where this page comes from