[Bug c++/114378] New: GCC fails on selecting a partial template specialization.
hokein.wu at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Mar 18 13:28:54 GMT 2024
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
```
More information about the Gcc-bugs
mailing list