What C++0x Headers are supposed to define nullptr?
问题 Now that C++0x is almost here, I've been experimenting with it, and in particular using nullptr. I haven't been able to figure out what standard header files one is supposed to include if one needs to use it. Any help is appreciated. 回答1: No headers should be required. It is a built-in keyword (§[lex.nullptr]). 2.14.7 Pointer literals [lex.nullptr] pointer-literal: nullptr The pointer literal is the keyword nullptr . It is a prvalue of type std::nullptr_t . [ Note: std::nullptr_t is a