Boost logo

Boost :

Subject: Re: [boost] [config] Macro for null pointer
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-12-05 02:22:59


On Wed, Dec 5, 2012 at 11:13 AM, Eric Niebler <eric_at_[hidden]> wrote:
> On 12/4/2012 7:16 PM, Andrey Semashev wrote:
>> On December 5, 2012 12:19:36 AM Eric Niebler <eric_at_[hidden]> wrote:
>>> On 12/4/2012 12:05 PM, Edward Diener wrote:
>>> >
>>> > Expecting an end-user to both include the Boost header file and then
>>> > somehow know or care whether or not his compiler supports 'nullptr' and
>>> > do something more when it does not before he can use 'nullptr' in his
>>> > code, seems to me to defeat the purpose of providing a nullptr
>>> emulation.
>>>
>>>
>>> ... until some other library ALSO defines a global nullptr symbol,
>>> making that library and boost mutually incompatible.
>>
>> The global nullptr in the Boost header is going to be conditional on a
>> config macro. You just disable it in this (rare) case and the problem is
>> solved.
>
> ... and Microsoft's min/max macros cause no problems because they can be
> disabled with NOMINMAX. :-P

I don't see how this is related. We're not making nullptr a macro, it
still obeys scoping rules.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk