diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index 250a756d..f178bb74 100644 --- a/checks/Jamfile.v2 +++ b/checks/Jamfile.v2 @@ -1,6 +1,6 @@ # # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Sat Feb 27 18:40:12 2016 +# This file was automatically generated on Fri Jul 1 18:47:25 2016 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -118,6 +118,7 @@ run-simple TEST_BOOST_NO_CXX11_NUMERIC_LIMITS : cxx11_numeric_limits ; run-simple TEST_BOOST_NO_CXX11_REF_QUALIFIERS : cxx11_ref_qualifiers ; run-simple TEST_BOOST_NO_CXX11_SMART_PTR : cxx11_smart_ptr ; run-simple TEST_BOOST_NO_CXX11_STD_ALIGN : cxx11_std_align ; +run-simple TEST_BOOST_NO_CXX11_THREAD_LOCAL : cxx11_thread_local ; run-simple TEST_BOOST_NO_CXX11_TRAILING_RESULT_TYPES : cxx11_trailing_result_types ; run-simple TEST_BOOST_NO_CXX11_USER_DEFINED_LITERALS : cxx11_user_defined_literals ; run-simple TEST_BOOST_NO_CXX14_BINARY_LITERALS : cxx14_binary_literals ; diff --git a/checks/test_case.cpp b/checks/test_case.cpp index 8c56b6f6..bf309432 100644 --- a/checks/test_case.cpp +++ b/checks/test_case.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Sat Feb 27 18:40:12 2016 +// This file was automatically generated on Fri Jul 1 18:47:25 2016 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -405,6 +405,10 @@ namespace test = boost_no_cxx11_smart_ptr; # include "../test/boost_no_cxx11_std_align.ipp" namespace test = boost_no_cxx11_std_align; #endif +#ifdef TEST_BOOST_NO_CXX11_THREAD_LOCAL +# include "../test/boost_no_cxx11_thread_local.ipp" +namespace test = boost_no_cxx11_thread_local; +#endif #ifdef TEST_BOOST_NO_CXX11_TRAILING_RESULT_TYPES # include "../test/boost_no_cxx11_trailing_result_types.ipp" namespace test = boost_no_cxx11_trailing_result_types; diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index 30027331..691a11c5 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -3115,6 +3115,19 @@ + +

+ BOOST_NO_CXX11_THREAD_LOCAL +

+ + +

+ The compiler does not support the thread_local + storage specifier. +

+ + +

BOOST_NO_CXX11_TRAILING_RESULT_TYPES diff --git a/doc/html/index.html b/doc/html/index.html index b1e51ae0..5ff77786 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -988,7 +988,7 @@ - +

Last revised: August 13, 2015 at 16:11:58 GMT

Last revised: July 02, 2016 at 08:07:27 GMT


diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 632dc6e6..e9944040 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -702,6 +702,8 @@ scoped enumerations (`enum class`). ]] [[`BOOST_NO_CXX11_TEMPLATE_ALIASES`][The compiler does not support template aliases. ]] +[[`BOOST_NO_CXX11_THREAD_LOCAL`][The compiler does not support the `thread_local` storage specifier. +]] [[`BOOST_NO_CXX11_TRAILING_RESULT_TYPES`][The compiler does not support the new function result type specification syntax (e.g. `auto foo(T) -> T;`).]] [[`BOOST_NO_CXX11_UNICODE_LITERALS`][The compiler does not support diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index 80dd2300..ccd930ea 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -196,6 +196,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 0e07b744..150e3c0d 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -39,6 +39,10 @@ # define BOOST_NO_TYPEID #endif +#if !__has_feature(cxx_thread_local) +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif + #ifdef __is_identifier #if !__is_identifier(__int64) && !defined(__GNUC__) # define BOOST_HAS_MS_INT64 diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index 02bd792a..e2f6061b 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -122,6 +122,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) diff --git a/include/boost/config/compiler/common_edg.hpp b/include/boost/config/compiler/common_edg.hpp index b92e574d..c09faeb0 100644 --- a/include/boost/config/compiler/common_edg.hpp +++ b/include/boost/config/compiler/common_edg.hpp @@ -106,6 +106,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 86a8df84..837f8152 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -60,6 +60,7 @@ #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL //#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG diff --git a/include/boost/config/compiler/digitalmars.hpp b/include/boost/config/compiler/digitalmars.hpp index a3d293c7..c344aae0 100644 --- a/include/boost/config/compiler/digitalmars.hpp +++ b/include/boost/config/compiler/digitalmars.hpp @@ -82,6 +82,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index fbd3dd9c..e319d049 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -252,6 +252,7 @@ // #if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_ALIGNAS +# define BOOST_NO_CXX11_THREAD_LOCAL #endif // C++0x features in 4.8.1 and later diff --git a/include/boost/config/compiler/gcc_xml.hpp b/include/boost/config/compiler/gcc_xml.hpp index c11f29dd..b56c7862 100644 --- a/include/boost/config/compiler/gcc_xml.hpp +++ b/include/boost/config/compiler/gcc_xml.hpp @@ -59,7 +59,8 @@ # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES # define BOOST_NO_CXX11_INLINE_NAMESPACES # define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) diff --git a/include/boost/config/compiler/hp_acc.hpp b/include/boost/config/compiler/hp_acc.hpp index a22856a4..a773b8c4 100644 --- a/include/boost/config/compiler/hp_acc.hpp +++ b/include/boost/config/compiler/hp_acc.hpp @@ -123,6 +123,7 @@ #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_THREAD_LOCAL /* See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and diff --git a/include/boost/config/compiler/metrowerks.hpp b/include/boost/config/compiler/metrowerks.hpp index c9301434..3c5e2286 100644 --- a/include/boost/config/compiler/metrowerks.hpp +++ b/include/boost/config/compiler/metrowerks.hpp @@ -125,6 +125,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) diff --git a/include/boost/config/compiler/mpw.hpp b/include/boost/config/compiler/mpw.hpp index 76045bcd..084f9e15 100644 --- a/include/boost/config/compiler/mpw.hpp +++ b/include/boost/config/compiler/mpw.hpp @@ -74,6 +74,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) diff --git a/include/boost/config/compiler/pathscale.hpp b/include/boost/config/compiler/pathscale.hpp index 7c211c45..a5e65af4 100644 --- a/include/boost/config/compiler/pathscale.hpp +++ b/include/boost/config/compiler/pathscale.hpp @@ -82,6 +82,7 @@ # define BOOST_NO_CXX11_INLINE_NAMESPACES # define BOOST_NO_CXX11_REF_QUALIFIERS # define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) diff --git a/include/boost/config/compiler/pgi.hpp b/include/boost/config/compiler/pgi.hpp index e5605c9e..fa2d5e40 100644 --- a/include/boost/config/compiler/pgi.hpp +++ b/include/boost/config/compiler/pgi.hpp @@ -120,6 +120,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) diff --git a/include/boost/config/compiler/sunpro_cc.hpp b/include/boost/config/compiler/sunpro_cc.hpp index 6017660c..c43767f2 100644 --- a/include/boost/config/compiler/sunpro_cc.hpp +++ b/include/boost/config/compiler/sunpro_cc.hpp @@ -132,6 +132,7 @@ #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_THREAD_LOCAL #endif #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION diff --git a/include/boost/config/compiler/vacpp.hpp b/include/boost/config/compiler/vacpp.hpp index 6c228eab..3fbed9fa 100644 --- a/include/boost/config/compiler/vacpp.hpp +++ b/include/boost/config/compiler/vacpp.hpp @@ -131,6 +131,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 5d51d185..7a66bc8c 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -180,6 +180,7 @@ # define BOOST_NO_CXX14_BINARY_LITERALS # define BOOST_NO_CXX14_GENERIC_LAMBDAS # define BOOST_NO_CXX14_DIGIT_SEPARATORS +# define BOOST_NO_CXX11_THREAD_LOCAL #endif // MSVC including version 14 has not yet completely diff --git a/include/boost/config/compiler/xlcpp.hpp b/include/boost/config/compiler/xlcpp.hpp index e369ecef..2aaafc3b 100644 --- a/include/boost/config/compiler/xlcpp.hpp +++ b/include/boost/config/compiler/xlcpp.hpp @@ -238,6 +238,10 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +#if !__has_feature(cxx_thread_local) +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif + #if __cplusplus < 201400 // All versions with __cplusplus above this value seem to support this: # define BOOST_NO_CXX14_DIGIT_SEPARATORS diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index 5e37669f..01f53d21 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 Sat Feb 27 18:40:12 2016 +# This file was automatically generated on Fri Jul 1 18:47:25 2016 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -319,6 +319,9 @@ test-suite "BOOST_NO_CXX11_SMART_PTR" : test-suite "BOOST_NO_CXX11_STD_ALIGN" : [ run ../no_cxx11_std_align_pass.cpp ] [ compile-fail ../no_cxx11_std_align_fail.cpp ] ; +test-suite "BOOST_NO_CXX11_THREAD_LOCAL" : +[ run ../no_cxx11_thread_local_pass.cpp ] +[ compile-fail ../no_cxx11_thread_local_fail.cpp ] ; test-suite "BOOST_NO_CXX11_TRAILING_RESULT_TYPES" : [ run ../no_cxx11_trailing_result_types_pass.cpp ] [ compile-fail ../no_cxx11_trailing_result_types_fail.cpp ] ; diff --git a/test/boost_no_cxx11_thread_local.ipp b/test/boost_no_cxx11_thread_local.ipp new file mode 100644 index 00000000..795ee746 --- /dev/null +++ b/test/boost_no_cxx11_thread_local.ipp @@ -0,0 +1,24 @@ +// (C) Copyright John Maddock 2012. +// 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_CXX11_THREAD_LOCAL +// TITLE: thread_local +// DESCRIPTION: The compiler supports the thread_local storage specifier. + +#include + + +namespace boost_no_cxx11_thread_local{ + +int test() +{ + static thread_local std::string local("hello"); + return 0; +} + +} + diff --git a/test/config_info.cpp b/test/config_info.cpp index 322499be..96d2e397 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -1057,6 +1057,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_CXX11_STATIC_ASSERT); PRINT_MACRO(BOOST_NO_CXX11_STD_ALIGN); PRINT_MACRO(BOOST_NO_CXX11_TEMPLATE_ALIASES); + PRINT_MACRO(BOOST_NO_CXX11_THREAD_LOCAL); PRINT_MACRO(BOOST_NO_CXX11_TRAILING_RESULT_TYPES); PRINT_MACRO(BOOST_NO_CXX11_UNICODE_LITERALS); PRINT_MACRO(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX); @@ -1139,6 +1140,7 @@ void print_boost_macros() + // END GENERATED BLOCK PRINT_MACRO(BOOST_INTEL); diff --git a/test/config_test.cpp b/test/config_test.cpp index 7f7b5f0b..7fbcb73d 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Sat Feb 27 18:40:12 2016 +// This file was automatically generated on Fri Jul 1 18:47:25 2016 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -252,6 +252,11 @@ namespace boost_no_cxx11_smart_ptr = empty_boost; #else namespace boost_no_cxx11_std_align = empty_boost; #endif +#ifndef BOOST_NO_CXX11_THREAD_LOCAL +#include "boost_no_cxx11_thread_local.ipp" +#else +namespace boost_no_cxx11_thread_local = empty_boost; +#endif #ifndef BOOST_NO_CXX11_TRAILING_RESULT_TYPES #include "boost_no_cxx11_trailing_result_types.ipp" #else @@ -1491,6 +1496,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_CXX11_STD_ALIGN at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_cxx11_thread_local::test()) + { + std::cerr << "Failed test for BOOST_NO_CXX11_THREAD_LOCAL at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_no_cxx11_trailing_result_types::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_TRAILING_RESULT_TYPES at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/no_cxx11_thread_local_fail.cpp b/test/no_cxx11_thread_local_fail.cpp new file mode 100644 index 00000000..957c622e --- /dev/null +++ b/test/no_cxx11_thread_local_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Fri Jul 1 18:47:25 2016 +// 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_THREAD_LOCAL +// This file should not compile, if it does then +// BOOST_NO_CXX11_THREAD_LOCAL should not be defined. +// See file boost_no_cxx11_thread_local.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_THREAD_LOCAL +#include "boost_no_cxx11_thread_local.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx11_thread_local::test(); +} + diff --git a/test/no_cxx11_thread_local_pass.cpp b/test/no_cxx11_thread_local_pass.cpp new file mode 100644 index 00000000..3e54ca2b --- /dev/null +++ b/test/no_cxx11_thread_local_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Fri Jul 1 18:47:25 2016 +// 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_THREAD_LOCAL +// This file should compile, if it does not then +// BOOST_NO_CXX11_THREAD_LOCAL should be defined. +// See file boost_no_cxx11_thread_local.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_THREAD_LOCAL +#include "boost_no_cxx11_thread_local.ipp" +#else +namespace boost_no_cxx11_thread_local = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx11_thread_local::test(); +} +