From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E0D623953C09; Tue, 18 May 2021 04:35:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0D623953C09 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/100475] semiregular-box's constructor uses wrong list-initialization Date: Tue, 18 May 2021 04:35:26 +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: 12.0 X-Bugzilla-Keywords: wrong-code 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: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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: Tue, 18 May 2021 04:35:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100475 --- Comment #6 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:fe993b469c528230d9a01e1ae2208610f960dd9f commit r12-856-gfe993b469c528230d9a01e1ae2208610f960dd9f Author: Patrick Palka Date: Tue May 18 00:28:44 2021 -0400 libstdc++: Fix up semiregular-box partial specialization [PR100475] This makes the in-place constructor of our partial specialization of __box for already-semiregular types perform direct-non-list-initializat= ion (in accordance with the specification of the primary template), and additionally makes the member function data() use std::__addressof. libstdc++-v3/ChangeLog: PR libstdc++/100475 * include/std/ranges (__box::__box): Use non-list-initialization in member initializer list of in-place constructor of the partial specialization for semiregular types. (__box::operator->): Use std::__addressof. * testsuite/std/ranges/adaptors/detail/semiregular_box.cc (test02): New test. * testsuite/std/ranges/single_view.cc (test04): New test.=