[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

Yuanfang Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 14 14:02:18 PDT 2022


ychen added inline comments.


================
Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5183
   if (!Better1 && !Better2) // Neither is better than the other
-    return JudgeByConstraints();
+    return nullptr;
+
----------------
royjacobson wrote:
> Previously we continued to check by constraints, now we directly return `nullptr`, doesn't this mean we don't perform constraints checks that we've done before? Or was it a bug?
I think this was a bug. By https://eel.is/c++draft/temp.func.order#6, the constraints check is performed only when `Better1 && Better2`.


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