================ @@ -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:
We should actually be erroring on this IIRC. The fact that this is not a definition should be an error. GCC says: `error: friend function template with constraints that depend on outer template parameters must be a definition` https://github.com/llvm/llvm-project/pull/74265 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits