__has_feature(cxx_nullptr)

Should __has_feature(cxx_nullptr) answer true when -std=c++0x?

typedef decltype(nullptr) nullptr_t;

Works. But I haven't tested it out further.

Apple clang version 2.0 (trunk 125236) (based on LLVM 2.9svn)

Thanks,
Howard

We don't know. nullptr is implemented in Clang, but we have fairly limited testing of this feature and so we don't know if the implementation is solid enough for us to advertise it as being complete.

If someone wants to write a bunch of tests for nullptr to verify that it's working well, we can turn on __has_feature(cxx_nullptr).

  - Doug

Thanks Doug.

I beefed up what nullptr tests I had in libc++, and they are passing:

http://llvm.org/svn/llvm-project/libcxx/trunk/test/language.support/support.types/nullptr_t.pass.cpp

I believe this covers chapters 2 - 5. nullptr_t is also mentioned in chapters 13 - 15, and I am not attempting to test those parts in libc++. My existing tests were originally just to make sure I got nullptr right in chapter 18, and to test nullptr_t emulation (which I would love to get rid of!).

-Howard