|
Boost : |
From: James Slaughter (James_at_[hidden])
Date: 2000-10-15 09:25:03
The macro's are from windef.h, which does at least enclose their definitions
in #ifndef blocks. The solution that comes to mind is:
#if defined(min)
# undef min
#endif
#define min min
...and similarly for max.
Hopefully that will work for most cases where the macro's are defined, such
as in MSVC's minmax.h. An alternative to get rid of the WinDef.h versions is
to define NOMINMAX before including windows.h.
Regards,
James.
> -----Original Message-----
> From: John Maddock [mailto:John_Maddock_at_[hidden]]
> Sent: Sunday, October 15, 2000 12:26 PM
> To: INTERNET:boost_at_[hidden]
> Subject: [boost] config.hpp and regex - bad interaction
> The problem is the section just added by Jeremy: [snip]
> which will crash and burn if min/max are already defined as macros.
>
> Suggestions?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk