From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2006-06-26 08:25:02
On Mon, 26 Jun 2006 11:58:30 +0100, "Martin Bonner"
>The basic rule is that you must never have the (pp-)tokens "max" and "("
>one after the other.
>If you do, the preprocessor will try to expand the
>The solution is to wrap the function name in parens
It's not the only solution, fortunately (the parentheses in general
also prevent ADL). You can use anything different than an open paren
which doesn't change the meaning of the construct after the
preprocessing phase. For instance:
Of course that's exactly what BOOST_PREVENT_MACRO_SUBSTITUTION is for.
FWIW, I would prefer for it to be named something like
BOOST_GUARD_FROM_FUNCTION_LIKE_MACRO, as it does not apply to
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk