usaxena95 added inline comments.
================ Comment at: clang/test/SemaTemplate/concepts-using-decl.cpp:112 + expect<1>(baz{}.foo<Empty>()); // expected-error {{call to member function 'foo' is ambiguous}} +} +} ---------------- ilya-biryukov wrote: > Could you also check that `requires` clauses and constraints in template > parameters do not hide each other? > ``` > template <IsEmpty T> ... > // vs > template <class T> requires IsEmpty<T> ... > // vs > template <class T> void foo() requires IsEmpty<T> ... > ``` > Should not hide each other. > > Another interesting case (that probably does not yet work): > ``` > struct base { template <class T> void foo(); }; > struct derived : base { > using base::foo; > template <IsEmpty T> void foo(); > }; > ``` > ^^ `derived().foo<Empty>()` will probably produce an ambiguity now (as we > don't have an explicit requires clause here). I don't think it's worth fixing > now, but keeping a test for it with a FIXME seems reasonable. The last test case would work though since we perform template head check if any template head is contrained. This is not ambiguous as overloading chooses the "most contrained" version. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136440/new/ https://reviews.llvm.org/D136440 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits