[Development] 0 vs. NULL

Marc Mutz marc.mutz at kdab.com
Fri Oct 9 12:10:24 CEST 2015


On Thursday 08 October 2015 11:55:52 André Somers wrote:
[...]
> Nowadays, for code that you won't need to compile with non C++/11
> complient compilers, I'd recommend to use nullptr instead. At least,
> nullptr will always be interpretted as a pointer.
[...]

Seconded. I'd go so far as to use nullptr in C++98, too, using Scott Meyer's 
library-only implementation 
(https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/nullptr).

Thanks,
Marc

-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt Experts



More information about the Development mailing list