public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100640] New: GCC permits explicit instantiation of a constructor template with an explicit template argument list
@ 2021-05-17 18:03 richard-gccbugzilla at metafoo dot co.uk
  2021-05-17 20:07 ` [Bug c++/100640] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: richard-gccbugzilla at metafoo dot co.uk @ 2021-05-17 18:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100640
           Summary: GCC permits explicit instantiation of a constructor
                    template with an explicit template argument list
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: richard-gccbugzilla at metafoo dot co.uk
  Target Milestone: ---

Example:

struct A {
  template<typename T> A() {}
};
template A::A<int>();

GCC accepts this without even a warning under -std=c++20 -pedantic-errors, but
this is not valid C++.

If this is an intentional extension, it doesn't appear to be documented (and
presumably should be rejected under -pedantic-errors).

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

* [Bug c++/100640] GCC permits explicit instantiation of a constructor template with an explicit template argument list
  2021-05-17 18:03 [Bug c++/100640] New: GCC permits explicit instantiation of a constructor template with an explicit template argument list richard-gccbugzilla at metafoo dot co.uk
@ 2021-05-17 20:07 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-17 20:07 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
           Keywords|                            |accepts-invalid
   Last reconfirmed|                            |2021-05-17

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

end of thread, other threads:[~2021-05-17 20:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 18:03 [Bug c++/100640] New: GCC permits explicit instantiation of a constructor template with an explicit template argument list richard-gccbugzilla at metafoo dot co.uk
2021-05-17 20:07 ` [Bug c++/100640] " redi 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).