std::filesy...::operator=(3)
okay so bestie, todayβs manual page is std::filesy...::operator=(3), straight out of the C++ Standard Libary, and itβs giving βtiny page, assignment operator energy.β letβs get into it. π
π NAME π
std::filesystem::filesystem_error::operator=β thatβs the page name, and the NAME line then repeats the exact same string:std::filesystem::filesystem_error::operator=.
β¨ Synopsis β¨
hereβs the signature exactly as shown:
filesystem_error& operator=( const filesystem_error& other )
(since C++17)
noexcept;
so what does it do? it assigns the contents with those of other. and if *this and other both have dynamic type std::filesystem::filesystem_error, then std::strcmp(what(), other.what()) == 0 after assignment. no cap, thatβs the behavior. π¦
πΈ Parameters πΈ
otherβ anotherfilesystem_errorobject to assign with.
π Return value π
*thisβ yep, it returns*this. iconic.
π₯ Notes π₯
ngl, hereβs the implementation tea the page gives us: typical implementations store path objects referenced by path1() and path2() in a reference-counted storage. as a result, *this and other usually share their path objects after assignment. so yeah, they usually share their path objects after the assignment. π
π Example π
this section is incomplete, and the reason is literally no example:
This section is incomplete Reason: no example
π Category π
- Todo no example
okay bye bestie π source/version: http://cppreference.com; date: 2024.06.10; page: std::filesy...::operator=(3). 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