From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 70EF438618B4; Mon, 19 Feb 2024 09:07:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70EF438618B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708333650; bh=SFw9vVO8xcSol9qZwJkW461PcGX4lJ231R+3K1QsuYE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rwavPYbqkktf76UIpna181fz1nWp1XlMlv6uAoB6kgJBFLgz9oe9R8NH+X1X13+5r BwDj1zdGXB6zEbqPwV2OM3gZ4GZQfv/8IR3mfL3WLOP6PIHHejY4EuyUYdC+ctJWDm YcNEsx+lzTMroP1elMZyDl7wydZj5Y4OiJid8Clg= From: "de34 at live dot cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113060] std::variant converting constructor/assignment is non-conforming after P2280? Date: Mon, 19 Feb 2024 09:07:28 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: de34 at live dot cn 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=3D113060 --- Comment #5 from Jiang An --- Function pointers seem working (https://gcc.godbolt.org/z/Mbvfafdof). ``` template constexpr bool is_array_element_initializable_from =3D false; template constexpr bool is_array_element_initializable_from decltype((void) array_element_initialization_tester{{std::forward(t)}})>() (std::declval()))> =3D true; ``` So perhaps we can simply change `decltype(_Arr<_Ti>{{std::declval<_Tp>()}})= ` to `decltype(std::declval decltype(_Arr<_Ti>{{std::forward<_Tp>(__t)}})>(std::declval<_Tp>()))` to resolve this "bug".=