c++ - Why not call nullptr NULL? -
in c++11 nullptr keyword added more type safe null pointer constant, since previous common definition of null 0 has problems.
why did standards committee choose not call new null pointer constant null, or declare null should #defined nullptr?
stephan t. lavavej (member of c++ standard committee) explained once in talk (55:35):
while implementation allowed #define null nullptr, break quite uses like
int = null; and apparently there plenty of those. not force change.
Comments
Post a Comment