Is NULL defined as nullptr in C++11?

后端 未结 4 1598
你的背包
你的背包 2020-12-18 19:05

Will C++11 implementations define NULLas nullptr?

Would this be prescribed by the new C++ standard?

4条回答
  •  借酒劲吻你
    2020-12-18 19:57

    FDIS of the upcoming standard C++11, integral expression is still a null pointer constant. NULL macro is still implementation defined but must be a null pointer constant. So in practice it means it is good as 0 or can be nullptr.

    Your code that used either 0 or NULL will work just as before.

    Read the details here.

提交回复
热议问题