News for hackers. Stuff that matters.
Re:How to write better game libraries by sharpneli on Sunday December 08, 2019 @04:35AM (#21735086)
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.

Re:How to write better game libraries by Const-me on Sunday December 08, 2019 @04:46AM (#21735117)
The OP’s advice to avoid macros in the library’s API is a good one. Please read my previous comments, it begins with “Some of these recommendations are awesome”.

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.