aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-11-11 22:25:14 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-11-11 22:28:03 +0000
commit8214ec0cf33482f60139ae18a40567317e63c1ff (patch)
treee5fe6ba30b223141a42f7eb0395821ccd7598abb
parent7543a6da90def8a847bb147444e8d42365c223f7 (diff)
downloadgcc-8214ec0cf33482f60139ae18a40567317e63c1ff.zip
gcc-8214ec0cf33482f60139ae18a40567317e63c1ff.tar.gz
gcc-8214ec0cf33482f60139ae18a40567317e63c1ff.tar.bz2
libstdc++: Fix <experimental/filesystem> for Windows [PR95048]
I meant to include this change in r13-3909-gb331bf303bdc1e but I forgot to sync it from the machine where I did the mingw testing to the one where I pushed the commit. libstdc++-v3/ChangeLog: PR libstdc++/95048 * include/experimental/bits/fs_path.h (path::_Cvt::_S_wconvert): Construct codecvt directly instead of getting it from the locale.
-rw-r--r--libstdc++-v3/include/experimental/bits/fs_path.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/libstdc++-v3/include/experimental/bits/fs_path.h b/libstdc++-v3/include/experimental/bits/fs_path.h
index 6e2f47f..a493e17 100644
--- a/libstdc++-v3/include/experimental/bits/fs_path.h
+++ b/libstdc++-v3/include/experimental/bits/fs_path.h
@@ -792,8 +792,7 @@ namespace __detail
static string_type
_S_wconvert(const char* __f, const char* __l, const char*)
{
- using _Cvt = std::codecvt_utf8_utf16<wchar_t>;
- const auto& __cvt = std::use_facet<_Cvt>(std::locale{});
+ std::codecvt_utf8_utf16<wchar_t> __cvt;
std::wstring __wstr;
if (__str_codecvt_in_all(__f, __l, __wstr, __cvt))
return __wstr;