From da9f4d062b9b9edc775279388f6bbe02dbf66265 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 23 Dec 2017 01:52:52 +0200 Subject: [PATCH 01/20] Add BOOST_HEADER_DEPRECATED --- doc/html/boost_config/acknowledgements.html | 2 +- .../boost_config/boost_macro_reference.html | 41 ++++++++++++++++--- 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 | 16 +++++++- include/boost/config/header_deprecated.hpp | 26 ++++++++++++ test/Jamfile.v2 | 1 + test/header_deprecated_test.cpp | 18 ++++++++ 11 files changed, 109 insertions(+), 19 deletions(-) create mode 100644 include/boost/config/header_deprecated.hpp create mode 100644 test/header_deprecated_test.cpp diff --git a/doc/html/boost_config/acknowledgements.html b/doc/html/boost_config/acknowledgements.html index 8281d052..e3cd5555 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 bc8efb2d..caa4e5c9 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 @@

Boost Macro Reference

-
+
-
+ - -
-
+
- +

Last revised: December 12, 2017 at 18:14:39 GMT

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


diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index e89f6555..9426531f 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -1282,7 +1282,21 @@ Usage example: ]] [[`BOOST_PRAGMA_MESSAGE(M)`][Defined in header ``, this macro expands to the equivalent of `#pragma message(M)`. `M` must be a string -literal. Example: `BOOST_PRAGMA_MESSAGE("This header is deprecated.")`.]] +literal. + +Example: `BOOST_PRAGMA_MESSAGE("This header is deprecated.")` + +The messages issued by `BOOST_PRAGMA_MESSAGE` can be suppressed by defining the macro +`BOOST_DISABLE_PRAGMA_MESSAGE`.]] + +[[`BOOST_HEADER_DEPRECATED(A)`][Defined in header ``, +this macro issues the message "This header is deprecated. Use `A` instead." via +`BOOST_PRAGMA_MESSAGE`. `A` must be a string literal. + +Example: `BOOST_HEADER_DEPRECATED("")` + +The messages issued by `BOOST_HEADER_DEPRECATED` can be suppressed by defining the macro +`BOOST_ALLOW_DEPRECATED_HEADERS`.]] ] [endsect] diff --git a/include/boost/config/header_deprecated.hpp b/include/boost/config/header_deprecated.hpp new file mode 100644 index 00000000..864554f2 --- /dev/null +++ b/include/boost/config/header_deprecated.hpp @@ -0,0 +1,26 @@ +#ifndef BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED +#define BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED + +// Copyright 2017 Peter Dimov. +// +// Distributed under 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 +// +// BOOST_HEADER_DEPRECATED("") +// +// Expands to the equivalent of +// BOOST_PRAGMA_MESSAGE("This header is deprecated. Use instead.") +// +// Note that this header is C compatible. + +#include + +#if defined(BOOST_ALLOW_DEPRECATED_HEADERS) +# define BOOST_HEADER_DEPRECATED(a) +#else +# define BOOST_HEADER_DEPRECATED(a) BOOST_PRAGMA_MESSAGE("This header is deprecated. Use " a " instead.") +#endif + +#endif // BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9f1e4ea4..ee6ecadb 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -105,6 +105,7 @@ test-suite config [ run config_build_check.cpp : : : [ requires int128 cxx11_constexpr cxx11_user_defined_literals ] ] [ run helper_macros_test.cpp ] [ compile pragma_message_test.cpp ] + [ compile header_deprecated_test.cpp ] ; obj has_clang_implicit_fallthrough : cmd_line_check.cpp : diff --git a/test/header_deprecated_test.cpp b/test/header_deprecated_test.cpp new file mode 100644 index 00000000..6a99a97d --- /dev/null +++ b/test/header_deprecated_test.cpp @@ -0,0 +1,18 @@ +// Copyright 2017 Peter Dimov. +// +// Distributed under 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 + +#include + +BOOST_HEADER_DEPRECATED("") + +#define ALTERNATIVE "the suitable component header" +BOOST_HEADER_DEPRECATED(ALTERNATIVE) + +#include // BOOST_STRINGIZE + +#define HEADER +BOOST_HEADER_DEPRECATED(BOOST_STRINGIZE(HEADER)) From 3ec5a2b573e8ea8175d786e1c10f91773d1fb473 Mon Sep 17 00:00:00 2001 From: akrzemi1 Date: Thu, 4 Jan 2018 00:58:32 +0100 Subject: [PATCH 02/20] Added macro BOOST_NO_CXX11_DEFAULTED_MOVES --- checks/Jamfile.v2 | 3 +- checks/test_case.cpp | 7 ++++- doc/macro_reference.qbk | 3 ++ include/boost/config/compiler/borland.hpp | 1 + include/boost/config/compiler/gcc.hpp | 1 + include/boost/config/compiler/visualc.hpp | 1 + include/boost/config/detail/suffix.hpp | 5 +++ test/all/Jamfile.v2 | 5 ++- test/boost_no_cxx11_defaulted_moves.ipp | 25 +++++++++++++++ test/config_info.cpp | 2 ++ test/config_test.cpp | 12 +++++++- test/no_cxx11_defaulted_moves_fail.cpp | 37 +++++++++++++++++++++++ test/no_cxx11_defaulted_moves_pass.cpp | 37 +++++++++++++++++++++++ 13 files changed, 135 insertions(+), 4 deletions(-) create mode 100644 test/boost_no_cxx11_defaulted_moves.ipp create mode 100644 test/no_cxx11_defaulted_moves_fail.cpp create mode 100644 test/no_cxx11_defaulted_moves_pass.cpp diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index 77b7e9d2..8ecfd756 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 Sun Jul 9 16:30:35 2017 +# This file was automatically generated on Wed Jan 03 23:31:31 2018 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -67,6 +67,7 @@ obj cxx11_addressof : test_case.cpp : TEST_BOOST_NO_CXX11_ADDRESSOF ; obj cxx11_alignas : test_case.cpp : TEST_BOOST_NO_CXX11_ALIGNAS ; obj cxx11_allocator : test_case.cpp : TEST_BOOST_NO_CXX11_ALLOCATOR ; obj cxx11_atomic_smart_ptr : test_case.cpp : TEST_BOOST_NO_CXX11_ATOMIC_SMART_PTR ; +obj cxx11_defaulted_moves : test_case.cpp : TEST_BOOST_NO_CXX11_DEFAULTED_MOVES ; obj cxx11_final : test_case.cpp : TEST_BOOST_NO_CXX11_FINAL ; obj cxx11_hdr_array : test_case.cpp : TEST_BOOST_NO_CXX11_HDR_ARRAY ; obj cxx11_hdr_atomic : test_case.cpp : TEST_BOOST_NO_CXX11_HDR_ATOMIC ; diff --git a/checks/test_case.cpp b/checks/test_case.cpp index 05f921f1..13df0b90 100644 --- a/checks/test_case.cpp +++ b/checks/test_case.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Sun Jul 9 16:30:35 2017 +// This file was automatically generated on Wed Jan 03 23:31:31 2018 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -291,6 +291,11 @@ # error "Defect macro BOOST_NO_CXX11_ATOMIC_SMART_PTR is defined." # endif #endif +#ifdef TEST_BOOST_NO_CXX11_DEFAULTED_MOVES +# ifdef BOOST_NO_CXX11_DEFAULTED_MOVES +# error "Defect macro BOOST_NO_CXX11_DEFAULTED_MOVES is defined." +# endif +#endif #ifdef TEST_BOOST_NO_CXX11_FINAL # ifdef BOOST_NO_CXX11_FINAL # error "Defect macro BOOST_NO_CXX11_FINAL is defined." diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index e89f6555..25130914 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -625,6 +625,9 @@ deleted (`= delete`) functions. [[`BOOST_NO_CXX11_DEFAULTED_FUNCTIONS`][The compiler does not support defaulted (`= default`) functions. ]] +[[`BOOST_NO_CXX11_DEFAULTED_MOVES`][The compiler does not support +defaulted move constructor or assignment. Other defaulted functions may still be supported. +]] [[`BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS`][The compiler does not support explicit conversion operators (`explicit operator T()`). ]] diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index fa891def..6190e390 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -174,6 +174,7 @@ #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DEFAULTED_MOVES #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index c67ab818..b0e3a5ec 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -233,6 +233,7 @@ // #if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11) #define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DEFAULTED_MOVES #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 8b40c45b..748d1407 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -167,6 +167,7 @@ // #if (_MSC_FULL_VER < 190023026) # define BOOST_NO_CXX11_NOEXCEPT +# define BOOST_NO_CXX11_DEFAULTED_MOVES # define BOOST_NO_CXX11_REF_QUALIFIERS # define BOOST_NO_CXX11_USER_DEFINED_LITERALS # define BOOST_NO_CXX11_ALIGNAS diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp index 4aeac4c7..137046fb 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -687,6 +687,11 @@ namespace std{ using ::type_info; } # define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS #endif +// Lack of defaulted moves is implied by the lack of either rvalue references or any dafaulted functions +#if !defined(BOOST_NO_CXX11_DEFAULTED_MOVES) && (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)) +# define BOOST_NO_CXX11_DEFAULTED_MOVES +#endif + // Defaulted and deleted function declaration helpers // These macros are intended to be inside a class definition. // BOOST_DEFAULTED_FUNCTION accepts the function declaration and its diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index d8e1636d..8b1f8c16 100644 --- a/test/all/Jamfile.v2 +++ b/test/all/Jamfile.v2 @@ -1,7 +1,7 @@ # # Regression test Jamfile for boost configuration setup. # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Sun Jul 9 16:30:35 2017 +# This file was automatically generated on Wed Jan 03 23:31:31 2018 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -190,6 +190,9 @@ test-suite "BOOST_NO_CXX11_ALLOCATOR" : test-suite "BOOST_NO_CXX11_ATOMIC_SMART_PTR" : [ run ../no_cxx11_atomic_sp_pass.cpp ] [ compile-fail ../no_cxx11_atomic_sp_fail.cpp ] ; +test-suite "BOOST_NO_CXX11_DEFAULTED_MOVES" : +[ run ../no_cxx11_defaulted_moves_pass.cpp ] +[ compile-fail ../no_cxx11_defaulted_moves_fail.cpp ] ; test-suite "BOOST_NO_CXX11_FINAL" : [ run ../no_cxx11_final_pass.cpp ] [ compile-fail ../no_cxx11_final_fail.cpp ] ; diff --git a/test/boost_no_cxx11_defaulted_moves.ipp b/test/boost_no_cxx11_defaulted_moves.ipp new file mode 100644 index 00000000..1e7fd941 --- /dev/null +++ b/test/boost_no_cxx11_defaulted_moves.ipp @@ -0,0 +1,25 @@ +// (C) Copyright Andrzej Krzemienski 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 more information. + +// MACRO: BOOST_NO_CXX11_DEFAULTED_MOVES +// TITLE: C++0x defaulting of move constructor/assignmet unavailable +// DESCRIPTION: The compiler does not support C++0x defaulting of move constructor/assignmet + +namespace boost_no_cxx11_defaulted_moves { + + struct foo { + foo(foo&&) = default; + foo& operator=(foo&&) = default; + }; + + int test() + { + return 0; + } + +} diff --git a/test/config_info.cpp b/test/config_info.cpp index 520aa8bc..363e1e95 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -1068,6 +1068,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_CXX11_DECLTYPE); PRINT_MACRO(BOOST_NO_CXX11_DECLTYPE_N3276); PRINT_MACRO(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS); + PRINT_MACRO(BOOST_NO_CXX11_DEFAULTED_MOVES); PRINT_MACRO(BOOST_NO_CXX11_DELETED_FUNCTIONS); PRINT_MACRO(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS); PRINT_MACRO(BOOST_NO_CXX11_EXTERN_TEMPLATE); @@ -1200,6 +1201,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_VOID_RETURNS); + // END GENERATED BLOCK PRINT_MACRO(BOOST_INTEL); diff --git a/test/config_test.cpp b/test/config_test.cpp index 446fa891..0b3f9a12 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Sun Jul 9 16:30:35 2017 +// This file was automatically generated on Wed Jan 03 23:31:31 2018 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -122,6 +122,11 @@ namespace boost_no_cxx11_allocator = empty_boost; #else namespace boost_no_cxx11_atomic_smart_ptr = empty_boost; #endif +#ifndef BOOST_NO_CXX11_DEFAULTED_MOVES +#include "boost_no_cxx11_defaulted_moves.ipp" +#else +namespace boost_no_cxx11_defaulted_moves = empty_boost; +#endif #ifndef BOOST_NO_CXX11_FINAL #include "boost_no_cxx11_final.ipp" #else @@ -1261,6 +1266,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_CXX11_ATOMIC_SMART_PTR at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_cxx11_defaulted_moves::test()) + { + std::cerr << "Failed test for BOOST_NO_CXX11_DEFAULTED_MOVES at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_no_cxx11_final::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_FINAL at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/no_cxx11_defaulted_moves_fail.cpp b/test/no_cxx11_defaulted_moves_fail.cpp new file mode 100644 index 00000000..78290126 --- /dev/null +++ b/test/no_cxx11_defaulted_moves_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Wed Jan 03 23:31:30 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_CXX11_DEFAULTED_MOVES +// This file should not compile, if it does then +// BOOST_NO_CXX11_DEFAULTED_MOVES should not be defined. +// See file boost_no_cxx11_defaulted_moves.ipp for details + +// Must not have BOOST_ASSERT_CONFIG set; it defeats +// the objective of this file: +#ifdef BOOST_ASSERT_CONFIG +# undef BOOST_ASSERT_CONFIG +#endif + +#include +#include "test.hpp" + +#ifdef BOOST_NO_CXX11_DEFAULTED_MOVES +#include "boost_no_cxx11_defaulted_moves.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx11_defaulted_moves::test(); +} + diff --git a/test/no_cxx11_defaulted_moves_pass.cpp b/test/no_cxx11_defaulted_moves_pass.cpp new file mode 100644 index 00000000..bf26c144 --- /dev/null +++ b/test/no_cxx11_defaulted_moves_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Wed Jan 03 23:31:30 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_CXX11_DEFAULTED_MOVES +// This file should compile, if it does not then +// BOOST_NO_CXX11_DEFAULTED_MOVES should be defined. +// See file boost_no_cxx11_defaulted_moves.ipp for details + +// Must not have BOOST_ASSERT_CONFIG set; it defeats +// the objective of this file: +#ifdef BOOST_ASSERT_CONFIG +# undef BOOST_ASSERT_CONFIG +#endif + +#include +#include "test.hpp" + +#ifndef BOOST_NO_CXX11_DEFAULTED_MOVES +#include "boost_no_cxx11_defaulted_moves.ipp" +#else +namespace boost_no_cxx11_defaulted_moves = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx11_defaulted_moves::test(); +} + From 95fe1c03ac17f1e34a9309c0abc2d9c2b017f38d Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 10 Jan 2018 15:27:31 +0000 Subject: [PATCH 03/20] Update deprecated macros --- include/boost/cxx11_char_types.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/cxx11_char_types.hpp b/include/boost/cxx11_char_types.hpp index eab46a46..71b9b70d 100644 --- a/include/boost/cxx11_char_types.hpp +++ b/include/boost/cxx11_char_types.hpp @@ -49,7 +49,7 @@ namespace boost { -# if defined(BOOST_NO_CHAR16_T) && (!defined(_MSC_VER) || _MSC_VER < 1600) // 1600 == VC++10 +# if defined(BOOST_NO_CXX11_CHAR16_T) && (!defined(_MSC_VER) || _MSC_VER < 1600) // 1600 == VC++10 typedef boost::uint_least16_t char16; typedef std::basic_string u16string; # else @@ -57,7 +57,7 @@ namespace boost typedef std::u16string u16string; # endif -# if defined(BOOST_NO_CHAR32_T) && (!defined(_MSC_VER) || _MSC_VER < 1600) // 1600 == VC++10 +# if defined(BOOST_NO_CXX11_CHAR32_T) && (!defined(_MSC_VER) || _MSC_VER < 1600) // 1600 == VC++10 typedef boost::uint_least32_t char32; typedef std::basic_string u32string; # else From 0d0211e4d5d97236be4e04145b2d8d9be1920046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Krzemie=C5=84ski?= Date: Thu, 11 Jan 2018 21:21:20 +0100 Subject: [PATCH 04/20] comment typeo fix --- include/boost/config/detail/suffix.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp index 137046fb..22d31f68 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -687,7 +687,7 @@ namespace std{ using ::type_info; } # define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS #endif -// Lack of defaulted moves is implied by the lack of either rvalue references or any dafaulted functions +// Lack of defaulted moves is implied by the lack of either rvalue references or any defaulted functions #if !defined(BOOST_NO_CXX11_DEFAULTED_MOVES) && (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)) # define BOOST_NO_CXX11_DEFAULTED_MOVES #endif From cb2b706bf29a248ae7fb67732d3ee4e5da1815e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Krzemie=C5=84ski?= Date: Thu, 11 Jan 2018 21:22:59 +0100 Subject: [PATCH 05/20] comment/whitespace fixes --- test/boost_no_cxx11_defaulted_moves.ipp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/boost_no_cxx11_defaulted_moves.ipp b/test/boost_no_cxx11_defaulted_moves.ipp index 1e7fd941..9bf27633 100644 --- a/test/boost_no_cxx11_defaulted_moves.ipp +++ b/test/boost_no_cxx11_defaulted_moves.ipp @@ -7,14 +7,14 @@ // See http://www.boost.org/libs/config for more information. // MACRO: BOOST_NO_CXX11_DEFAULTED_MOVES -// TITLE: C++0x defaulting of move constructor/assignmet unavailable -// DESCRIPTION: The compiler does not support C++0x defaulting of move constructor/assignmet +// TITLE: C++0x defaulting of move constructor/assignment unavailable +// DESCRIPTION: The compiler does not support C++0x defaulting of move constructor/assignment namespace boost_no_cxx11_defaulted_moves { struct foo { foo(foo&&) = default; - foo& operator=(foo&&) = default; + foo& operator=(foo&&) = default; }; int test() From 0ac815ed2158a9fc9c44c815af717b01c6ea72a7 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 16 Jan 2018 19:01:36 +0200 Subject: [PATCH 06/20] Add clang++-libc++, g++ 4.4, g++ 4.6 to Travis --- .travis.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2668f56d..0bb59050 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# Copyright 2016, 2017 Peter Dimov +# Copyright 2016, 2017, 2018 Peter Dimov # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) @@ -25,6 +25,26 @@ matrix: - os: linux env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11 + - os: linux + compiler: g++-4.4 + env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x + addons: + apt: + packages: + - g++-4.4 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-4.6 + env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x + addons: + apt: + packages: + - g++-4.6 + sources: + - ubuntu-toolchain-r-test + - os: linux env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 addons: @@ -163,6 +183,14 @@ matrix: - ubuntu-toolchain-r-test - llvm-toolchain-trusty-5.0 + - os: linux + compiler: clang++-libc++ + env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z + addons: + apt: + packages: + - libc++-dev + - os: osx env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z osx_image: xcode9.1 From 3143e185c600553da8b9312c49449d36f4e34b5c Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 17 Jan 2018 19:27:38 +0200 Subject: [PATCH 07/20] Disable config_test_no_rtti on g++ 4.4 -std=c++0x --- test/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9f1e4ea4..efde04f0 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -59,6 +59,7 @@ test-suite config : #input-files : #requirements off + gcc-4.4,0x:no # does not compile with -fno-rtti [ check-target-builds has_atomic_lib : atomic ] [ check-target-builds has_pthread_lib : pthread ] [ check-target-builds has_rt_lib : rt ] From 2617671fd26dbfa13c059e2df18b658cb289c2e8 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 18 Jan 2018 00:47:00 +0200 Subject: [PATCH 08/20] Use full g++ 4.4 version (4.4.7) --- test/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index efde04f0..faddf7d2 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -59,7 +59,7 @@ test-suite config : #input-files : #requirements off - gcc-4.4,0x:no # does not compile with -fno-rtti + gcc-4.4.7,0x:no # does not compile with -fno-rtti [ check-target-builds has_atomic_lib : atomic ] [ check-target-builds has_pthread_lib : pthread ] [ check-target-builds has_rt_lib : rt ] From 9d3cef6dba2a199ba45f579d9c84c298e85c327c Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 18 Jan 2018 21:45:06 +0200 Subject: [PATCH 09/20] Define BOOST_NO_CXX11_THREAD_LOCAL for libc++ on Linux --- include/boost/config/stdlib/libcpp.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index 3d3f4ae4..1e77dca3 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -113,6 +113,13 @@ # define BOOST_NO_CXX11_THREAD_LOCAL #endif +#if defined(__linux__) && !defined(BOOST_NO_CXX11_THREAD_LOCAL) +// After libc++-dev is installed on Trusty, clang++-libc++ almost works, +// except uses of `thread_local` fail with undefined reference to +// `__cxa_thread_atexit`. +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif + #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX From 2ec8f0fc738be251cc8ce9a0700fbc4027f08ac9 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 19 Jan 2018 05:01:39 +0200 Subject: [PATCH 10/20] Add file/line to BOOST_PRAGMA_MESSAGE on Intel C++ --- include/boost/config/pragma_message.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/config/pragma_message.hpp b/include/boost/config/pragma_message.hpp index d213f63c..b2c5ff2e 100644 --- a/include/boost/config/pragma_message.hpp +++ b/include/boost/config/pragma_message.hpp @@ -18,6 +18,8 @@ #if defined(BOOST_DISABLE_PRAGMA_MESSAGE) # define BOOST_PRAGMA_MESSAGE(x) +#elif defined(__INTEL_COMPILER) +# define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x)) #elif defined(__GNUC__) # define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x))) #elif defined(_MSC_VER) From d0b3e9d59e79016d3650a3a4b304121e5b80e229 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 28 Jan 2018 18:37:04 +0000 Subject: [PATCH 11/20] Config: Fix up cygwin support as follows: * Define BOOST_HAS_STDINT_H in more situations. * Disable BOOST_NO_CXX14_HDR_SHARED_MUTEX in -std=c++XX mode as the std header doesn't compile (cygwin bug). * Add more tests to CI. --- appveyor.yml | 16 ++++++++++------ include/boost/config/platform/cygwin.hpp | 11 +++++++++++ include/boost/cstdint.hpp | 2 +- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c41150ee..3278fd66 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,14 +30,18 @@ environment: - ARGS: --toolset=msvc-12.0 address-model=64 - ARGS: --toolset=msvc-14.0 address-model=64 - ARGS: --toolset=msvc-14.0 address-model=64 cxxflags=-std:c++latest - - ARGS: --toolset=gcc address-model=64 + - ARGS: --toolset=gcc address-model=64 cxxstd=03,11,14,1z PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z - PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=32 - PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH% - - ARGS: --toolset=gcc address-model=32 linkflags=-Wl,-allow-multiple-definition + - ARGS: --toolset=gcc address-model=64 cxxstd=03,11,14,1z + PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw64\bin;%PATH% + - ARGS: --toolset=gcc address-model=64 cxxstd=03,11,14,1z + PATH: C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% + - ARGS: --toolset=gcc address-model=32 linkflags=-Wl,-allow-multiple-definition cxxstd=03,11,14,1z PATH: C:\MinGW\bin;%PATH% + - ARGS: --toolset=gcc address-model=64 cxxstd=03,11,14,1z + PATH: C:\cygwin64\bin;%PATH% + - ARGS: --toolset=gcc address-model=32 cxxstd=03,11,14,1z + PATH: C:\cygwin\bin;%PATH% install: - cd .. diff --git a/include/boost/config/platform/cygwin.hpp b/include/boost/config/platform/cygwin.hpp index 8ecc4a4a..6dd7e57c 100644 --- a/include/boost/config/platform/cygwin.hpp +++ b/include/boost/config/platform/cygwin.hpp @@ -38,10 +38,21 @@ #ifdef _STDINT_H #define BOOST_HAS_STDINT_H #endif +#if __GNUC__ > 5 && !defined(BOOST_HAS_STDINT_H) +# define BOOST_HAS_STDINT_H +#endif /// Cygwin has no fenv.h #define BOOST_NO_FENV_H +// Cygwin has it's own which breaks unless the correct compiler flags are used: +#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX +#include +#if !(__XSI_VISIBLE >= 500 || __POSIX_VISIBLE >= 200112) +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#endif + // boilerplate code: #include diff --git a/include/boost/cstdint.hpp b/include/boost/cstdint.hpp index 5e1411a5..0b169132 100644 --- a/include/boost/cstdint.hpp +++ b/include/boost/cstdint.hpp @@ -60,7 +60,7 @@ # include // There is a bug in Cygwin two _C macros -# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__) +# if defined(INTMAX_C) && defined(__CYGWIN__) # undef INTMAX_C # undef UINTMAX_C # define INTMAX_C(c) c##LL From 5ac217aa3ff37d02edb47b337d9fe99c6fe725e3 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 28 Jan 2018 19:07:22 +0000 Subject: [PATCH 12/20] Config: correct appveyor.yml multi-config builds. --- appveyor.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3278fd66..a11abfd9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,17 +30,23 @@ environment: - ARGS: --toolset=msvc-12.0 address-model=64 - ARGS: --toolset=msvc-14.0 address-model=64 - ARGS: --toolset=msvc-14.0 address-model=64 cxxflags=-std:c++latest - - ARGS: --toolset=gcc address-model=64 cxxstd=03,11,14,1z + - ARGS: --toolset=gcc address-model=64 + CXXSTD: 03,11,14,1z PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 cxxstd=03,11,14,1z + - ARGS: --toolset=gcc address-model=64 + CXXSTD: 03,11,14,1z PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 cxxstd=03,11,14,1z + - ARGS: --toolset=gcc address-model=64 + CXXSTD: 03,11,14,1z PATH: C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=32 linkflags=-Wl,-allow-multiple-definition cxxstd=03,11,14,1z + - ARGS: --toolset=gcc address-model=32 linkflags=-Wl,-allow-multiple-definition + CXXSTD: 03,11,14,1z PATH: C:\MinGW\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 cxxstd=03,11,14,1z + - ARGS: --toolset=gcc address-model=64 + CXXSTD: 03,11,14,1z PATH: C:\cygwin64\bin;%PATH% - - ARGS: --toolset=gcc address-model=32 cxxstd=03,11,14,1z + - ARGS: --toolset=gcc address-model=32 + CXXSTD: 03,11,14,1z PATH: C:\cygwin\bin;%PATH% install: @@ -60,6 +66,6 @@ build: off test_script: - cd libs\config\test - - ..\..\..\b2 config_info_travis_install %ARGS% + - FOR %A in (%CXXSTD%) DO ..\..\..\b2 config_info_travis_install %ARGS% cxxstd=%A - config_info_travis - - ..\..\..\b2 -j3 %ARGS% + - ..\..\..\b2 -j3 %ARGS% cxxstd=%CXXSTD% From 81b7dfb7282e90d2274ed976cc738c0e9418de44 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 28 Jan 2018 19:23:20 +0000 Subject: [PATCH 13/20] Appveyor: try again with FOR loop. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a11abfd9..59bc5d05 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -66,6 +66,6 @@ build: off test_script: - cd libs\config\test - - FOR %A in (%CXXSTD%) DO ..\..\..\b2 config_info_travis_install %ARGS% cxxstd=%A + - FOR %%A in (%CXXSTD%) DO ..\..\..\b2 config_info_travis_install %ARGS% cxxstd=%%A - config_info_travis - ..\..\..\b2 -j3 %ARGS% cxxstd=%CXXSTD% From 8e14096bf3d26fbbafa00a4ec0e22ce21fa9dffe Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 28 Jan 2018 19:31:25 +0000 Subject: [PATCH 14/20] appveyor: yet another try at command for loop. --- appveyor.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 59bc5d05..17a564ff 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -66,6 +66,8 @@ build: off test_script: - cd libs\config\test - - FOR %%A in (%CXXSTD%) DO ..\..\..\b2 config_info_travis_install %ARGS% cxxstd=%%A + - echo "FOR %%A in (%CXXSTD%) DO ..\..\..\b2 config_info_travis_install %ARGS% cxxstd=%%A" > info.bat + - type info.bat + - info.bat - config_info_travis - ..\..\..\b2 -j3 %ARGS% cxxstd=%CXXSTD% From d566c119a757470710a41b5b12ed7d2b11ac59b5 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 28 Jan 2018 19:37:10 +0000 Subject: [PATCH 15/20] Appveyor: yet another command line escaping attempt... --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 17a564ff..c7afac16 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -66,7 +66,7 @@ build: off test_script: - cd libs\config\test - - echo "FOR %%A in (%CXXSTD%) DO ..\..\..\b2 config_info_travis_install %ARGS% cxxstd=%%A" > info.bat + - echo "FOR ^%^%A in (^%CXXSTD^%) DO ..\..\..\b2 config_info_travis_install ^%ARGS^% cxxstd=^%^%A" > info.bat - type info.bat - info.bat - config_info_travis From bc99a449c161ca3f1446c9b11aac1e32a967e84c Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 28 Jan 2018 19:40:28 +0000 Subject: [PATCH 16/20] Appveyor: give up trying to loop through cxxstd options for now... --- appveyor.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c7afac16..03fb2edf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -66,8 +66,6 @@ build: off test_script: - cd libs\config\test - - echo "FOR ^%^%A in (^%CXXSTD^%) DO ..\..\..\b2 config_info_travis_install ^%ARGS^% cxxstd=^%^%A" > info.bat - - type info.bat - - info.bat + - ..\..\..\b2 config_info_travis_install %ARGS^ - config_info_travis - ..\..\..\b2 -j3 %ARGS% cxxstd=%CXXSTD% From 2de7d27bfdc83b3556ec604eddb6bf3e0d7ed69d Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 28 Jan 2018 19:43:33 +0000 Subject: [PATCH 17/20] Appveyor: correct ^ typo. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 03fb2edf..4c30127d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -66,6 +66,6 @@ build: off test_script: - cd libs\config\test - - ..\..\..\b2 config_info_travis_install %ARGS^ + - ..\..\..\b2 config_info_travis_install %ARGS% - config_info_travis - ..\..\..\b2 -j3 %ARGS% cxxstd=%CXXSTD% From 29dbea1b5afb4badd9b904fbfb4fd9b84d46c3ca Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 30 Jan 2018 09:17:01 +0000 Subject: [PATCH 18/20] Appveyor: yet another attempt to print config_info for each build config. --- appveyor.bat | 6 ++++++ appveyor.yml | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 appveyor.bat diff --git a/appveyor.bat b/appveyor.bat new file mode 100644 index 00000000..63196d15 --- /dev/null +++ b/appveyor.bat @@ -0,0 +1,6 @@ +IF NOT DEFINED CXXSTD (..\..\..\b2 config_info_travis_install "%ARGS%") +IF DEFINED CXXSTD FOR %%A IN (%CXXSTD%) DO ( +..\..\..\b2 -a -d2 config_info_travis_install %ARGS% cxxstd=%%A +config_info_travis +del config_info_travis.exe +) \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 4c30127d..7d04c714 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -33,9 +33,6 @@ environment: - ARGS: --toolset=gcc address-model=64 CXXSTD: 03,11,14,1z PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 - CXXSTD: 03,11,14,1z - PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw64\bin;%PATH% - ARGS: --toolset=gcc address-model=64 CXXSTD: 03,11,14,1z PATH: C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% @@ -66,6 +63,5 @@ build: off test_script: - cd libs\config\test - - ..\..\..\b2 config_info_travis_install %ARGS% - - config_info_travis + - ..\appveyor.bat - ..\..\..\b2 -j3 %ARGS% cxxstd=%CXXSTD% From 0275380f326d3cda038d05437c794ae98318ac82 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 30 Jan 2018 17:58:24 +0000 Subject: [PATCH 19/20] Appveyor: try to fix quoting in batch script. --- appveyor.bat | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/appveyor.bat b/appveyor.bat index 63196d15..fb6d5279 100644 --- a/appveyor.bat +++ b/appveyor.bat @@ -1,6 +1,12 @@ -IF NOT DEFINED CXXSTD (..\..\..\b2 config_info_travis_install "%ARGS%") +IF NOT DEFINED CXXSTD ( +ECHO %ARGS:"=% +..\..\..\b2 config_info_travis_install %ARGS:"=% +config_info_travis +del config_info_travis.exe +) IF DEFINED CXXSTD FOR %%A IN (%CXXSTD%) DO ( -..\..\..\b2 -a -d2 config_info_travis_install %ARGS% cxxstd=%%A +ECHO %ARGS:"=% +..\..\..\b2 -a -d2 config_info_travis_install %ARGS:"=% cxxstd=%%A config_info_travis del config_info_travis.exe ) \ No newline at end of file From db4ebfca6fdfb3364b5ff980e85e7c0818429897 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Fri, 9 Feb 2018 07:58:30 -0500 Subject: [PATCH 20/20] Variable templates are somewhat unusable in GCC 5.1 (bug 65719) --- include/boost/config/compiler/gcc.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index b0e3a5ec..8296520a 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -285,7 +285,7 @@ #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +#if (BOOST_GCC_VERSION < 50200) || !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif