From: Eric Niebler (eric_at_[hidden])
Date: 2004-02-23 20:58:41
John Maddock wrote:
> Would you like to make and manage the change? Remove the workarounds from
> win32.hpp, and then patch all occurrences of min and max throughout boost?
We agreed to make boost work in the presence of the min/max macros by
wrapping all min/max function identifiers in parens, like (std::min)(a,b);
I have spent some time and made the 800 or so edits throughout boost
required to make it play nice with the min/max macros. I'm running
regressions now. I have a couple of questions about procedure before I
can commit the changes.
1) Is this a good time? I know there's talk about a 1.31.1 release. Will
this be done from the 1.31.0 branch or from main? I don't want to
destabilize before a release.
2) I can't test with old compilers, which are the ones most likely to
have a hard time with this change. Also, I'm not a CVS guru. If all hell
breaks loose as a result of this change, is there someone willing to
help me back it out?
3) Is there a boost developer style guide where we can document the fact
that all calls to min/max functions must be wrapped in parens?
4) This is the sort of thing developers will forget to do even if it's
in a style guide. A simple way of ensuring this stays fixed would be to
run the regressions with min() and max() #defined to garbage, so that
violations are detected and corrected early. Is this possible?
-- 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