Issue 64717
Summary [libc++] `std::ranges::clamp` violates [alg.clamp]p5
Labels new issue
Assignees
Reporter Fulgen301
    [alg.clamp]p5 mandates the complexity requirements for `std::ranges::clamp` to be at most two comparisons and three applications of the projection. libc++ however applies the projection four times. [See godbolt.](https://godbolt.org/z/cE1WGcY1j)

https://github.com/llvm/llvm-project/blob/5ed62c7bc99a979261d34e41aaca9581577674bf/libcxx/include/__algorithm/ranges_clamp.h#L40-L43
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to