public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96363] New: bogus error with constrained partial specialization
@ 2020-07-28 21:50 nathan at gcc dot gnu.org
  2020-07-29 12:04 ` [Bug c++/96363] " ppalka at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-07-28 21:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96363
           Summary: bogus error with constrained partial specialization
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nathan at gcc dot gnu.org
  Target Milestone: ---

template <typename T> class TPL;

template <typename T> struct Trait;

template <typename T>
  requires (Trait<T>::val == 0)
class TPL<T>;  // #1

template <typename T>
  requires (Trait<T>::val == 1)
class TPL<T>;  // #2 error here

cc1plus -quiet -std=c++20 par.cc 
par.cc:11:7: error: ‘TPL<T>’ does not match original declaration
   11 | class TPL<T>;
      |       ^~~~~~
par.cc:1:29: note: original template declaration here
    1 | template <typename T> class TPL;
      |                             ^~~

ICBW, but if #2 is rejected, why is #1 accepted.  Aren't these just two partial
specializations with different constraints?

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

end of thread, other threads:[~2022-07-21 16:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 21:50 [Bug c++/96363] New: bogus error with constrained partial specialization nathan at gcc dot gnu.org
2020-07-29 12:04 ` [Bug c++/96363] " ppalka at gcc dot gnu.org
2020-07-29 13:32 ` redi at gcc dot gnu.org
2022-05-24 16:52 ` ppalka at gcc dot gnu.org
2022-05-24 16:53 ` ppalka at gcc dot gnu.org
2022-05-25 16:20 ` [Bug c++/96363] bogus error with multiple constrained partial specialization forward declarations ppalka at gcc dot gnu.org
2022-05-26 13:43 ` cvs-commit at gcc dot gnu.org
2022-05-26 13:45 ` ppalka at gcc dot gnu.org
2022-07-21 16:47 ` cvs-commit at gcc dot gnu.org
2022-07-21 16:48 ` 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).