Boost logo

Boost :

From: Edward Diener (eddielee_at_[hidden])
Date: 2004-02-26 18:56:31


Eric Niebler wrote:
> I just committed the min/max macro fixes. I built and tested with vc6,
> vc7.1 and gcc (cygwin). This was a huge change and I have little doubt
> that it will cause problems somewhere. Let me know if you see anything
> out of the ordinary.
>
> This could potentially have downstream effects, particularly if people
> are relying on the boost headers to #undef the min and max macros for
> them, which they no longer do.
>
> With this check-in, I did *not* modify the regression tests to #define
> min and max to garbage. That caused too many problems.
>
> In the future, calling min and max (member) functions will take some
> care on the part of all boost developers. I'd like to write up a
> document about what I learned. Is there a boost style guide, or an
> appropriate place for such a document?

Yes, you definitely need to document this if the normal calls of
std::min(x,y) or std::max(x,y) no longer work properly when including Boost
header files for normal developers also. I do know of the workaround for
VC++ of (std::min)(x,y) and (std::max)(x,y) which I have to use in my own
code when windows.h is included. If things have gotten more complicated than
this when Boost headers are included, programmers must definitely be told
about or else one is going to have many unhappy developers on one's hands. I
would have said to you that you need to write documentation on the changes
before committing the fixes, and not considering the importance of doing so
as an aftermath, even if only Boost developers are involved, but since I am
not a Boost developer myself (yet) I will shut up further about it. <g>


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