ychen added inline comments.

================
Comment at: clang/test/CXX/over/over.match/over.match.best/p1-2a.cpp:106
   template<typename T>
-  constexpr int goo(const int b) requires AtLeast2<int> {
+  constexpr int goo(const int b) requires AtLeast2<int> { // expected-note 
{{candidate function}}
     return 2;
----------------
usaxena95 wrote:
> Thanks for working on this.
> 
> I wanted to bring up related: 
> https://github.com/llvm/llvm-project/issues/56154
> Eg.: Removing this `const` still removes the ambiguity but it shouldn't.
> Since you have more context, does this look related to you ?
Removing `const` makes the partial ordering compare constraints where 
`AtLeast2<int> && true` subsumes `AtLeast2<int>` so it is not ambiguous 
anymore. Similar reasoning could be made for the original test case of 
https://github.com/llvm/llvm-project/issues/56154. 56154 exposes an issue in 
constraints partial ordering which is not related to this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128750/new/

https://reviews.llvm.org/D128750

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to