abseil-cpp icon indicating copy to clipboard operation
abseil-cpp copied to clipboard

Use constexpr in container algorithm

Open MBkkt opened this issue 8 months ago • 4 comments

https://github.com/llvm/llvm-project/blob/main/libcxx/include/algorithm checked with llvm libc++19 and clang19 (only algorithms which support constexpr since c++20)

MBkkt avatar May 01 '25 05:05 MBkkt

Interestingly this passes Abseil's tests but breaks almost our entire monorepo in certain cases where operator<=> is defined. I haven't had a chance to dig into why, and I'm not sure I will have time soon.

derekmauro avatar May 07 '25 13:05 derekmauro

Interestingly this passes Abseil's tests but breaks almost our entire monorepo in certain cases where operator<=> is defined. I haven't had a chance to dig into why, and I'm not sure I will have time soon.

@derekmauro Hi, can you share some example with compiler/stdlib/std version if possible?

MBkkt avatar May 09 '25 12:05 MBkkt

I'm pretty sure the problem is not the fault of your change. I think there are a handful of users that have non-compliant code that I will need to fix first.

derekmauro avatar May 09 '25 12:05 derekmauro

Ok, thanks for explaining

MBkkt avatar May 09 '25 13:05 MBkkt