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

Remove the NOMINMAX definition #86

Closed
wants to merge 1 commit into from

Conversation

alxarsenault
Copy link
Contributor

Removed the #define NOMINMAX and replaced all instances of these:
std::min(x, y) with (std::min)(x, y)
std::max(x, y) with (std::max)(x, y)
std::numeric_limits<T>::max() with (std::numeric_limits<T>::max)()

@adamstark
Copy link
Owner

Thanks for this, but after taking a look I think that I prefer the NOMINMAX option. People who aren't familiar with this issue will see the extra parentheses around max/min etc, and just remove them (because they are unusual) and then more compatibility issues crop up. I think it's best dealt with once (even if it's an annoying thing to have to declare).

@adamstark adamstark closed this Oct 26, 2024
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.

2 participants