From 139bd2213b4f7f739de574dfbaf540d36b7bce9a Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Sat, 3 Mar 2012 00:34:17 +0000 Subject: [PATCH] Deprecate BOOST_NO_INITIALIZER_LISTS; use BOOST_NO_0X_HDR_INITIALIZER_LIST instead [SVN r77157] --- .../boost_config/boost_macro_reference.html | 43 +++++++++++++------ doc/macro_reference.qbk | 3 -- include/boost/config/compiler/borland.hpp | 2 +- include/boost/config/compiler/clang.hpp | 2 +- include/boost/config/compiler/codegear.hpp | 3 +- include/boost/config/compiler/common_edg.hpp | 2 +- include/boost/config/compiler/digitalmars.hpp | 2 +- include/boost/config/compiler/gcc.hpp | 2 +- include/boost/config/compiler/gcc_xml.hpp | 2 +- include/boost/config/compiler/hp_acc.hpp | 2 +- include/boost/config/compiler/intel.hpp | 2 +- include/boost/config/compiler/metrowerks.hpp | 2 +- include/boost/config/compiler/mpw.hpp | 2 +- include/boost/config/compiler/pathscale.hpp | 1 - include/boost/config/compiler/pgi.hpp | 1 - include/boost/config/compiler/sunpro_cc.hpp | 2 +- include/boost/config/compiler/vacpp.hpp | 2 +- include/boost/config/compiler/visualc.hpp | 4 +- include/boost/config/suffix.hpp | 20 ++++----- test/all/Jamfile.v2 | 3 -- test/boost_no_initializer_lists.ipp | 34 --------------- test/config_info.cpp | 1 - test/config_test.cpp | 10 ----- test/no_initializer_lists_fail.cpp | 37 ---------------- test/no_initializer_lists_pass.cpp | 37 ---------------- 25 files changed, 55 insertions(+), 166 deletions(-) delete mode 100644 test/boost_no_initializer_lists.ipp delete mode 100644 test/no_initializer_lists_fail.cpp delete mode 100644 test/no_initializer_lists_pass.cpp diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index e90f2701..366574de 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -2690,18 +2690,6 @@ - -

- BOOST_NO_INITIALIZER_LISTS -

- - -

- The C++ compiler does not support C++0x initializer lists. -

- - -

BOOST_NO_LAMBDAS @@ -3703,6 +3691,37 @@ +

+ +Boost Deprecated Macros +

+

+ The following macros have been deprecated; their use is no longer recommended. + Please use the suggested replacements instead. + They will be removed in a future release of Boost. +

+
+++++ + + + + + + + + + + +

Macro

Replacement

+ BOOST_NO_INITIALIZER_LISTS +

+ Use BOOST_NO_0X_HDR_INITIALIZER_LIST instead. +

+

Macros diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index c5dad035..01402555 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -596,9 +596,6 @@ explicit instantiation forward declarations for templates (`extern template ...` [[`BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS`][The compiler does not support default template arguments for function templates. ]] -[[`BOOST_NO_INITIALIZER_LISTS`][ -The C++ compiler does not support C++0x initializer lists. -]] [[`BOOST_NO_LAMBDAS`][The compiler does not support Lambdas. ]] [[`BOOST_NO_LONG_LONG`][The compiler does not support `long long`. diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index 680e87bd..86541ee0 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -176,7 +176,7 @@ #define BOOST_NO_DEFAULTED_FUNCTIONS #define BOOST_NO_DELETED_FUNCTIONS #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_0X_HDR_INITIALIZER_LIST #define BOOST_NO_LAMBDAS #define BOOST_NO_NULLPTR #define BOOST_NO_RAW_LITERALS diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index d9f1fd27..73694e2e 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -63,7 +63,7 @@ #endif #if !__has_feature(cxx_generalized_initializers) -# define BOOST_NO_INITIALIZER_LISTS +# define BOOST_NO_0X_HDR_INITIALIZER_LIST #endif #if !__has_feature(cxx_lambdas) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index f1887a0c..1d593fb0 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -98,7 +98,6 @@ #define BOOST_NO_DELETED_FUNCTIONS #define BOOST_NO_EXTERN_TEMPLATE #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_INITIALIZER_LISTS #define BOOST_NO_LAMBDAS #define BOOST_NO_NOEXCEPT #define BOOST_NO_NULLPTR @@ -120,7 +119,7 @@ #define BOOST_HAS_MACRO_USE_FACET -#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_0X_HDR_INITIALIZER_LIST // On non-Win32 platforms let the platform config figure this out: #ifdef _WIN32 diff --git a/include/boost/config/compiler/common_edg.hpp b/include/boost/config/compiler/common_edg.hpp index 10333ad2..0858b6d3 100644 --- a/include/boost/config/compiler/common_edg.hpp +++ b/include/boost/config/compiler/common_edg.hpp @@ -64,7 +64,7 @@ #endif #if (__EDG_VERSION__ <= 310) // No support for initializer lists -# define BOOST_NO_INITIALIZER_LISTS +# define BOOST_NO_0X_HDR_INITIALIZER_LIST #endif #if (__EDG_VERSION__ < 400) # define BOOST_NO_VARIADIC_MACROS diff --git a/include/boost/config/compiler/digitalmars.hpp b/include/boost/config/compiler/digitalmars.hpp index ed92306f..fd3f55d0 100644 --- a/include/boost/config/compiler/digitalmars.hpp +++ b/include/boost/config/compiler/digitalmars.hpp @@ -71,7 +71,7 @@ #define BOOST_NO_DELETED_FUNCTIONS #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_0X_HDR_INITIALIZER_LIST #define BOOST_NO_LAMBDAS #define BOOST_NO_NOEXCEPT #define BOOST_NO_NULLPTR diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 5a69cb49..ac3d9a4e 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -182,7 +182,7 @@ # define BOOST_NO_AUTO_MULTIDECLARATIONS # define BOOST_NO_CHAR16_T # define BOOST_NO_CHAR32_T -# define BOOST_NO_INITIALIZER_LISTS +# define BOOST_NO_0X_HDR_INITIALIZER_LIST # define BOOST_NO_DEFAULTED_FUNCTIONS # define BOOST_NO_DELETED_FUNCTIONS #endif diff --git a/include/boost/config/compiler/gcc_xml.hpp b/include/boost/config/compiler/gcc_xml.hpp index 61dcedcc..89980ba2 100644 --- a/include/boost/config/compiler/gcc_xml.hpp +++ b/include/boost/config/compiler/gcc_xml.hpp @@ -43,7 +43,7 @@ # define BOOST_NO_CHAR32_T # define BOOST_NO_DEFAULTED_FUNCTIONS # define BOOST_NO_DELETED_FUNCTIONS -# define BOOST_NO_INITIALIZER_LISTS +# define BOOST_NO_0X_HDR_INITIALIZER_LIST # define BOOST_NO_SCOPED_ENUMS # define BOOST_NO_SFINAE_EXPR # define BOOST_NO_SCOPED_ENUMS diff --git a/include/boost/config/compiler/hp_acc.hpp b/include/boost/config/compiler/hp_acc.hpp index 0d73b287..f938f9ac 100644 --- a/include/boost/config/compiler/hp_acc.hpp +++ b/include/boost/config/compiler/hp_acc.hpp @@ -104,7 +104,7 @@ #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_EXTERN_TEMPLATE #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_0X_HDR_INITIALIZER_LIST #define BOOST_NO_LAMBDAS #define BOOST_NO_NOEXCEPT #define BOOST_NO_NULLPTR diff --git a/include/boost/config/compiler/intel.hpp b/include/boost/config/compiler/intel.hpp index a1704a48..327df4b3 100644 --- a/include/boost/config/compiler/intel.hpp +++ b/include/boost/config/compiler/intel.hpp @@ -240,7 +240,7 @@ template<> struct assert_intrinsic_wchar_t {}; // // Although the Intel compiler is capable of supporting these, it appears not to in MSVC compatibility mode: // -# define BOOST_NO_INITIALIZER_LISTS +# define BOOST_NO_0X_HDR_INITIALIZER_LIST # define BOOST_NO_VARIADIC_TEMPLATES # define BOOST_NO_DELETED_FUNCTIONS # define BOOST_NO_DEFAULTED_FUNCTIONS diff --git a/include/boost/config/compiler/metrowerks.hpp b/include/boost/config/compiler/metrowerks.hpp index 02baecdd..3501698f 100644 --- a/include/boost/config/compiler/metrowerks.hpp +++ b/include/boost/config/compiler/metrowerks.hpp @@ -104,7 +104,7 @@ #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_EXTERN_TEMPLATE #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_0X_HDR_INITIALIZER_LIST #define BOOST_NO_LAMBDAS #define BOOST_NO_NOEXCEPT #define BOOST_NO_NULLPTR diff --git a/include/boost/config/compiler/mpw.hpp b/include/boost/config/compiler/mpw.hpp index 45e1aa45..9274fbf2 100644 --- a/include/boost/config/compiler/mpw.hpp +++ b/include/boost/config/compiler/mpw.hpp @@ -52,7 +52,7 @@ #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_EXTERN_TEMPLATE #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_0X_HDR_INITIALIZER_LIST #define BOOST_NO_LAMBDAS #define BOOST_NO_NOEXCEPT #define BOOST_NO_NULLPTR diff --git a/include/boost/config/compiler/pathscale.hpp b/include/boost/config/compiler/pathscale.hpp index 94e44726..eaff0ad2 100644 --- a/include/boost/config/compiler/pathscale.hpp +++ b/include/boost/config/compiler/pathscale.hpp @@ -45,7 +45,6 @@ # define BOOST_NO_NUMERIC_LIMITS_LOWEST # define BOOST_NO_NOEXCEPT # define BOOST_NO_LAMBDAS -# define BOOST_NO_INITIALIZER_LISTS # define BOOST_NO_MS_INT64_NUMERIC_LIMITS # define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS # define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS diff --git a/include/boost/config/compiler/pgi.hpp b/include/boost/config/compiler/pgi.hpp index 706cfeb1..7e3e8e47 100644 --- a/include/boost/config/compiler/pgi.hpp +++ b/include/boost/config/compiler/pgi.hpp @@ -75,7 +75,6 @@ #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_EXTERN_TEMPLATE #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_INITIALIZER_LISTS #define BOOST_NO_LAMBDAS #define BOOST_NO_NOEXCEPT #define BOOST_NO_NULLPTR diff --git a/include/boost/config/compiler/sunpro_cc.hpp b/include/boost/config/compiler/sunpro_cc.hpp index eaf6c741..c2136cc0 100644 --- a/include/boost/config/compiler/sunpro_cc.hpp +++ b/include/boost/config/compiler/sunpro_cc.hpp @@ -111,7 +111,7 @@ #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_EXTERN_TEMPLATE #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_0X_HDR_INITIALIZER_LIST #define BOOST_NO_LAMBDAS #define BOOST_NO_NOEXCEPT #define BOOST_NO_NULLPTR diff --git a/include/boost/config/compiler/vacpp.hpp b/include/boost/config/compiler/vacpp.hpp index b0407aab..7b9860ea 100644 --- a/include/boost/config/compiler/vacpp.hpp +++ b/include/boost/config/compiler/vacpp.hpp @@ -95,7 +95,7 @@ // not enabled separately at this time # define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS #endif -#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_0X_HDR_INITIALIZER_LIST #define BOOST_NO_LAMBDAS #define BOOST_NO_NOEXCEPT #define BOOST_NO_NULLPTR diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 15fc5e1c..850769bf 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -137,7 +137,7 @@ #endif #if _MSC_VER < 1600 || !defined(BOOST_STRICT_CONFIG) // 150X == VC++ 9.0 -# define BOOST_NO_INITIALIZER_LISTS +# define BOOST_NO_0X_HDR_INITIALIZER_LIST #endif #ifndef _NATIVE_WCHAR_T_DEFINED @@ -215,7 +215,7 @@ #define BOOST_NO_DELETED_FUNCTIONS #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_0X_HDR_INITIALIZER_LIST #define BOOST_NO_NOEXCEPT #define BOOST_NO_RAW_LITERALS #define BOOST_NO_SCOPED_ENUMS diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 72a0dc95..56d363de 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -334,17 +334,6 @@ # define BOOST_HASH_MAP_HEADER #endif -// -// Set BOOST_NO_INITIALIZER_LISTS if there is no library support. -// - -#if defined(BOOST_NO_0X_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS) -# define BOOST_NO_INITIALIZER_LISTS -#endif -#if defined(BOOST_NO_INITIALIZER_LISTS) && !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST) -# define BOOST_NO_0X_HDR_INITIALIZER_LIST -#endif - // // Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined // @@ -700,5 +689,14 @@ namespace std{ using ::type_info; } # endif #endif + +// Deprecated macros for 1.50 +// These will go away in a future release + +// Use BOOST_NO_0X_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS +#if defined(BOOST_NO_0X_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS) +# define BOOST_NO_INITIALIZER_LISTS +#endif + #endif diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index 811c052a..2c410bc2 100644 --- a/test/all/Jamfile.v2 +++ b/test/all/Jamfile.v2 @@ -328,9 +328,6 @@ test-suite "BOOST_NO_FUNCTION_TEMPLATE_ORDERING" : test-suite "BOOST_NO_MS_INT64_NUMERIC_LIMITS" : [ run ../no_i64_limits_pass.cpp ] [ compile-fail ../no_i64_limits_fail.cpp ] ; -test-suite "BOOST_NO_INITIALIZER_LISTS" : -[ run ../no_initializer_lists_pass.cpp ] -[ compile-fail ../no_initializer_lists_fail.cpp ] ; test-suite "BOOST_NO_INCLASS_MEMBER_INITIALIZATION" : [ run ../no_inline_memb_init_pass.cpp ] [ compile-fail ../no_inline_memb_init_fail.cpp ] ; diff --git a/test/boost_no_initializer_lists.ipp b/test/boost_no_initializer_lists.ipp deleted file mode 100644 index 5bc58c22..00000000 --- a/test/boost_no_initializer_lists.ipp +++ /dev/null @@ -1,34 +0,0 @@ -// (C) Copyright Daniel James 2008. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/config for most recent version. - - -// MACRO: BOOST_NO_INITIALIZER_LISTS -// TITLE: Initializer Lists -// DESCRIPTION: If the compiler does not support C++0x initializer lists - -#include -#include -#include - -namespace boost_no_initializer_lists { - -void quiet_warning(const std::initializer_list&){} - -void f(std::initializer_list) -{ -} - -int test() -{ - std::vector v{"once", "upon", "a", "time"}; // See C++ std 8.5.4 - f( { 1, 2, 3, 4 } ); - std::initializer_list x = { 1, 2 }; - quiet_warning(x); - return 0; -} - -} diff --git a/test/config_info.cpp b/test/config_info.cpp index ae9578df..fa9042f3 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -1028,7 +1028,6 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_FUNCTION_TEMPLATE_ORDERING); PRINT_MACRO(BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS); PRINT_MACRO(BOOST_NO_INCLASS_MEMBER_INITIALIZATION); - PRINT_MACRO(BOOST_NO_INITIALIZER_LISTS); PRINT_MACRO(BOOST_NO_INTEGRAL_INT64_T); PRINT_MACRO(BOOST_NO_INTRINSIC_WCHAR_T); PRINT_MACRO(BOOST_NO_IOSFWD); diff --git a/test/config_test.cpp b/test/config_test.cpp index 3f8cb588..1973a21b 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -277,11 +277,6 @@ namespace boost_no_function_template_ordering = empty_boost; #else namespace boost_no_ms_int64_numeric_limits = empty_boost; #endif -#ifndef BOOST_NO_INITIALIZER_LISTS -#include "boost_no_initializer_lists.ipp" -#else -namespace boost_no_initializer_lists = empty_boost; -#endif #ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION #include "boost_no_inline_memb_init.ipp" #else @@ -1371,11 +1366,6 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_MS_INT64_NUMERIC_LIMITS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_initializer_lists::test()) - { - std::cerr << "Failed test for BOOST_NO_INITIALIZER_LISTS at: " << __FILE__ << ":" << __LINE__ << std::endl; - ++error_count; - } if(0 != boost_no_inclass_member_initialization::test()) { std::cerr << "Failed test for BOOST_NO_INCLASS_MEMBER_INITIALIZATION at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/no_initializer_lists_fail.cpp b/test/no_initializer_lists_fail.cpp deleted file mode 100644 index 1cc02556..00000000 --- a/test/no_initializer_lists_fail.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// This file was automatically generated on Wed Sep 24 11:44:21 2008 -// by libs/config/tools/generate.cpp -// Copyright John Maddock 2002-4. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/config for the most recent version.// -// Revision $Id$ -// - - -// Test file for macro BOOST_NO_INITIALIZER_LISTS -// This file should not compile, if it does then -// BOOST_NO_INITIALIZER_LISTS should not be defined. -// See file boost_no_initializer_lists.ipp for details - -// Must not have BOOST_ASSERT_CONFIG set; it defeats -// the objective of this file: -#ifdef BOOST_ASSERT_CONFIG -# undef BOOST_ASSERT_CONFIG -#endif - -#include -#include "test.hpp" - -#ifdef BOOST_NO_INITIALIZER_LISTS -#include "boost_no_initializer_lists.ipp" -#else -#error "this file should not compile" -#endif - -int main( int, char *[] ) -{ - return boost_no_initializer_lists::test(); -} - diff --git a/test/no_initializer_lists_pass.cpp b/test/no_initializer_lists_pass.cpp deleted file mode 100644 index 74e3b5ad..00000000 --- a/test/no_initializer_lists_pass.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// This file was automatically generated on Wed Sep 24 11:44:21 2008 -// by libs/config/tools/generate.cpp -// Copyright John Maddock 2002-4. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/config for the most recent version.// -// Revision $Id$ -// - - -// Test file for macro BOOST_NO_INITIALIZER_LISTS -// This file should compile, if it does not then -// BOOST_NO_INITIALIZER_LISTS should be defined. -// See file boost_no_initializer_lists.ipp for details - -// Must not have BOOST_ASSERT_CONFIG set; it defeats -// the objective of this file: -#ifdef BOOST_ASSERT_CONFIG -# undef BOOST_ASSERT_CONFIG -#endif - -#include -#include "test.hpp" - -#ifndef BOOST_NO_INITIALIZER_LISTS -#include "boost_no_initializer_lists.ipp" -#else -namespace boost_no_initializer_lists = empty_boost; -#endif - -int main( int, char *[] ) -{ - return boost_no_initializer_lists::test(); -} -