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 compilation error, when including magic_enum after windows.h #189

Merged
merged 2 commits into from
May 28, 2022
Merged

Fix compilation error, when including magic_enum after windows.h #189

merged 2 commits into from
May 28, 2022

Conversation

bamo-volue
Copy link
Contributor

While the error is clearly windows's fault, windows.h is such a commonly used header, that I think it makes sense to support it.
The fix is to wrap the function call to numeric_limits::max in braces, so the max-macro is avoided

include/magic_enum.hpp Outdated Show resolved Hide resolved
@Neargye Neargye added this to the 0.8.1 milestone May 27, 2022
@Neargye Neargye merged commit 6956c56 into Neargye:master May 28, 2022
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.

3 participants