c++ - Undefining min and max macros -
in source code, saw min , max being undefined. reason that?
// remove stupid msvc min/max macro definitions #ifdef win32 #undef min #undef max #endif
some msvc header has pre-processor macros define min
, max
. bad many reasons. first, not reserved names, second, there standard library functions same names.
so msvc or whatever breaking rules , code defining min
, max
macros, , use of undef
work-around fix problem.
see this related question, shows how defines can break code.
Comments
Post a Comment