Boost logo

Boost :

Subject: Re: [boost] [config] Macro for null pointer
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2012-11-16 00:32:20

On Thu, Nov 15, 2012 at 7:04 PM, Edward Diener <eldiener_at_[hidden]>wrote:

> I have found something like this to be helpful, when working with multiple
> compilers:
> #include <boost/config.hpp>
> #if defined(BOOST_NO_NULLPTR)
> #else
> #define BOOST_XXX_NULLPTR nullptr
> #endif
> where XXX is some local name for my own use. And then use
> BOOST_XXX_NULLPTR in places where a null pointer is needed.
> Would this be a candidate for a BOOST_NULLPTR macro in the config library
> instead ?

Might it be better to just offer a (albeit imperfect) nullptr emulation if
not supplied by the compiler? For example, [1].

- Jeff


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