Open gsamatt opened 4 months ago
@llvm/issue-subscribers-clang-frontend
Author: None (gsamatt)
Reduced (https://godbolt.org/z/Yzcdca6a1):
struct A {
template <typename M> static constexpr bool C = true;
template <typename M> friend void f() requires (C<M>) {}
};
struct B {
template <typename M> static constexpr bool C = false;
template <typename M> friend void f() requires (C<M>) {}
};
This does not compile with clang 18 but it does with clang 17: https://godbolt.org/z/orMfTfxMd
This would compile with both compiler as it uses a different name for the requirement: https://godbolt.org/z/Mjxq54abb