[llvm] [libc++] Prevent calling the projection more than three times (PR #66315)

Jocelyn Castellano via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 10:46:48 PDT 2023


================
@@ -37,9 +37,10 @@ struct __fn {
     _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))),
----------------
pandaninjas wrote:

I think we don't need a similar fix in `std::clamp` because `std::clamp` doesn't support using a projection

https://github.com/llvm/llvm-project/pull/66315


More information about the llvm-commits mailing list