Skip to content
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

[libc++] Simplify bitset::{any, all} #128445

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

winner245
Copy link
Contributor

@winner245 winner245 commented Feb 24, 2025

The any() and all() member functions of bitset are implemented using the same bitwise logic as std::find() with __bit_iterator optimizations. Therefore, we can simplify any() and all() to one line by directly calling std::find, and inline them within the class.

@winner245 winner245 force-pushed the simplify-bitset-any-all branch from 30e237c to 097854d Compare February 24, 2025 03:40
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.

1 participant