[libcxx-commits] [PATCH] D91138: [6/N] [libcxx] Handle backslash as path separator on windows
Marek Kurdej via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 9 14:24:26 PST 2020
curdeius added inline comments.
================
Comment at: libcxx/include/filesystem:1122
+#if defined(_LIBCPP_WIN32API)
+ _VSTD::replace(__pn_.begin(), __pn_.end(), L'/', L'\\');
+#endif
----------------
Not sure it will be easier to read, but why not adding (always defined) `__posix_preferred_separator` and `__windows_preferred_separator` and using them here?
================
Comment at: libcxx/src/filesystem/operations.cpp:55
+
+static bool isSeparator(path::value_type C) {
+ if (C == '/')
----------------
No need for `static` in an anonymous namespace.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91138/new/
https://reviews.llvm.org/D91138
More information about the libcxx-commits
mailing list