Boost logo

Boost :

Subject: Re: [boost] [config] Macro for null pointer
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-11-30 03:04:47

On Fri, Nov 30, 2012 at 11:19 AM, Jeffrey Lee Hellrung, Jr.
<jeffrey.hellrung_at_[hidden]> wrote:
> On Thu, Nov 29, 2012 at 10:59 PM, Andrey Semashev <andrey.semashev_at_[hidden]
>> wrote:
>> On Thu, Nov 29, 2012 at 9:51 PM, Jeffrey Lee Hellrung, Jr.
>> <jeffrey.hellrung_at_[hidden]> wrote:
>> > On Thu, Nov 29, 2012 at 12:04 AM, Andrey Semashev <
>> andrey.semashev_at_[hidden]
>> >> wrote:
>> >
>> >> My main point is that
>> >> nullptr should "just work" (tm) by default.
>> >>
>> >
>> > But, it kinda doesn't "just work" if correct and robust use requires a
>> > conditional using declaration. And, at that point, what use is the "using
>> > boost::nullptr" at global scope anyway, if it's conditional on a
>> > configuration macro?
>> The config macro is only used to solve problems, should they arise.
>> Other than that nullptr will work after simply including the header.
>> And I'm sure in 99.9% of cases this will be the case.
> Just to be clear, the conditional using declaration I was referring to is
> the one you suggested clients should use in their code, whereas you seem to
> be referring to the using declaration in the boost/utility/nullptr.hpp
> header. Is that right, and is my interpretation of your suggestion correct?

Yes, I was referring to the global using declaration in
boost/utility/nullptr.hpp and the BOOST_NO_GLOBAL_NULLPTR config

I have little concern about BOOST_USING_NULLPTR macro; I would
probably use conditional using declaration in a public third party
library anyway (I prefer explicitness of this solution).

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