public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "eric.niebler at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108848] New: Accessing class static member of non-dependent expression using member syntax in dependent context is rejected Date: Sun, 19 Feb 2023 19:53:31 +0000 [thread overview] Message-ID: <bug-108848-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108848 Bug ID: 108848 Summary: Accessing class static member of non-dependent expression using member syntax in dependent context is rejected Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eric.niebler at gmail dot com Target Milestone: --- Clang accepts the following, gcc thinks the expression in the line marked "HERE" should be `tag<int>.template smbr<void>`. template <class T> struct tag_t { template <class Sig> static constexpr const Sig* smbr = nullptr; int i = 0; }; template <class T> inline constexpr tag_t<T> tag {}; // This is OK using X = decltype(tag<int>.smbr<void>); template <class U> struct S { // This is incorrectly rejected by gcc using Y = decltype(tag<int>.smbr<void>); // This is OK using Z = decltype(tag_t<int>::smbr<void>); }; https://godbolt.org/z/9GoPYTYa1
next reply other threads:[~2023-02-19 19:53 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-19 19:53 eric.niebler at gmail dot com [this message] 2023-02-20 19:14 ` [Bug c++/108848] template keyword incorreclty required to access template class static member of non-dependent expression using member syntax in dependent context pinskia at gcc dot gnu.org 2023-02-21 1:33 ` [Bug c++/108848] [10/11/12/13 Regression] " ppalka at gcc dot gnu.org 2023-02-21 12:27 ` rguenth at gcc dot gnu.org 2023-02-23 17:01 ` ppalka at gcc dot gnu.org 2023-02-28 20:05 ` cvs-commit at gcc dot gnu.org 2023-02-28 20:06 ` [Bug c++/108848] [10/11/12 " ppalka at gcc dot gnu.org 2023-07-07 10:44 ` [Bug c++/108848] [11/12 Regression] template keyword incorrectly " rguenth at gcc dot gnu.org
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-108848-4@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: linkBe 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).