================ @@ -47,3 +47,21 @@ namespace InvalidInsertPos { template<> int v<int, 0>; int k = v<int, 500>; } + +namespace GH51347 { + template <typename T> + auto p = p<T>; // expected-error {{the type of variable template specialization 'p<int>'}} ---------------- erichkeane wrote:
Are there cases where this pattern is legal and we should allow this anyway? If not, should we diagnose this not at instantiation, but earlier at definition of the variable template? https://github.com/llvm/llvm-project/pull/134522 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits