[libcxx-commits] [PATCH] D91138: [6/N] [libcxx] Handle backslash as path separator on windows
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Dec 10 00:18:52 PST 2020
mstorsjo added inline comments.
================
Comment at: libcxx/include/filesystem:1122
+#if defined(_LIBCPP_WIN32API)
+ _VSTD::replace(__pn_.begin(), __pn_.end(), L'/', L'\\');
+#endif
----------------
curdeius wrote:
> 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?
Hmm, maybe - although I'm not sure if it really helps with readability?
================
Comment at: libcxx/src/filesystem/operations.cpp:55
+
+static bool isSeparator(path::value_type C) {
+ if (C == '/')
----------------
curdeius wrote:
> No need for `static` in an anonymous namespace.
Thanks, will fix.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91138/new/
https://reviews.llvm.org/D91138
More information about the libcxx-commits
mailing list