[cfe-dev] Libc++ Windows Semi-analyzed test results

Christopher Jefferson chris at bubblescope.net
Wed Sep 28 16:28:13 PDT 2011


On 28 Sep 2011, at 21:00, Marc Glisse wrote:

> On Wed, 28 Sep 2011, Howard Hinnant wrote:
> 
>> #include <iostream>
>> 
>> int main()
>> {
>>   std::cout << __cplusplus << '\n';
>> }
>> 
>> Without -std=c++0x:
>> 
>> 1
>> 
>> With -std=c++0x:
>> 
>> 201103
> 
> NOOOOOOOO!!!
> :-(
> 
> What is the rational for defining it before the C++11 support is (almost) 
> complete? The main point of the value of this macro is imho to be able to 
> detect whether we can use C++11 features. If you want to indicate 
> experimental partial support, a compiler specific macro is fine. But 
> defining __cplusplus to 201103 when the new standard isn't implemented yet 
> makes the macro useless. The only rational I could think of is that the 
> C++11 mode of clang is considered experimental and unsupported and thus it 
> doesn't matter that it doesn't work…

Well, given that the C++03 support isn't finished, and probably never will be, we should probably remove the c++98 definition too ;)

In practice the C++0x support is in a good state, I know a number of people (including myself) who are using it on a day-to-day basis, and I suspect it will be years, if ever, before the compiler is 100% standards compliant.

Chris



More information about the cfe-dev mailing list