[CXX-83] numeric_limits::max compilation problem on windows Created: 13/Feb/11 Updated: 04/May/14 Resolved: 16/Apr/14 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | legacy-0.8.0 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Johannes Wienke | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | cxxmove, legacy-cxx, windows | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
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. |
| Comments |
| Comment by Githook User [ 16/Apr/14 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: |
| Comment by Andrew Morrow (Inactive) [ 16/Apr/14 ] |