-
Notifications
You must be signed in to change notification settings - Fork 16.1k
Closed
Labels
c++20clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partyVerified by a second party
Description
Bisected to aeee4eb, present in main (7090c10).
Reduced test case:
template <typename T, typename U> inline constexpr bool IsSame = false;
template <typename T> inline constexpr bool IsSame<T, T> = true;
struct Empty {};
struct X {};
template <typename T, typename E = X> struct Test {
Test()
requires(IsSame<T, Empty>);
};
template <typename XType>
struct Test<void, XType> : public Test<Empty, XType> {
using Test<Empty, XType>::Test;
};
void foo() {
Test<void>();
}Accepted before aeee4eb, error since:
test.cpp:18:5: error: invalid reference to function 'Test': constraints not satisfied
Test<void>();
^
test.cpp:9:14: note: because 'IsSame<X, Empty>' evaluated to false
requires(IsSame<T, Empty>);
^Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c++20clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partyVerified by a second party