public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96719] New: non-standard handling of alias templates used as template template arguments
@ 2020-08-20  1:16 richard-gccbugzilla at metafoo dot co.uk
  2020-08-20  7:49 ` [Bug c++/96719] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: richard-gccbugzilla at metafoo dot co.uk @ 2020-08-20  1:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96719
           Summary: non-standard handling of alias templates used as
                    template template arguments
           Product: gcc
           Version: 11.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: ---

template<typename T, typename U = T> struct A { using type = U; };
template<typename V, typename W = float> using B = A<V, W>;
template<template<typename...> class Z> struct Q {
  using type = typename Z<int>::type;
};

Here, Q<B>::type should be float, but GCC believes it's int.

I think this is due to GCC implementing the (non-standard at this time) rule in
CWG1286. This is also reflected in incorrect manglings:

void f(Q<B>) {}

... is mangled as if it were written as `f(Q<A>)`, and other rejects-valids,
such as for:

void f(Q<A>) {}
void f(Q<B>) {}

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

* [Bug c++/96719] non-standard handling of alias templates used as template template arguments
  2020-08-20  1:16 [Bug c++/96719] New: non-standard handling of alias templates used as template template arguments richard-gccbugzilla at metafoo dot co.uk
@ 2020-08-20  7:49 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2020-08-20  7:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ABI
     Ever confirmed|0                           |1
                 CC|                            |jason at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-08-20

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes I think this was an intentional decision. Possibly also related to CWG
1430.

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

end of thread, other threads:[~2020-08-20  7:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-20  1:16 [Bug c++/96719] New: non-standard handling of alias templates used as template template arguments richard-gccbugzilla at metafoo dot co.uk
2020-08-20  7:49 ` [Bug c++/96719] " 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).