From: Eric Niebler (eric_at_[hidden])
Date: 2003-12-29 18:27:22
Darin Adler wrote:
> On Dec 29, 2003, at 1:50 PM, Eric Niebler wrote:
>> It seems extremely unwise to be undef'ing min and max. Evil though
>> they are, many Win32 platform headers (and users' headers!) depend on
>> them, and there is simply no way to write a template or set of
>> overloads that behave exactly as the macros do.
> Microsoft suggests defining NOMINMAX:
> How does <afxtempl.h> cope with clients that have set NOMINMAX?
If you define NOMINMAX and include afxtempl.h, it will fail to compile
because it will be unable to find identifier 'max'. It's probably worth
filing a bug against Microsoft for that, but the problem remains and
Boost should cope.
I should point out that win32.hpp both undef's min/max *and* defines
NOMINMAX. It should be users who decide to define NOMINMAX, not boost.
Boost should work regardless of whether the min/max macros are defined
or not. They are quite possibly the most used macros on the most used
platform. Boost shouldn't be fooling with them.
-- Eric Niebler Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk