public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109181] New: requires expression type requirement rejects valid type when it is a nested member template
@ 2023-03-18  6:23 waffl3x at protonmail dot com
  2023-03-18  6:32 ` [Bug c++/109181] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: waffl3x at protonmail dot com @ 2023-03-18  6:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109181
           Summary: requires expression type requirement rejects valid
                    type when it is a nested member template
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: waffl3x at protonmail dot com
  Target Milestone: ---

https://godbolt.org/z/5hG9Eqhc9

struct A {
    template<typename>
    using B = int;
};

inline constexpr bool go = requires{typename A::template B<int>;};

error: 'typename A::B' names 'template<class> using B = int', which is not a
type

I believe this is not a regression as the bug exists all the way back to 10.1
(assuming I understand what regression means)

Clang and MSVC accept this code, I assume GCC is incorrect since I couldn't
find anything specifying that a member template is not allowed, however I also
haven't found anything that specifies that it is allowed so I am not certain.

The behavior exists in all versions I checked since GCC 10.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-09 18:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-18  6:23 [Bug c++/109181] New: requires expression type requirement rejects valid type when it is a nested member template waffl3x at protonmail dot com
2023-03-18  6:32 ` [Bug c++/109181] " pinskia at gcc dot gnu.org
2023-03-18 19:34 ` waffl3x at protonmail dot com
2023-03-20 23:28 ` ppalka at gcc dot gnu.org
2023-03-20 23:51 ` pinskia at gcc dot gnu.org
2023-03-22  1:00 ` waffl3x at protonmail dot com
2023-08-08  2:53 ` waffl3x at protonmail dot com
2023-08-09 18:10 ` ppalka at gcc dot gnu.org

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).