How to define our own nullptr in c++98?

前端 未结 2 425
北荒
北荒 2020-12-22 13:38

Actually I am writing my own version of all library classes, and I don\'t want to include the STL files into my class file. So, for example, I want to check whether the node

2条回答
  •  -上瘾入骨i
    2020-12-22 14:14

    You should not define macros with identifiers that are keywords.

    Even if you don't use STL, there is no need to define your own nullptr, because it is not part of STL (nor the standard library), but is part of the (C++) language itself.

提交回复
热议问题