From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2446E3858D39; Tue, 14 Mar 2023 22:35:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2446E3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678833317; bh=GM3NS7cAWE2x9T4pMNgOjqU3OXts4zuTLP5l3hJPyic=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SoaaD2iI8w5KQB4H5AdEqOnQ8MCldzt5UhgKU97m+sctyAG2sfMGwwqX1xVMJAVkh qAM6lyh21M22cH8+KgX79+9PywLRaIeO6FDxRHDCVCIY2+0hPJK7CAgyUv7VYuSLnJ wyvipjNY+2nKmeYlJdqSL2taWNbthj+3vrfSpWSc= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109136] initializer_list constructor constraint and explicit conversion operator Date: Tue, 14 Mar 2023 22:35:17 +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: 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: short_desc 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=3D109136 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[concepts] initializer_list |initializer_list |constructor constraint |constructor constraint and |should require static_cast |explicit conversion |for explicit conversion |operator |operator | --- Comment #1 from Andrew Pinski --- This has nothing to do with concepts really: ``` #include struct foo { explicit operator int(); }; template void f(From x) { std::initializer_list{ x }; } void g() { f(foo{}); } ``` GCC accepts the above example but clang rejects it.=