Namespaces
Variants

std::filesystem::filesystem_error:: operator=

From zh.cppreference.net
filesystem_error & operator = ( const filesystem_error & other ) noexcept ;
(自 C++17 起)

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

目录

参数

其他 - 用于赋值的另一个 filesystem_error 对象

返回值

* this

注释

典型实现将 path1() 和 path2() 引用的 path 对象存储在引用计数存储中。因此,在赋值操作后, * this 和 other 通常会共享其 path 对象。

示例