14 Oct 15:37
Re: Ticket #2115 Avoid bad Apple macros
David Abrahams <dave <at> boostpro.com>
2008-10-14 13:37:15 GMT
2008-10-14 13:37:15 GMT
Heh, I forgot about that one. Suppose we just #define check BOOST_PREVENT_MACRO_SUBSTITUION check ?Sent from my iPhone On Oct 13, 2008, at 11:51 PM, Eric Niebler <eric <at> boost-consulting.com> wrote: > David Abrahams wrote: >> "John Maddock" <john <at> johnmaddock.co.uk> wrote: >>> Are the Apple defined macros function-like macros? If so we could >>> use >>> the usual macro-expansion suppression in these cases as we do with >>> min/max. >> Yeah, just as long as we keep in mind that the parens suppress >> ADL. In >> other words check(x) >> and >> (check)(x) >> are not equivalent. > > I think John is referring to the BOOST_PREVENT_MACRO_SUBSTITUTION > macro: > > check BOOST_PREVENT_MACRO_SUBSTITUTION (x) > > -- > Eric Niebler > BoostPro Computing > http://www.boostpro.com > > _______________________________________________ > Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost > _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Sent from my iPhone
On Oct 13, 2008, at 11:51 PM, Eric Niebler <eric <at> boost-consulting.com>
wrote:
> David Abrahams wrote:
>> "John Maddock" <john <at> johnmaddock.co.uk> wrote:
>>> Are the Apple defined macros function-like macros? If so we could
>>> use
>>> the usual macro-expansion suppression in these cases as we do with
>>> min/max.
>> Yeah, just as long as we keep in mind that the parens suppress
>> ADL. In
>> other words check(x)
>> and
>> (check)(x)
>> are not equivalent.
>
> I think John is referring to the BOOST_PREVENT_MACRO_SUBSTITUTION
> macro:
>
> check BOOST_PREVENT_MACRO_SUBSTITUTION (x)
>
> --
> Eric Niebler
> BoostPro Computing
>
RSS Feed