From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E504D3846411; Fri, 7 Aug 2020 11:43:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E504D3846411 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596800582; bh=3fYI7XjJgh4gRYGUhneqeYZqMwe95SAkFBoENJEUE18=; h=From:To:Subject:Date:In-Reply-To:References:From; b=swah2hnwnQcCJbx7wcjpopGwS8o8rtj5GOUSYMdf2XLH88NXpKly9NZl6GG+50JGX cTQ+J3jCpY9HbUDAnUBiVeFa+8aEiva4vdQIJFrL7XEB6GFNJbg31UOkQ3vPZPsjJk UQcFWHfACbgzoxi5GwkTp3NIxfKOv5lf9qrSjYJ8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/94242] filesystem::path::generic_string() only works with std::allocator Date: Fri, 07 Aug 2020 11:43:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 9.3.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2020 11:43:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94242 --- Comment #3 from CVS Commits --- The releases/gcc-8 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:39a5a04daa09c711caeb6aaff12f1d03406fe29f commit r8-10392-g39a5a04daa09c711caeb6aaff12f1d03406fe29f Author: Jonathan Wakely Date: Sat Mar 21 21:51:07 2020 +0000 libstdc++: Fix path::generic_string allocator handling (PR 94242) It's not possible to construct a path::string_type from an allocator of a different type. Create the correct specialization of basic_string, and adjust path::_S_str_convert to use a basic_string_view so that it is independent of the allocator type. PR libstdc++/94242 * include/bits/fs_path.h (path::_S_str_convert): Replace first parameter with basic_string_view so that strings with different allocators can be accepted. (path::generic_string()): Use basic_string object that u= ses the right allocator type. * testsuite/27_io/filesystem/path/generic/94242.cc: New test. * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve test coverage. (cherry picked from commit 9fc985118d9f5014afc1caf32a411ee5803fba61)=