std::ios_base::operator=(3)
β¨ NAME β¨
std::ios_base::operator= β bestie, the name line is literally std::ios_base::operator= - std::ios_base::operator=. This is the C++ Standard Libary manual page for it, and we are about to vibe-check a very important little "nope" π
π¦ Synopsis π¦
Okay so here's the whole signature situation, copied exactly because we do not mess with code:
private: (until C++11)
ios_base& operator=( const ios_base& );
public: (since C++11)
ios_base& operator=( const ios_base& ) = delete;
The copy assignment operator is private (until C++11), deleted (since C++11): streams are not copy-assignable. No cap, that's the whole mood β you cannot copy-assign these cuties π
πΈ Defect reports πΈ
The following behavior-changing defect reports were applied retroactively to previously published C++ standards. Iconic retroactive lore, honestly β¨
- DR:
LWG 50β Applied to:C++98β Behavior as published: the copy assignment operator was not specified as private β Correct behavior: specified.
Sign-off tea π«Ά: this page came from http://cppreference.com, version/date 2024.06.10, and its manual-page name is std::ios_base::operator=(3). Slay, go forth and do not copy-assign streams π
π¦ 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