[Clang] Invalid diagnostic when checking trailing requires of inherited ctor #62361
Closed
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>);
^
Activity