From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 2AED03858D39; Fri, 11 Nov 2022 22:29:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2AED03858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668205783; bh=6xz9QAaOWi3Py+wns8I+uUnq3+ojL6b9qSzUen67m58=; h=From:To:Subject:Date:From; b=NgTvz+tkliZ24jY59Y0gp2W/0zDZdDWgLO/egI4eupxfr63hVtdqeJuAXpFEUnNMI grRwmSEnGWqcGgHX2PIOrtgPtXJT+w7PX3HHjwKMy6AWLmDhK5jtHt1oJUadnNBJaP WEGUJT1F4V7x0dPp3hORttOV1ZFvXn9HD9hx7IYM= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-3915] libstdc++: Fix for Windows [PR95048] X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 7543a6da90def8a847bb147444e8d42365c223f7 X-Git-Newrev: 8214ec0cf33482f60139ae18a40567317e63c1ff Message-Id: <20221111222943.2AED03858D39@sourceware.org> Date: Fri, 11 Nov 2022 22:29:41 +0000 (GMT) List-Id: https://gcc.gnu.org/g:8214ec0cf33482f60139ae18a40567317e63c1ff commit r13-3915-g8214ec0cf33482f60139ae18a40567317e63c1ff Author: Jonathan Wakely Date: Fri Nov 11 22:25:14 2022 +0000 libstdc++: Fix 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. Diff: --- libstdc++-v3/include/experimental/bits/fs_path.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libstdc++-v3/include/experimental/bits/fs_path.h b/libstdc++-v3/include/experimental/bits/fs_path.h index 6e2f47f5e63..a493e17a37e 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; - const auto& __cvt = std::use_facet<_Cvt>(std::locale{}); + std::codecvt_utf8_utf16 __cvt; std::wstring __wstr; if (__str_codecvt_in_all(__f, __l, __wstr, __cvt)) return __wstr;