Skip to content

Use constexpr in container algorithm #1880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

MBkkt
Copy link
Contributor

@MBkkt MBkkt commented May 1, 2025

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)

@derekmauro
Copy link
Member

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.

@MBkkt
Copy link
Contributor Author

MBkkt commented May 9, 2025

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?

@derekmauro
Copy link
Member

derekmauro commented May 9, 2025

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.

@MBkkt
Copy link
Contributor Author

MBkkt commented May 9, 2025

Ok, thanks for explaining

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants