[flang-commits] [clang-tools-extra] [clang] [flang] [compiler-rt] [llvm] [libc] [clang] Exclude non-template classes when checking if constraint refers to containing template arguments (PR #74265)
Erich Keane via flang-commits
flang-commits at lists.llvm.org
Wed Dec 6 06:41:20 PST 2023
================
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -std=c++20 -verify %s
+
+template<class T, class U>
+concept C = true;
+
+class non_temp {
+ template<C<non_temp> T>
+ friend void f();
+
+ non_temp();
+};
+
+template<C<non_temp> T>
+void f() {
+ auto v = non_temp();
+}
+
+template<class A>
+class temp {
+ template<C<temp> T>
+ friend void g();
----------------
erichkeane wrote:
That can be a followup.
https://github.com/llvm/llvm-project/pull/74265
More information about the flang-commits
mailing list