From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 21B5E3858CD1; Thu, 1 Jun 2023 03:00:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21B5E3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685588443; bh=rynIe8PR8NWVHjJK5VrCKo5k/Fg3Br+uUSWuQKcVNI8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=m84p/l1ihu3kSVtB6ngcCzGAglOF6wbqehJk7WPz78rzyRlyXOf8FYk8Eed6FlYCj 64LSJKocdVwcGC/NCV1y8nq/zZLrE+Zpk6uQ7+HKJIpevVP2unbtsMwvXMqNfR/OEM 27KhNVPisI45xsztnzaJMgG9GVzM5J/qV74ec0Y8= From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/84849] [DR1228] Ambiguous resolution of braze initializer list to a class with explicit constructors Date: Thu, 01 Jun 2023 03:00:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 7.2.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: SUSPENDED 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=3D84849 --- Comment #10 from Jason Merrill --- (In reply to ensadc from comment #7) > (In reply to Zhihao Yuan from comment #6) >=20 > I think this is a different bug. GCC thinks the implicitly-deleted move > assignment operator `pair& pair::operator=3D(pair&&)` i= s a > candidate for the assignment, which causes ambiguity with > `operator=3D(value_type&&)` (where value_type =3D pair). But as part= of > resolution of CWG 1402, [class.copy.assign] specifies that "A defaulted m= ove > assignment operator that is defined as deleted is ignored by overload > resolution". Incidentally, no: GCC mentions it, but considers it worse than any other candidate. The real ambiguity is with operator=3D(const pair&), the implicitly-deleted *copy* assignment. I don't think this is a bug; if you disagree, please open another PR for it.=