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

Include <algorithm> explicitly #1521

Merged
merged 1 commit into from
Mar 31, 2022
Merged

Include <algorithm> explicitly #1521

merged 1 commit into from
Mar 31, 2022

Conversation

PixelyIon
Copy link
Contributor

@PixelyIon PixelyIon commented Mar 30, 2022

A compilation error occurs on latest LLVM libcxx (tested on llvm/llvm-project@6e2c6c9) due to the C++ stdlib header <algorithm> being a transitive dependency that is no longer included on the latest LLVM libcxx (as of https://reviews.llvm.org/D119667), this causes breakage for instances of std::find/std::find_if as they cannot be resolved. This PR explicitly includes the <algorithm> header wherever necessary to compile without errors but it is generally a good practice to avoid transitive dependencies.

C++ stdlib header `<algorithm>` was a transitive dependency that is no longer included on LLVM libcxx, this makes it necessary to explicitly include it on any usage.
@google-cla
Copy link

google-cla bot commented Mar 30, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@robertwu1 robertwu1 merged commit 9053f01 into google:main Mar 31, 2022
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.

None yet

2 participants