[libcxx-commits] [PATCH] D91137: [5/N] [libcxx] Convert paths to/from the right narrow code page for narrow strings on windows

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 9 14:08:43 PST 2020


curdeius accepted this revision.
curdeius added a comment.

I take your word on what you explained about codepages as I'm not much familiar with it. Otherwise LGTM with some nits.



================
Comment at: libcxx/include/filesystem:1444
+  using _CVT = __widen_from_utf8<sizeof(wchar_t) * __CHAR_BIT__>;
+  using _Str = basic_string<wchar_t>;
+  _Str __w;
----------------
Or just use it instead of _Str?


================
Comment at: libcxx/include/filesystem:1472
+  using _Str = basic_string<wchar_t>;
+  _Str __w;
+  _CVT()(back_inserter(__w), __tmp.data(), __tmp.data() + __tmp.size());
----------------



================
Comment at: libcxx/include/filesystem:1477
+  return path(__f, __l);
+#endif
+}
----------------
Please add comments to longer #endifs.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91137/new/

https://reviews.llvm.org/D91137



More information about the libcxx-commits mailing list