public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109390] New: Does not reject specialized non-type argument of dependent type in class template partial specialization
@ 2023-04-03 11:45 sbergman at redhat dot com
  2023-04-04  1:00 ` [Bug c++/109390] " pinskia at gcc dot gnu.org
  2023-04-04  1:10 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: sbergman at redhat dot com @ 2023-04-03 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109390
           Summary: Does not reject specialized non-type argument of
                    dependent type in class template partial
                    specialization
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sbergman at redhat dot com
  Target Milestone: ---

As seen with e.g. gcc-c++-12.2.1-4.fc37.x86_64, it does not reject

> $ cat test.cc
> template<typename T, typename T::type> struct S {};
> template<typename T> struct S<T, 0> {};
> $ g++ -fsyntax-only test.cc

even though I think it should per (e.g. C++20) [temp.class.spec]/9.1 "The type
of a template parameter corresponding to a specialized non-type argument shall
not be dependent on a parameter of the specialization."

(I'm not sure whether or not this should be considered a duplicate of bug
102158 "[C++20] Specialized non-type template argument violates
[temp.spec.partial#general-9] but accepted by GCC".)

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

* [Bug c++/109390] Does not reject specialized non-type argument of dependent type in class template partial specialization
  2023-04-03 11:45 [Bug c++/109390] New: Does not reject specialized non-type argument of dependent type in class template partial specialization sbergman at redhat dot com
@ 2023-04-04  1:00 ` pinskia at gcc dot gnu.org
  2023-04-04  1:10 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-04-04  1:00 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=102158
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-04-04
           Keywords|                            |accepts-invalid

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. at least related to PR 102158 .

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

* [Bug c++/109390] Does not reject specialized non-type argument of dependent type in class template partial specialization
  2023-04-03 11:45 [Bug c++/109390] New: Does not reject specialized non-type argument of dependent type in class template partial specialization sbergman at redhat dot com
  2023-04-04  1:00 ` [Bug c++/109390] " pinskia at gcc dot gnu.org
@ 2023-04-04  1:10 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-04-04  1:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2127

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

end of thread, other threads:[~2023-04-04  1:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-03 11:45 [Bug c++/109390] New: Does not reject specialized non-type argument of dependent type in class template partial specialization sbergman at redhat dot com
2023-04-04  1:00 ` [Bug c++/109390] " pinskia at gcc dot gnu.org
2023-04-04  1:10 ` pinskia 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).