diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index 9c9d61e5..21b55d6b 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 Mon Oct 13 13:09:13 2014 +# This file was automatically generated on Fri Jun 26 21:48:00 2015 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -336,11 +336,14 @@ run-simple test_case.cpp : : : TEST_BOOST_NO_CXX14_DECLTYPE_AUTO : cxx14 alias cxx14_decltype_auto : cxx14_decltype_auto.output ; explicit cxx14_decltype_auto ; run-simple test_case.cpp : : : TEST_BOOST_NO_CXX14_DIGIT_SEPARATORS : cxx14_digit_separators ; -alias cxx14_digit_separator : cxx14_digit_separator.output ; -explicit cxx14_digit_separator ; +alias cxx14_digit_separators : cxx14_digit_separators.output ; +explicit cxx14_digit_separators ; run-simple test_case.cpp : : : TEST_BOOST_NO_CXX14_GENERIC_LAMBDAS : cxx14_generic_lambdas ; alias cxx14_generic_lambdas : cxx14_generic_lambdas.output ; explicit cxx14_generic_lambdas ; +run-simple test_case.cpp : : : TEST_BOOST_NO_CXX14_HDR_SHARED_MUTEX : cxx14_hdr_shared_mutex ; +alias cxx14_hdr_shared_mutex : cxx14_hdr_shared_mutex.output ; +explicit cxx14_hdr_shared_mutex ; run-simple test_case.cpp : : : TEST_BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES : cxx14_initialized_lambda_captures ; alias cxx14_initialized_lambda_captures : cxx14_initialized_lambda_captures.output ; explicit cxx14_initialized_lambda_captures ; diff --git a/checks/test_case.cpp b/checks/test_case.cpp index 9940abec..9eaf99a1 100644 --- a/checks/test_case.cpp +++ b/checks/test_case.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Mon Oct 13 13:09:13 2014 +// This file was automatically generated on Fri Jun 26 21:48:00 2015 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -429,6 +429,10 @@ namespace test = boost_no_cxx14_digit_separators; # include "../test/boost_no_cxx14_generic_lambda.ipp" namespace test = boost_no_cxx14_generic_lambdas; #endif +#ifdef TEST_BOOST_NO_CXX14_HDR_SHARED_MUTEX +# include "../test/boost_no_cxx14_hdr_shared_mutex.ipp" +namespace test = boost_no_cxx14_hdr_shared_mutex; +#endif #ifdef TEST_BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES # include "../test/boost_no_cxx14_lambda_capture.ipp" namespace test = boost_no_cxx14_initialized_lambda_captures; diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 9851a83d..d1e03d59 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -897,6 +897,7 @@ Foo foo = { 0 }; [[`BOOST_NO_CXX14_DECLTYPE_AUTO`][The compiler does not support `decltype(auto)`.]] [[`BOOST_NO_CXX14_DIGIT_SEPARATORS`][The compiler does not support digit separators (e.g. `1'000'000`).]] [[`BOOST_NO_CXX14_GENERIC_LAMBDAS`][The compiler does not support generic lambda (e.g. `[](auto v){ }`).]] +[[`BOOST_NO_CXX14_HDR_SHARED_MUTEX`][The standard library does not provide header .]] [[`BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES`][The compiler does not support initialized lambda capture (e.g. `[foo = 42]{ }`).]] [[`BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION`][The compiler does not support return type deduction for normal functions (e.g. `auto f() { return val; }`).]] [[`BOOST_NO_CXX14_VARIABLE_TEMPLATES`][The compiler does not support variable template (e.g. `template T kibi = T(1024);`).]] diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 404e6863..5d5ec6b6 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -147,6 +147,27 @@ # define BOOST_NO_CXX11_STD_ALIGN #endif +// I haven't been able to find any information +// about what version of Dinkumware supports C++14. +// The Dinkumware website says that they now support +// C++14 but they give no further information about +// their standard library. So I will use SD-6 or mark it +// as unsupported until someone finds a version +// of a compiler that uses the Dinkumware standard library +// and they can see that shared_mutex is distributed in that +// version and they can see the value of _CPPLIB_VER in rhat +// version's yvals.h header file. +// +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + #if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400) // Intel's compiler can't handle this header yet: # define BOOST_NO_CXX11_HDR_ATOMIC diff --git a/include/boost/config/stdlib/libcomo.hpp b/include/boost/config/stdlib/libcomo.hpp index 5aacfb2a..941498d0 100644 --- a/include/boost/config/stdlib/libcomo.hpp +++ b/include/boost/config/stdlib/libcomo.hpp @@ -62,6 +62,16 @@ # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + // // Intrinsic type_traits support. // The SGI STL has it's own __type_traits class, which @@ -71,5 +81,3 @@ #define BOOST_HAS_SGI_TYPE_TRAITS #define BOOST_STDLIB "Comeau standard library " BOOST_STRINGIZE(__LIBCOMO_VERSION__) - - diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index eee2d75d..ab5d1235 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -67,4 +67,14 @@ // libc++ uses a non-standard messages_base #define BOOST_NO_STD_MESSAGES +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus <= 201103 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + // --- end --- diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index 48d9e949..3c4eb66c 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -235,6 +235,16 @@ # define BOOST_NO_CXX11_STD_ALIGN #endif +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus <= 201103 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#elif __cplusplus < 201402 || (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + // // Headers not present on Solaris with the Oracle compiler: #if defined(__SUNPRO_CC) @@ -254,6 +264,9 @@ # ifndef BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_THREAD # endif +# ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +# endif #endif #if (!defined(_GTHREAD_USE_MUTEX_TIMEDLOCK) || (_GTHREAD_USE_MUTEX_TIMEDLOCK == 0)) && !defined(BOOST_NO_CXX11_HDR_MUTEX) diff --git a/include/boost/config/stdlib/modena.hpp b/include/boost/config/stdlib/modena.hpp index f2a83888..7a85e0cd 100644 --- a/include/boost/config/stdlib/modena.hpp +++ b/include/boost/config/stdlib/modena.hpp @@ -51,6 +51,16 @@ # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + #define BOOST_STDLIB "Modena C++ standard library" diff --git a/include/boost/config/stdlib/msl.hpp b/include/boost/config/stdlib/msl.hpp index b8f43a12..dd2775e1 100644 --- a/include/boost/config/stdlib/msl.hpp +++ b/include/boost/config/stdlib/msl.hpp @@ -75,13 +75,14 @@ # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + #define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) - - - - - - - - - diff --git a/include/boost/config/stdlib/roguewave.hpp b/include/boost/config/stdlib/roguewave.hpp index 2b4e8636..97a2b0b9 100644 --- a/include/boost/config/stdlib/roguewave.hpp +++ b/include/boost/config/stdlib/roguewave.hpp @@ -187,3 +187,12 @@ # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif diff --git a/include/boost/config/stdlib/sgi.hpp b/include/boost/config/stdlib/sgi.hpp index bda77c22..c8052717 100644 --- a/include/boost/config/stdlib/sgi.hpp +++ b/include/boost/config/stdlib/sgi.hpp @@ -145,7 +145,14 @@ # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF -#define BOOST_STDLIB "SGI standard library" - - +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#define BOOST_STDLIB "SGI standard library" \ No newline at end of file diff --git a/include/boost/config/stdlib/stlport.hpp b/include/boost/config/stdlib/stlport.hpp index fd5d3a5a..bbc4176c 100644 --- a/include/boost/config/stdlib/stlport.hpp +++ b/include/boost/config/stdlib/stlport.hpp @@ -235,12 +235,14 @@ namespace boost { using std::min; using std::max; } # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) - - - - - - - - diff --git a/include/boost/config/stdlib/vacpp.hpp b/include/boost/config/stdlib/vacpp.hpp index a58ec1c5..4ccd0d24 100644 --- a/include/boost/config/stdlib/vacpp.hpp +++ b/include/boost/config/stdlib/vacpp.hpp @@ -51,7 +51,14 @@ # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + #define BOOST_STDLIB "Visual Age default standard library" - - - diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index ece421c9..1bca6e6b 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 Mon Oct 13 13:09:12 2014 +# This file was automatically generated on Fri Jun 26 21:48:00 2015 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -337,6 +337,9 @@ test-suite "BOOST_NO_CXX14_DIGIT_SEPARATORS" : test-suite "BOOST_NO_CXX14_GENERIC_LAMBDAS" : [ run ../no_cxx14_generic_lambda_pass.cpp ] [ compile-fail ../no_cxx14_generic_lambda_fail.cpp ] ; +test-suite "BOOST_NO_CXX14_HDR_SHARED_MUTEX" : +[ run ../no_cxx14_hdr_shared_mutex_pass.cpp ] +[ compile-fail ../no_cxx14_hdr_shared_mutex_fail.cpp ] ; test-suite "BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES" : [ run ../no_cxx14_lambda_capture_pass.cpp ] [ compile-fail ../no_cxx14_lambda_capture_fail.cpp ] ; diff --git a/test/boost_no_cxx14_hdr_shared_mutex.ipp b/test/boost_no_cxx14_hdr_shared_mutex.ipp new file mode 100644 index 00000000..cb0ee206 --- /dev/null +++ b/test/boost_no_cxx14_hdr_shared_mutex.ipp @@ -0,0 +1,27 @@ +// (C) Copyright Edward Diener 2015 + +// 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 more information. + +// MACRO: BOOST_NO_CXX14_HDR_SHARED_MUTEX +// TITLE: C++0y header unavailable +// DESCRIPTION: The standard library does not supply C++0y header + +#include + +namespace boost_no_cxx14_hdr_shared_mutex { + +int test() +{ +#if defined(__cpp_lib_shared_timed_mutex) && __cpp_lib_shared_timed_mutex == 201402 + using std::shared_timed_mutex; +#else + using std::shared_mutex; +#endif + return 0; +} + +} diff --git a/test/config_info.cpp b/test/config_info.cpp index b1fcf516..b466c43c 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -1061,6 +1061,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_CXX14_DECLTYPE_AUTO); PRINT_MACRO(BOOST_NO_CXX14_DIGIT_SEPARATORS); PRINT_MACRO(BOOST_NO_CXX14_GENERIC_LAMBDAS); + PRINT_MACRO(BOOST_NO_CXX14_HDR_SHARED_MUTEX); PRINT_MACRO(BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES); PRINT_MACRO(BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION); PRINT_MACRO(BOOST_NO_CXX14_VARIABLE_TEMPLATES); @@ -1123,6 +1124,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_USING_TEMPLATE); PRINT_MACRO(BOOST_NO_VOID_RETURNS); + // END GENERATED BLOCK PRINT_MACRO(BOOST_INTEL); diff --git a/test/config_test.cpp b/test/config_test.cpp index 6d2db3e4..3a3f5ba5 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Mon Oct 13 13:09:12 2014 +// This file was automatically generated on Fri Jun 26 21:48:00 2015 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -287,6 +287,11 @@ namespace boost_no_cxx14_digit_separators = empty_boost; #else namespace boost_no_cxx14_generic_lambdas = empty_boost; #endif +#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX +#include "boost_no_cxx14_hdr_shared_mutex.ipp" +#else +namespace boost_no_cxx14_hdr_shared_mutex = empty_boost; +#endif #ifndef BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #include "boost_no_cxx14_lambda_capture.ipp" #else @@ -1511,6 +1516,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_CXX14_GENERIC_LAMBDAS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_cxx14_hdr_shared_mutex::test()) + { + std::cerr << "Failed test for BOOST_NO_CXX14_HDR_SHARED_MUTEX at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_no_cxx14_initialized_lambda_captures::test()) { std::cerr << "Failed test for BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/no_cxx14_hdr_shared_mutex_fail.cpp b/test/no_cxx14_hdr_shared_mutex_fail.cpp new file mode 100644 index 00000000..11c93bbe --- /dev/null +++ b/test/no_cxx14_hdr_shared_mutex_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Fri Jun 26 21:47:59 2015 +// 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_CXX14_HDR_SHARED_MUTEX +// This file should not compile, if it does then +// BOOST_NO_CXX14_HDR_SHARED_MUTEX should not be defined. +// See file boost_no_cxx14_hdr_shared_mutex.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_CXX14_HDR_SHARED_MUTEX +#include "boost_no_cxx14_hdr_shared_mutex.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx14_hdr_shared_mutex::test(); +} + diff --git a/test/no_cxx14_hdr_shared_mutex_pass.cpp b/test/no_cxx14_hdr_shared_mutex_pass.cpp new file mode 100644 index 00000000..20c5f7bb --- /dev/null +++ b/test/no_cxx14_hdr_shared_mutex_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Fri Jun 26 21:47:59 2015 +// 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_CXX14_HDR_SHARED_MUTEX +// This file should compile, if it does not then +// BOOST_NO_CXX14_HDR_SHARED_MUTEX should be defined. +// See file boost_no_cxx14_hdr_shared_mutex.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_CXX14_HDR_SHARED_MUTEX +#include "boost_no_cxx14_hdr_shared_mutex.ipp" +#else +namespace boost_no_cxx14_hdr_shared_mutex = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx14_hdr_shared_mutex::test(); +} +