std::filesy...y::operator=(3)

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

πŸ’… std::filesystem::directory_entry::operator= πŸ’…

okay bestie, you've landed on the std::filesy...y::operator=(3) page from the C++ Standard Libary β€” yes, that's literally how it's spelled up top, and we are not fixing it. This page is all about std::filesystem::directory_entry::operator=, aka the assignment operator. It's giving "replace my whole contents with yours" energy. πŸ’–


✨ NAME ✨

std::filesystem::directory_entry::operator= - std::filesystem::directory_entry::operator=

periodt, it's listed twice like that. iconic, lowkey repetitive, but we move. 🫢

🌸 Synopsis 🌸

directory_entry& operator=( const directory_entry& other ) =
(1) (since C++17)
default;
directory_entry& operator=( directory_entry&& other ) noexcept =
(2) (since C++17)
default;

So (1) is the copy-assignment operator, (2) is the move-assignment operator β€” and yes, the move one is marked noexcept. Both are (since C++17), bestie. πŸ¦‹

It replaces the contents of the directory entry (path and cached attributes, if any) with the contents of other. And both copy- and move-assignment operators for directory_entry are defaulted. no handwritten drama, just defaults slaying. ✨

πŸŽ€ Parameters πŸŽ€

  • other β€” other directory_entry.

⭐ Return value ⭐

*this β€” yep, that's the whole return value. It returns *this. πŸ’…

πŸ¦‹ Example πŸ¦‹

This section is incomplete. Reason: no example. 😭

πŸ” See also πŸ”

  • assign β€” assigns contents (public member function).

πŸ—‚οΈ Category πŸ—‚οΈ

* Todo no example


mwah πŸ’‹ β€” source: http://cppreference.com, version/date: 2024.06.10, manual: std::filesy...y::operator=(3). slay and goodnight ✨

πŸ“¦ where this page comes from