Boost logo

Boost :

Subject: Re: [boost] [config] Macro for null pointer
From: Eric Niebler (eric_at_[hidden])
Date: 2012-12-05 02:13:06

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

Eric Niebler
BoostPro Computing

Boost list run by bdawes at, gregod at, cpdaniel at, john at