-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
c++17clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partyregression
Description
In the following program
template <class T, T, T>
struct A {
static const int i = 1;
};
template <class T, T n>
struct A<T, n, n> {
static const int i = 2;
};
int j;
static_assert( A<int&, j, j>::i == 2, "" );GCC selects more specialized (second) A<T, n, n> and the check succeeds, but Clang selects the first general A<class T, T, T> and static_assert fails in C++20 mode. Surprisingly it works fine in C++14 mode. Online demo: https://godbolt.org/z/P7sGcPYKE
Metadata
Metadata
Assignees
Labels
c++17clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partyregression