From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A5FAE3858D37; Sun, 22 Oct 2023 23:04:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A5FAE3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698015876; bh=EEaH3ZehR2sNlTPnHlkljEJYM0UJ5zMiIOWI02+/PUg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uD3+ROoWhJuT/dYJksEbbLjBTigbiKfneDSlBRgiJtV5tU2i4ldRUZAOSSwsKOHaW wbGhwWZk/NIpCOLSUj3zRGrN1xN0eJSX8onKy87PHNiJrv2qDtFVAyonm41DB7bceq I/HmVX0TlDnOo5DbGcMrZMlGhEd8a/ugqojdrWPc= From: "stsp at users dot sourceforge.net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111923] default argument is not treated as a complete-class context of a class Date: Sun, 22 Oct 2023 23:04:36 +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.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stsp at users dot sourceforge.net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D111923 --- Comment #4 from Stas Sergeev --- (In reply to Andrew Pinski from comment #3) > One more note, default argument clause does not apply here as the it is n= ot > an argument of a method of that class but rather a different context (the > lamdba definition context). Yes, but doesn't this apply to the note4? [Note 4:=E2=80=82A complete-class context of a nested class is also a compl= ete-class context of any enclosing class, if the nested class is defined within the member-specification of the enclosing class. =E2=80=94 end note] Isn't lambda an instance of a nested class here? > int off_p =3D offsetof(A, a); > is well formed due to it being a DMI. Thanks for info. Do you happen to know the particular reason why the standard disallows this for static member? Shouldn't that be a DR?=