首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::filesystem::path::assign

template< class Source > path& assign( const Source& source );

(1)

(since C++17)

template< class InputIt > path& assign( InputIt first, InputIt last );

(2)

(since C++17)

将内容替换为path通过从给定字符序列构造的新路径名来初始化。

1%29指定由字符范围标识的路径名。source...

2%29指定按字符范围标识的路径名。[first, last)...

参数

source

-

a character range to use, represented as std::string, std::string_view, pointer to a null-terminated multibyte string, or as an input iterator with char value type that points to a null-terminated multibyte string

first, last

-

a character range to use

类型要求

-输入必须符合输入器的要求。

-InputIt的值类型必须是编码字符类型%28 char,wchar[医]T,char16[医]T和char32[医]t%29

}

返回值

*this...

例外

另见

operator=

assigns another path (public member function)

代码语言:txt
复制
 © cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券