This matches what MS STL returns; in std::filesystem, forward slashes is considered a generic dir separator that is valid on all platforms.
amccarth EricWF curdeius ldionne
- Group Reviewers
- rGf4f5fb915104: [libcxx] Make generic_*string return paths with forward slashes on windows
Hmmm. Why can't it be implemented in terms of generic_string?
If I'm not mistaken it means that you traverse the string twice, once in u8string() to convert it using _CVT, and then in replace().
Because before C++20 (before char8_t), there's no typename that specifically triggers UTF8 output; if requesting output as char, it's produced in the current windows narrow code page, which in most cases isn't UTF8.
Yep, that's a correct observation. Suboptimal, but I wouldn't want to complicate things even further (especially at this point of the patchset) for that cause - at this point, getting it to work (at all) and correctly is the only priority...