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

Add NOMINMAX before windows.h in enumerable_thread_specific.h #1291

Conversation

Alexandr-Konovalov
Copy link
Contributor

Description

Currently enumerable_thread_specific.h inclusion breaks std::min() and std::max() usage due to macro spreading from windows.h. Technically, it may affect someone that relays on those macro and implicit presence of windows.h, it looks like a much less evil, as std not macro is a way to go and workaround is straightforward.

Fixes # - issue number(s) if exists

  • - git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details)

Type of change

Choose one or multiple, leave empty if none of the other choices apply

Add a respective label(s) to PR if you have permissions

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

List users with @ to send notifications

Other information

Currently enumerable_thread_specific.h inclusion breaks std::min and
std::max usage due to macro spreading from windows.h.

Signed-off-by: Alexandr Konovalov <[email protected]>
@dnmokhov dnmokhov merged commit 54a22a6 into uxlfoundation:master Jan 22, 2024
18 of 20 checks passed
@dnmokhov dnmokhov linked an issue Feb 13, 2024 that may be closed by this pull request
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.

Is is intended behavior to have min max defined?
2 participants