11 Oct 14:58
Ticket #2115 Avoid bad Apple macros
From: Beman Dawes <bdawes <at> acm.org>
Subject: Ticket #2115 Avoid bad Apple macros
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-10-11 12:59:20 GMT
Subject: Ticket #2115 Avoid bad Apple macros
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-10-11 12:59:20 GMT
> Apple has a header called <AssertMacros.h> that #defines both “check” > and “check_error.” These macros naturally collide with the same names > in Boost. We should consider a global change. What global change? That Boost not use these names? What about the other horrid macros in that header? Here is a list from Marshall: debug_string, check, ncheck, check_string, ncheck_string, check_noerr, check_noerr_string, verify, nverify, verify_string, nverify_string, verify_noerr, verify_noerr_string, verify_action, require, nrequire, require_action, nrequire_action, require_quiet, nrequire_quiet, require_action_quiet, nrequire_action_quiet, require_string, nrequire_string, requireaction_string, nrequireaction_string, require_noerr, require_noerr_action, require_noerr_quiet, require_noerr_action_quiet, require_noerr_string, require_noerr_action_string. Marshall comments: IMHO, the really nasty ones are: check, verify, require and check_error. > That would also > probably require a global policy change for checkins. > > Assigning to Beman, Cc'ing John M, component "inspection script" > assigned to John although I might be wrong about that, but obviously > we need to discuss this. Maybe we'll decide to make it "wontfix" I really don't want to start a policy of avoiding every name that is(Continue reading)
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)
>
> --
RSS Feed