public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "stsp at users dot sourceforge.net" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-111923-4-nGlpWLcUD1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111923-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111923

--- Comment #4 from Stas Sergeev <stsp at users dot sourceforge.net> ---
(In reply to Andrew Pinski from comment #3)
> One more note, default argument clause does not apply here as the it is not
> 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: A complete-class context of a nested class is also a complete-class
context of any enclosing class, if the nested class is defined within the
member-specification of the enclosing class.
— end note]

Isn't lambda an instance of a nested class here?

> int off_p = 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?

  parent reply	other threads:[~2023-10-22 23:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-22 22:42 [Bug c++/111923] New: " stsp at users dot sourceforge.net
2023-10-22 22:51 ` [Bug c++/111923] " pinskia at gcc dot gnu.org
2023-10-22 22:56 ` pinskia at gcc dot gnu.org
2023-10-22 22:58 ` pinskia at gcc dot gnu.org
2023-10-22 23:04 ` stsp at users dot sourceforge.net [this message]
2023-10-22 23:08 ` pinskia at gcc dot gnu.org
2023-10-22 23:27 ` stsp at users dot sourceforge.net
2023-10-23  8:05 ` stsp at users dot sourceforge.net
2023-10-24 10:25 ` stsp at users dot sourceforge.net
2023-10-24 23:16 ` richard-gccbugzilla at metafoo dot co.uk
2023-10-24 23:30 ` stsp at users dot sourceforge.net
2023-10-25  1:35 ` stsp at users dot sourceforge.net
2024-02-03 20:08 ` jens.maurer at gmx dot net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-111923-4-nGlpWLcUD1@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).