9 Jan
2012
9 Jan
'12
9:26 p.m.
2012/1/9 Jasper van de Gronde <th.v.d.gronde@...528...>:
The main advantage of nullptr compared to NULL is that it is more type-safe. Also, if anything it is even more descriptive than NULL.
Actually there might be little to no advantage in changing NULL to nullptr because compilers typically define NULL not to 0 but to an implementation-defined value that can be converted without a cast to any pointer type, which is equivalent to nullptr. For example g++ defines NULL to __null which is an internal magic constant. The name "nullptr" just exposes this to the user.
Regards, Krzysztof