[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions
Utkarsh Saxena via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 05:47:26 PDT 2022
usaxena95 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;
----------------
ychen wrote:
> 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.
Thanks for the clarification.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128750/new/
https://reviews.llvm.org/D128750
More information about the cfe-commits
mailing list