|
Boost : |
Subject: Re: [boost] [config] Macro for null pointer
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2012-11-28 11:43:08
On Tue, Nov 27, 2012 at 3:35 PM, Jeffrey Lee Hellrung, Jr. <
jeffrey.hellrung_at_[hidden]> wrote:
[...]
> First go at it:
>
> /*** BEGIN NULLPTR DEFINITION ***/
>
> #include <boost/config.hpp>
>
> #ifndef BOOST_NO_NULLPTR
>
> #include <cstddef>
>
> namespace boost
> {
>
> typedef std::nullptr_t nullptr_t;
>
> } // namespace boost
>
> #else // #ifndef BOOST_NO_NULLPTR
>
[...]
>
> using boost::nullptr;
>
One thing I wonder about is if this using declaration is The Right Thing To
Do. An alternative is to provide a macro to bring the nullptr identifier
into the current scope (and which does nothing in C++11).
> #endif // #ifndef BOOST_NO_NULLPTR
>
[...]
- Jeff
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk