3 ms·
In fact, VS's STL has to defend itself against those macros. Since the user might have already included windows.h without NOMINMAX, what we do is parenthesize a
by StephanTLavavej 11y ago
In fact, VS's STL has to defend itself against those macros. Since the user might have already included windows.h without NOMINMAX, what we do is parenthesize all mentions of min/max, which inhibits preprocessor expansion of function-like macros. Look at our declarations of std::min()/etc.
- TillE 11y ago> what we do is parenthesize all mentions of min/max Oh! That explains some of the odd-looking code in <random>, since min and max are used as function names to determine the range of an RNG engine.
- StephanTLavavej 11y agoBingo. We have a test that includes windows.h followed by all STL headers, to verify that we always remember the parens.