From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 15B23385840F; Thu, 23 Mar 2023 13:20:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 15B23385840F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679577642; bh=akjYAK2OOtXZT7QUcNYchdfqXCjfJWhM+jc1qLM9hXY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=W2Me1z68exU2aFxOzw+dxuQ4TDIFx7/pQZVTB+Op6Jr5gFQC0S7jr7AVYA2q1dYeq 4jMV5aBCIceCfZDtxUueOwcx+7uytsxNpZBvKZyOrDiRxJXMr+/p2ELxrsP0b5ul+9 C9lSwqsQn1cLh4Z9aJQoXD09NJKNZbr8KyN/kQ7k= From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109247] [13 Regression] optional o; o = {x}; wants to use explicit optional(U) constructor since r13-6765-ga226590fefb35ed6 Date: Thu, 23 Mar 2023 13:20:41 +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: 13.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D109247 --- Comment #2 from Jason Merrill --- No templates (so it's ambiguous, but the problem is the same): struct B { int a; }; struct C { explicit C (int); C& operator=3D (B); C& operator=3D (const C&); }; void f(C x) { x =3D { 42 }; }=