[cfe-dev] auto and decltype availability

Michael Price - Dev michael.b.price.dev at gmail.com
Fri Jul 15 18:11:14 PDT 2011


I guess I'll be verbose then. :-)

What is the release version number(s) of the LLVM project that first  
included a clang frontend that linked in a version of libclang that  
was able to correctly (according to a reasonably recent draft of the C+ 
+0x standard) handle the 'auto' and 'decltype' keywords?

Sent from my iPhone

On Jul 15, 2011, at 6:40 PM, Chris Lattner <clattner at apple.com> wrote:

>
> On Jul 15, 2011, at 2:05 PM, Michael Price wrote:
>
>> I think that is a perfectly fine recommendation, but this isn't for  
>> writing code.  This is for letting people know which version of the  
>> compiler first introduced a certain feature.  For instance, if we  
>> want to use static_assert, we may (depending on other feature  
>> availability) only want to update to the version of clang that  
>> supported the features that we desire.
>>
>> It's hard to convince managers that we should update (or even  
>> switch compilers) if we have to respond with "use __has_feature in  
>> the code".
>
> Ok, are you asking about llvm.org compilers, apple compilers,  
> someone else's compilers?  Everyone has their own versioning  
> scheme :).
>
> -Chris
>
>>
>> On Fri, Jul 15, 2011 at 1:38 PM, Chris Lattner <clattner at apple.com>  
>> wrote:
>>
>> On Jul 15, 2011, at 9:11 AM, Michael Price wrote:
>>
>> > Does anyone know which released version first had the auto and  
>> decltype features 'turned on'? And generally speaking, is there an  
>> easy way to determine this for any given C++0x feature?
>> >
>> > For some background, I'm working on a series of C++0x  
>> presentations at the company I work for, and at the end of every  
>> presentation I have a chart that shows the availability of the  
>> features I discussed that day.  Currently we are not using clang,  
>> but I have an entry for it because I want to show that clang is  
>> trying to keeping pace with GCC and surpassing IBM XL C/C++ and Sun  
>> Studio.
>>
>> Hi Michael,
>>
>> We recommend that people write code that uses __has_feature to  
>> check for a feature, not compare against a compiler version  
>> number.  These are documented here:
>> http://clang.llvm.org/docs/LanguageExtensions.html#feature_check
>>
>> -Chris
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110715/1bf22916/attachment.html>


More information about the cfe-dev mailing list