Closed
Description
In this program
#include <concepts>
template <auto>
struct A;
template <std::same_as<int> auto p>
struct A<p> {};
A<0> a;
A<auto>
is a class template with non-type parameter, and A<std::same_as<int> auto>
is its specialization for int
parameters. The program is accepted by GCC and MSVC, but Clang complains:
error: class template partial specialization is not more specialized than the primary template [-Winvalid-partial-specialization]
Online demo: https://godbolt.org/z/ee4TcPY5K
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done