[llvm] r194362 - Add LLVM_HAS_INITIALIZER_LISTS for upcoming C++11 support. Use it in ArrayRef

Pete Cooper peter_cooper at apple.com
Sun Nov 10 21:21:13 PST 2013



Sent from my iPhone

> On Nov 10, 2013, at 8:20 PM, Chandler Carruth <chandlerc at google.com> wrote:
> 
> 
>> On Sun, Nov 10, 2013 at 7:58 PM, Pete Cooper <peter_cooper at apple.com> wrote:
>> +/// \brief Does the compiler support generalized initializers (using braced
>> +/// lists and std::initializer_list).
>> +#if (__has_feature(cxx_generalized_initializers)   \
>> +|| defined(__GXX_EXPERIMENTAL_CXX0X__))
> 
> There are a lot of versions of GCC which support some of -std=c++0x, define this macro, and don't support initializer lists.
I wasn't aware of patchy gcc support for this. Thanks for catching this. I've fixed it in r194365.
> How thoroughly have you tested this?
Only tested with clang on Mac OS X. I don't have gcc. I'll try be more careful next time with my ifdefs.

Thanks
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131110/144c2f8b/attachment.html>


More information about the llvm-commits mailing list