Details
-
Bug
-
Resolution: Done
-
Critical - P2
-
None
-
None
-
Windows with MSVC 2008
Description
Compilation of client applications may break because of the in-header implementation of many methods, e.g. in bsonutils. There numeric_limits::max is used, which gives a compilation error because max is often defined as a macro which may be pulled in earlier by other headers. Even WinDef.h defines this macro. Please ensure that the mongodb code undefs any existing version of max before using numeric_limits::max. This error would be much easier to prevent if the methods weren't implemented in-header. ![]()