public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104326] New: Deduction failure for parameter pack in template template non-type parameter
@ 2022-02-01 16:21 colavitam at gmail dot com
  2022-02-01 16:32 ` [Bug c++/104326] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: colavitam at gmail dot com @ 2022-02-01 16:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104326
           Summary: Deduction failure for parameter pack in template
                    template non-type parameter
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: colavitam at gmail dot com
  Target Milestone: ---

Consider the following code:

```
template <typename... Args>
struct tuple {};

template <typename>
struct Test;

template <
    typename... Types,
    template <Types> typename... Outer,
    Types... Inner
>
struct Test<tuple<Outer<Inner>...>> {};

template <long T> struct O1 {};
template <long T> struct O2 {};
template <unsigned T> struct O3 {};

Test<tuple<O1<1>, O2<2>>> test1;
Test<tuple<O1<1>, O2<2>, O3<3>>> test2;
```

This code is rejected by gcc and accepted by clang.

gcc accepts the definition of test1 but rejects test2. It appears as though
Types is not being correctly expanded with the template template parameter.

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

end of thread, other threads:[~2022-02-02  4:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-01 16:21 [Bug c++/104326] New: Deduction failure for parameter pack in template template non-type parameter colavitam at gmail dot com
2022-02-01 16:32 ` [Bug c++/104326] " pinskia at gcc dot gnu.org
2022-02-01 16:38 ` colavitam at gmail dot com
2022-02-02  2:47 ` pinskia at gcc dot gnu.org
2022-02-02  4:05 ` colavitam at gmail dot com

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