public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114378] New: GCC fails on selecting a partial template specialization.
@ 2024-03-18 13:28 hokein.wu at gmail dot com
  2024-03-18 13:38 ` [Bug c++/114378] " ppalka at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: hokein.wu at gmail dot com @ 2024-03-18 13:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114378
           Summary: GCC fails on selecting a partial template
                    specialization.
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hokein.wu at gmail dot com
  Target Milestone: ---

GCC (trunk) behaves differently for the following code where the arguments of a
template A can be deducible from a type. https://godbolt.org/z/3bxW8W9To


```
#include <array>

template <int N>
using A = std::array<int, N>;

// Ensures a specialization of A is deduced, from
https://eel.is/c++draft/over.match.class.deduct#6
template <class> class AA;
template <int N> class AA<A<N>> {};
template <class T> concept deduces_A = requires { sizeof(AA<T>);} ;

static_assert(deduces_A<std::array<int, 3>>); // fails on gcc, true on clang
and msvc
```

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

* [Bug c++/114378] GCC fails on selecting a partial template specialization.
  2024-03-18 13:28 [Bug c++/114378] New: GCC fails on selecting a partial template specialization hokein.wu at gmail dot com
@ 2024-03-18 13:38 ` ppalka at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-03-18 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
IIUC this is CWG1647 / PR60679.

It works if we give 'N' type std::size_t instead of so that there's no implicit
integral conversion going on.

*** This bug has been marked as a duplicate of bug 60679 ***

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

end of thread, other threads:[~2024-03-18 13:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-18 13:28 [Bug c++/114378] New: GCC fails on selecting a partial template specialization hokein.wu at gmail dot com
2024-03-18 13:38 ` [Bug c++/114378] " 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).