That's not what Boost.Config is for.
Plus, since nullptr is a keyword, available without qualification in any scope, it
wouldn't be possible for us to provide a compatible replacement as we aren't
allowed to define things in the global namespace.
For our purposes it will probably work most of the time if defined in boost::
but there's no good way to define a global in a header under C++03 anyway.
Well, I wasn't "literally" trying to define nullptr[_t], but a practical
alternative that is the same type as the standard one when available.
BOOST_NULLPTR/boost::nullptr and boost::nullptr_t are more than enough
for portable code. Does it make sense?
Ion
But it's not possible to use boost::nullptr in portable code, because nullptr is
a keyword.
Then BOOST_NULLPTR or boostnullptr macros are the only choice ;-)
Ion
While I agree with the above argument, I still support the idea of adding
BOOST_NULLPTR to Boost.Config.
My reasoning is that the macro is meant to be used by library implementers;
and the world of library implementers is different from the world of
application developers, who consume the libraries.
As a regular application developer, I know which version of C++ I am using,
and I know if I should use NULL or nullptr. I also know which compiler
warning to turn off.
In contrast, Boost is known to have served as a "platform" that screens the
users from compiler differences and compiler bugs. To say "file a bug
against the compiler and have Boost just use NULL" goes against this
tradition.
As a maintainer of a library that supports C++98 compilers with bugs, I
feel compelled to use something like BOOST_NULLPTR. In fact, I have been
hit by this very issue:
https://github.com/boostorg/optional/commit/76ff82d1912901f188599acea09cdcdb232353bd
As an application developer, I would never use BOOST_NULLPTR.
Regards,
&rzej;
Just reviewing boost/cstdint.hpp, to know where "portable" types were
defined in Boost, surprisingly that is provided by Boost.Config.
Providing portable nullptr-like type/macro sounds pretty similar to me.
My 2 cents,
Ion