Namespaces
Variants

std::experimental::filesystem::path::generic_string,generic_wstring,generic_u8string,...

来自 zh.cppreference.net
 
 
实验性
技术规范
文件系统库 (filesystem TS)
基础库 (library fundamentals TS)
基础库 2 (library fundamentals TS v2)
基础库 3 (library fundamentals TS v3)
并行扩展 (parallelism TS)
并行扩展 2 (parallelism TS v2)
并发扩展 (concurrency TS)
并发扩展 2 (concurrency TS v2)
概念 (concepts TS)
范围 (ranges TS)
反射 (reflection TS)
数学特殊函数 (special functions TR)
实验性非TS
模式匹配
线性代数
std::execution
契约
2D图形
 
 
 
template< class CharT, class Traits = std::char_traits<CharT>,
          class Alloc = std::allocator<CharT> >
std::basic_string<CharT,Traits,Alloc>
    generic_string( const Alloc& a = Alloc() ) const;
(1) (filesystem TS)
std::string generic_string() const;
(2) (filesystem TS)
std::wstring generic_wstring() const;
(3) (filesystem TS)
std::string generic_u8string() const;
(4) (filesystem TS)
std::u16string generic_u16string() const;
(5) (filesystem TS)
std::u32string generic_u32string() const;
(6) (filesystem TS)

返回通用路径名格式中的内部路径名,并转换为特定的字符串类型。如有转换,则在 待办 中指定。使用 / 字符作为目录分隔符。

1) 所有内存分配由 a 执行。
2-6) u8string() 情况下的编码始终为 UTF-8。

参数

a - 用于构造字符串的分配器
-
CharT必须是编码字符类型之一(char、wchar_t、char16_t和char32_t)

返回值

通用路径名格式的内部路径名,已转换为指定的字符串类型。

异常

可能抛出实现定义的异常。

另请参阅

返回转换为字符串的本机路径名格式路径
(公开成员函数)