|
Boost : |
Subject: Re: [boost] [Config] Meaning of BOOST_NO_CXX11_HDR_INITIALIZER_LIST
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-03-10 11:27:53
Let's go back again to the BOOST_NO_CXX11_HDR_INITIALIZER_LIST discussion.
I believe that BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
checks the compiler support of initializer_list as well.
So better implementation of BOOST_NO_CXX11_HDR_INITIALIZER_LIST
would be:
1. In compiler configs, don't define BOOST_NO_CXX11_HDR_INITIALIZER_LIST.
2. In stdlib configs, define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
if stdlib doesn't have <initializer_list>.
3. In suffix.hpp, define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
if BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX is defined (and
BOOST_NO_CXX11_HDR_INITIALIZER_LIST is not defined):
#if defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX)
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#endif
I also came up with another thoughts.
Do we really want BOOST_NO_CXX11_HDR_INITIALIZER_LIST
to check the compiler support of initializer_list?
Even if BOOST_NO_CXX11_HDR_INITIALIZER_LIST checks
only the existence of <initializer_list>, we can check both
the compiler support and the header existence by
defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX) ||
defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
Comments?
Regards,
Michel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk