From 15d78e548f3a798f65da8dd17863405f337bbc35 Mon Sep 17 00:00:00 2001 From: Zach Laine Date: Tue, 6 Mar 2018 00:53:15 -0600 Subject: [PATCH 01/51] Add BOOST_NO_CXX17_IF_CONSTEXPR. --- checks/Jamfile.v2 | 3 +- checks/test_case.cpp | 7 ++- include/boost/config/compiler/borland.hpp | 3 ++ include/boost/config/compiler/clang.hpp | 4 ++ include/boost/config/compiler/codegear.hpp | 4 ++ include/boost/config/compiler/common_edg.hpp | 4 ++ include/boost/config/compiler/digitalmars.hpp | 3 ++ include/boost/config/compiler/gcc.hpp | 3 ++ include/boost/config/compiler/gcc_xml.hpp | 3 ++ include/boost/config/compiler/metrowerks.hpp | 3 ++ include/boost/config/compiler/mpw.hpp | 3 ++ include/boost/config/compiler/pathscale.hpp | 3 ++ include/boost/config/compiler/sunpro_cc.hpp | 3 ++ include/boost/config/compiler/vacpp.hpp | 3 ++ include/boost/config/compiler/visualc.hpp | 1 + include/boost/config/compiler/xlcpp.hpp | 4 ++ include/boost/config/compiler/xlcpp_zos.hpp | 1 + test/all/Jamfile.v2 | 5 ++- test/boost_no_cxx17_if_constexpr.ipp | 44 +++++++++++++++++++ test/config_info.cpp | 7 +++ test/config_test.cpp | 12 ++++- test/no_cxx17_if_constexpr_fail.cpp | 37 ++++++++++++++++ test/no_cxx17_if_constexpr_pass.cpp | 37 ++++++++++++++++ 23 files changed, 193 insertions(+), 4 deletions(-) create mode 100644 test/boost_no_cxx17_if_constexpr.ipp create mode 100644 test/no_cxx17_if_constexpr_fail.cpp create mode 100644 test/no_cxx17_if_constexpr_pass.cpp diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index 8ecfd756..2c4d4672 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 Wed Jan 03 23:31:31 2018 +# This file was automatically generated on Tue Mar 6 17:44:35 2018 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -111,6 +111,7 @@ obj cxx14_return_type_deduction : test_case.cpp : TEST_BOOST_NO_CXX14_RE obj cxx14_std_exchange : test_case.cpp : TEST_BOOST_NO_CXX14_STD_EXCHANGE ; obj cxx14_variable_templates : test_case.cpp : TEST_BOOST_NO_CXX14_VARIABLE_TEMPLATES ; obj cxx17_fold_expressions : test_case.cpp : TEST_BOOST_NO_CXX17_FOLD_EXPRESSIONS ; +obj cxx17_if_constexpr : test_case.cpp : TEST_BOOST_NO_CXX17_IF_CONSTEXPR ; obj cxx17_inline_variables : test_case.cpp : TEST_BOOST_NO_CXX17_INLINE_VARIABLES ; obj cxx17_iterator_traits : test_case.cpp : TEST_BOOST_NO_CXX17_ITERATOR_TRAITS ; obj cxx17_std_apply : test_case.cpp : TEST_BOOST_NO_CXX17_STD_APPLY ; diff --git a/checks/test_case.cpp b/checks/test_case.cpp index 13df0b90..7c0f8a3f 100644 --- a/checks/test_case.cpp +++ b/checks/test_case.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Wed Jan 03 23:31:31 2018 +// This file was automatically generated on Tue Mar 6 17:44:35 2018 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -511,6 +511,11 @@ # error "Defect macro BOOST_NO_CXX17_FOLD_EXPRESSIONS is defined." # endif #endif +#ifdef TEST_BOOST_NO_CXX17_IF_CONSTEXPR +# ifdef BOOST_NO_CXX17_IF_CONSTEXPR +# error "Defect macro BOOST_NO_CXX17_IF_CONSTEXPR is defined." +# endif +#endif #ifdef TEST_BOOST_NO_CXX17_INLINE_VARIABLES # ifdef BOOST_NO_CXX17_INLINE_VARIABLES # error "Defect macro BOOST_NO_CXX17_INLINE_VARIABLES is defined." diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index 6190e390..cb164f8f 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -239,6 +239,9 @@ #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif #if __BORLANDC__ >= 0x590 # define BOOST_HAS_TR1_HASH diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 0fdf331f..a5d13b31 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -290,6 +290,10 @@ # define BOOST_NO_CXX17_STRUCTURED_BINDINGS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif + // Clang 3.9+ in c++1z #if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L # define BOOST_NO_CXX17_INLINE_VARIABLES diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index 44ca8428..c2cfe15c 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -167,6 +167,10 @@ # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif + // // TR1 macros: // diff --git a/include/boost/config/compiler/common_edg.hpp b/include/boost/config/compiler/common_edg.hpp index d49ceb68..88aba9ac 100644 --- a/include/boost/config/compiler/common_edg.hpp +++ b/include/boost/config/compiler/common_edg.hpp @@ -149,6 +149,10 @@ # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif + #ifdef c_plusplus // EDG has "long long" in non-strict mode // However, some libraries have insufficient "long long" support diff --git a/include/boost/config/compiler/digitalmars.hpp b/include/boost/config/compiler/digitalmars.hpp index e4c5afdd..3e9a3ab0 100644 --- a/include/boost/config/compiler/digitalmars.hpp +++ b/include/boost/config/compiler/digitalmars.hpp @@ -124,6 +124,9 @@ #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif #if (__DMC__ <= 0x840) #error "Compiler not supported or configured - please reconfigure" diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 8296520a..e740fd39 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -299,6 +299,9 @@ #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif #if __GNUC__ >= 7 # define BOOST_FALLTHROUGH __attribute__((fallthrough)) diff --git a/include/boost/config/compiler/gcc_xml.hpp b/include/boost/config/compiler/gcc_xml.hpp index 2b47585a..bdba4ed0 100644 --- a/include/boost/config/compiler/gcc_xml.hpp +++ b/include/boost/config/compiler/gcc_xml.hpp @@ -102,6 +102,9 @@ #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif #define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__ diff --git a/include/boost/config/compiler/metrowerks.hpp b/include/boost/config/compiler/metrowerks.hpp index 99ff0f5e..4bfc01ec 100644 --- a/include/boost/config/compiler/metrowerks.hpp +++ b/include/boost/config/compiler/metrowerks.hpp @@ -167,6 +167,9 @@ #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif #define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) diff --git a/include/boost/config/compiler/mpw.hpp b/include/boost/config/compiler/mpw.hpp index d9544345..2292ada0 100644 --- a/include/boost/config/compiler/mpw.hpp +++ b/include/boost/config/compiler/mpw.hpp @@ -116,6 +116,9 @@ #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif // // versions check: diff --git a/include/boost/config/compiler/pathscale.hpp b/include/boost/config/compiler/pathscale.hpp index 94b3f91d..1318d275 100644 --- a/include/boost/config/compiler/pathscale.hpp +++ b/include/boost/config/compiler/pathscale.hpp @@ -129,4 +129,7 @@ #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif #endif diff --git a/include/boost/config/compiler/sunpro_cc.hpp b/include/boost/config/compiler/sunpro_cc.hpp index 54ad77a3..41b7bcad 100644 --- a/include/boost/config/compiler/sunpro_cc.hpp +++ b/include/boost/config/compiler/sunpro_cc.hpp @@ -182,6 +182,9 @@ #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif // Turn on threading support for Solaris 12. // Ticket #11972 diff --git a/include/boost/config/compiler/vacpp.hpp b/include/boost/config/compiler/vacpp.hpp index c8400a34..cabe844f 100644 --- a/include/boost/config/compiler/vacpp.hpp +++ b/include/boost/config/compiler/vacpp.hpp @@ -178,3 +178,6 @@ #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 748d1407..fc12c181 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -201,6 +201,7 @@ // #if (_MSC_VER < 1911) || (_MSVC_LANG < 201703) # define BOOST_NO_CXX17_STRUCTURED_BINDINGS +# define BOOST_NO_CXX17_IF_CONSTEXPR #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 a4c66e40..ee7aa125 100644 --- a/include/boost/config/compiler/xlcpp.hpp +++ b/include/boost/config/compiler/xlcpp.hpp @@ -246,6 +246,10 @@ # define BOOST_NO_CXX17_STRUCTURED_BINDINGS #endif +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif + // Clang 3.9+ in c++1z #if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L # define BOOST_NO_CXX17_INLINE_VARIABLES diff --git a/include/boost/config/compiler/xlcpp_zos.hpp b/include/boost/config/compiler/xlcpp_zos.hpp index bc785b8a..eb1bf2e9 100644 --- a/include/boost/config/compiler/xlcpp_zos.hpp +++ b/include/boost/config/compiler/xlcpp_zos.hpp @@ -153,6 +153,7 @@ #define BOOST_NO_CXX17_STRUCTURED_BINDINGS #define BOOST_NO_CXX17_INLINE_VARIABLES #define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#define BOOST_NO_CXX17_IF_CONSTEXPR // ------------------------------------- diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index 8b1f8c16..bff9133a 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 Wed Jan 03 23:31:31 2018 +# This file was automatically generated on Tue Mar 6 17:44:35 2018 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -322,6 +322,9 @@ test-suite "BOOST_NO_CXX14_VARIABLE_TEMPLATES" : test-suite "BOOST_NO_CXX17_FOLD_EXPRESSIONS" : [ run ../no_cxx17_fold_expressions_pass.cpp ] [ compile-fail ../no_cxx17_fold_expressions_fail.cpp ] ; +test-suite "BOOST_NO_CXX17_IF_CONSTEXPR" : +[ run ../no_cxx17_if_constexpr_pass.cpp ] +[ compile-fail ../no_cxx17_if_constexpr_fail.cpp ] ; test-suite "BOOST_NO_CXX17_INLINE_VARIABLES" : [ run ../no_cxx17_inline_variables_pass.cpp ] [ compile-fail ../no_cxx17_inline_variables_fail.cpp ] ; diff --git a/test/boost_no_cxx17_if_constexpr.ipp b/test/boost_no_cxx17_if_constexpr.ipp new file mode 100644 index 00000000..8c40e69c --- /dev/null +++ b/test/boost_no_cxx17_if_constexpr.ipp @@ -0,0 +1,44 @@ +/* +Copyright 2018 T. Zachary Laine +(whatwasthataddress@gmail.com) + +Distributed under Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +// MACRO: BOOST_NO_CXX17_IF_CONSTEXPR +// TITLE: C++17 if constexpr +// DESCRIPTION: C++17 if constexpr are not supported. + +namespace boost_no_cxx17_if_constexpr { + +template +struct same +{ + static constexpr bool value = false; +}; + +template +struct same +{ + static constexpr bool value = true; +}; + +int test() +{ + if constexpr (true) { + if constexpr (1 != 0) { + if constexpr (same::value) { + return 1; + } else if constexpr (false) { + return 1; + } else { + return 0; + } + } + } + return 1; +} + +} diff --git a/test/config_info.cpp b/test/config_info.cpp index 45ccfaf0..15ea5d4a 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -1158,6 +1158,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_CXX14_STD_EXCHANGE); PRINT_MACRO(BOOST_NO_CXX14_VARIABLE_TEMPLATES); PRINT_MACRO(BOOST_NO_CXX17_FOLD_EXPRESSIONS); + PRINT_MACRO(BOOST_NO_CXX17_IF_CONSTEXPR); PRINT_MACRO(BOOST_NO_CXX17_INLINE_VARIABLES); PRINT_MACRO(BOOST_NO_CXX17_ITERATOR_TRAITS); PRINT_MACRO(BOOST_NO_CXX17_STD_APPLY); @@ -1228,6 +1229,12 @@ void print_boost_macros() + + + + + + // END GENERATED BLOCK PRINT_MACRO(BOOST_INTEL); diff --git a/test/config_test.cpp b/test/config_test.cpp index 0b3f9a12..2d27e53c 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Wed Jan 03 23:31:31 2018 +// This file was automatically generated on Tue Mar 6 17:44:35 2018 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -342,6 +342,11 @@ namespace boost_no_cxx14_variable_templates = empty_boost; #else namespace boost_no_cxx17_fold_expressions = empty_boost; #endif +#ifndef BOOST_NO_CXX17_IF_CONSTEXPR +#include "boost_no_cxx17_if_constexpr.ipp" +#else +namespace boost_no_cxx17_if_constexpr = empty_boost; +#endif #ifndef BOOST_NO_CXX17_INLINE_VARIABLES #include "boost_no_cxx17_inline_variables.ipp" #else @@ -1486,6 +1491,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_CXX17_FOLD_EXPRESSIONS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_cxx17_if_constexpr::test()) + { + std::cerr << "Failed test for BOOST_NO_CXX17_IF_CONSTEXPR at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_no_cxx17_inline_variables::test()) { std::cerr << "Failed test for BOOST_NO_CXX17_INLINE_VARIABLES at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/no_cxx17_if_constexpr_fail.cpp b/test/no_cxx17_if_constexpr_fail.cpp new file mode 100644 index 00000000..63137ff3 --- /dev/null +++ b/test/no_cxx17_if_constexpr_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Tue Mar 6 00:52:32 2018 +// 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_CXX17_IF_CONSTEXPR +// This file should not compile, if it does then +// BOOST_NO_CXX17_IF_CONSTEXPR should not be defined. +// See file boost_no_cxx17_if_constexpr.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_CXX17_IF_CONSTEXPR +#include "boost_no_cxx17_if_constexpr.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx17_if_constexpr::test(); +} + diff --git a/test/no_cxx17_if_constexpr_pass.cpp b/test/no_cxx17_if_constexpr_pass.cpp new file mode 100644 index 00000000..bcbd808c --- /dev/null +++ b/test/no_cxx17_if_constexpr_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Tue Mar 6 00:52:32 2018 +// 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_CXX17_IF_CONSTEXPR +// This file should compile, if it does not then +// BOOST_NO_CXX17_IF_CONSTEXPR should be defined. +// See file boost_no_cxx17_if_constexpr.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_CXX17_IF_CONSTEXPR +#include "boost_no_cxx17_if_constexpr.ipp" +#else +namespace boost_no_cxx17_if_constexpr = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx17_if_constexpr::test(); +} + From d03a3756d91418a00af06ec2b0a8fd6257b04cbb Mon Sep 17 00:00:00 2001 From: Zach Laine Date: Sat, 17 Mar 2018 13:24:51 -0500 Subject: [PATCH 02/51] Add static_asserts() to a false path in boost_no_cxx_if_constexpr.ipp as a further check of implementation correctness. --- test/boost_no_cxx17_if_constexpr.ipp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/boost_no_cxx17_if_constexpr.ipp b/test/boost_no_cxx17_if_constexpr.ipp index 8c40e69c..3392ee73 100644 --- a/test/boost_no_cxx17_if_constexpr.ipp +++ b/test/boost_no_cxx17_if_constexpr.ipp @@ -30,6 +30,7 @@ int test() if constexpr (true) { if constexpr (1 != 0) { if constexpr (same::value) { + static_assert(!same::value, ""); return 1; } else if constexpr (false) { return 1; From 77a290c23717bf59aca134b35b64fdd34ec578b4 Mon Sep 17 00:00:00 2001 From: Peter Kolbus Date: Mon, 26 Mar 2018 22:19:21 -0500 Subject: [PATCH 03/51] Fix MSVC C4668 on _HAS_NAMESPACE Resolve MSVC warning C4668 (undefined preprocessor macro) for _HAS_NAMESPACE by short-circuiting (checking for Green Hills compiler first). --- include/boost/config/stdlib/dinkumware.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 641c2ae2..e5198d4f 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -96,7 +96,7 @@ #include #endif #include -#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) \ +#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (defined(__ghs__) && !_HAS_NAMESPACE) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) \ && !defined(__VXWORKS__) # define BOOST_NO_STD_TYPEINFO #endif From 3764d61f25862d5d85dc3ceee28e61db09970452 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 3 Apr 2018 19:08:57 +0100 Subject: [PATCH 04/51] BOOST_NO_CXX17_STD_INVOKE: Update test case to check we have std::invoke_result. MSVC has no std::invoke in C++14 mode. GCC has no std::invoke_result prior to 7.1. --- include/boost/config/stdlib/dinkumware.hpp | 2 +- include/boost/config/stdlib/libstdcpp3.hpp | 6 ++---- test/boost_no_cxx17_std_invoke.ipp | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 641c2ae2..827bed4e 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -175,7 +175,7 @@ # define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_ITERATOR_TRAITS #endif -#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) +#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0) # define BOOST_NO_CXX17_STD_INVOKE #endif diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index e99fe316..f6eab26c 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -294,12 +294,10 @@ extern "C" char *gets (char *__s); #endif // -// C++17 features in GCC 6.1 and later +// C++17 features in GCC 7.1 and later // -#if (BOOST_LIBSTDCXX_VERSION < 60100) || (__cplusplus <= 201402L) -# define BOOST_NO_CXX17_STD_INVOKE -#endif #if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L) +# define BOOST_NO_CXX17_STD_INVOKE # define BOOST_NO_CXX17_STD_APPLY #endif diff --git a/test/boost_no_cxx17_std_invoke.ipp b/test/boost_no_cxx17_std_invoke.ipp index 77f20e6c..7de7e6ae 100644 --- a/test/boost_no_cxx17_std_invoke.ipp +++ b/test/boost_no_cxx17_std_invoke.ipp @@ -19,7 +19,7 @@ int foo( int i, int j) { int test() { int i = 1, j = 2; - std::invoke( foo, i, j); + typename std::invoke_result::type t = std::invoke( foo, i, j); return 0; } From 4370498457a20759ee63126ad1690d02f1f6c14a Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 4 Apr 2018 18:20:47 +0100 Subject: [PATCH 05/51] std::invoke is only feature complete in VC2015.3 and later. --- include/boost/config/stdlib/dinkumware.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 827bed4e..0ccb8403 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -175,7 +175,7 @@ # define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_ITERATOR_TRAITS #endif -#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0) +#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0) || !defined(_MSVC_STL_UPDATE) || (_MSVC_STL_UPDATE < 201709) # define BOOST_NO_CXX17_STD_INVOKE #endif From 149bfe1c93d3cd2c6a586e7db55cbb00fb864300 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 4 Apr 2018 18:37:59 +0100 Subject: [PATCH 06/51] libcpp has no invoke_result. --- include/boost/config/stdlib/libcpp.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index 1e77dca3..a051dbb7 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -87,9 +87,6 @@ #endif // C++17 features -#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L) -# define BOOST_NO_CXX17_STD_INVOKE -#endif #if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L) # define BOOST_NO_CXX17_STD_APPLY #endif @@ -104,6 +101,7 @@ #endif #define BOOST_NO_CXX17_ITERATOR_TRAITS +#define BOOST_NO_CXX17_STD_INVOKE // Invoke support is incomplete (no invoke_result) #if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL) // This is a bit of a sledgehammer, because really it's just libc++abi that has no From 745a1eb4f80cef08505392d462a8f25a47fc7c01 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 12 Dec 2017 11:26:39 -0600 Subject: [PATCH 07/51] Refactoring cray.hpp - Added comments and file structure outline. - Added basic identifying information (e.g. BOOST_COMPILER). --- include/boost/config/compiler/cray.hpp | 60 ++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 9 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 5f810781..3d970928 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -1,29 +1,71 @@ // (C) Copyright John Maddock 2011. -// (C) Copyright Cray, Inc. 2013 +// (C) Copyright Cray, Inc. 2013 - 2017. // 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 for most recent version. -// Greenhills C compiler setup: +// Cray C++ compiler setup. +// +// There are a few parameters that affect the macros defined in this file: +// +// - What version of CCE (Cray Compiling Environment) are we running? This +// comes from the '_RELEASE_MAJOR', '_RELEASE_MINOR', and +// '_RELEASE_PATCHLEVEL' macros. +// - What C++ standards conformance level are we using (e.g. '-h +// std=c++14')? This comes from the '__cplusplus' macro. +// - Are we using GCC extensions ('-h gnu' or '-h nognu')? If we have '-h +// gnu' then CCE emulates GCC, and the macros '__GNUC__', +// '__GNUC_MINOR__', and '__GNUC_PATCHLEVEL__' are defined. +// +// This file is organized as follows: +// +// - Verify that the combination of parameters listed above is supported. +// If we have an unsupported combination, we abort with '#error'. +// - Establish baseline values for all Boost macros. +// - Apply changes to the baseline macros based on compiler version. These +// changes are cummulative so each version section only describes the +// changes since the previous version. +// - Within each version section, we may also apply changes based on +// other parameters (i.e. C++ standards conformance level and GCC +// extensions). -#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE) +#define BOOST_CRAY_VERSION (_RELEASE_MAJOR * 10000 + _RELEASE_MINOR * 100 + _RELEASE_PATCHLEVEL) -#if _RELEASE_MAJOR < 8 +#ifdef __GNUC__ +# define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "Cray C++ version " BOOST_STRINGIZE(_RELEASE_MAJOR) "." BOOST_STRINGIZE(_RELEASE_MINOR) "." BOOST_STRINGIZE(_RELEASE_PATCHLEVEL) +#endif + +/// +/// Parameter validation +/// + +// FIXME: Do we really need to support compilers before 8.5? Do they pass +// the Boost.Config tests? + +#if BOOST_CRAY_VERSION < 80000 # error "Boost is not configured for Cray compilers prior to version 8, please try the configure script." #endif -// -// Check this is a recent EDG based compiler, otherwise we don't support it here: -// -#ifndef __EDG_VERSION__ +// We only support recent EDG based compilers. + +#ifndef __EDG__ # error "Unsupported Cray compiler, please try running the configure script." #endif -#if _RELEASE_MINOR < 5 || __cplusplus < 201100 +/// +/// Baseline values +/// + #include +#if _RELEASE_MINOR < 5 || __cplusplus < 201100 + // // #define BOOST_NO_CXX11_STATIC_ASSERT From 790a0471070a2d390dae55f6ed24feac0f784c16 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 12 Dec 2017 11:54:17 -0600 Subject: [PATCH 08/51] Refactor cray.hpp logic - The effect of the logic is the same as before, but it is organized according to the outline described in the comments. The only change in the logic is that we always include 'common_edg.hpp', since we know we are only dealing with EDG based compilers. --- include/boost/config/compiler/cray.hpp | 75 ++++++++++++++++++++------ 1 file changed, 60 insertions(+), 15 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 3d970928..012341ab 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -41,9 +41,9 @@ # define BOOST_COMPILER "Cray C++ version " BOOST_STRINGIZE(_RELEASE_MAJOR) "." BOOST_STRINGIZE(_RELEASE_MINOR) "." BOOST_STRINGIZE(_RELEASE_PATCHLEVEL) #endif -/// -/// Parameter validation -/// +//// +//// Parameter validation +//// // FIXME: Do we really need to support compilers before 8.5? Do they pass // the Boost.Config tests? @@ -58,16 +58,12 @@ # error "Unsupported Cray compiler, please try running the configure script." #endif -/// -/// Baseline values -/// +//// +//// Baseline values +//// #include -#if _RELEASE_MINOR < 5 || __cplusplus < 201100 - -// -// #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS @@ -105,7 +101,6 @@ #define BOOST_NO_CXX11_FINAL #define BOOST_NO_CXX11_THREAD_LOCAL - //#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG #define BOOST_MATH_DISABLE_STD_FPCLASSIFY //#define BOOST_HAS_FPCLASSIFY @@ -132,7 +127,57 @@ #define __ATOMIC_SEQ_CST 5 #endif -#else /* _RELEASE_MINOR */ +//// +//// Version changes +//// + +// +// 8.5.0 +// + +#if BOOST_CRAY_VERSION >= 80500 + +#if __cplusplus >= 201103 + +#undef BOOST_NO_CXX11_STATIC_ASSERT +#undef BOOST_NO_CXX11_AUTO_DECLARATIONS +#undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#undef BOOST_HAS_NRVO +#undef BOOST_NO_CXX11_VARIADIC_MACROS +#undef BOOST_NO_CXX11_VARIADIC_TEMPLATES +#undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#undef BOOST_NO_CXX11_UNICODE_LITERALS +#undef BOOST_NO_TWO_PHASE_NAME_LOOKUP +#undef BOOST_HAS_NRVO +#undef BOOST_NO_CXX11_TEMPLATE_ALIASES +#undef BOOST_NO_CXX11_STATIC_ASSERT +#undef BOOST_NO_SFINAE_EXPR +#undef BOOST_NO_CXX11_SFINAE_EXPR +#undef BOOST_NO_CXX11_SCOPED_ENUMS +#undef BOOST_NO_CXX11_RVALUE_REFERENCES +#undef BOOST_NO_CXX11_RANGE_BASED_FOR +#undef BOOST_NO_CXX11_RAW_LITERALS +#undef BOOST_NO_CXX11_NULLPTR +#undef BOOST_NO_CXX11_NOEXCEPT +#undef BOOST_NO_CXX11_LAMBDAS +#undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#undef BOOST_NO_CXX11_DELETED_FUNCTIONS +#undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#undef BOOST_NO_CXX11_DECLTYPE_N3276 +#undef BOOST_NO_CXX11_DECLTYPE +#undef BOOST_NO_CXX11_CONSTEXPR +#undef BOOST_NO_CXX11_USER_DEFINED_LITERALS +#undef BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#undef BOOST_NO_CXX11_CHAR32_T +#undef BOOST_NO_CXX11_CHAR16_T +#undef BOOST_NO_CXX11_REF_QUALIFIERS +#undef BOOST_NO_CXX11_FINAL +#undef BOOST_NO_CXX11_THREAD_LOCAL +#undef BOOST_MATH_DISABLE_STD_FPCLASSIFY +#undef BOOST_SP_USE_PTHREADS +#undef BOOST_AC_USE_PTHREADS #define BOOST_HAS_VARIADIC_TMPL #define BOOST_HAS_UNISTD_H @@ -158,9 +203,9 @@ #if __cplusplus < 201400 #define BOOST_NO_CXX11_DECLTYPE_N3276 -#endif /* __cpluspus */ - -#endif /* _RELEASE_MINOR */ +#endif // __cpluspus < 201400 +#endif // __cplusplus >= 201103 +#endif // BOOST_CRAY_VERSION >= 80500 From 9e9ba3361d583f9aa068ab923e928c4f7e932c69 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 12 Dec 2017 12:01:57 -0600 Subject: [PATCH 09/51] Cosmetic refactoring - Nothing really changed, besides readability. --- include/boost/config/compiler/cray.hpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 012341ab..6d665c4e 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -108,15 +108,15 @@ #define BOOST_SP_USE_PTHREADS #define BOOST_AC_USE_PTHREADS -/* everything that follows is working around what are thought to be - * compiler shortcomings. Revist all of these regularly. - */ +// +// Everything that follows is working around what are thought to be +// compiler shortcomings. Revist all of these regularly. +// //#define BOOST_USE_ENUM_STATIC_ASSERT //#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS //(this may be implied by the previous #define -// These constants should be provided by the -// compiler, at least when -hgnu is asserted on the command line. +// These constants should be provided by the compiler. #ifndef __ATOMIC_RELAXED #define __ATOMIC_RELAXED 0 @@ -137,7 +137,7 @@ #if BOOST_CRAY_VERSION >= 80500 -#if __cplusplus >= 201103 +#if __cplusplus >= 201103L #undef BOOST_NO_CXX11_STATIC_ASSERT #undef BOOST_NO_CXX11_AUTO_DECLARATIONS @@ -201,11 +201,18 @@ #define BOOST_HAS_LONG_LONG #define BOOST_HAS_FLOAT128 -#if __cplusplus < 201400 +#if __cplusplus < 201402L #define BOOST_NO_CXX11_DECLTYPE_N3276 -#endif // __cpluspus < 201400 +#endif // __cplusplus < 201402L -#endif // __cplusplus >= 201103 +#endif // __cplusplus >= 201103L #endif // BOOST_CRAY_VERSION >= 80500 +// +// 8.6.5 +// + +#if BOOST_CRAY_VERSION >= 80605 +#endif // BOOST_CRAY_VERSION >= 80605 + From b21d168410a2052234991bfc3bf387668aac3644 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 12 Dec 2017 12:09:13 -0600 Subject: [PATCH 10/51] Sort macro definitions in 'cray.hpp' - There are some duplicates. This commit does not remove the duplicates. --- include/boost/config/compiler/cray.hpp | 120 ++++++++++++------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 6d665c4e..7d80ce7d 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -64,42 +64,42 @@ #include -#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_HAS_NRVO +#define BOOST_HAS_NRVO +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_HAS_NRVO -#define BOOST_NO_CXX11_VARIADIC_MACROS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_HAS_NRVO -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_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 +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DECLTYPE -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#define BOOST_NO_CXX11_CHAR32_T -#define BOOST_NO_CXX11_CHAR16_T +#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_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_CXX11_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_THREAD_LOCAL +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_VARIADIC_MACROS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP //#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG #define BOOST_MATH_DISABLE_STD_FPCLASSIFY @@ -139,42 +139,42 @@ #if __cplusplus >= 201103L -#undef BOOST_NO_CXX11_STATIC_ASSERT +#undef BOOST_HAS_NRVO +#undef BOOST_HAS_NRVO +#undef BOOST_NO_COMPLETE_VALUE_INITIALIZATION #undef BOOST_NO_CXX11_AUTO_DECLARATIONS #undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#undef BOOST_HAS_NRVO -#undef BOOST_NO_CXX11_VARIADIC_MACROS -#undef BOOST_NO_CXX11_VARIADIC_TEMPLATES -#undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#undef BOOST_NO_CXX11_UNICODE_LITERALS -#undef BOOST_NO_TWO_PHASE_NAME_LOOKUP -#undef BOOST_HAS_NRVO -#undef BOOST_NO_CXX11_TEMPLATE_ALIASES -#undef BOOST_NO_CXX11_STATIC_ASSERT -#undef BOOST_NO_SFINAE_EXPR -#undef BOOST_NO_CXX11_SFINAE_EXPR -#undef BOOST_NO_CXX11_SCOPED_ENUMS -#undef BOOST_NO_CXX11_RVALUE_REFERENCES -#undef BOOST_NO_CXX11_RANGE_BASED_FOR -#undef BOOST_NO_CXX11_RAW_LITERALS -#undef BOOST_NO_CXX11_NULLPTR -#undef BOOST_NO_CXX11_NOEXCEPT +#undef BOOST_NO_CXX11_CHAR16_T +#undef BOOST_NO_CXX11_CHAR32_T +#undef BOOST_NO_CXX11_CONSTEXPR +#undef BOOST_NO_CXX11_DECLTYPE +#undef BOOST_NO_CXX11_DECLTYPE_N3276 +#undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#undef BOOST_NO_CXX11_DELETED_FUNCTIONS +#undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#undef BOOST_NO_CXX11_FINAL +#undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #undef BOOST_NO_CXX11_LAMBDAS #undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#undef BOOST_NO_CXX11_DELETED_FUNCTIONS -#undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#undef BOOST_NO_CXX11_DECLTYPE_N3276 -#undef BOOST_NO_CXX11_DECLTYPE -#undef BOOST_NO_CXX11_CONSTEXPR -#undef BOOST_NO_CXX11_USER_DEFINED_LITERALS -#undef BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#undef BOOST_NO_CXX11_CHAR32_T -#undef BOOST_NO_CXX11_CHAR16_T +#undef BOOST_NO_CXX11_NOEXCEPT +#undef BOOST_NO_CXX11_NULLPTR +#undef BOOST_NO_CXX11_RANGE_BASED_FOR +#undef BOOST_NO_CXX11_RAW_LITERALS #undef BOOST_NO_CXX11_REF_QUALIFIERS -#undef BOOST_NO_CXX11_FINAL +#undef BOOST_NO_CXX11_RVALUE_REFERENCES +#undef BOOST_NO_CXX11_SCOPED_ENUMS +#undef BOOST_NO_CXX11_SFINAE_EXPR +#undef BOOST_NO_CXX11_STATIC_ASSERT +#undef BOOST_NO_CXX11_STATIC_ASSERT +#undef BOOST_NO_CXX11_TEMPLATE_ALIASES #undef BOOST_NO_CXX11_THREAD_LOCAL +#undef BOOST_NO_CXX11_UNICODE_LITERALS +#undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#undef BOOST_NO_CXX11_USER_DEFINED_LITERALS +#undef BOOST_NO_CXX11_VARIADIC_MACROS +#undef BOOST_NO_CXX11_VARIADIC_TEMPLATES +#undef BOOST_NO_SFINAE_EXPR +#undef BOOST_NO_TWO_PHASE_NAME_LOOKUP #undef BOOST_MATH_DISABLE_STD_FPCLASSIFY #undef BOOST_SP_USE_PTHREADS #undef BOOST_AC_USE_PTHREADS From e20aa6d1872f4221e3a9e4190cfa4fc949f22b18 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 12 Dec 2017 12:10:59 -0600 Subject: [PATCH 11/51] Remove duplicate macros in 'cray.hpp' --- include/boost/config/compiler/cray.hpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 7d80ce7d..2ceb49c9 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -64,7 +64,6 @@ #include -#define BOOST_HAS_NRVO #define BOOST_HAS_NRVO #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #define BOOST_NO_CXX11_AUTO_DECLARATIONS @@ -90,7 +89,6 @@ #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_THREAD_LOCAL #define BOOST_NO_CXX11_UNICODE_LITERALS @@ -139,7 +137,6 @@ #if __cplusplus >= 201103L -#undef BOOST_HAS_NRVO #undef BOOST_HAS_NRVO #undef BOOST_NO_COMPLETE_VALUE_INITIALIZATION #undef BOOST_NO_CXX11_AUTO_DECLARATIONS @@ -165,7 +162,6 @@ #undef BOOST_NO_CXX11_SCOPED_ENUMS #undef BOOST_NO_CXX11_SFINAE_EXPR #undef BOOST_NO_CXX11_STATIC_ASSERT -#undef BOOST_NO_CXX11_STATIC_ASSERT #undef BOOST_NO_CXX11_TEMPLATE_ALIASES #undef BOOST_NO_CXX11_THREAD_LOCAL #undef BOOST_NO_CXX11_UNICODE_LITERALS From c78aa624695768209de0bb8651a1f8e2980384b8 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 12 Dec 2017 12:15:14 -0600 Subject: [PATCH 12/51] Undefine temporary macros in 'cray.hpp' --- include/boost/config/compiler/cray.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 2ceb49c9..8e797831 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -31,6 +31,10 @@ // other parameters (i.e. C++ standards conformance level and GCC // extensions). +//// +//// Front matter +//// + #define BOOST_CRAY_VERSION (_RELEASE_MAJOR * 10000 + _RELEASE_MINOR * 100 + _RELEASE_PATCHLEVEL) #ifdef __GNUC__ @@ -212,3 +216,10 @@ #if BOOST_CRAY_VERSION >= 80605 #endif // BOOST_CRAY_VERSION >= 80605 +//// +//// Remove temporary macros +//// + +#undef BOOST_GCC_VERSION +#undef BOOST_CRAY_VERSION + From f18418b17a0b88644b1bac9ed5d9b5323f75db75 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 12 Dec 2017 13:06:18 -0600 Subject: [PATCH 13/51] Work through tests with 'cray.hpp' - Almost everything is passing. The only thing that's failing is 'limits_test.cpp', which is failing tests on lines 160 and 161 (shown below). if(lim::is_iec559) { BOOST_TEST(! (qnan == qnan)); # __LINE__ == 160 BOOST_TEST(qnan != qnan); # __LINE__ == 161 } --- include/boost/config/compiler/cray.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 8e797831..217007fc 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -45,6 +45,13 @@ # define BOOST_COMPILER "Cray C++ version " BOOST_STRINGIZE(_RELEASE_MAJOR) "." BOOST_STRINGIZE(_RELEASE_MINOR) "." BOOST_STRINGIZE(_RELEASE_PATCHLEVEL) #endif +// We have to emulate some GCC macros in order to enable some Boost.Config +// tests. + +#if __cplusplus >= 201103L && defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) +# define __GXX_EXPERIMENTAL_CXX0X__ +#endif // __GNUC__ + //// //// Parameter validation //// @@ -214,12 +221,28 @@ // #if BOOST_CRAY_VERSION >= 80605 + +#if __cplusplus == 201402L +#define BOOST_NO_CXX11_HDR_ATOMIC +#define BOOST_NO_CXX11_HDR_REGEX +#define BOOST_NO_CXX11_HDR_TYPEINDEX +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX14_DIGIT_SEPARATORS +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#define BOOST_NO_TEMPLATE_TEMPLATES +#endif // __cplusplus == 201402L + #endif // BOOST_CRAY_VERSION >= 80605 //// //// Remove temporary macros //// +// I've commented out some '#undef' statements to signify that we purposely +// want to keep certain macros. + +//#undef __GXX_EXPERIMENTAL_CXX0X__ +//#undef BOOST_COMPILER #undef BOOST_GCC_VERSION #undef BOOST_CRAY_VERSION From 76ee8244df64aaa1805a6d2994770008cad4b5b7 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 12 Dec 2017 14:27:35 -0600 Subject: [PATCH 14/51] Fix 'cray.hpp' for C++11 version 8.6.5 - All tests pass except that one about 'qnan' (described in the last commit). The test command line is: `b2 -q toolset=craype cxxstd=11 cxxstd-dialect=gnu`. --- include/boost/config/compiler/cray.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 217007fc..2f0a5f64 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -222,13 +222,16 @@ #if BOOST_CRAY_VERSION >= 80605 -#if __cplusplus == 201402L +#if __cplusplus >= 201103L #define BOOST_NO_CXX11_HDR_ATOMIC #define BOOST_NO_CXX11_HDR_REGEX +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#endif // __cplusplus >= 201103L + +#if __cplusplus >= 201402L #define BOOST_NO_CXX11_HDR_TYPEINDEX #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX14_DIGIT_SEPARATORS -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #define BOOST_NO_TEMPLATE_TEMPLATES #endif // __cplusplus == 201402L From da5012a135d601cc4114a8178030f9a541ee9957 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 12 Dec 2017 14:31:45 -0600 Subject: [PATCH 15/51] Work on 'cray.hpp' for C++2003 version 8.6.5 - All tests pass except the 'qnan' test mentioned in the previous commit. The test command line is: `b2 -q toolset=craype cxxstd=03 cxxstd-dialect=gnu` --- include/boost/config/compiler/cray.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 2f0a5f64..03d0da9d 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -222,6 +222,9 @@ #if BOOST_CRAY_VERSION >= 80605 +#if __cplusplus >= 199711L +#endif // __cplusplus >= 199711L + #if __cplusplus >= 201103L #define BOOST_NO_CXX11_HDR_ATOMIC #define BOOST_NO_CXX11_HDR_REGEX From 31cbd59c85e4012bc032ddc02695a4838b615201 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 12 Dec 2017 14:35:22 -0600 Subject: [PATCH 16/51] 'cray.hpp' remove unneeded macros for C++14 - Test still passes: `b2 -q toolset=craype cxxstd=14 cxxstd-dialect=gnu`. --- include/boost/config/compiler/cray.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 03d0da9d..310cd5ec 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -232,10 +232,7 @@ #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L -#define BOOST_NO_CXX11_HDR_TYPEINDEX -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX14_DIGIT_SEPARATORS -#define BOOST_NO_TEMPLATE_TEMPLATES #endif // __cplusplus == 201402L #endif // BOOST_CRAY_VERSION >= 80605 From 9c220e9fff8ffbfc1df47e2de0282ceaebfeb76c Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Wed, 13 Dec 2017 15:27:00 -0600 Subject: [PATCH 17/51] Work on Cray 8.6.5 header for C++14 - We're down to 7 failing tests in 'test/all'. --- include/boost/config/compiler/cray.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 310cd5ec..a284d48f 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -49,7 +49,7 @@ // tests. #if __cplusplus >= 201103L && defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) -# define __GXX_EXPERIMENTAL_CXX0X__ +# define __GXX_EXPERIMENTAL_CXX0X__ 1 #endif // __GNUC__ //// @@ -232,6 +232,16 @@ #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L +#undef BOOST_DEDUCED_TYPENAME // Whether defined or undefined, has no affect on 'no_ded_typename_fail'. +#undef BOOST_HAS_CLOCK_GETTIME // Whether defined or undefined, has no affect on 'has_clock_gettime_pass'. +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // If defined, then 'no_com_value_init_fail' fails. If undefined, then 'no_com_value_init_pass' fails. +#undef BOOST_NO_CXX11_ALIGNAS +#undef BOOST_NO_CXX11_HDR_FUNCTIONAL +#define BOOST_NO_CXX11_HDR_REGEX // If defined, then 'no_cxx11_hdr_regex_fail' fails. If undefined, then 'no_cxx11_hdr_regex_pass' fails. +#undef BOOST_NO_CXX11_INLINE_NAMESPACES +#undef BOOST_NO_CXX11_SMART_PTR +#undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#undef BOOST_NO_CXX14_CONSTEXPR #define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif // __cplusplus == 201402L From f34ea93eb212c9ec018f53f6f04a101ecf69f1e1 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Wed, 13 Dec 2017 15:34:37 -0600 Subject: [PATCH 18/51] Document test procedure for 'cray.hpp' - It took me a while to figure out that I had to be in the 'test/all' directory. --- include/boost/config/compiler/cray.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index a284d48f..0e1f5b48 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -30,6 +30,17 @@ // - Within each version section, we may also apply changes based on // other parameters (i.e. C++ standards conformance level and GCC // extensions). +// +// To test changes to this file: +// +// ``` +// module load cce/8.6.5 # Pick the version you want to test. +// cd boost/libs/config/test/all +// b2 -j 8 toolset=craype cxxstd=03 cxxstd=11 cxxstd=14 cxxstd-dialect=gnu +// ``` +// +// Using 'cxxstd-dialect=iso' is not supported at this time (the tests run, +// but many tests fail). //// //// Front matter From 5679e66d1061a781d0e77e73b681e48a02a8f7fc Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Wed, 13 Dec 2017 15:46:41 -0600 Subject: [PATCH 19/51] Add more notes about 'cray.hpp' failing tests --- include/boost/config/compiler/cray.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 0e1f5b48..ba6e3819 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -243,8 +243,8 @@ #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L -#undef BOOST_DEDUCED_TYPENAME // Whether defined or undefined, has no affect on 'no_ded_typename_fail'. -#undef BOOST_HAS_CLOCK_GETTIME // Whether defined or undefined, has no affect on 'has_clock_gettime_pass'. +#undef BOOST_DEDUCED_TYPENAME // Whether defined or undefined, has no affect on 'no_ded_typename_fail'. Also fails on GCC. +#undef BOOST_HAS_CLOCK_GETTIME // Whether defined or undefined, has no affect on 'has_clock_gettime_pass'. Similar failure on GCC, with 'undefined reference to clock_gettime'. May be related to 'ld' path and loaded modules. #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // If defined, then 'no_com_value_init_fail' fails. If undefined, then 'no_com_value_init_pass' fails. #undef BOOST_NO_CXX11_ALIGNAS #undef BOOST_NO_CXX11_HDR_FUNCTIONAL From bea3493fcb8d5282418827538951ecae5548cab0 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Wed, 13 Dec 2017 15:52:09 -0600 Subject: [PATCH 20/51] Add comments in 'cray.hpp' --- include/boost/config/compiler/cray.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index ba6e3819..0575f634 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -56,8 +56,11 @@ # define BOOST_COMPILER "Cray C++ version " BOOST_STRINGIZE(_RELEASE_MAJOR) "." BOOST_STRINGIZE(_RELEASE_MINOR) "." BOOST_STRINGIZE(_RELEASE_PATCHLEVEL) #endif -// We have to emulate some GCC macros in order to enable some Boost.Config -// tests. +// Since the Cray compiler defines '__GNUC__', we have to emulate some +// additional GCC macros in order to make everything work. +// +// FIXME: Perhaps Cray should fix the compiler to define these additional +// macros for GCC emulation? #if __cplusplus >= 201103L && defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) # define __GXX_EXPERIMENTAL_CXX0X__ 1 From 83c9f749901cf81383a395b2631ae00cc0d79cfa Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Thu, 14 Dec 2017 10:07:25 -0600 Subject: [PATCH 21/51] Add '-lrt' to 'cray.hpp' test specification --- include/boost/config/compiler/cray.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 0575f634..4dd349c5 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -36,11 +36,14 @@ // ``` // module load cce/8.6.5 # Pick the version you want to test. // cd boost/libs/config/test/all -// b2 -j 8 toolset=craype cxxstd=03 cxxstd=11 cxxstd=14 cxxstd-dialect=gnu +// b2 -j 8 toolset=craype cxxstd=03 cxxstd=11 cxxstd=14 cxxstd-dialect=gnu linkflags=-lrt // ``` // // Using 'cxxstd-dialect=iso' is not supported at this time (the tests run, // but many tests fail). +// +// 'linkflags=-lrt' is needed. Otherwise you get an 'undefined reference to +// clock_gettime' error. //// //// Front matter From f7165b4f706827f0dc01003cacdef2ff6e73c09e Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Thu, 14 Dec 2017 12:28:18 -0600 Subject: [PATCH 22/51] Add comments on macro definitions in 'cray.hpp' --- include/boost/config/compiler/cray.hpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 4dd349c5..f76d5e49 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -39,11 +39,25 @@ // b2 -j 8 toolset=craype cxxstd=03 cxxstd=11 cxxstd=14 cxxstd-dialect=gnu linkflags=-lrt // ``` // -// Using 'cxxstd-dialect=iso' is not supported at this time (the tests run, -// but many tests fail). +// Note: Using 'cxxstd-dialect=iso' is not supported at this time (the +// tests run, but many tests fail). // -// 'linkflags=-lrt' is needed. Otherwise you get an 'undefined reference to -// clock_gettime' error. +// Note: 'linkflags=-lrt' is needed in Cray Linux Environment. Otherwise +// you get an 'undefined reference to clock_gettime' error. +// +// Pay attention to the macro definitions for the macros you wish to +// modify. For example, only macros categorized as compiler macros should +// appear in this file; platform macros should not appear in this file. +// Also, some macros have to be defined to specific values; it is not +// always enough to define or undefine a macro. +// +// Macro definitions are available in the source code at: +// +// `boost/libs/config/doc/html/boost_config/boost_macro_reference.html` +// +// Macro definitions are also available online at: +// +// http://www.boost.org/doc/libs/master/libs/config/doc/html/boost_config/boost_macro_reference.html //// //// Front matter From bf628a3b3e323de408f5949370277b0cc27e8fe5 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Thu, 14 Dec 2017 14:25:57 -0600 Subject: [PATCH 23/51] Fix 'BOOST_NO_DEDUCED_TYPENAME' in 'cray.hpp' - Cray compiler requires the 'typename' keyword before a dependent type. --- include/boost/config/compiler/cray.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index f76d5e49..02991472 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -263,7 +263,7 @@ #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L -#undef BOOST_DEDUCED_TYPENAME // Whether defined or undefined, has no affect on 'no_ded_typename_fail'. Also fails on GCC. +#undef BOOST_NO_DEDUCED_TYPENAME // Not documented. See 'boost/libs/config/include/boost/config/detail/suffix.hpp'. #undef BOOST_HAS_CLOCK_GETTIME // Whether defined or undefined, has no affect on 'has_clock_gettime_pass'. Similar failure on GCC, with 'undefined reference to clock_gettime'. May be related to 'ld' path and loaded modules. #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // If defined, then 'no_com_value_init_fail' fails. If undefined, then 'no_com_value_init_pass' fails. #undef BOOST_NO_CXX11_ALIGNAS From 82c6e933f1f318b8dce74bdad28d149238ad1f35 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Thu, 14 Dec 2017 14:42:30 -0600 Subject: [PATCH 24/51] Remove 'BOOST_HAS_CLOCK_GETTIME' from 'cray.hpp' - This is a platform specific macro that is set elsewhere. It does not belong in a compiler configuration header. - This commit has no effect on test results for CCE 8.6.5 with C++14. --- include/boost/config/compiler/cray.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 02991472..45521138 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -264,7 +264,6 @@ #if __cplusplus >= 201402L #undef BOOST_NO_DEDUCED_TYPENAME // Not documented. See 'boost/libs/config/include/boost/config/detail/suffix.hpp'. -#undef BOOST_HAS_CLOCK_GETTIME // Whether defined or undefined, has no affect on 'has_clock_gettime_pass'. Similar failure on GCC, with 'undefined reference to clock_gettime'. May be related to 'ld' path and loaded modules. #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // If defined, then 'no_com_value_init_fail' fails. If undefined, then 'no_com_value_init_pass' fails. #undef BOOST_NO_CXX11_ALIGNAS #undef BOOST_NO_CXX11_HDR_FUNCTIONAL From 90ae2088680a985e7c89dcd407b1469a282ae89c Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Fri, 15 Dec 2017 07:43:17 -0600 Subject: [PATCH 25/51] BOOST_NO_COMPLETE_VALUE_INITIALIZATION test is broken --- include/boost/config/compiler/cray.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 45521138..cac82aba 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -264,7 +264,18 @@ #if __cplusplus >= 201402L #undef BOOST_NO_DEDUCED_TYPENAME // Not documented. See 'boost/libs/config/include/boost/config/detail/suffix.hpp'. -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // If defined, then 'no_com_value_init_fail' fails. If undefined, then 'no_com_value_init_pass' fails. +// 'BOOST_NO_COMPLETE_VALUE_INITIALIZATION' test is broken. +// 'no_com_value_init_fail.cpp' should pass if one of the following occurs: +// +// - It fails to compile. +// - It fails to run. +// +// The test Jamfile file uses 'compile-fail', but the proper semantics for +// this test is 'compile-or-run-fail'. For the Cray compiler, +// 'no_com_value_init_fail.cpp' compiles, so the test indicates a defect. +// However, if we run the compiled program, it fails at runtime, so this +// really isn't a defect. +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // Test is broken. #undef BOOST_NO_CXX11_ALIGNAS #undef BOOST_NO_CXX11_HDR_FUNCTIONAL #define BOOST_NO_CXX11_HDR_REGEX // If defined, then 'no_cxx11_hdr_regex_fail' fails. If undefined, then 'no_cxx11_hdr_regex_pass' fails. From d26ae70b20e6e4c54f570e4f4aeeee052c6f2c3d Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Fri, 15 Dec 2017 07:56:46 -0600 Subject: [PATCH 26/51] BOOST_NO_DEDUCED_TYPENAME test is broken --- include/boost/config/compiler/cray.hpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index cac82aba..06bcb9da 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -263,7 +263,18 @@ #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L -#undef BOOST_NO_DEDUCED_TYPENAME // Not documented. See 'boost/libs/config/include/boost/config/detail/suffix.hpp'. +// 'BOOST_NO_DEDUCED_TYPENAME' test is broken. The test files are enabled / +// disabled with an '#ifdef BOOST_DEDUCED_TYPENAME'. However, +// 'boost/libs/config/include/boost/config/detail/suffix.hpp' ensures that +// 'BOOST_DEDUCED_TYPENAME' is always defined (the value it is defined as +// depends on 'BOOST_NO_DEDUCED_TYPENAME'). So, modifying +// 'BOOST_NO_DEDUCED_TYPENAME' has no effect on which tests are run. +// +// The 'no_ded_typename_pass.cpp' test should always compile and run +// successfully, regardless of the value of 'BOOST_DEDUCED_TYPENAME'. +// 'BOOST_DEDUCED_TYPENAME' must always have an appropriate value; it's not +// just something that you turn on or off. +#undef BOOST_NO_DEDUCED_TYPENAME // This is correct. Test is broken. // 'BOOST_NO_COMPLETE_VALUE_INITIALIZATION' test is broken. // 'no_com_value_init_fail.cpp' should pass if one of the following occurs: // @@ -275,7 +286,7 @@ // 'no_com_value_init_fail.cpp' compiles, so the test indicates a defect. // However, if we run the compiled program, it fails at runtime, so this // really isn't a defect. -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // Test is broken. +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // This is correct. Test is broken. #undef BOOST_NO_CXX11_ALIGNAS #undef BOOST_NO_CXX11_HDR_FUNCTIONAL #define BOOST_NO_CXX11_HDR_REGEX // If defined, then 'no_cxx11_hdr_regex_fail' fails. If undefined, then 'no_cxx11_hdr_regex_pass' fails. From 3c4ea795d73d6869c7a5852cc8e2557e1fa590f0 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Fri, 15 Dec 2017 08:18:43 -0600 Subject: [PATCH 27/51] Add explanatory comments to 'cray.hpp' --- include/boost/config/compiler/cray.hpp | 28 +++++++++++--------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 06bcb9da..435dc553 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -45,6 +45,11 @@ // Note: 'linkflags=-lrt' is needed in Cray Linux Environment. Otherwise // you get an 'undefined reference to clock_gettime' error. // +// Note: If a test '*_fail.cpp' file compiles, but fails to run, then it is +// reported as a defect. However, this is not actually a defect. This is an +// area where the test system is somewhat broken. Tests that are failing +// because of this problem are noted in the comments. +// // Pay attention to the macro definitions for the macros you wish to // modify. For example, only macros categorized as compiler macros should // appear in this file; platform macros should not appear in this file. @@ -271,25 +276,16 @@ // 'BOOST_NO_DEDUCED_TYPENAME' has no effect on which tests are run. // // The 'no_ded_typename_pass.cpp' test should always compile and run -// successfully, regardless of the value of 'BOOST_DEDUCED_TYPENAME'. -// 'BOOST_DEDUCED_TYPENAME' must always have an appropriate value; it's not -// just something that you turn on or off. +// successfully, because 'BOOST_DEDUCED_TYPENAME' must always have an +// appropriate value (it's not just something that you turn on or off). +// Therefore, if you wish to test changes to 'BOOST_NO_DEDUCED_TYPENAME', +// you have to modify 'no_ded_typename_pass.cpp' to unconditionally include +// 'boost_no_ded_typename.ipp'. #undef BOOST_NO_DEDUCED_TYPENAME // This is correct. Test is broken. -// 'BOOST_NO_COMPLETE_VALUE_INITIALIZATION' test is broken. -// 'no_com_value_init_fail.cpp' should pass if one of the following occurs: -// -// - It fails to compile. -// - It fails to run. -// -// The test Jamfile file uses 'compile-fail', but the proper semantics for -// this test is 'compile-or-run-fail'. For the Cray compiler, -// 'no_com_value_init_fail.cpp' compiles, so the test indicates a defect. -// However, if we run the compiled program, it fails at runtime, so this -// really isn't a defect. -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // This is correct. Test is broken. +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // This is correct. Test compiles, but fails to run. #undef BOOST_NO_CXX11_ALIGNAS #undef BOOST_NO_CXX11_HDR_FUNCTIONAL -#define BOOST_NO_CXX11_HDR_REGEX // If defined, then 'no_cxx11_hdr_regex_fail' fails. If undefined, then 'no_cxx11_hdr_regex_pass' fails. +#define BOOST_NO_CXX11_HDR_REGEX // This is correct. Test compiles, but fails to run. #undef BOOST_NO_CXX11_INLINE_NAMESPACES #undef BOOST_NO_CXX11_SMART_PTR #undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES From f2eca6c7fa50827dfd5d0344068771dd6bcc3bc7 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Fri, 15 Dec 2017 08:30:21 -0600 Subject: [PATCH 28/51] Add comments in 'cray.hpp' --- include/boost/config/compiler/cray.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 435dc553..5e512daf 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -63,6 +63,13 @@ // Macro definitions are also available online at: // // http://www.boost.org/doc/libs/master/libs/config/doc/html/boost_config/boost_macro_reference.html +// +// Typically, defining a 'BOOST_NO_*' macro disables some feature, and +// undefining the macro enables the feature. If a feature is enabled, and +// the tests are passing, then you probably do not need to revisit it. +// However, if you have disabled a feature, you may want to try enabling +// it, even if the '_fail.cpp' tests are passing, because sometimes the +// '_fail.cpp' tests are broken. //// //// Front matter From 026ebd864e286c0333fc338cf85f728f290ac381 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Fri, 15 Dec 2017 08:38:22 -0600 Subject: [PATCH 29/51] Alphabetize macros in 'cray.hpp' - Did not change any macro values. --- include/boost/config/compiler/cray.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 5e512daf..39f584f2 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -275,6 +275,15 @@ #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // This is correct. Test compiles, but fails to run. +#undef BOOST_NO_CXX11_ALIGNAS +#undef BOOST_NO_CXX11_HDR_FUNCTIONAL +#define BOOST_NO_CXX11_HDR_REGEX // This is correct. Test compiles, but fails to run. +#undef BOOST_NO_CXX11_INLINE_NAMESPACES +#undef BOOST_NO_CXX11_SMART_PTR +#undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#undef BOOST_NO_CXX14_CONSTEXPR +#define BOOST_NO_CXX14_DIGIT_SEPARATORS // 'BOOST_NO_DEDUCED_TYPENAME' test is broken. The test files are enabled / // disabled with an '#ifdef BOOST_DEDUCED_TYPENAME'. However, // 'boost/libs/config/include/boost/config/detail/suffix.hpp' ensures that @@ -289,15 +298,6 @@ // you have to modify 'no_ded_typename_pass.cpp' to unconditionally include // 'boost_no_ded_typename.ipp'. #undef BOOST_NO_DEDUCED_TYPENAME // This is correct. Test is broken. -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // This is correct. Test compiles, but fails to run. -#undef BOOST_NO_CXX11_ALIGNAS -#undef BOOST_NO_CXX11_HDR_FUNCTIONAL -#define BOOST_NO_CXX11_HDR_REGEX // This is correct. Test compiles, but fails to run. -#undef BOOST_NO_CXX11_INLINE_NAMESPACES -#undef BOOST_NO_CXX11_SMART_PTR -#undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#undef BOOST_NO_CXX14_CONSTEXPR -#define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif // __cplusplus == 201402L #endif // BOOST_CRAY_VERSION >= 80605 From ea46cf5332d57d8dd6ceaf78f67e39afa10f935b Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Fri, 15 Dec 2017 09:11:19 -0600 Subject: [PATCH 30/51] Set more macros in 'cray.hpp' --- include/boost/config/compiler/cray.hpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 39f584f2..b2c48a30 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -64,12 +64,12 @@ // // http://www.boost.org/doc/libs/master/libs/config/doc/html/boost_config/boost_macro_reference.html // -// Typically, defining a 'BOOST_NO_*' macro disables some feature, and -// undefining the macro enables the feature. If a feature is enabled, and -// the tests are passing, then you probably do not need to revisit it. -// However, if you have disabled a feature, you may want to try enabling -// it, even if the '_fail.cpp' tests are passing, because sometimes the -// '_fail.cpp' tests are broken. +// Typically, if you enable a feature, and the tests pass, then you have +// nothing to worry about. However, it's sometimes hard to figure out if a +// disabled feature needs to stay disabled. To get a list of disabled +// features, run 'b2' in 'boost/libs/config/check'. These are the macros +// you should pay attention to (in addition to macros that cause test +// failures). //// //// Front matter @@ -275,8 +275,16 @@ #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L +#undef BOOST_HAS_INT128 +#undef BOOST_HAS_MACRO_USE_FACET +#undef BOOST_HAS_MS_INT64 +#undef BOOST_HAS_SGI_TYPE_TRAITS +#undef BOOST_HAS_STLP_USE_FACET +#undef BOOST_HAS_TWO_ARG_USE_FACET +#undef BOOST_MSVC_STD_ITERATOR #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // This is correct. Test compiles, but fails to run. #undef BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_HDR_ATOMIC #undef BOOST_NO_CXX11_HDR_FUNCTIONAL #define BOOST_NO_CXX11_HDR_REGEX // This is correct. Test compiles, but fails to run. #undef BOOST_NO_CXX11_INLINE_NAMESPACES @@ -298,6 +306,7 @@ // you have to modify 'no_ded_typename_pass.cpp' to unconditionally include // 'boost_no_ded_typename.ipp'. #undef BOOST_NO_DEDUCED_TYPENAME // This is correct. Test is broken. +#define BOOST_NO_MS_INT64_NUMERIC_LIMITS // This is also defined in 'boost/libs/config/include/boost/config/detail/suffix.hpp'. Changing it here has no effect. #endif // __cplusplus == 201402L #endif // BOOST_CRAY_VERSION >= 80605 From 382913d25d68e1ecb6d337e4ac1e54b65b5fde15 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Fri, 15 Dec 2017 09:34:32 -0600 Subject: [PATCH 31/51] Work on Cray 8.6.5 C++2011 configuration --- include/boost/config/compiler/cray.hpp | 30 ++++++++++++-------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index b2c48a30..3b19fd92 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -269,29 +269,15 @@ #endif // __cplusplus >= 199711L #if __cplusplus >= 201103L -#define BOOST_NO_CXX11_HDR_ATOMIC -#define BOOST_NO_CXX11_HDR_REGEX -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#endif // __cplusplus >= 201103L - -#if __cplusplus >= 201402L -#undef BOOST_HAS_INT128 -#undef BOOST_HAS_MACRO_USE_FACET -#undef BOOST_HAS_MS_INT64 -#undef BOOST_HAS_SGI_TYPE_TRAITS -#undef BOOST_HAS_STLP_USE_FACET -#undef BOOST_HAS_TWO_ARG_USE_FACET -#undef BOOST_MSVC_STD_ITERATOR -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // This is correct. Test compiles, but fails to run. #undef BOOST_NO_CXX11_ALIGNAS +#undef BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_HDR_ATOMIC #undef BOOST_NO_CXX11_HDR_FUNCTIONAL #define BOOST_NO_CXX11_HDR_REGEX // This is correct. Test compiles, but fails to run. #undef BOOST_NO_CXX11_INLINE_NAMESPACES #undef BOOST_NO_CXX11_SMART_PTR #undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#undef BOOST_NO_CXX14_CONSTEXPR -#define BOOST_NO_CXX14_DIGIT_SEPARATORS +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // This is correct. Test compiles, but fails to run. // 'BOOST_NO_DEDUCED_TYPENAME' test is broken. The test files are enabled / // disabled with an '#ifdef BOOST_DEDUCED_TYPENAME'. However, // 'boost/libs/config/include/boost/config/detail/suffix.hpp' ensures that @@ -306,6 +292,18 @@ // you have to modify 'no_ded_typename_pass.cpp' to unconditionally include // 'boost_no_ded_typename.ipp'. #undef BOOST_NO_DEDUCED_TYPENAME // This is correct. Test is broken. +#endif // __cplusplus >= 201103L + +#if __cplusplus >= 201402L +#undef BOOST_HAS_INT128 +#undef BOOST_HAS_MACRO_USE_FACET +#undef BOOST_HAS_MS_INT64 +#undef BOOST_HAS_SGI_TYPE_TRAITS +#undef BOOST_HAS_STLP_USE_FACET +#undef BOOST_HAS_TWO_ARG_USE_FACET +#undef BOOST_MSVC_STD_ITERATOR +#undef BOOST_NO_CXX14_CONSTEXPR +#define BOOST_NO_CXX14_DIGIT_SEPARATORS #define BOOST_NO_MS_INT64_NUMERIC_LIMITS // This is also defined in 'boost/libs/config/include/boost/config/detail/suffix.hpp'. Changing it here has no effect. #endif // __cplusplus == 201402L From d1e0933528e2512b12c97aae2b1729bd1c302422 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Fri, 15 Dec 2017 10:36:01 -0600 Subject: [PATCH 32/51] Improve Cray 8.6.5 C++2003 configuration --- include/boost/config/compiler/cray.hpp | 36 ++++++++++++++++++-------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 3b19fd92..774b29cb 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -266,18 +266,19 @@ #if BOOST_CRAY_VERSION >= 80605 #if __cplusplus >= 199711L -#endif // __cplusplus >= 199711L - -#if __cplusplus >= 201103L -#undef BOOST_NO_CXX11_ALIGNAS -#undef BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_HDR_ATOMIC -#undef BOOST_NO_CXX11_HDR_FUNCTIONAL -#define BOOST_NO_CXX11_HDR_REGEX // This is correct. Test compiles, but fails to run. -#undef BOOST_NO_CXX11_INLINE_NAMESPACES -#undef BOOST_NO_CXX11_SMART_PTR -#undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_HAS_FLOAT128 +#define BOOST_HAS_PTHREAD_YIELD // This is a platform macro, but it improves test results. #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // This is correct. Test compiles, but fails to run. +#undef BOOST_NO_CXX11_CHAR16_T +#undef BOOST_NO_CXX11_CHAR32_T +#undef BOOST_NO_CXX11_INLINE_NAMESPACES +#undef BOOST_NO_CXX11_FINAL +#undef BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_SFINAE_EXPR // This is correct, even though '*_fail.cpp' test fails. +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX // This is correct, even though '*_fail.cpp' test fails. +#undef BOOST_NO_CXX11_VARIADIC_MACROS +#undef BOOST_NO_CXX11_VARIADIC_TEMPLATES // 'BOOST_NO_DEDUCED_TYPENAME' test is broken. The test files are enabled / // disabled with an '#ifdef BOOST_DEDUCED_TYPENAME'. However, // 'boost/libs/config/include/boost/config/detail/suffix.hpp' ensures that @@ -292,6 +293,19 @@ // you have to modify 'no_ded_typename_pass.cpp' to unconditionally include // 'boost_no_ded_typename.ipp'. #undef BOOST_NO_DEDUCED_TYPENAME // This is correct. Test is broken. +#undef BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif // __cplusplus >= 199711L + +#if __cplusplus >= 201103L +#undef BOOST_NO_CXX11_ALIGNAS +#undef BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_HDR_ATOMIC +#undef BOOST_NO_CXX11_HDR_FUNCTIONAL +#define BOOST_NO_CXX11_HDR_REGEX // This is correct. Test compiles, but fails to run. +#undef BOOST_NO_CXX11_SFINAE_EXPR +#undef BOOST_NO_CXX11_SMART_PTR +#undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L From 900c36e2fbe07af6261c724c6736ee8bb8f58326 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Fri, 15 Dec 2017 11:54:59 -0600 Subject: [PATCH 33/51] 'cray.hpp' empty section for 8.7.0 --- include/boost/config/compiler/cray.hpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 774b29cb..f3eb1298 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -323,6 +323,23 @@ #endif // BOOST_CRAY_VERSION >= 80605 +// +// 8.7.0 +// + +#if BOOST_CRAY_VERSION >= 80700 + +#if __cplusplus >= 199711L +#endif // __cplusplus >= 199711L + +#if __cplusplus >= 201103L +#endif // __cplusplus >= 201103L + +#if __cplusplus >= 201402L +#endif // __cplusplus == 201402L + +#endif // BOOST_CRAY_VERSION >= 80700 + //// //// Remove temporary macros //// From 07993e2e2fe3c2123bff89271c18bcdf9ab64021 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Fri, 15 Dec 2017 12:06:36 -0600 Subject: [PATCH 34/51] Remove redundant macro definitions in 'cray.hpp' - This commit had no effect on test results. --- include/boost/config/compiler/cray.hpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index f3eb1298..a5d18d0d 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -309,16 +309,8 @@ #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L -#undef BOOST_HAS_INT128 -#undef BOOST_HAS_MACRO_USE_FACET -#undef BOOST_HAS_MS_INT64 -#undef BOOST_HAS_SGI_TYPE_TRAITS -#undef BOOST_HAS_STLP_USE_FACET -#undef BOOST_HAS_TWO_ARG_USE_FACET -#undef BOOST_MSVC_STD_ITERATOR #undef BOOST_NO_CXX14_CONSTEXPR #define BOOST_NO_CXX14_DIGIT_SEPARATORS -#define BOOST_NO_MS_INT64_NUMERIC_LIMITS // This is also defined in 'boost/libs/config/include/boost/config/detail/suffix.hpp'. Changing it here has no effect. #endif // __cplusplus == 201402L #endif // BOOST_CRAY_VERSION >= 80605 From 620f819e3b7aedbd158d5ca17a5e7cefed0e7f7e Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Wed, 10 Jan 2018 12:56:12 -0600 Subject: [PATCH 35/51] Handle Cray developer builds --- include/boost/config/compiler/cray.hpp | 73 +++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index a5d18d0d..37b36c11 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -75,7 +75,78 @@ //// Front matter //// -#define BOOST_CRAY_VERSION (_RELEASE_MAJOR * 10000 + _RELEASE_MINOR * 100 + _RELEASE_PATCHLEVEL) +// In a developer build of the Cray compiler (i.e. a compiler built by a +// Cray employee), the release patch level is reported as "x". This gives +// versions that look like e.g. "8.6.x". +// +// To accomplish this, the the Cray compiler preprocessor inserts: +// +// #define _RELEASE_PATCHLEVEL x +// +// If we are using a developer build of the compiler, we want to use the +// configuration macros for the most recent patch level of the release. To +// accomplish this, we'll pretend that _RELEASE_PATCHLEVEL is 99. +// +// However, it's difficult to detect if _RELEASE_PATCHLEVEL is x. We must +// consider that the x will be expanded if x is defined as a macro +// elsewhere. For example, imagine if someone put "-D x=3" on the command +// line, and _RELEASE_PATCHLEVEL is x. Then _RELEASE_PATCHLEVEL would +// expand to 3, and we could not distinguish it from an actual +// _RELEASE_PATCHLEVEL of 3. This problem only affects developer builds; in +// production builds, _RELEASE_PATCHLEVEL is always an integer. +// +// IMPORTANT: In developer builds, if x is defined as a macro, you will get +// an incorrect configuration. The behavior in this case is undefined. +// +// Even if x is not defined, we have to use some trickery to detect if +// _RELEASE_PATCHLEVEL is x. First we define BOOST_CRAY_x to some arbitrary +// magic value, 9867657. Then we use BOOST_CRAY_APPEND to append the +// expanded value of _RELEASE_PATCHLEVEL to the string "BOOST_CRAY_". +// +// - If _RELEASE_PATCHLEVEL is undefined, we get "BOOST_CRAY_". +// - If _RELEASE_PATCHLEVEL is 5, we get "BOOST_CRAY_5". +// - If _RELEASE_PATCHLEVEL is x (and x is not defined) we get +// "BOOST_CRAY_x": +// +// Then we check if BOOST_CRAY_x is equal to the output of +// BOOST_CRAY_APPEND. In other words, the output of BOOST_CRAY_APPEND is +// treated as a macro name, and expanded again. If we can safely assume +// that BOOST_CRAY_ is not a macro defined as our magic number, and +// BOOST_CRAY_5 is not a macro defined as our magic number, then the only +// way the equality test can pass is if _RELEASE_PATCHLEVEL expands to x. +// +// So, that is how we detect if we are using a developer build of the Cray +// compiler. + +#define BOOST_CRAY_x 9867657 // Arbitrary number +#define BOOST_CRAY_APPEND(MACRO) BOOST_CRAY_APPEND_INTERNAL(MACRO) +#define BOOST_CRAY_APPEND_INTERNAL(MACRO) BOOST_CRAY_##MACRO + +#if BOOST_CRAY_x == BOOST_CRAY_APPEND(_RELEASE_PATCHLEVEL) + + // This is a developer build. + // + // - _RELEASE_PATCHLEVEL is defined as x, and x is not defined as a macro. + + // Pretend _RELEASE_PATCHLEVEL is 99, so we get the configuration for the + // most recent patch level in this release. + + #define BOOST_CRAY_VERSION (_RELEASE_MAJOR * 10000 + _RELEASE_MINOR * 100 + 99) + +#else + + // This is a production build. + // + // _RELEASE_PATCHLEVEL is not defined as x, or x is defined as a macro. + + #define BOOST_CRAY_VERSION (_RELEASE_MAJOR * 10000 + _RELEASE_MINOR * 100 + _RELEASE_PATCHLEVEL) + +#endif // BOOST_CRAY_x == BOOST_CRAY_APPEND(_RELEASE_PATCHLEVEL) + +#undef BOOST_CRAY_APPEND_INTERNAL +#undef BOOST_CRAY_APPEND +#undef BOOST_CRAY_x + #ifdef __GNUC__ # define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) From 3144e2a8e4cc2038bb0a71797e3ea91170262a40 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 6 Feb 2018 11:29:08 -0600 Subject: [PATCH 36/51] Fix comments in 'cray.hpp' --- include/boost/config/compiler/cray.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 37b36c11..1bb5a380 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -36,9 +36,8 @@ // ``` // module load cce/8.6.5 # Pick the version you want to test. // cd boost/libs/config/test/all -// b2 -j 8 toolset=craype cxxstd=03 cxxstd=11 cxxstd=14 cxxstd-dialect=gnu linkflags=-lrt +// b2 -j 8 toolset=cray cxxstd=03 cxxstd=11 cxxstd=14 cxxstd-dialect=gnu linkflags=-lrt // ``` -// // Note: Using 'cxxstd-dialect=iso' is not supported at this time (the // tests run, but many tests fail). // From c04b9913219e3c56b1ecd745d68cd81cde8305b7 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 6 Feb 2018 11:36:52 -0600 Subject: [PATCH 37/51] Add section for next release to 'cray.hpp' --- include/boost/config/compiler/cray.hpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 1bb5a380..54b1c4fb 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -402,6 +402,23 @@ #endif // BOOST_CRAY_VERSION >= 80700 +// +// Next release +// + +#if BOOST_CRAY_VERSION > 80799 + +#if __cplusplus >= 199711L +#endif // __cplusplus >= 199711L + +#if __cplusplus >= 201103L +#endif // __cplusplus >= 201103L + +#if __cplusplus >= 201402L +#endif // __cplusplus == 201402L + +#endif // BOOST_CRAY_VERSION > 80799 + //// //// Remove temporary macros //// From 7238f9f0f63f7265edeac66306e5af841b387981 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 6 Feb 2018 12:43:21 -0600 Subject: [PATCH 38/51] Fix 'cray.hpp' BOOST_NO_CXX11_HDR_ATOMIC setting --- include/boost/config/compiler/cray.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 54b1c4fb..f272683e 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -415,6 +415,7 @@ #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L +#undef BOOST_NO_CXX11_HDR_ATOMIC #endif // __cplusplus == 201402L #endif // BOOST_CRAY_VERSION > 80799 From 54c07da09b26c424b4fda749074037b4d97fc225 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 10 Apr 2018 10:32:18 -0500 Subject: [PATCH 39/51] Update copyright information --- include/boost/config/compiler/cray.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index f272683e..82129541 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -1,5 +1,5 @@ -// (C) Copyright John Maddock 2011. -// (C) Copyright Cray, Inc. 2013 - 2017. +// Copyright 2011 John Maddock +// Copyright 2013, 2017-2018 Cray, Inc. // 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) @@ -163,7 +163,7 @@ #if __cplusplus >= 201103L && defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) # define __GXX_EXPERIMENTAL_CXX0X__ 1 -#endif // __GNUC__ +#endif //// //// Parameter validation From 5e33b4c27a828fde033321e938b17de1b4512299 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 10 Apr 2018 11:39:43 -0500 Subject: [PATCH 40/51] Update 'cray.hpp' for upcoming release --- include/boost/config/compiler/cray.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 82129541..f20371dc 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -392,9 +392,13 @@ #if BOOST_CRAY_VERSION >= 80700 #if __cplusplus >= 199711L +#undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#undef BOOST_NO_SFINAE_EXPR #endif // __cplusplus >= 199711L #if __cplusplus >= 201103L +#undef BOOST_NO_CXX11_HDR_ATOMIC +#undef BOOST_NO_CXX11_HDR_REGEX #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L @@ -415,7 +419,6 @@ #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L -#undef BOOST_NO_CXX11_HDR_ATOMIC #endif // __cplusplus == 201402L #endif // BOOST_CRAY_VERSION > 80799 @@ -431,4 +434,3 @@ //#undef BOOST_COMPILER #undef BOOST_GCC_VERSION #undef BOOST_CRAY_VERSION - From 42e1c7913a557e123969f682e4d3c1f8b5c8605e Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 10 Apr 2018 12:40:55 -0500 Subject: [PATCH 41/51] Update 'cray.hpp' for CCE 8.6.5 --- include/boost/config/compiler/cray.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index f20371dc..0451735a 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -346,7 +346,7 @@ #undef BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS #undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_SFINAE_EXPR // This is correct, even though '*_fail.cpp' test fails. -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX // This is correct, even though '*_fail.cpp' test fails. +#undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #undef BOOST_NO_CXX11_VARIADIC_MACROS #undef BOOST_NO_CXX11_VARIADIC_TEMPLATES // 'BOOST_NO_DEDUCED_TYPENAME' test is broken. The test files are enabled / @@ -363,6 +363,7 @@ // you have to modify 'no_ded_typename_pass.cpp' to unconditionally include // 'boost_no_ded_typename.ipp'. #undef BOOST_NO_DEDUCED_TYPENAME // This is correct. Test is broken. +#undef BOOST_NO_SFINAE_EXPR #undef BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif // __cplusplus >= 199711L @@ -375,7 +376,6 @@ #undef BOOST_NO_CXX11_SFINAE_EXPR #undef BOOST_NO_CXX11_SMART_PTR #undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif // __cplusplus >= 201103L #if __cplusplus >= 201402L @@ -392,8 +392,6 @@ #if BOOST_CRAY_VERSION >= 80700 #if __cplusplus >= 199711L -#undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#undef BOOST_NO_SFINAE_EXPR #endif // __cplusplus >= 199711L #if __cplusplus >= 201103L From 664b2fdec872091ab28cfcd201a5823de114a38d Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 10 Apr 2018 13:29:34 -0500 Subject: [PATCH 42/51] Update 'cray.hpp' for CCE 8.6.4 --- include/boost/config/compiler/cray.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 0451735a..b238c9ac 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -330,10 +330,11 @@ #endif // BOOST_CRAY_VERSION >= 80500 // -// 8.6.5 +// 8.6.4 +// (versions prior to 8.6.5 do not define _RELEASE_PATCHLEVEL) // -#if BOOST_CRAY_VERSION >= 80605 +#if BOOST_CRAY_VERSION >= 80600 #if __cplusplus >= 199711L #define BOOST_HAS_FLOAT128 @@ -383,7 +384,12 @@ #define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif // __cplusplus == 201402L -#endif // BOOST_CRAY_VERSION >= 80605 +#endif // BOOST_CRAY_VERSION >= 80600 + +// +// 8.6.5 +// (no change from 8.6.4) +// // // 8.7.0 From d70b2988262f25350ed1e8c2fc6a6a04630576f5 Mon Sep 17 00:00:00 2001 From: Justin LaPolla Date: Tue, 10 Apr 2018 13:59:50 -0500 Subject: [PATCH 43/51] Fix typo in comment in 'cray.hpp' --- include/boost/config/compiler/cray.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index b238c9ac..412ef9ef 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -66,7 +66,7 @@ // Typically, if you enable a feature, and the tests pass, then you have // nothing to worry about. However, it's sometimes hard to figure out if a // disabled feature needs to stay disabled. To get a list of disabled -// features, run 'b2' in 'boost/libs/config/check'. These are the macros +// features, run 'b2' in 'boost/libs/config/checks'. These are the macros // you should pay attention to (in addition to macros that cause test // failures). From 17c680679718ec15f2c9bc9f2373df7a4377293a Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 15 Apr 2018 20:53:20 +0100 Subject: [PATCH 44/51] Bump to 1.68.0 --- include/boost/version.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/version.hpp b/include/boost/version.hpp index e96f3432..967ff285 100644 --- a/include/boost/version.hpp +++ b/include/boost/version.hpp @@ -19,7 +19,7 @@ // BOOST_VERSION / 100 % 1000 is the minor version // BOOST_VERSION / 100000 is the major version -#define BOOST_VERSION 106700 +#define BOOST_VERSION 106800 // // BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION @@ -27,6 +27,6 @@ // number, y is the minor version number, and z is the patch level if not 0. // This is used by to select which library version to link to. -#define BOOST_LIB_VERSION "1_67" +#define BOOST_LIB_VERSION "1_68" #endif From f3ebdc4558d7bcbf14b08f75d770a2a06ad7506c Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 18 Apr 2018 19:30:39 +0100 Subject: [PATCH 45/51] Add docs for BOOST_NO_CXX17_IF_CONSTEXPR [CI SKIP] --- doc/html/boost_config/acknowledgements.html | 2 +- .../boost_config/boost_macro_reference.html | 32 +++++++++++++++++-- doc/html/boost_config/build_config.html | 2 +- doc/html/boost_config/cstdint.html | 4 +-- .../guidelines_for_boost_authors.html | 4 +-- doc/html/boost_config/rationale.html | 4 +-- doc/html/index.html | 10 +++--- doc/macro_reference.qbk | 1 + 8 files changed, 43 insertions(+), 16 deletions(-) diff --git a/doc/html/boost_config/acknowledgements.html b/doc/html/boost_config/acknowledgements.html index e3cd5555..8281d052 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 caa4e5c9..ed19e071 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 - + @@ -26,7 +26,7 @@ - @@ -5956,7 +5982,7 @@ Macros for libraries with separate source code -
+ - -
- - +

Last revised: December 22, 2017 at 23:49:22 GMT

Last revised: April 18, 2018 at 18:30:02 GMT


diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 737d4eb5..f44340dd 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -950,6 +950,7 @@ that are not yet supported by a particular compiler or library. [[`BOOST_NO_CXX17_STD_APPLY`][The compiler does not support `std::apply()`.]] [[`BOOST_NO_CXX17_STD_INVOKE`][The compiler does not support `std::invoke()`.]] [[`BOOST_NO_CXX17_ITERATOR_TRAITS`][The compiler does not support SFINAE-friendly `std::iterator_traits`.]] +[[`BOOST_NO_CXX17_IF_CONSTEXPR`][The compiler does not support `if constexpr`.]] ] [endsect] From 39f48141c5d50f6203590e6153a76c042e4c465e Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 18 Apr 2018 20:08:22 +0100 Subject: [PATCH 46/51] Fix some warnings and miswritten test case, add test for BOOST_HAS_PRAGMA_DETECT_MISMATCH. --- checks/Jamfile.v2 | 3 ++- checks/test_case.cpp | 7 ++++- test/all/Jamfile.v2 | 5 +++- test/boost_has_detect_mismatch.ipp | 24 +++++++++++++++++ test/boost_has_part_alloc.ipp | 2 +- test/boost_no_cxx11_hdr_atomic.ipp | 2 ++ test/boost_no_cxx11_hdr_tuple.ipp | 1 + test/boost_no_cxx11_pointer_traits.ipp | 4 +-- test/boost_no_std_allocator.ipp | 2 +- test/config_info.cpp | 2 ++ test/config_test.cpp | 12 ++++++++- test/has_detect_mismatch_fail.cpp | 37 ++++++++++++++++++++++++++ test/has_detect_mismatch_pass.cpp | 37 ++++++++++++++++++++++++++ 13 files changed, 130 insertions(+), 8 deletions(-) create mode 100644 test/boost_has_detect_mismatch.ipp create mode 100644 test/has_detect_mismatch_fail.cpp create mode 100644 test/has_detect_mismatch_pass.cpp diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index 2c4d4672..0c26bce1 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 Tue Mar 6 17:44:35 2018 +# This file was automatically generated on Wed Apr 18 20:03:40 2018 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -14,6 +14,7 @@ import path ; obj two_arg_use_facet : test_case.cpp : TEST_BOOST_HAS_TWO_ARG_USE_FACET ; obj bethreads : test_case.cpp : TEST_BOOST_HAS_BETHREADS ; obj clock_gettime : test_case.cpp : TEST_BOOST_HAS_CLOCK_GETTIME ; +obj pragma_detect_mismatch : test_case.cpp : TEST_BOOST_HAS_PRAGMA_DETECT_MISMATCH ; obj dirent_h : test_case.cpp : TEST_BOOST_HAS_DIRENT_H ; obj expm1 : test_case.cpp : TEST_BOOST_HAS_EXPM1 ; obj float128 : test_case.cpp : TEST_BOOST_HAS_FLOAT128 ; diff --git a/checks/test_case.cpp b/checks/test_case.cpp index 7c0f8a3f..7d9cb10c 100644 --- a/checks/test_case.cpp +++ b/checks/test_case.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Tue Mar 6 17:44:35 2018 +// This file was automatically generated on Wed Apr 18 20:03:40 2018 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -26,6 +26,11 @@ # error "Feature macro BOOST_HAS_CLOCK_GETTIME is not defined." # endif #endif +#ifdef TEST_BOOST_HAS_PRAGMA_DETECT_MISMATCH +# ifndef BOOST_HAS_PRAGMA_DETECT_MISMATCH +# error "Feature macro BOOST_HAS_PRAGMA_DETECT_MISMATCH is not defined." +# endif +#endif #ifdef TEST_BOOST_HAS_DIRENT_H # ifndef BOOST_HAS_DIRENT_H # error "Feature macro BOOST_HAS_DIRENT_H is not defined." diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index bff9133a..ae3457c2 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 Tue Mar 6 17:44:35 2018 +# This file was automatically generated on Wed Apr 18 20:03:40 2018 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -31,6 +31,9 @@ test-suite "BOOST_HAS_BETHREADS" : test-suite "BOOST_HAS_CLOCK_GETTIME" : [ run ../has_clock_gettime_pass.cpp ] [ compile-fail ../has_clock_gettime_fail.cpp ] ; +test-suite "BOOST_HAS_PRAGMA_DETECT_MISMATCH" : +[ run ../has_detect_mismatch_pass.cpp ] +[ compile-fail ../has_detect_mismatch_fail.cpp ] ; test-suite "BOOST_HAS_DIRENT_H" : [ run ../has_dirent_h_pass.cpp ] [ compile-fail ../has_dirent_h_fail.cpp ] ; diff --git a/test/boost_has_detect_mismatch.ipp b/test/boost_has_detect_mismatch.ipp new file mode 100644 index 00000000..3f29fcd3 --- /dev/null +++ b/test/boost_has_detect_mismatch.ipp @@ -0,0 +1,24 @@ +// (C) Copyright John Maddock 2018. +// 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_HAS_PRAGMA_DETECT_MISMATCH +// TITLE: detect_mismatch pragma +// DESCRIPTION: The compiler supports #pragma detect_mismatch + +#include + + +namespace boost_has_pragma_detect_mismatch { + +int test() +{ +# pragma detect_mismatch("Boost_Config", "1") + return 0; +} + +} + diff --git a/test/boost_has_part_alloc.ipp b/test/boost_has_part_alloc.ipp index 3e4c2cb8..ea31dd94 100644 --- a/test/boost_has_part_alloc.ipp +++ b/test/boost_has_part_alloc.ipp @@ -25,7 +25,7 @@ namespace boost_has_partial_std_allocator{ // template -int test_allocator(const T& i) +int test_allocator(const T&) { typedef std::allocator alloc1_t; #if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700))) diff --git a/test/boost_no_cxx11_hdr_atomic.ipp b/test/boost_no_cxx11_hdr_atomic.ipp index edede3fc..171dcc3d 100644 --- a/test/boost_no_cxx11_hdr_atomic.ipp +++ b/test/boost_no_cxx11_hdr_atomic.ipp @@ -52,6 +52,8 @@ int test() a1 |= 2; a1 ^= 3; + a2 = 0u; + a3.store(&v); a3.fetch_add(1); a3.fetch_sub(1); diff --git a/test/boost_no_cxx11_hdr_tuple.ipp b/test/boost_no_cxx11_hdr_tuple.ipp index 34bdc4df..6911ee34 100644 --- a/test/boost_no_cxx11_hdr_tuple.ipp +++ b/test/boost_no_cxx11_hdr_tuple.ipp @@ -17,6 +17,7 @@ namespace boost_no_cxx11_hdr_tuple { int test() { std::tuple t(0, 1, 2); + (void)t; return 0; } diff --git a/test/boost_no_cxx11_pointer_traits.ipp b/test/boost_no_cxx11_pointer_traits.ipp index d7223f32..3d1bb1f8 100644 --- a/test/boost_no_cxx11_pointer_traits.ipp +++ b/test/boost_no_cxx11_pointer_traits.ipp @@ -18,7 +18,7 @@ namespace boost_no_cxx11_pointer_traits { template struct pointer { template - using rebind = pointer; + using rebind = pointer; }; template @@ -31,7 +31,7 @@ struct result > { int test() { - return result >::rebind >::value; + return result >::rebind >::value; } } /* boost_no_cxx11_pointer_traits */ diff --git a/test/boost_no_std_allocator.ipp b/test/boost_no_std_allocator.ipp index 80e048e4..c3868dd8 100644 --- a/test/boost_no_std_allocator.ipp +++ b/test/boost_no_std_allocator.ipp @@ -25,7 +25,7 @@ namespace boost_no_std_allocator{ #endif template -int test_allocator(const T& i) +int test_allocator(const T&) { typedef std::allocator alloc1_t; #if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700))) diff --git a/test/config_info.cpp b/test/config_info.cpp index 15ea5d4a..b5629772 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -1054,6 +1054,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_HAS_NL_TYPES_H); PRINT_MACRO(BOOST_HAS_NRVO); PRINT_MACRO(BOOST_HAS_PARTIAL_STD_ALLOCATOR); + PRINT_MACRO(BOOST_HAS_PRAGMA_DETECT_MISMATCH); PRINT_MACRO(BOOST_HAS_PTHREADS); PRINT_MACRO(BOOST_HAS_PTHREAD_DELAY_NP); PRINT_MACRO(BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE); @@ -1235,6 +1236,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 2d27e53c..c7e4e8a6 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Tue Mar 6 17:44:35 2018 +// This file was automatically generated on Wed Apr 18 20:03:40 2018 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -823,6 +823,11 @@ namespace boost_has_bethreads = empty_boost; #else namespace boost_has_clock_gettime = empty_boost; #endif +#ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH +#include "boost_has_detect_mismatch.ipp" +#else +namespace boost_has_pragma_detect_mismatch = empty_boost; +#endif #ifdef BOOST_HAS_DIRENT_H #include "boost_has_dirent_h.ipp" #else @@ -1006,6 +1011,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_HAS_CLOCK_GETTIME at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_has_pragma_detect_mismatch::test()) + { + std::cerr << "Failed test for BOOST_HAS_PRAGMA_DETECT_MISMATCH at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_has_dirent_h::test()) { std::cerr << "Failed test for BOOST_HAS_DIRENT_H at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/has_detect_mismatch_fail.cpp b/test/has_detect_mismatch_fail.cpp new file mode 100644 index 00000000..5a544b13 --- /dev/null +++ b/test/has_detect_mismatch_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Wed Apr 18 20:03:40 2018 +// 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_HAS_PRAGMA_DETECT_MISMATCH +// This file should not compile, if it does then +// BOOST_HAS_PRAGMA_DETECT_MISMATCH should be defined. +// See file boost_has_detect_mismatch.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_HAS_PRAGMA_DETECT_MISMATCH +#include "boost_has_detect_mismatch.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_has_pragma_detect_mismatch::test(); +} + diff --git a/test/has_detect_mismatch_pass.cpp b/test/has_detect_mismatch_pass.cpp new file mode 100644 index 00000000..ea47fb88 --- /dev/null +++ b/test/has_detect_mismatch_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Wed Apr 18 20:03:40 2018 +// 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_HAS_PRAGMA_DETECT_MISMATCH +// This file should compile, if it does not then +// BOOST_HAS_PRAGMA_DETECT_MISMATCH should not be defined. +// See file boost_has_detect_mismatch.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_HAS_PRAGMA_DETECT_MISMATCH +#include "boost_has_detect_mismatch.ipp" +#else +namespace boost_has_pragma_detect_mismatch = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_has_pragma_detect_mismatch::test(); +} + From a97d5f32d4ed7568994c8d1801e0a498a74365eb Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 19 Apr 2018 09:12:18 +0100 Subject: [PATCH 47/51] Previous fix broke some tests, second try at warning suppression. --- test/boost_has_part_alloc.ipp | 4 ++-- test/boost_no_std_allocator.ipp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/boost_has_part_alloc.ipp b/test/boost_has_part_alloc.ipp index ea31dd94..fac5fed4 100644 --- a/test/boost_has_part_alloc.ipp +++ b/test/boost_has_part_alloc.ipp @@ -25,7 +25,7 @@ namespace boost_has_partial_std_allocator{ // template -int test_allocator(const T&) +int test_allocator(const T& i) { typedef std::allocator alloc1_t; #if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700))) @@ -38,7 +38,7 @@ int test_allocator(const T&) typedef typename alloc1_t::value_type value_type BOOST_UNUSED_ATTRIBUTE; #endif alloc1_t a1; - + (void)i; #if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700))) pointer p = a1.allocate(1); const_pointer cp = p; diff --git a/test/boost_no_std_allocator.ipp b/test/boost_no_std_allocator.ipp index c3868dd8..920bf1de 100644 --- a/test/boost_no_std_allocator.ipp +++ b/test/boost_no_std_allocator.ipp @@ -25,7 +25,7 @@ namespace boost_no_std_allocator{ #endif template -int test_allocator(const T&) +int test_allocator(const T& i) { typedef std::allocator alloc1_t; #if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700))) @@ -41,6 +41,7 @@ int test_allocator(const T&) alloc1_t a1; alloc1_t a2(a1); + (void)i; #if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700))) // stuff deprecated in C++17: typedef typename alloc1_t::BOOST_NESTED_TEMPLATE rebind binder_t; From c80a3088a0c16d4517fb3b30598c1c68a1004d0b Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 19 Apr 2018 18:25:38 +0100 Subject: [PATCH 48/51] #pragma detect_mismatch should be at global scope. [CI SKIP] --- test/boost_has_detect_mismatch.ipp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/boost_has_detect_mismatch.ipp b/test/boost_has_detect_mismatch.ipp index 3f29fcd3..6430dd46 100644 --- a/test/boost_has_detect_mismatch.ipp +++ b/test/boost_has_detect_mismatch.ipp @@ -14,9 +14,10 @@ namespace boost_has_pragma_detect_mismatch { +# pragma detect_mismatch("Boost_Config", "1") + int test() { -# pragma detect_mismatch("Boost_Config", "1") return 0; } From eb68e4725a1d64860aa945a6ba32f4876bb2e611 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 28 Apr 2018 20:32:16 +0300 Subject: [PATCH 49/51] Add parentheses to BOOST_CUDA_VERSION Expressions like `BOOST_CUDA_VERSION / 1000000` don't work correctly; add parentheses around the expression to fix. --- include/boost/config/compiler/nvcc.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp index f21b9b54..64909409 100644 --- a/include/boost/config/compiler/nvcc.hpp +++ b/include/boost/config/compiler/nvcc.hpp @@ -12,7 +12,7 @@ #endif #if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__) -# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__ +# define BOOST_CUDA_VERSION (__CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__) #else // We don't really know what the CUDA version is, but it's definitely before 7.5: # define BOOST_CUDA_VERSION 7000000 From 47bc9827be2093bfdd4509dfdae19a256b59d62a Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 28 Jun 2018 18:05:33 +0100 Subject: [PATCH 50/51] Tentatively add support for gcc-8 CI testing. --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0bb59050..ff0257a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,6 +108,15 @@ matrix: sources: - ubuntu-toolchain-r-test + - os: linux + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17 + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + - os: linux env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11 From 9fd87d6d7d7d0966f03d28ddb27149e193328748 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 9 Jul 2018 17:54:42 +0100 Subject: [PATCH 51/51] CUDA 9 does support constexpr for msvc. --- include/boost/config/compiler/nvcc.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp index 64909409..ed035fcf 100644 --- a/include/boost/config/compiler/nvcc.hpp +++ b/include/boost/config/compiler/nvcc.hpp @@ -33,8 +33,8 @@ #if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000) # define BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif -// Most recent CUDA (8.0) has no constexpr support in msvc mode: -#if defined(_MSC_VER) +// CUDA (8.0) has no constexpr support in msvc mode: +#if defined(_MSC_VER) && (BOOST_CUDA_VERSION < 9000000) # define BOOST_NO_CXX11_CONSTEXPR #endif