From 043059d96bf397d501880adc4baede95a2036f58 Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Tue, 10 Jul 2012 19:10:08 +0000 Subject: [PATCH] Add BOOST_NO_CXX11_RANGE_BASED_FOR macro. Fix a bunch of .ipp files with incomplete _cxx11 name changes. [SVN r79404] --- doc/html/boost_config/acknowledgements.html | 2 +- .../boost_config/boost_macro_reference.html | 33 ++---- .../guidelines_for_boost_authors.html | 2 +- doc/html/boost_config/rationale.html | 2 +- doc/html/index.html | 4 +- doc/macro_reference.qbk | 3 + include/boost/config/compiler/borland.hpp | 1 + include/boost/config/compiler/clang.hpp | 4 + include/boost/config/compiler/codegear.hpp | 1 + include/boost/config/compiler/common_edg.hpp | 1 + include/boost/config/compiler/cray.hpp | 1 + include/boost/config/compiler/digitalmars.hpp | 1 + include/boost/config/compiler/gcc.hpp | 1 + include/boost/config/compiler/gcc_xml.hpp | 1 + include/boost/config/compiler/hp_acc.hpp | 1 + include/boost/config/compiler/metrowerks.hpp | 1 + include/boost/config/compiler/mpw.hpp | 1 + include/boost/config/compiler/pathscale.hpp | 1 + include/boost/config/compiler/pgi.hpp | 1 + include/boost/config/compiler/sunpro_cc.hpp | 1 + include/boost/config/compiler/vacpp.hpp | 1 + include/boost/config/compiler/visualc.hpp | 8 +- test/all/Jamfile.v2 | 7 +- test/boost_no_auto_declarations.ipp | 2 +- test/boost_no_auto_multidecl.ipp | 2 +- test/boost_no_char16_t.ipp | 2 +- test/boost_no_char32_t.ipp | 2 +- test/boost_no_constexpr.ipp | 2 +- test/boost_no_decltype.ipp | 2 +- test/boost_no_defaulted_functions.ipp | 2 +- test/boost_no_deleted_functions.ipp | 2 +- test/boost_no_explicit_cvt_ops.ipp | 2 +- test/boost_no_extern_template.ipp | 2 +- ...oost_no_function_template_default_args.ipp | 2 +- test/boost_no_lambdas.ipp | 2 +- test/boost_no_noexcept.ipp | 2 +- test/boost_no_nullptr.ipp | 2 +- test/boost_no_range_based_for.ipp | 23 ++++ test/boost_no_raw_literals.ipp | 2 +- test/boost_no_rvalue_references.ipp | 2 +- test/boost_no_scoped_enums.ipp | 2 +- test/boost_no_static_assert.ipp | 2 +- test/boost_no_tem_local_classes.ipp | 2 +- test/boost_no_unicode_literals.ipp | 2 +- test/boost_no_unified_init.ipp | 2 +- test/boost_no_variadic_macros.ipp | 2 +- test/boost_no_variadic_templates.ipp | 2 +- test/config_info.cpp | 55 +++++---- test/config_test.cpp | 112 ++++++++++-------- test/no_range_based_for_fail.cpp | 37 ++++++ test/no_range_based_for_pass.cpp | 37 ++++++ 51 files changed, 262 insertions(+), 127 deletions(-) create mode 100644 test/boost_no_range_based_for.ipp create mode 100644 test/no_range_based_for_fail.cpp create mode 100644 test/no_range_based_for_pass.cpp diff --git a/doc/html/boost_config/acknowledgements.html b/doc/html/boost_config/acknowledgements.html index 17e711df..2e961d14 100644 --- a/doc/html/boost_config/acknowledgements.html +++ b/doc/html/boost_config/acknowledgements.html @@ -3,7 +3,7 @@ Acknowledgements - + diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index 9cba40a6..d46d6ab2 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -3,7 +3,7 @@ Boost Macro Reference - + @@ -2805,6 +2805,18 @@ + +

+ BOOST_NO_CXX11_RANGE_BASED_FOR +

+ + +

+ The compiler does not support range-based for statements. +

+ + +

BOOST_NO_CXX11_RAW_LITERALS @@ -4451,25 +4463,6 @@ - -

- BOOST_NO_LONG_LONG -

- - -

- BOOST_NO_CXX11_LONG_LONG -

- - -

- Boost 1.51 -

- - - - -

BOOST_NO_NOEXCEPT diff --git a/doc/html/boost_config/guidelines_for_boost_authors.html b/doc/html/boost_config/guidelines_for_boost_authors.html index 8fdc8f18..e461783e 100644 --- a/doc/html/boost_config/guidelines_for_boost_authors.html +++ b/doc/html/boost_config/guidelines_for_boost_authors.html @@ -3,7 +3,7 @@ Guidelines for Boost Authors - + diff --git a/doc/html/boost_config/rationale.html b/doc/html/boost_config/rationale.html index 68dfc28a..cf175845 100644 --- a/doc/html/boost_config/rationale.html +++ b/doc/html/boost_config/rationale.html @@ -3,7 +3,7 @@ Rationale - + diff --git a/doc/html/index.html b/doc/html/index.html index c3dbb281..f5f4d0d5 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,7 +3,7 @@ Boost.Config - + @@ -951,7 +951,7 @@ - +

Last revised: July 09, 2012 at 22:23:04 GMT

Last revised: July 10, 2012 at 19:03:16 GMT


diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index f1ccc362..65f490ed 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -613,6 +613,9 @@ control passing of unnamed types as template parameters, see also ]] [[`BOOST_NO_CXX11_NULLPTR`][The compiler does not support `nullptr`. ]] +[[`BOOST_NO_CXX11_RANGE_BASED_FOR`][The compiler does not support +range-based for statements. +]] [[`BOOST_NO_CXX11_RAW_LITERALS`][The compiler does not support raw string literals. ]] diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index 8057ac8e..cffa8ea0 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -180,6 +180,7 @@ #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index d0e8edfd..aab3c610 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -87,6 +87,10 @@ # define BOOST_NO_CXX11_NULLPTR #endif +#if !__has_feature(cxx_range_for) +# define BOOST_NO_CXX11_RANGE_BASED_FOR +#endif + #if !__has_feature(cxx_raw_string_literals) # define BOOST_NO_CXX11_RAW_LITERALS #endif diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index f53926c9..1a6df335 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -102,6 +102,7 @@ #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_SFINAE_EXPR diff --git a/include/boost/config/compiler/common_edg.hpp b/include/boost/config/compiler/common_edg.hpp index 5832e558..441a055f 100644 --- a/include/boost/config/compiler/common_edg.hpp +++ b/include/boost/config/compiler/common_edg.hpp @@ -85,6 +85,7 @@ #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index d6f07848..5463ea08 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -38,6 +38,7 @@ #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_NOEXCEPT diff --git a/include/boost/config/compiler/digitalmars.hpp b/include/boost/config/compiler/digitalmars.hpp index ffa9545a..15cc209d 100644 --- a/include/boost/config/compiler/digitalmars.hpp +++ b/include/boost/config/compiler/digitalmars.hpp @@ -76,6 +76,7 @@ #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index d2c111bd..f42fd790 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -212,6 +212,7 @@ #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif diff --git a/include/boost/config/compiler/gcc_xml.hpp b/include/boost/config/compiler/gcc_xml.hpp index baa172f2..eaed4b5a 100644 --- a/include/boost/config/compiler/gcc_xml.hpp +++ b/include/boost/config/compiler/gcc_xml.hpp @@ -49,6 +49,7 @@ # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_LAMBDAS # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +# define BOOST_NO_CXX11_RANGE_BASED_FOR # define BOOST_NO_CXX11_RAW_LITERALS # define BOOST_NO_CXX11_UNICODE_LITERALS # define BOOST_NO_CXX11_NOEXCEPT diff --git a/include/boost/config/compiler/hp_acc.hpp b/include/boost/config/compiler/hp_acc.hpp index b41d1adc..4f5f81b3 100644 --- a/include/boost/config/compiler/hp_acc.hpp +++ b/include/boost/config/compiler/hp_acc.hpp @@ -109,6 +109,7 @@ #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS diff --git a/include/boost/config/compiler/metrowerks.hpp b/include/boost/config/compiler/metrowerks.hpp index 32aa0dab..184cb71c 100644 --- a/include/boost/config/compiler/metrowerks.hpp +++ b/include/boost/config/compiler/metrowerks.hpp @@ -109,6 +109,7 @@ #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR diff --git a/include/boost/config/compiler/mpw.hpp b/include/boost/config/compiler/mpw.hpp index c6c95358..14adee0c 100644 --- a/include/boost/config/compiler/mpw.hpp +++ b/include/boost/config/compiler/mpw.hpp @@ -57,6 +57,7 @@ #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS diff --git a/include/boost/config/compiler/pathscale.hpp b/include/boost/config/compiler/pathscale.hpp index 96763489..a357ceb2 100644 --- a/include/boost/config/compiler/pathscale.hpp +++ b/include/boost/config/compiler/pathscale.hpp @@ -39,6 +39,7 @@ # define BOOST_NO_SFINAE_EXPR # define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_RANGE_BASED_FOR # define BOOST_NO_CXX11_RAW_LITERALS # define BOOST_NO_CXX11_NULLPTR # define BOOST_NO_NUMERIC_LIMITS_LOWEST diff --git a/include/boost/config/compiler/pgi.hpp b/include/boost/config/compiler/pgi.hpp index 170e0da0..b2c8e8ed 100644 --- a/include/boost/config/compiler/pgi.hpp +++ b/include/boost/config/compiler/pgi.hpp @@ -80,6 +80,7 @@ #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_NUMERIC_LIMITS_LOWEST +#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS diff --git a/include/boost/config/compiler/sunpro_cc.hpp b/include/boost/config/compiler/sunpro_cc.hpp index 16686152..65beb501 100644 --- a/include/boost/config/compiler/sunpro_cc.hpp +++ b/include/boost/config/compiler/sunpro_cc.hpp @@ -116,6 +116,7 @@ #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS diff --git a/include/boost/config/compiler/vacpp.hpp b/include/boost/config/compiler/vacpp.hpp index 35d5612f..2410d5a3 100644 --- a/include/boost/config/compiler/vacpp.hpp +++ b/include/boost/config/compiler/vacpp.hpp @@ -104,6 +104,7 @@ #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #if ! __IBMCPP_RVALUE_REFERENCES # define BOOST_NO_CXX11_RVALUE_REFERENCES diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 0df43b79..0b11faaf 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -204,6 +204,13 @@ # define BOOST_HAS_STDINT_H #endif +// C++ features supported by VC++ 11 (aka 2012) +// +#if _MSC_VER < 1700 +# define BOOST_NO_CXX11_RANGE_BASED_FOR +# define BOOST_NO_CXX11_SCOPED_ENUMS +#endif // _MSC_VER < 1700 + // C++0x features not supported by any versions #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T @@ -216,7 +223,6 @@ #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index a57651f1..9bd02e64 100644 --- a/test/all/Jamfile.v2 +++ b/test/all/Jamfile.v2 @@ -1,7 +1,7 @@ # # Regression test Jamfile for boost configuration setup. # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Sun Apr 22 11:55:04 2012 +# This file was automatically generated on Tue Jul 10 14:57:46 2012 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -199,7 +199,7 @@ test-suite "BOOST_BCB_PARTIAL_SPECIALIZATION_BUG" : test-suite "BOOST_NO_CXX11_CHAR16_T" : [ run ../no_char16_t_pass.cpp ] [ compile-fail ../no_char16_t_fail.cpp ] ; -test-suite "BOOST_NO_CXX11_CHAR16_T" : +test-suite "BOOST_NO_CXX11_CHAR32_T" : [ run ../no_char32_t_pass.cpp ] [ compile-fail ../no_char32_t_fail.cpp ] ; test-suite "BOOST_NO_COMPLETE_VALUE_INITIALIZATION" : @@ -415,6 +415,9 @@ test-suite "BOOST_NO_PRIVATE_IN_AGGREGATE" : test-suite "BOOST_NO_POINTER_TO_MEMBER_CONST" : [ run ../no_ptr_mem_const_pass.cpp ] [ compile-fail ../no_ptr_mem_const_fail.cpp ] ; +test-suite "BOOST_NO_CXX11_RANGE_BASED_FOR" : +[ run ../no_range_based_for_pass.cpp ] +[ compile-fail ../no_range_based_for_fail.cpp ] ; test-suite "BOOST_NO_CXX11_RAW_LITERALS" : [ run ../no_raw_literals_pass.cpp ] [ compile-fail ../no_raw_literals_fail.cpp ] ; diff --git a/test/boost_no_auto_declarations.ipp b/test/boost_no_auto_declarations.ipp index 6b2ff1f5..ce526eb8 100644 --- a/test/boost_no_auto_declarations.ipp +++ b/test/boost_no_auto_declarations.ipp @@ -9,7 +9,7 @@ // TITLE: C++0x auto declarators unavailable // DESCRIPTION: The compiler does not support C++0x declarations of variables with automatically deduced type -namespace boost_no_auto_declarations { +namespace boost_no_cxx11_auto_declarations { void check_f(int& x) { diff --git a/test/boost_no_auto_multidecl.ipp b/test/boost_no_auto_multidecl.ipp index d5800910..fe22cadc 100644 --- a/test/boost_no_auto_multidecl.ipp +++ b/test/boost_no_auto_multidecl.ipp @@ -9,7 +9,7 @@ // TITLE: C++0x auto multideclarators unavailable // DESCRIPTION: The compiler does not support C++0x declarations of series of variables with automatically deduced type -namespace boost_no_auto_multideclarations { +namespace boost_no_cxx11_auto_multideclarations { void check_f(int& x, int*& y) { diff --git a/test/boost_no_char16_t.ipp b/test/boost_no_char16_t.ipp index 6eb43aaf..8e7fbae1 100644 --- a/test/boost_no_char16_t.ipp +++ b/test/boost_no_char16_t.ipp @@ -11,7 +11,7 @@ // TITLE: C++0x char16_t unavailable // DESCRIPTION: The compiler does not support C++0x char16_t -namespace boost_no_char16_t { +namespace boost_no_cxx11_char16_t { // Microsoft VC++ 2010, and possibly other compilers, provides // a typedef for char16_t rather than a new type. We want that diff --git a/test/boost_no_char32_t.ipp b/test/boost_no_char32_t.ipp index 2f1abd72..062215c9 100644 --- a/test/boost_no_char32_t.ipp +++ b/test/boost_no_char32_t.ipp @@ -10,7 +10,7 @@ // TITLE: C++0x char32_t unavailable // DESCRIPTION: The compiler does not support C++0x char32_t -namespace boost_no_char32_t { +namespace boost_no_cxx11_char32_t { // Microsoft VC++ 2010, and possibly other compilers, provides // a typedef for char32_t rather than a new type. We want that diff --git a/test/boost_no_constexpr.ipp b/test/boost_no_constexpr.ipp index dbbf2440..82de2e2d 100644 --- a/test/boost_no_constexpr.ipp +++ b/test/boost_no_constexpr.ipp @@ -10,7 +10,7 @@ // TITLE: C++0x constexpr unavailable // DESCRIPTION: The compiler does not support C++0x constexpr -namespace boost_no_constexpr { +namespace boost_no_cxx11_constexpr { void quiet_warning(int){} diff --git a/test/boost_no_decltype.ipp b/test/boost_no_decltype.ipp index 21eba391..d361d201 100644 --- a/test/boost_no_decltype.ipp +++ b/test/boost_no_decltype.ipp @@ -11,7 +11,7 @@ // TITLE: C++0x decltype unavailable // DESCRIPTION: The compiler does not support C++0x decltype -namespace boost_no_decltype { +namespace boost_no_cxx11_decltype { void quiet_warning(int){} diff --git a/test/boost_no_defaulted_functions.ipp b/test/boost_no_defaulted_functions.ipp index 4b8d5bde..5c4c7d02 100644 --- a/test/boost_no_defaulted_functions.ipp +++ b/test/boost_no_defaulted_functions.ipp @@ -14,7 +14,7 @@ # error Defaulted functions are not supported in non-C++0x mode #endif -namespace boost_no_defaulted_functions { +namespace boost_no_cxx11_defaulted_functions { struct foo { foo() = default; diff --git a/test/boost_no_deleted_functions.ipp b/test/boost_no_deleted_functions.ipp index 8ca0506d..4d3f0a90 100644 --- a/test/boost_no_deleted_functions.ipp +++ b/test/boost_no_deleted_functions.ipp @@ -14,7 +14,7 @@ # error Deleted functions are not supported in non-C++0x mode #endif -namespace boost_no_deleted_functions { +namespace boost_no_cxx11_deleted_functions { struct foo { foo() = delete; diff --git a/test/boost_no_explicit_cvt_ops.ipp b/test/boost_no_explicit_cvt_ops.ipp index e8c4a59f..8b187c0f 100644 --- a/test/boost_no_explicit_cvt_ops.ipp +++ b/test/boost_no_explicit_cvt_ops.ipp @@ -14,7 +14,7 @@ # error This feature is not available in non-C++0x mode #endif -namespace boost_no_explicit_conversion_operators { +namespace boost_no_cxx11_explicit_conversion_operators { void quiet_warning(int){} diff --git a/test/boost_no_extern_template.ipp b/test/boost_no_extern_template.ipp index 434fa041..c5e2ca09 100644 --- a/test/boost_no_extern_template.ipp +++ b/test/boost_no_extern_template.ipp @@ -10,7 +10,7 @@ // TITLE: C++0x extern template unavailable // DESCRIPTION: The compiler does not support C++0x extern template -namespace boost_no_extern_template { +namespace boost_no_cxx11_extern_template { template void f(T const* p, U const* q) { diff --git a/test/boost_no_function_template_default_args.ipp b/test/boost_no_function_template_default_args.ipp index ca2cb31c..cb0c7500 100644 --- a/test/boost_no_function_template_default_args.ipp +++ b/test/boost_no_function_template_default_args.ipp @@ -9,7 +9,7 @@ // TITLE: Default template arguments for function templates // DESCRIPTION: Default template arguments for function templates are not supported. -namespace boost_no_function_template_default_args +namespace boost_no_cxx11_function_template_default_args { template diff --git a/test/boost_no_lambdas.ipp b/test/boost_no_lambdas.ipp index 9e53a895..689f90b6 100644 --- a/test/boost_no_lambdas.ipp +++ b/test/boost_no_lambdas.ipp @@ -14,7 +14,7 @@ # error This feature is not available in non-C++0x mode #endif -namespace boost_no_lambdas { +namespace boost_no_cxx11_lambdas { int test() { diff --git a/test/boost_no_noexcept.ipp b/test/boost_no_noexcept.ipp index 2b425977..878658f1 100644 --- a/test/boost_no_noexcept.ipp +++ b/test/boost_no_noexcept.ipp @@ -9,7 +9,7 @@ // TITLE: C++0x noexcept unavailable // DESCRIPTION: The compiler does not support C++0x noexcept -namespace boost_no_noexcept { +namespace boost_no_cxx11_noexcept { void quiet_warning(bool){} diff --git a/test/boost_no_nullptr.ipp b/test/boost_no_nullptr.ipp index ad2d4df3..5fc12fb6 100644 --- a/test/boost_no_nullptr.ipp +++ b/test/boost_no_nullptr.ipp @@ -10,7 +10,7 @@ // TITLE: C++0x nullptr feature unavailable // DESCRIPTION: The compiler does not support the C++0x nullptr feature -namespace boost_no_nullptr { +namespace boost_no_cxx11_nullptr { void quiet_warning(const int*){} diff --git a/test/boost_no_range_based_for.ipp b/test/boost_no_range_based_for.ipp new file mode 100644 index 00000000..15468ec4 --- /dev/null +++ b/test/boost_no_range_based_for.ipp @@ -0,0 +1,23 @@ +// Copyright Beman Dawes 2012 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/config for more information. + +// MACRO: BOOST_NO_CXX11_RANGE_BASED_FOR +// TITLE: C++11 ranged-based for statement unavailable +// DESCRIPTION: The compiler does not support the C++11 range-based for statement + +namespace boost_no_cxx11_range_based_for { + +int test() +{ + // example from 6.5.4 The range-based for statement [stmt.ranged] + int array[5] = { 1, 2, 3, 4, 5 }; + for (int& x : array) + x *= 2; + return 0; +} + +} diff --git a/test/boost_no_raw_literals.ipp b/test/boost_no_raw_literals.ipp index fa1c74ba..c3ead77b 100644 --- a/test/boost_no_raw_literals.ipp +++ b/test/boost_no_raw_literals.ipp @@ -10,7 +10,7 @@ // TITLE: C++0x raw string literals unavailable // DESCRIPTION: The compiler does not support C++0x raw string literals -namespace boost_no_raw_literals { +namespace boost_no_cxx11_raw_literals { void quiet_warning(const char*){} void quiet_warning(const wchar_t*){} diff --git a/test/boost_no_rvalue_references.ipp b/test/boost_no_rvalue_references.ipp index c868f9dd..219a7173 100644 --- a/test/boost_no_rvalue_references.ipp +++ b/test/boost_no_rvalue_references.ipp @@ -9,7 +9,7 @@ // TITLE: C++0x rvalue references unavailable // DESCRIPTION: The compiler does not support C++0x rvalue references -namespace boost_no_rvalue_references { +namespace boost_no_cxx11_rvalue_references { void g(int&) {} diff --git a/test/boost_no_scoped_enums.ipp b/test/boost_no_scoped_enums.ipp index 10f029ee..f1d9dc56 100644 --- a/test/boost_no_scoped_enums.ipp +++ b/test/boost_no_scoped_enums.ipp @@ -10,7 +10,7 @@ // TITLE: C++0x scoped enum unavailable // DESCRIPTION: The compiler does not support C++0x scoped enum -namespace boost_no_scoped_enums { +namespace boost_no_cxx11_scoped_enums { int test() { diff --git a/test/boost_no_static_assert.ipp b/test/boost_no_static_assert.ipp index 9176590e..38ca2967 100644 --- a/test/boost_no_static_assert.ipp +++ b/test/boost_no_static_assert.ipp @@ -9,7 +9,7 @@ // TITLE: C++0x static_assert unavailable // DESCRIPTION: The compiler does not support C++0x static assertions -namespace boost_no_static_assert { +namespace boost_no_cxx11_static_assert { int test() { diff --git a/test/boost_no_tem_local_classes.ipp b/test/boost_no_tem_local_classes.ipp index 4e975e41..04e07b87 100644 --- a/test/boost_no_tem_local_classes.ipp +++ b/test/boost_no_tem_local_classes.ipp @@ -16,7 +16,7 @@ // template parameters but it is intentionally limited to local named classes // because some non C++11 compilers might only support local named classes as // template parameters which is still very useful to program local functors). -namespace boost_no_local_class_template_parameters { +namespace boost_no_cxx11_local_class_template_parameters { template struct a { void use() {} }; template void f(T x) {} diff --git a/test/boost_no_unicode_literals.ipp b/test/boost_no_unicode_literals.ipp index 57d5b58f..1675d205 100644 --- a/test/boost_no_unicode_literals.ipp +++ b/test/boost_no_unicode_literals.ipp @@ -10,7 +10,7 @@ // TITLE: C++0x unicode literals unavailable // DESCRIPTION: The compiler does not support C++0x Unicode literals (N2442) -namespace boost_no_unicode_literals { +namespace boost_no_cxx11_unicode_literals { void quiet_warning(const char*){} diff --git a/test/boost_no_unified_init.ipp b/test/boost_no_unified_init.ipp index 7e735c8c..2a09c5f3 100644 --- a/test/boost_no_unified_init.ipp +++ b/test/boost_no_unified_init.ipp @@ -11,7 +11,7 @@ #include -namespace boost_no_unified_initialization_syntax { +namespace boost_no_cxx11_unified_initialization_syntax { struct BasicStruct { diff --git a/test/boost_no_variadic_macros.ipp b/test/boost_no_variadic_macros.ipp index 3f92215d..50f60a72 100644 --- a/test/boost_no_variadic_macros.ipp +++ b/test/boost_no_variadic_macros.ipp @@ -47,7 +47,7 @@ #define TEST_VARIADIC_MACRO_MAYBE_STRIP_PARENS_2(x) TEST_VARIADIC_MACRO_APPLY(TEST_VARIADIC_MACRO_MAYBE_STRIP_PARENS_2_I, x) #define TEST_VARIADIC_MACRO_MAYBE_STRIP_PARENS_2_I(...) __VA_ARGS__ -namespace boost_no_variadic_macros { +namespace boost_no_cxx11_variadic_macros { void quiet_warning(int){} diff --git a/test/boost_no_variadic_templates.ipp b/test/boost_no_variadic_templates.ipp index 46b4d9da..570e8f2e 100644 --- a/test/boost_no_variadic_templates.ipp +++ b/test/boost_no_variadic_templates.ipp @@ -9,7 +9,7 @@ // TITLE: C++0x variadic templates unavailable // DESCRIPTION: The compiler does not support C++0x variadic templates -namespace boost_no_variadic_templates { +namespace boost_no_cxx11_variadic_templates { template struct tuple {}; diff --git a/test/config_info.cpp b/test/config_info.cpp index d9460e9d..b26e8b58 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -982,13 +982,8 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_ADL_BARRIER); PRINT_MACRO(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP); PRINT_MACRO(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS); - PRINT_MACRO(BOOST_NO_CXX11_AUTO_DECLARATIONS); - PRINT_MACRO(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS); PRINT_MACRO(BOOST_NO_AUTO_PTR); - PRINT_MACRO(BOOST_NO_CXX11_CHAR16_T); - PRINT_MACRO(BOOST_NO_CXX11_CHAR32_T); PRINT_MACRO(BOOST_NO_COMPLETE_VALUE_INITIALIZATION); - PRINT_MACRO(BOOST_NO_CXX11_CONSTEXPR); PRINT_MACRO(BOOST_NO_CTYPE_FUNCTIONS); PRINT_MACRO(BOOST_NO_CV_SPECIALIZATIONS); PRINT_MACRO(BOOST_NO_CV_VOID_SPECIALIZATIONS); @@ -996,6 +991,18 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_CWCTYPE); PRINT_MACRO(BOOST_NO_CXX11_ALLOCATOR); PRINT_MACRO(BOOST_NO_CXX11_ATOMIC_SMART_PTR); + PRINT_MACRO(BOOST_NO_CXX11_AUTO_DECLARATIONS); + PRINT_MACRO(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS); + PRINT_MACRO(BOOST_NO_CXX11_CHAR16_T); + PRINT_MACRO(BOOST_NO_CXX11_CHAR32_T); + PRINT_MACRO(BOOST_NO_CXX11_CONSTEXPR); + PRINT_MACRO(BOOST_NO_CXX11_DECLTYPE); + PRINT_MACRO(BOOST_NO_CXX11_DECLTYPE_N3276); + PRINT_MACRO(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS); + PRINT_MACRO(BOOST_NO_CXX11_DELETED_FUNCTIONS); + PRINT_MACRO(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS); + PRINT_MACRO(BOOST_NO_CXX11_EXTERN_TEMPLATE); + PRINT_MACRO(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS); PRINT_MACRO(BOOST_NO_CXX11_HDR_ARRAY); PRINT_MACRO(BOOST_NO_CXX11_HDR_CHRONO); PRINT_MACRO(BOOST_NO_CXX11_HDR_CODECVT); @@ -1015,20 +1022,27 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_CXX11_HDR_TYPE_TRAITS); PRINT_MACRO(BOOST_NO_CXX11_HDR_UNORDERED_MAP); PRINT_MACRO(BOOST_NO_CXX11_HDR_UNORDERED_SET); + PRINT_MACRO(BOOST_NO_CXX11_LAMBDAS); + PRINT_MACRO(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS); + PRINT_MACRO(BOOST_NO_CXX11_NOEXCEPT); + PRINT_MACRO(BOOST_NO_CXX11_NULLPTR); + PRINT_MACRO(BOOST_NO_CXX11_RANGE_BASED_FOR); + PRINT_MACRO(BOOST_NO_CXX11_RAW_LITERALS); + PRINT_MACRO(BOOST_NO_CXX11_RVALUE_REFERENCES); + PRINT_MACRO(BOOST_NO_CXX11_SCOPED_ENUMS); PRINT_MACRO(BOOST_NO_CXX11_SMART_PTR); - PRINT_MACRO(BOOST_NO_CXX11_DECLTYPE); - PRINT_MACRO(BOOST_NO_CXX11_DECLTYPE_N3276); - PRINT_MACRO(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS); - PRINT_MACRO(BOOST_NO_CXX11_DELETED_FUNCTIONS); + PRINT_MACRO(BOOST_NO_CXX11_STATIC_ASSERT); + PRINT_MACRO(BOOST_NO_CXX11_TEMPLATE_ALIASES); + PRINT_MACRO(BOOST_NO_CXX11_UNICODE_LITERALS); + PRINT_MACRO(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX); + PRINT_MACRO(BOOST_NO_CXX11_VARIADIC_MACROS); + PRINT_MACRO(BOOST_NO_CXX11_VARIADIC_TEMPLATES); PRINT_MACRO(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS); PRINT_MACRO(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS); PRINT_MACRO(BOOST_NO_EXCEPTIONS); PRINT_MACRO(BOOST_NO_EXCEPTION_STD_NAMESPACE); - PRINT_MACRO(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS); PRINT_MACRO(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS); - PRINT_MACRO(BOOST_NO_CXX11_EXTERN_TEMPLATE); PRINT_MACRO(BOOST_NO_FENV_H); - PRINT_MACRO(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS); PRINT_MACRO(BOOST_NO_FUNCTION_TEMPLATE_ORDERING); PRINT_MACRO(BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS); PRINT_MACRO(BOOST_NO_INCLASS_MEMBER_INITIALIZATION); @@ -1037,10 +1051,8 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_IOSFWD); PRINT_MACRO(BOOST_NO_IOSTREAM); PRINT_MACRO(BOOST_NO_IS_ABSTRACT); - PRINT_MACRO(BOOST_NO_CXX11_LAMBDAS); PRINT_MACRO(BOOST_NO_LIMITS); PRINT_MACRO(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS); - PRINT_MACRO(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS); PRINT_MACRO(BOOST_NO_LONG_LONG); PRINT_MACRO(BOOST_NO_LONG_LONG_NUMERIC_LIMITS); PRINT_MACRO(BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS); @@ -1049,21 +1061,15 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_MEMBER_TEMPLATE_KEYWORD); PRINT_MACRO(BOOST_NO_MS_INT64_NUMERIC_LIMITS); PRINT_MACRO(BOOST_NO_NESTED_FRIENDSHIP); - PRINT_MACRO(BOOST_NO_CXX11_NOEXCEPT); - PRINT_MACRO(BOOST_NO_CXX11_NULLPTR); PRINT_MACRO(BOOST_NO_NUMERIC_LIMITS_LOWEST); PRINT_MACRO(BOOST_NO_OPERATORS_IN_NAMESPACE); PRINT_MACRO(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS); PRINT_MACRO(BOOST_NO_POINTER_TO_MEMBER_CONST); PRINT_MACRO(BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS); PRINT_MACRO(BOOST_NO_PRIVATE_IN_AGGREGATE); - PRINT_MACRO(BOOST_NO_CXX11_RAW_LITERALS); PRINT_MACRO(BOOST_NO_RTTI); - PRINT_MACRO(BOOST_NO_CXX11_RVALUE_REFERENCES); - PRINT_MACRO(BOOST_NO_CXX11_SCOPED_ENUMS); PRINT_MACRO(BOOST_NO_SFINAE); PRINT_MACRO(BOOST_NO_SFINAE_EXPR); - PRINT_MACRO(BOOST_NO_CXX11_STATIC_ASSERT); PRINT_MACRO(BOOST_NO_STDC_NAMESPACE); PRINT_MACRO(BOOST_NO_STD_ALLOCATOR); PRINT_MACRO(BOOST_NO_STD_DISTANCE); @@ -1082,19 +1088,14 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_SWPRINTF); PRINT_MACRO(BOOST_NO_TEMPLATED_IOSTREAMS); PRINT_MACRO(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS); - PRINT_MACRO(BOOST_NO_CXX11_TEMPLATE_ALIASES); PRINT_MACRO(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION); PRINT_MACRO(BOOST_NO_TEMPLATE_TEMPLATES); PRINT_MACRO(BOOST_NO_TWO_PHASE_NAME_LOOKUP); PRINT_MACRO(BOOST_NO_TYPEID); PRINT_MACRO(BOOST_NO_TYPENAME_WITH_CTOR); - PRINT_MACRO(BOOST_NO_CXX11_UNICODE_LITERALS); - PRINT_MACRO(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX); PRINT_MACRO(BOOST_NO_UNREACHABLE_RETURN_DETECTION); PRINT_MACRO(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE); PRINT_MACRO(BOOST_NO_USING_TEMPLATE); - PRINT_MACRO(BOOST_NO_CXX11_VARIADIC_MACROS); - PRINT_MACRO(BOOST_NO_CXX11_VARIADIC_TEMPLATES); PRINT_MACRO(BOOST_NO_VOID_RETURNS); @@ -1112,6 +1113,10 @@ void print_boost_macros() + + + + // END GENERATED BLOCK diff --git a/test/config_test.cpp b/test/config_test.cpp index fdcaec3d..39df5afd 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Sun Apr 22 11:55:04 2012 +// This file was automatically generated on Tue Jul 10 14:57:46 2012 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -40,12 +40,12 @@ namespace boost_no_array_type_specializations = empty_boost; #ifndef BOOST_NO_CXX11_AUTO_DECLARATIONS #include "boost_no_auto_declarations.ipp" #else -namespace boost_no_auto_declarations = empty_boost; +namespace boost_no_cxx11_auto_declarations = empty_boost; #endif #ifndef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #include "boost_no_auto_multidecl.ipp" #else -namespace boost_no_auto_multideclarations = empty_boost; +namespace boost_no_cxx11_auto_multideclarations = empty_boost; #endif #ifndef BOOST_NO_AUTO_PTR #include "boost_no_auto_ptr.ipp" @@ -60,12 +60,12 @@ namespace boost_bcb_partial_specialization_bug = empty_boost; #ifndef BOOST_NO_CXX11_CHAR16_T #include "boost_no_char16_t.ipp" #else -namespace boost_no_char16_t = empty_boost; +namespace boost_no_cxx11_char16_t = empty_boost; #endif #ifndef BOOST_NO_CXX11_CHAR32_T #include "boost_no_char32_t.ipp" #else -namespace boost_no_char32_t = empty_boost; +namespace boost_no_cxx11_char32_t = empty_boost; #endif #ifndef BOOST_NO_COMPLETE_VALUE_INITIALIZATION #include "boost_no_com_value_init.ipp" @@ -75,7 +75,7 @@ namespace boost_no_complete_value_initialization = empty_boost; #ifndef BOOST_NO_CXX11_CONSTEXPR #include "boost_no_constexpr.ipp" #else -namespace boost_no_constexpr = empty_boost; +namespace boost_no_cxx11_constexpr = empty_boost; #endif #ifndef BOOST_NO_CTYPE_FUNCTIONS #include "boost_no_ctype_functions.ipp" @@ -215,12 +215,12 @@ namespace boost_no_cxx11_hdr_functional = empty_boost; #ifndef BOOST_NO_CXX11_DECLTYPE #include "boost_no_decltype.ipp" #else -namespace boost_no_decltype = empty_boost; +namespace boost_no_cxx11_decltype = empty_boost; #endif #ifndef BOOST_NO_CXX11_DECLTYPE_N3276 #include "boost_no_decltype_n3276.ipp" #else -namespace boost_no_decltype_n3276 = empty_boost; +namespace boost_no_cxx11_decltype_n3276 = empty_boost; #endif #ifndef BOOST_DEDUCED_TYPENAME #include "boost_no_ded_typename.ipp" @@ -230,12 +230,12 @@ namespace boost_deduced_typename = empty_boost; #ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #include "boost_no_defaulted_functions.ipp" #else -namespace boost_no_defaulted_functions = empty_boost; +namespace boost_no_cxx11_defaulted_functions = empty_boost; #endif #ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS #include "boost_no_deleted_functions.ipp" #else -namespace boost_no_deleted_functions = empty_boost; +namespace boost_no_cxx11_deleted_functions = empty_boost; #endif #ifndef BOOST_NO_DEPENDENT_NESTED_DERIVATIONS #include "boost_no_dep_nested_class.ipp" @@ -260,7 +260,7 @@ namespace boost_no_exception_std_namespace = empty_boost; #ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #include "boost_no_explicit_cvt_ops.ipp" #else -namespace boost_no_explicit_conversion_operators = empty_boost; +namespace boost_no_cxx11_explicit_conversion_operators = empty_boost; #endif #ifndef BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS #include "boost_no_exp_func_tem_arg.ipp" @@ -270,7 +270,7 @@ namespace boost_no_explicit_function_template_arguments = empty_boost; #ifndef BOOST_NO_CXX11_EXTERN_TEMPLATE #include "boost_no_extern_template.ipp" #else -namespace boost_no_extern_template = empty_boost; +namespace boost_no_cxx11_extern_template = empty_boost; #endif #ifndef BOOST_NO_FENV_H #include "boost_no_fenv_h.ipp" @@ -280,7 +280,7 @@ namespace boost_no_fenv_h = empty_boost; #ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #include "boost_no_function_template_default_args.ipp" #else -namespace boost_no_function_template_default_args = empty_boost; +namespace boost_no_cxx11_function_template_default_args = empty_boost; #endif #ifndef BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS #include "boost_no_function_type_spec.ipp" @@ -330,7 +330,7 @@ namespace boost_no_templated_iterator_constructors = empty_boost; #ifndef BOOST_NO_CXX11_LAMBDAS #include "boost_no_lambdas.ipp" #else -namespace boost_no_lambdas = empty_boost; +namespace boost_no_cxx11_lambdas = empty_boost; #endif #ifndef BOOST_NO_LIMITS #include "boost_no_limits.ipp" @@ -390,12 +390,12 @@ namespace boost_no_nested_friendship = empty_boost; #ifndef BOOST_NO_CXX11_NOEXCEPT #include "boost_no_noexcept.ipp" #else -namespace boost_no_noexcept = empty_boost; +namespace boost_no_cxx11_noexcept = empty_boost; #endif #ifndef BOOST_NO_CXX11_NULLPTR #include "boost_no_nullptr.ipp" #else -namespace boost_no_nullptr = empty_boost; +namespace boost_no_cxx11_nullptr = empty_boost; #endif #ifndef BOOST_NO_OPERATORS_IN_NAMESPACE #include "boost_no_ops_in_namespace.ipp" @@ -422,10 +422,15 @@ namespace boost_no_private_in_aggregate = empty_boost; #else namespace boost_no_pointer_to_member_const = empty_boost; #endif +#ifndef BOOST_NO_CXX11_RANGE_BASED_FOR +#include "boost_no_range_based_for.ipp" +#else +namespace boost_no_cxx11_range_based_for = empty_boost; +#endif #ifndef BOOST_NO_CXX11_RAW_LITERALS #include "boost_no_raw_literals.ipp" #else -namespace boost_no_raw_literals = empty_boost; +namespace boost_no_cxx11_raw_literals = empty_boost; #endif #ifndef BOOST_NO_UNREACHABLE_RETURN_DETECTION #include "boost_no_ret_det.ipp" @@ -440,12 +445,12 @@ namespace boost_no_rtti = empty_boost; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #include "boost_no_rvalue_references.ipp" #else -namespace boost_no_rvalue_references = empty_boost; +namespace boost_no_cxx11_rvalue_references = empty_boost; #endif #ifndef BOOST_NO_CXX11_SCOPED_ENUMS #include "boost_no_scoped_enums.ipp" #else -namespace boost_no_scoped_enums = empty_boost; +namespace boost_no_cxx11_scoped_enums = empty_boost; #endif #ifndef BOOST_NO_SFINAE #include "boost_no_sfinae.ipp" @@ -465,7 +470,7 @@ namespace boost_no_stringstream = empty_boost; #ifndef BOOST_NO_CXX11_STATIC_ASSERT #include "boost_no_static_assert.ipp" #else -namespace boost_no_static_assert = empty_boost; +namespace boost_no_cxx11_static_assert = empty_boost; #endif #ifndef BOOST_NO_STDC_NAMESPACE #include "boost_no_stdc_namespace.ipp" @@ -545,7 +550,7 @@ namespace boost_no_swprintf = empty_boost; #ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES #include "boost_no_template_aliases.ipp" #else -namespace boost_no_template_aliases = empty_boost; +namespace boost_no_cxx11_template_aliases = empty_boost; #endif #ifndef BOOST_NO_TEMPLATED_IOSTREAMS #include "boost_no_template_streams.ipp" @@ -560,7 +565,7 @@ namespace boost_no_template_templates = empty_boost; #ifndef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #include "boost_no_tem_local_classes.ipp" #else -namespace boost_no_local_class_template_parameters = empty_boost; +namespace boost_no_cxx11_local_class_template_parameters = empty_boost; #endif #ifndef BOOST_NO_TWO_PHASE_NAME_LOOKUP #include "boost_no_two_phase_lookup.ipp" @@ -580,12 +585,12 @@ namespace boost_no_typename_with_ctor = empty_boost; #ifndef BOOST_NO_CXX11_UNICODE_LITERALS #include "boost_no_unicode_literals.ipp" #else -namespace boost_no_unicode_literals = empty_boost; +namespace boost_no_cxx11_unicode_literals = empty_boost; #endif #ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #include "boost_no_unified_init.ipp" #else -namespace boost_no_unified_initialization_syntax = empty_boost; +namespace boost_no_cxx11_unified_initialization_syntax = empty_boost; #endif #ifndef BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #include "boost_no_using_breaks_adl.ipp" @@ -605,12 +610,12 @@ namespace boost_no_using_template = empty_boost; #ifndef BOOST_NO_CXX11_VARIADIC_MACROS #include "boost_no_variadic_macros.ipp" #else -namespace boost_no_variadic_macros = empty_boost; +namespace boost_no_cxx11_variadic_macros = empty_boost; #endif #ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES #include "boost_no_variadic_templates.ipp" #else -namespace boost_no_variadic_templates = empty_boost; +namespace boost_no_cxx11_variadic_templates = empty_boost; #endif #ifndef BOOST_NO_VOID_RETURNS #include "boost_no_void_returns.ipp" @@ -1151,12 +1156,12 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_auto_declarations::test()) + if(0 != boost_no_cxx11_auto_declarations::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_AUTO_DECLARATIONS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_auto_multideclarations::test()) + if(0 != boost_no_cxx11_auto_multideclarations::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1171,12 +1176,12 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_BCB_PARTIAL_SPECIALIZATION_BUG at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_char16_t::test()) + if(0 != boost_no_cxx11_char16_t::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_CHAR16_T at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_char32_t::test()) + if(0 != boost_no_cxx11_char32_t::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_CHAR32_T at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1186,7 +1191,7 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_COMPLETE_VALUE_INITIALIZATION at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_constexpr::test()) + if(0 != boost_no_cxx11_constexpr::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_CONSTEXPR at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1326,12 +1331,12 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_CXX11_HDR_FUNCTIONAL at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_decltype::test()) + if(0 != boost_no_cxx11_decltype::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_DECLTYPE at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_decltype_n3276::test()) + if(0 != boost_no_cxx11_decltype_n3276::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_DECLTYPE_N3276 at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1341,12 +1346,12 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_DEDUCED_TYPENAME at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_defaulted_functions::test()) + if(0 != boost_no_cxx11_defaulted_functions::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_DEFAULTED_FUNCTIONS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_deleted_functions::test()) + if(0 != boost_no_cxx11_deleted_functions::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_DELETED_FUNCTIONS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1371,7 +1376,7 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_EXCEPTION_STD_NAMESPACE at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_explicit_conversion_operators::test()) + if(0 != boost_no_cxx11_explicit_conversion_operators::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1381,7 +1386,7 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_extern_template::test()) + if(0 != boost_no_cxx11_extern_template::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_EXTERN_TEMPLATE at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1391,7 +1396,7 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_FENV_H at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_function_template_default_args::test()) + if(0 != boost_no_cxx11_function_template_default_args::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1441,7 +1446,7 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_lambdas::test()) + if(0 != boost_no_cxx11_lambdas::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_LAMBDAS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1501,12 +1506,12 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_NESTED_FRIENDSHIP at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_noexcept::test()) + if(0 != boost_no_cxx11_noexcept::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_NOEXCEPT at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_nullptr::test()) + if(0 != boost_no_cxx11_nullptr::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_NULLPTR at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1536,7 +1541,12 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_POINTER_TO_MEMBER_CONST at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_raw_literals::test()) + if(0 != boost_no_cxx11_range_based_for::test()) + { + std::cerr << "Failed test for BOOST_NO_CXX11_RANGE_BASED_FOR at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } + if(0 != boost_no_cxx11_raw_literals::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_RAW_LITERALS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1551,12 +1561,12 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_RTTI at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_rvalue_references::test()) + if(0 != boost_no_cxx11_rvalue_references::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_RVALUE_REFERENCES at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_scoped_enums::test()) + if(0 != boost_no_cxx11_scoped_enums::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_SCOPED_ENUMS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1576,7 +1586,7 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_STRINGSTREAM at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_static_assert::test()) + if(0 != boost_no_cxx11_static_assert::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_STATIC_ASSERT at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1656,7 +1666,7 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_SWPRINTF at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_template_aliases::test()) + if(0 != boost_no_cxx11_template_aliases::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_TEMPLATE_ALIASES at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1671,7 +1681,7 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_TEMPLATE_TEMPLATES at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_local_class_template_parameters::test()) + if(0 != boost_no_cxx11_local_class_template_parameters::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1691,12 +1701,12 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_TYPENAME_WITH_CTOR at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_unicode_literals::test()) + if(0 != boost_no_cxx11_unicode_literals::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_UNICODE_LITERALS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_unified_initialization_syntax::test()) + if(0 != boost_no_cxx11_unified_initialization_syntax::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1716,12 +1726,12 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_USING_TEMPLATE at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_variadic_macros::test()) + if(0 != boost_no_cxx11_variadic_macros::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_VARIADIC_MACROS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_variadic_templates::test()) + if(0 != boost_no_cxx11_variadic_templates::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_VARIADIC_TEMPLATES at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; diff --git a/test/no_range_based_for_fail.cpp b/test/no_range_based_for_fail.cpp new file mode 100644 index 00000000..6b0a0f54 --- /dev/null +++ b/test/no_range_based_for_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Tue Jul 10 14:28:33 2012 +// 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_CXX11_RANGE_BASED_FOR +// This file should not compile, if it does then +// BOOST_NO_CXX11_RANGE_BASED_FOR should not be defined. +// See file boost_no_range_based_for.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_CXX11_RANGE_BASED_FOR +#include "boost_no_range_based_for.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx11_range_based_for::test(); +} + diff --git a/test/no_range_based_for_pass.cpp b/test/no_range_based_for_pass.cpp new file mode 100644 index 00000000..b8207c57 --- /dev/null +++ b/test/no_range_based_for_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Tue Jul 10 14:28:33 2012 +// 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_CXX11_RANGE_BASED_FOR +// This file should compile, if it does not then +// BOOST_NO_CXX11_RANGE_BASED_FOR should be defined. +// See file boost_no_range_based_for.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_CXX11_RANGE_BASED_FOR +#include "boost_no_range_based_for.ipp" +#else +namespace boost_no_cxx11_range_based_for = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx11_range_based_for::test(); +} +