|
|
|
|
|
by sharpneli
2388 days ago
|
|
And then there is things like windows.h defining max which breaks std::max. Sure that one has another define which prevents it but not all libraries have. C++ defines don’t respect namespaces so you are pretty much screwed in anycase. |
|
BTW, you can disable these windows.h macros by defining NOMINMAX. I usually do, because I prefer min/max from <algorithm>; in some edge cases std::min / std::max can be twice as fast because compiler guarantees to compute arguments exactly once.