
4 Dec
2012
4 Dec
'12
10:21 p.m.
On Tue, Dec 4, 2012 at 2:14 PM, Peter Dimov <lists@pdimov.com> wrote:
Eric Niebler wrote:
... until some other library ALSO defines a global nullptr symbol, making that library and boost mutually incompatible.
How is the end user supposed to actually use nullptr if it's not global? It's a keyword in C++11; boost::nullptr is not legal.
namespace X { BOOST_USING_NULLPTR; void foo() { int * p = nullptr; } } // namespace X is the basic usage I had proposed. BOOST_USING_NULLPTR expands to some empty statement in C++11 and "using ::boost::nullptr" in C++03. - Jeff