Subject: Re: [boost] Ticket #2115 Avoid bad Apple macros
From: Mat Marcus (mat-lists_at_[hidden])
Date: 2008-10-12 14:30:48
On Sat, Oct 11, 2008 at 5:59 AM, Beman Dawes <bdawes_at_[hidden]> wrote:
>> 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?
> I really don't want to start a policy of avoiding every name that is defined
> in any vendor header. I forget the details, but at least one vendor has
> shipped a header defining "read" and "write" macros!
Unfortunately, this isn't a corner case of some obscure name in an
obscure vendor header. This header gets #included in mainstream use
> The fix for this one is to complain to Apple.
I am a library provider. My library depends on boost. Clients of my
library are also clients of boost. Some of my clients may wish to use
the Apple macros. If boost code fails to work in the presence of an
Apple of Microsoft header, I must patch boost. (This is why,
unpleasant as it is, my code myst compile without defining NOMINMAX.
Of course it is important to file bugs and put pressure on vendors
when they stray. But first I must produce a library that works in my
clients' environments.) Similarly, i boost code emits a warning and my
client wants to treat warnings as errors, I must patch boost. If any
boost code has 64-bit runtime issues, or fails to work in a DLL, I
must patch it.
So, please put pressure on Apple, and file the necessary bug reports.
But each requirement that a library imposes loses a group of users.
But please also consider "fixing" boost too.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk