Streams
Streams copied to clipboard
undefined min/max in StreamTerminators.h for msvc
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.