From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2387C385702B; Fri, 17 Nov 2023 17:46:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2387C385702B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700243179; bh=4+1X04PljnpExjdumTo9NMIwcTrpmrBt6c/ANyqLCdQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=U5vmRIRgNnXUUfWfpjvFKzsuTfAFK0ybg6YlJzzymLZKAPEr8WTJtDo39JVV1fWRU 74a2jLulCZu25Dr9+VuEXs9SY12ro+oS/SUoS/2EgCb0a8VMhG/Hp8XtZdOQ2fgg6S IY1Uq6fJT4j14gfoXjAN874XBCKVFZU8BrN2lERk= From: "mital at mitalashok dot co.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112590] structural constexpr class fails to instantiate Date: Fri, 17 Nov 2023 17:46:18 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mital at mitalashok dot co.uk 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: cc 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=3D112590 Mital Ashok changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mital at mitalashok dot co= .uk --- Comment #1 from Mital Ashok --- See [temp.arg.nontype]p3 : > For a non-type template-parameter of reference type, or for each non-stat= ic > data member of reference or pointer type in a non-type template-parameter > of class type or subobject thereof, the reference or pointer value shall > not refer to or be the address of (respectively): > - A temporary object, > - [...] > - a subject of one of the above. And "f_{a_}" is initializing the pointer as a subobject of a temporary object, so this is invalid. Though the error given might be wrong or misleading.=