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

[C++] Fix missed header for some compilers #11152

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

BewareMyPower
Copy link
Contributor

Motivation

Visual Studio 2017 cannot compile the code of latest master

image

It's introduced from #11088. For some compilers, std::max might be included implicitly, but C++ standard only requires that it's included in <algorithm> header, see https://en.cppreference.com/w/cpp/algorithm/max for reference.

Modifications

Include <algorithm> header for std::max function.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

@merlimat merlimat added this to the 2.9.0 milestone Jun 30, 2021
@merlimat merlimat merged commit 6c1d510 into apache:master Jun 30, 2021
codelipenghui pushed a commit that referenced this pull request Jul 7, 2021
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Jul 7, 2021
@BewareMyPower BewareMyPower deleted the bewaremypower/fix-cpp-header branch July 13, 2021 02:54
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants