From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 106CF3858401; Thu, 25 Jan 2024 09:49:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 106CF3858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706176142; bh=g/wRGFgJumT6X1S1UBjbkm4u5g8+HyXNSuH5NiOdE08=; h=From:To:Subject:Date:In-Reply-To:References:From; b=c/paMl5AhPbxavJqgpeWj8Gbtfm+B0yeylHDvwdUlOkWeDnX6tA8nt9MK8mwOUEh+ EmCRFim3+ozlCUv0YkcuUhD7LbJkfIZ6ci52JIqL3J8EQE56yubpObp7hxyjM9CcLU uBoyIZZGwwuiLtP9y6Jfe2LS9I63Sx6ZuWPaLrHc= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113522] std::swap cannot be called with explicit template argument std::array Date: Thu, 25 Jan 2024 09:48:59 +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: 13.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113522 --- Comment #7 from Andrew Pinski --- (In reply to Jonathan Wakely from comment #6) > I'd also like to ban it for std::make_pair, but that would break loads of > very silly code that does std::make_pair(a,b) (c.f. Bug 92300 comment > 3). Note GCC/go has that code too: go/gofrontend/expressions.cc: return std::make_pair(NULL, NULL); go/gofrontend/expressions.cc: return std::make_pair(NULL, NULL); go/gofrontend/expressions.cc: return std::make_pair(NULL, NULL); go/gofrontend/import.cc: this->type_offsets_.resize(maxp1, std::make_pair(0, 0)); :)=