[Development] RFF: nullptr rules
Mathias Hasselmann
mathias at taschenorakel.de
Thu Dec 10 10:52:15 CET 2015
Am 09.12.2015 um 17:45 schrieb Mathias Hasselmann:
>
>
> Am 09.12.2015 um 16:14 schrieb Marc Mutz:
>
>> Arguments in favour:
>> - it's the C++ way of writing the null pointer constant these days
>> - we need to use it in headers, anyway, to allow people to use
>> -Wzero-as...,
>> and it makes no sense to have two sets of rules for headers and impl
>> - it can disambiguate code and prevent accidents
>> - in some situations, it makes code easier to understand (:
>> m_foo(nullptr)).
>>
>> Arguments against:
>> - it's uglier than "0", and more to type
>
> Have we discussed "{}" instead of "nullptr", or "0" already?
This actually was a serious question: What are the opinions on using
"{}" instead of "0" or "nullptr" to initialize a pointer?
Ciao,
Mathias
More information about the Development
mailing list