23 May
2022
23 May
'22
7:59 p.m.
On 22/05/2022 2:59, Peter Dimov via Boost wrote:
Compilers apparently are warning on the use of 0 as a null pointer constant, suggesting we use nullptr instead. But compilers don't know that we support C++03 where nullptr isn't a thing.
Case in point: https://github.com/boostorg/throw_exception/pull/22
ifdef-ing every use of nullptr is unwieldy, so maybe we need BOOST_NULLPTR added to Boost.Config? That would expand to nullptr when it's supported, and 0 otherwise.
Maybe we need the boost::nullptr_t type, emulated in C++ mode and "typedef decltype(nullptr) nullptr_t;" in compilers that support it... And if nullptr/nullptr_t is provided by Boost.Config, without any heavy-include need, that would be perfect ;-) Best, Ion