vimpunk / mio

Cross-platform C++11 header-only library for memory mapped file IO
MIT License
1.71k stars 157 forks source link

Windows header shadows STL min/max implementation #62

Closed lkotsonis closed 3 years ago

lkotsonis commented 3 years ago

When including windows.h, the std::min and std::max definitions from <aglorithm> are shadowed with a macro defined through the Windows header. This is disabled by using #define NOMINMAX but I guess it would be very restrictive to have it hard-coded on the mio headers. Would it make sense to have some sort of option in CMAKE to enable/disable this? I can make a PR if you think it's a good idea.

lkotsonis commented 3 years ago

Dear god, I just saw the flag on CMake. Sorry about that.