[lex.nullptr]:
:
nullptr
nullptr. std::nullptr_t. [: std::nullptr_t- , , ; , . . 4.10 4.11. -end note]
Therefore, use nullptrwhen you need a literal pointer, and std::nullptr_tin the context when you need to take this type. The latter, for example, if you create a function or constructor or something that can take nullptras an argument.
Barry source
share