[cfe-commits] std::nullptr_t support in MS headers

Howard Hinnant hhinnant at apple.com
Fri Jun 22 19:20:39 PDT 2012


On Jun 22, 2012, at 9:49 PM, João Matos wrote:

> Ping.
> 
> On Wed, Jun 20, 2012 at 1:56 PM, João Matos <ripzonetriton at gmail.com> wrote:
>> This patch defines nullptr_t in the standard namespace. MS does it in
>> stddef.h, and some standard headers (<exception>, pulled by
>> <iostream>) expect it to be there. This is needed for a simple C++
>> hello world to be compiled in C++11 mode.
>> 
>> --
>> João Matos

My only request/comment is that this not come into play if clang is being used on an Apple platform.

libc++ has its own definition of nullptr_t in <cstddef>.  It does not export std::nullptr_t to ::nullptr_t. 

18.2 [support.types] states that that the addition of std::nullptr_t to <cstddef> is a change with respect to <stddef.h>.  I.e. #include'ing <stddef.h> should not introduce std::nullptr_t nor ::nullptr_t.

Howard





More information about the cfe-commits mailing list