Subject: Re: [boost] What to do with platform defining 'null' as preprocessor symbol?
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2012-08-23 12:59:22
Jan Hudec wrote:
> At work we develop, among others, for Bada. The system
> library provided is unfortunately somewhat flaky. A tell-tale
> sign is, that it's native API headers define lowercase 'null'
> as preprocessor symbol expanding to 0.
Another one, huh? Did they learn that trick from Microsoft?
> Unfortunately boost uses identifier 'null'.
> Would it make sense to rename those identifiers and avoid
> that name like boost avoids 'min' and 'max'?
Boost doesn't avoid "min" and "max" but encloses them in parentheses to prevent preprocessor expansion. "null" could be treated similarly, though some may prefer to choose a different identifier. (At least there isn't an algorithm named "null"!)
You'll need to find all the places where "null" occurs and file Trac tickets to get things fixed. If you supply patches against trunk, they are more likely to be applied.
If you can apply the patches and run the tests yourself against several compilers on different platforms, you could send a summary reply to this thread with the Trac issues and the results of your testing. Then, someone might even submit all of your patches in one go.
Rob Stewart robert.stewart_at_[hidden]
Software Engineer using std::disclaimer;
Dev Tools & Components
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk