[cfe-dev] __has_feature(cxx_nullptr)
Howard Hinnant
hhinnant at apple.com
Wed Mar 9 09:26:24 PST 2011
On Mar 9, 2011, at 11:22 AM, Douglas Gregor wrote:
>
> On Mar 9, 2011, at 6:07 AM, Howard Hinnant wrote:
>
>> 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.
>
>
> 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).
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
More information about the cfe-dev
mailing list