boost config macro to check C++11 initialization list support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

boost config macro to check C++11 initialization list support

Boost - Build mailing list
Hi,

I am looking for a macro to determine if the compiler has C++11 initialization list support.  For example:

    std::map <int, int> m { {1, 1}, {5,5} };


Is BOOST_NO_CXX11_HDR_INITIALIZER_LIST, the proper macro to use?


Thanks,


Tal

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: boost config macro to check C++11 initialization list support

Glen Fernandes
Tal wrote:
> Is BOOST_NO_CXX11_HDR_INITIALIZER_LIST, the proper macro to use?

Hi Tal,

You have two feature defect detection facilities:
1. BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX for the C++11 language feature
2. BOOST_NO_CXX11_HDR_INITIALIZER_LIST for the C++ std::initializer_list library facility

Glen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: boost config macro to check C++11 initialization list support

Boost - Build mailing list

> On May 26, 2017, at 8:56 AM, Glen Fernandes via Boost-build <[hidden email]> wrote:
>
> Tal wrote:
>> Is BOOST_NO_CXX11_HDR_INITIALIZER_LIST, the proper macro to use?
>
> Hi Tal,
>
> You have two feature defect detection facilities:
> 1. BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX for the C++11 language
> feature
> 2. BOOST_NO_CXX11_HDR_INITIALIZER_LIST for the C++ std::initializer_list
> library facility

Ah, I missed the first one.  That one is a much better fit than the one I was going to use.


Thanks,

Tal

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Loading...