From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF6773858D33; Mon, 19 Feb 2024 23:47:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF6773858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708386447; bh=qMwy0iJQddEdOv72VQz1N2hvNc3Bf26Kfv4iQXcFr3c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qHRn44G2/+zaqYxdFHPNwTsJctFgoNUUotqAAoqmh5mE4QW9PxCsv/i7OGqUdLQcu V1YTt8BJorvYaQHl/pab1qiOlN6OR4wdQv/5gce+O3X9W28pqHUiVwxTnSfJ4S0VCi gCQbb/kcauEh0FeaHPuisku2/x2D8KMXWxhRT2x8= From: "dangelog at gmail dot com" 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 23:47:27 +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: dangelog at gmail dot com 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 #7 from Giuseppe D'Angelo --- Hi, > Note that this example adds a mediate function template (test_array_eleme= nt_initializable) to "reduce" the non-constexpr-ness of std::declval. That's very clever, thank you!=20 Is it _supposed_ to work, though? I had imagined (possibly erroneusly) that once one places the call to `test_array_element_initializable` using `declv= al` as an argument, it would disqualify the whole thing from being usable in constant expressions. (It would help to have another compiler that implements P2280, so to do more tests...)=