Namespaces
Variants
Actions

std::filesystem::filesystem_error::operator=

From cppreference.com
 
C++
 
Filesystem library
Classes
Functions
File types
 
filesystem_error
filesystem_error& operator=( const filesystem_error& other ) noexcept;
(since C++17)

Assigns the contents with those of other. If *this and other both have dynamic type std::filesystem::filesystem_error then std::strcmp(what(), other.what() == 0 after assignment.

Contents

[edit] Parameters

other - another filesystem_error object to assign with

[edit] Return value

*this

[edit] Notes

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.

[edit] Example

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant