std::filesystem::filesystem_error::operator=
filesystem_error& operator=( const filesystem_error& other ) noexcept; | (начиная с C++17) |
Присваивает содержимое содержимому other. Если *this и other имеют динамический тип std::filesystem::filesystem_error, то после присваивания std::strcmp(what(), other.what()) == 0.
Параметры
| other | - | другой объект filesystem_error для присваивания |
Возвращаемое значение
*this
Примечания
Типичные реализации хранят объекты path, на которые ссылаются path1() и path2(), в хранилище со счетчиком ссылок. В результате после присваивания *this и other обычно совместно используют свои объекты path.
Пример
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/filesystem/filesystem_error/operator%3D