[clang] [Sema] When checking for constraint equivalence, do not calculate satisfaction (PR #74490)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 5 08:26:52 PST 2023
================
@@ -504,3 +504,24 @@ struct bar {
bar<int> x;
} // namespace GH61763
+
+namespace GH74314 {
+template <class T, class U> constexpr bool is_same_v = __is_same(T, U);
+template <class T, class U> constexpr bool is_not_same_v = !__is_same(T, U);
+
+template <class Result>
+concept something_interesting = requires {
+ true;
+ requires is_same_v<int, Result>;
+};
+
+template <class T>
+struct X {
+ void foo() requires requires { requires is_not_same_v<T, int>; };
+};
+
+template <class T>
+void X<T>::foo() requires requires { requires something_interesting<T>; } {}
+// expected-error at -1{{definition of 'foo' does not match any declaration}}
+// expected-note@*{{}}
+} // namespace GH74314
----------------
erichkeane wrote:
need a newline here.
https://github.com/llvm/llvm-project/pull/74490
More information about the cfe-commits
mailing list