Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2004-02-29 18:16:44


I learned some new stuff from another post about the min/max macros given in
the Windows headers. Can the following suppositions and solution work?

1. The MS Windows headers define "min" and "max" macros
2. But nothing in those headers _actually needs_ those macros
3. These macros prevent STL from working
4. A "NOMINMAX" #define can be created to turn off the macros
5. Using the #define will fix STL _without_ breaking the MS stuff
6. The #define would break user code that uses the macros, though
7. If an user with that breakage includes STL, they have an alternate "min"
and "max" available!
8. Boost pretty much requires STL

So why can't we add:

#if defined(min) || defined(max)
#error Define NOMINMAX and use the alternates in <algorithm>
#endif

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk