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

Fix include to avoid MSVC compilation error #268

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

thbeu
Copy link
Contributor

@thbeu thbeu commented Nov 1, 2023

Avoid MSVC compilation error C2039: "min": is not a member of "std" of Visual Studio 2017.

Avoid MSVC compilation error C2039: "min": is not a member of "std"
@asmaloney
Copy link
Owner

Could you please wrap this in #ifdef _MSC_VER <whatever 2017 is>?

That way I know I can remove it when I drop support for MSVC 2017.

Thanks!

@thbeu
Copy link
Contributor Author

thbeu commented Nov 1, 2023

This is not necessary, since std::min and std::max are defined in header <algorithm>, see https://en.cppreference.com/w/cpp/algorithm/min. Thus, this is a proper C++ fix and independent of the actual compiler. It just happend, that I observed it with VS 2017.

@asmaloney asmaloney merged commit 1cbfa90 into asmaloney:master Nov 8, 2023
12 checks passed
@asmaloney
Copy link
Owner

Thanks!

@thbeu thbeu deleted the fix-include branch November 8, 2023 05:54
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