The string returned by all native format observers is in the native pathname format ([fs.def.native]).
Returns: pathstring.
const value_type* c_str() const noexcept;
Returns: pathstring.c_str().
Returns: pathstring.
[ Note: Conversion to string_type is provided so that an object of class path can be given as an argument to existing standard library file stream constructors and open functions. — end note ]
template <class EcharT, class traits = char_traits<EcharT>,
class Allocator = allocator<EcharT>>
basic_string<EcharT, traits, Allocator>
string(const Allocator& a = Allocator()) const;
Returns: pathstring.
Remarks: All memory allocation, including for the return value, shall be performed by a. Conversion, if any, is specified by [path.cvt].
std::string string() const;
std::wstring wstring() const;
std::string u8string() const;
std::u16string u16string() const;
std::u32string u32string() const;
Returns: pathstring.
Remarks: Conversion, if any, is performed as specified by [path.cvt]. The encoding of the string returned by u8string() is always UTF-8.