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

Portable minmax Win32-API workaround #744 #745

Merged
merged 1 commit into from
Apr 18, 2024
Merged

Portable minmax Win32-API workaround #744 #745

merged 1 commit into from
Apr 18, 2024

Conversation

ckormanyos
Copy link
Member

@ckormanyos ckormanyos commented Apr 18, 2024

Description

The purpose of this PR is to work around min/max macro conflicts with windows.h when using Win32-API programming on MSVC (in Windows). Unfortunately windows.h defines min() and max() macros that conflict with the standard C++ ones.

Tasklist

  • Ensure all CI builds pass
  • Review and approve

@ckormanyos
Copy link
Member Author

  • The selected solution method uses parentheses like (std::min)().
  • Do Not in this PR resort to #define NOMINMAX.

@ckormanyos
Copy link
Member Author

Hi @mloskot this one cycled green and I think the trivial changes are ready for rewiew.

Copy link
Member

@mloskot mloskot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you @ckormanyos

@mloskot mloskot linked an issue Apr 18, 2024 that may be closed by this pull request
@mloskot mloskot merged commit 2c3ee86 into boostorg:develop Apr 18, 2024
18 checks passed
@striezel striezel mentioned this pull request Jun 30, 2024
6 tasks
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.

Use of min and max in Gil conflicts with Win32-API on Windows/MSVC
2 participants