You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need a way to include the paths with only slashes rather than backslashes in the output in a cross-platform manner. This can be done by introducing type in format-spec for path.
How to use the proposed feature
On Windows,
std::filesystem::path filename = R"(C:\Users\zhihaoy\.cache)";
print("|{}|", filename); // prints |C:\Users\zhihaoy\.cache|print("|{:n}|", filename); // prints `.native()` |C:\Users\zhihaoy\.cache|print("|{:g}|", filename); // prints `.generic_wstring()` |C:/Users/zhihaoy/.cache|
On POSIX, the last line prints .generic_string().
The text was updated successfully, but these errors were encountered:
Why
Need a way to include the paths with only slashes rather than backslashes in the output in a cross-platform manner. This can be done by introducing
type
in format-spec forpath
.How to use the proposed feature
On Windows,
On POSIX, the last line prints
.generic_string()
.The text was updated successfully, but these errors were encountered: