[libcxx-commits] [PATCH] D64818: [libcxx] Construct path using a instance of std::locale
Jean Guegant via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 17 11:19:52 PDT 2019
jguegant marked an inline comment as done.
jguegant added inline comments.
================
Comment at: libcxx/include/filesystem:741
+ wstring __r;
+ if (!has_facet<codecvt<wchar_t, char, mbstate_t>>(__loc))
+ return __r;
----------------
Not sure what is the expected behavior if the locale does not this facet.
================
Comment at: libcxx/include/filesystem:809
+ static wstring __convert(_Iter __i, const locale& __loc) {
+ const char __sentinel = char{};
+ string __s;
----------------
Quuxplusone wrote:
> `char{}` is a strange way to spell `'\0'`, and since `sentinel` is used only on line 811, I think you don't need `sentinel` at all.
Sure, that make sense now! It used to be a generic CharT.
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64818/new/
https://reviews.llvm.org/D64818
More information about the libcxx-commits
mailing list