命名空间
变体
操作

std::filesystem::filesystem_error::operator=

来自 cppreference.cn
 
 
 
 
filesystem_error& operator=( const filesystem_error& other ) noexcept;
(since C++17)

将内容赋值为 other 的内容。如果 *thisother 均具有动态类型 std::filesystem::filesystem_error,则在赋值后 std::strcmp(what(), other.what()) == 0

内容

[编辑] 参数

other - 要赋值的另一个 filesystem_error 对象

[编辑] 返回值

*this

[编辑] 注解

典型的实现将 path1()path2() 引用的 path 对象存储在引用计数存储中。因此,*thisother 通常在赋值后共享它们的 path 对象。

[编辑] 示例