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

@var-const I think we have an interesting case here. This assertion causes the 
complexity guarantee of `ranges::clamp` not to be satisfied when we enable this 
assertion, because `clamp` says that it should not apply the projection more 
than 3 times and the comparator more than twice.

This is a case where complexity is not about asymptotic behavior but really 
about a specific number of function applications.

https://github.com/llvm/llvm-project/pull/68413
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to