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

undefined min/max in StreamTerminators.h for msvc #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mesinger
Copy link

Hello,
while working on Windows and compiling with MSVC(1921), and using common windows headers, i couldn't compile while using Streams. This is due to the implementation of

inline auto max(Less&& less = Less())

and

inline auto min(Less&& less = Less())

in StreamTerminators.h.

min and max are already defined as macros

#define max(a,b)            (((a) > (b)) ? (a) : (b))

and

#define min(a,b)            (((a) < (b)) ? (a) : (b))

in minwindef.h.

I got it working by first, undefining, and at the end of the file, redefining min and max.

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.

1 participant