std::filesystem::filesystem_error::operator=

filesystem_error& operator=( const filesystem_error& other ) noexcept;
(C++17 起)

other 的内容赋值内容。若 *thisother 均拥有动态类型 std::filesystem::filesystem_error 则赋值后 std::strcmp(what(), other.what()) == 0

参数

other - 用以赋值的另一 filesystem_error 对象

返回值

*this

注解

典型的实现在引用计数的存储中存储 path1()path2() 所引用的 path 对象。结果是 *thisother 通常在赋值后共享其 path 对象。

示例