From 776bc8ac107e864fc4c51d6aee0e532026a50281 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Tue, 11 Aug 2015 10:05:33 +0200 Subject: [PATCH 01/16] Update for MSVC14's _HAS_AUTO_PTR_ETC If _HAS_AUTO_PTR_ETC is defined to 0, MSVC14's standard library implements C++17's N4190, thus removing std::auto_ptr. --- include/boost/config/stdlib/dinkumware.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 90c45c6c..af8ddda5 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -172,10 +172,19 @@ // Bug specific to VC14, // See https://connect.microsoft.com/VisualStudio/feedback/details/1348277/link-error-when-using-std-codecvt-utf8-utf16-char16-t // and discussion here: http://blogs.msdn.com/b/vcblog/archive/2014/11/12/visual-studio-2015-preview-now-available.aspx?PageIndex=2 -#if _CPPLIB_VER == 650 +#if defined(_CPPLIB_VER) && (_CPPLIB_VER == 650) # define BOOST_NO_CXX11_HDR_CODECVT #endif +#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 650) +// If _HAS_AUTO_PTR_ETC is defined to 0, std::auto_ptr is not available. +// See https://www.visualstudio.com/en-us/news/vs2015-vs.aspx#C++ +// and http://blogs.msdn.com/b/vcblog/archive/2015/06/19/c-11-14-17-features-in-vs-2015-rtm.aspx +# if defined(_HAS_AUTO_PTR_ETC) && (_HAS_AUTO_PTR_ETC == 0) +# define BOOST_NO_AUTO_PTR +# endif +#endif + #ifdef _CPPLIB_VER # define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER #else From a8f96e4b6e2c06c023889d798ab25dc7f39a3fb1 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 12 Aug 2015 19:47:56 +0100 Subject: [PATCH 02/16] Intel should not set GCC and MSVC specific macros. --- include/boost/config/compiler/intel.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/config/compiler/intel.hpp b/include/boost/config/compiler/intel.hpp index ecfacc5e..7789b944 100644 --- a/include/boost/config/compiler/intel.hpp +++ b/include/boost/config/compiler/intel.hpp @@ -20,6 +20,9 @@ #include +#undef BOOST_MSVC +#undef BOOST_MSVC_FULL_VER + #if (__INTEL_COMPILER >= 1500) && (_MSC_VER >= 1900) // // These appear to be supported, even though VC++ may not support them: @@ -36,6 +39,9 @@ #include +#undef BOOST_GCC_VERSION +#undef BOOST_GCC_CXX11 + #endif #undef BOOST_COMPILER From 15fa6fd8b9af7dbd415b9dcfc50fb9494c4bdba6 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 13 Aug 2015 17:13:32 +0100 Subject: [PATCH 03/16] Add BOOST_HAS_FLOAT128 for compilers that support __float128 as a distinct type. --- checks/Jamfile.v2 | 5 ++++- checks/test_case.cpp | 6 +++++- .../boost_config/boost_macro_reference.html | 19 +++++++++++++++++++ doc/html/index.html | 2 +- doc/macro_reference.qbk | 3 +++ include/boost/config/compiler/gcc.hpp | 13 +++++++++++++ test/all/Jamfile.v2 | 5 ++++- test/config_info.cpp | 2 ++ test/config_test.cpp | 12 +++++++++++- 9 files changed, 62 insertions(+), 5 deletions(-) diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index 21b55d6b..3ae69ce9 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 Fri Jun 26 21:48:00 2015 +# This file was automatically generated on Thu Aug 13 16:32:12 2015 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -41,6 +41,9 @@ explicit dirent_h ; run-simple test_case.cpp : : : TEST_BOOST_HAS_EXPM1 : expm1 ; alias expm1 : expm1.output ; explicit expm1 ; +run-simple test_case.cpp : : : TEST_BOOST_HAS_FLOAT128 : float128 ; +alias float128 : float128.output ; +explicit float128 ; run-simple test_case.cpp : : : TEST_BOOST_HAS_FTIME : ftime ; alias ftime : ftime.output ; explicit ftime ; diff --git a/checks/test_case.cpp b/checks/test_case.cpp index 9eaf99a1..6193e82d 100644 --- a/checks/test_case.cpp +++ b/checks/test_case.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Jun 26 21:48:00 2015 +// This file was automatically generated on Thu Aug 13 16:32:12 2015 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -29,6 +29,10 @@ namespace test = boost_has_dirent_h; # include "../test/boost_has_expm1.ipp" namespace test = boost_has_expm1; #endif +#ifdef TEST_BOOST_HAS_FLOAT128 +# include "../test/boost_has_float128.ipp" +namespace test = boost_has_float128; +#endif #ifdef TEST_BOOST_HAS_FTIME # include "../test/boost_has_ftime.ipp" namespace test = boost_has_ftime; diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index 3138e4fb..acda8ff0 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -1427,6 +1427,25 @@ + +

+ BOOST_HAS_FLOAT128 +

+ + +

+ Compiler +

+ + +

+ The compiler has __float128 + as a native type which is distinct from all the regular C++ floating + point types. +

+ + +

BOOST_HAS_FTIME diff --git a/doc/html/index.html b/doc/html/index.html index faecedf4..b1e51ae0 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -988,7 +988,7 @@ - +

Last revised: July 07, 2015 at 10:18:34 GMT

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


diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index d1e03d59..0973c365 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -348,6 +348,9 @@ The platform has the POSIX header ``. [[`BOOST_HAS_EXPM1`][Platform][ The platform has the functions `expm1`, `expm1f` and `expm1l` in `` ]] +[[`BOOST_HAS_FLOAT128`][Compiler][ +The compiler has `__float128` as a native type which is distinct +from all the regular C++ floating point types.]] [[`BOOST_HAS_FTIME`][Platform][ The platform has the Win32 API type FTIME. ]] diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 41705df0..07147ee0 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -143,6 +143,19 @@ #if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) # define BOOST_HAS_INT128 #endif +// +// Recent GCC versions have a __float128 native type, we need to +// include a std lib header to detect this - not ideal, but we'll +// be including later anyway when we select the std lib. +// +#ifdef __cplusplus +#include +#else +#include +#endif +#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) +# define BOOST_HAS_FLOAT128 +#endif // C++0x features in 4.3.n and later // diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index 1bca6e6b..9d0b1e09 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 Fri Jun 26 21:48:00 2015 +# This file was automatically generated on Thu Aug 13 16:32:12 2015 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -37,6 +37,9 @@ test-suite "BOOST_HAS_DIRENT_H" : test-suite "BOOST_HAS_EXPM1" : [ run ../has_expm1_pass.cpp ] [ compile-fail ../has_expm1_fail.cpp ] ; +test-suite "BOOST_HAS_FLOAT128" : +[ run ../has_float128_pass.cpp ] +[ compile-fail ../has_float128_fail.cpp ] ; test-suite "BOOST_HAS_FTIME" : [ run ../has_ftime_pass.cpp ] [ compile-fail ../has_ftime_fail.cpp ] ; diff --git a/test/config_info.cpp b/test/config_info.cpp index b466c43c..bb512ac3 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -937,6 +937,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_HAS_CLOCK_GETTIME); PRINT_MACRO(BOOST_HAS_DIRENT_H); PRINT_MACRO(BOOST_HAS_EXPM1); + PRINT_MACRO(BOOST_HAS_FLOAT128); PRINT_MACRO(BOOST_HAS_FTIME); PRINT_MACRO(BOOST_HAS_GETSYSTEMTIMEASFILETIME); PRINT_MACRO(BOOST_HAS_GETTIMEOFDAY); @@ -1125,6 +1126,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 3a3f5ba5..18b3726d 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Jun 26 21:48:00 2015 +// This file was automatically generated on Thu Aug 13 16:32:12 2015 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -753,6 +753,11 @@ namespace boost_has_dirent_h = empty_boost; #else namespace boost_has_expm1 = empty_boost; #endif +#ifdef BOOST_HAS_FLOAT128 +#include "boost_has_float128.ipp" +#else +namespace boost_has_float128 = empty_boost; +#endif #ifdef BOOST_HAS_FTIME #include "boost_has_ftime.ipp" #else @@ -1016,6 +1021,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_HAS_EXPM1 at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_has_float128::test()) + { + std::cerr << "Failed test for BOOST_HAS_FLOAT128 at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_has_ftime::test()) { std::cerr << "Failed test for BOOST_HAS_FTIME at: " << __FILE__ << ":" << __LINE__ << std::endl; From b794a7162b0c5fb8a5e320ce111a8dc815de6461 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 13 Aug 2015 17:52:48 +0100 Subject: [PATCH 04/16] Add float128_type typedef dimilar to int128_type. --- include/boost/config/suffix.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index c0ba3339..91a62acb 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -501,6 +501,16 @@ namespace boost{ # endif } #endif +// same again for __float128: +#if defined(BOOST_HAS_FLOAT128) && defined(__cplusplus) +namespace boost { +# ifdef __GNUC__ + __extension__ typedef __float128 float128_type; +# else + typedef __float128 float128_type; +# endif +} +#endif // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// From 7b9e5f8d6be9334a14befc3623977bb241fdff3f Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 18 Aug 2015 18:09:15 +0100 Subject: [PATCH 05/16] std::shared_ptr is only partly usable on Oracle, disable for now. --- include/boost/config/stdlib/libstdcpp3.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index 7d27b0cc..9718bedc 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -251,6 +251,10 @@ #define BOOST_NO_CXX11_HDR_FUTURE #define BOOST_NO_CXX11_HDR_FORWARD_LIST #define BOOST_NO_CXX11_HDR_ATOMIC +// shared_ptr is present, but is not convertible to bool +// which causes all kinds of problems especially in Boost.Thread +// but probably elsewhere as well. +#define BOOST_NO_CXX11_SMART_PTR #endif #if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) From 034817c492923a05181d5ad745ccaa8578feb1b0 Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Thu, 27 Aug 2015 13:34:22 +0200 Subject: [PATCH 06/16] Use __has_attribute instead of gcc version in clang --- include/boost/config/compiler/clang.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 47ea65b0..c78edb24 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -23,6 +23,10 @@ #define __has_extension __has_feature #endif +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif + #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif @@ -256,9 +260,7 @@ # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif - -// Unused attribute: -#if defined(__GNUC__) && (__GNUC__ >= 4) +#if __has_attribute(unused) # define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) #endif From 00705343486081d9d1a25ccbd60baf6d855a652f Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Thu, 27 Aug 2015 16:23:21 +0200 Subject: [PATCH 07/16] Add basic platform bits for Nuxi CloudABI. Nuxi CloudABI is a POSIX-like runtime environment purely built on the principle of capability-based security[1]. It allows you to run arbitrary untrusted binaries directly on top of a UNIX kernel without compromising system integrity. This change adds a basic platform configuration that defines a small set of options that allow it to build most of the Boost sources. The next step is to send out small fixes to individual libraries that don't build yet. [1] Nuxi CloudABI: https://github.com/NuxiNL/cloudlibc --- include/boost/config/platform/cloudabi.hpp | 18 ++++++++++++++++++ .../boost/config/select_platform_config.hpp | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 include/boost/config/platform/cloudabi.hpp diff --git a/include/boost/config/platform/cloudabi.hpp b/include/boost/config/platform/cloudabi.hpp new file mode 100644 index 00000000..bed7b631 --- /dev/null +++ b/include/boost/config/platform/cloudabi.hpp @@ -0,0 +1,18 @@ +// Copyright Nuxi, https://nuxi.nl/ 2015. +// 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) + +#define BOOST_PLATFORM "CloudABI" + +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_UNISTD_H + +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_LOG1P +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_SCHED_YIELD diff --git a/include/boost/config/select_platform_config.hpp b/include/boost/config/select_platform_config.hpp index acd1409e..62fd818b 100644 --- a/include/boost/config/select_platform_config.hpp +++ b/include/boost/config/select_platform_config.hpp @@ -80,6 +80,10 @@ #elif defined(__VMS) // VMS: # define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" + +#elif defined(__CloudABI__) +// Nuxi CloudABI: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp" #else # if defined(unix) \ From ca012353048cbc84ada93af994f7b86bf5a56b36 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 30 Aug 2015 10:09:44 +0100 Subject: [PATCH 08/16] Add missing files. --- test/boost_has_float128.ipp | 29 +++++++++++++++++++++++++++++ test/has_float128_fail.cpp | 37 +++++++++++++++++++++++++++++++++++++ test/has_float128_pass.cpp | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 test/boost_has_float128.ipp create mode 100644 test/has_float128_fail.cpp create mode 100644 test/has_float128_pass.cpp diff --git a/test/boost_has_float128.ipp b/test/boost_has_float128.ipp new file mode 100644 index 00000000..80b211c1 --- /dev/null +++ b/test/boost_has_float128.ipp @@ -0,0 +1,29 @@ +// (C) Copyright John Maddock 2012. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for most recent version. + +// MACRO: BOOST_HAS_FLOAT128 +// TITLE: __float128 +// DESCRIPTION: The platform supports __float128. + +#include + + +namespace boost_has_float128{ + +int test() +{ +#ifdef __GNUC__ + __extension__ __float128 big_float = 0.0Q; +#else + __float128 big_float = 0.0Q; +#endif + (void)&big_float; + return 0; +} + +} + diff --git a/test/has_float128_fail.cpp b/test/has_float128_fail.cpp new file mode 100644 index 00000000..cbb42b21 --- /dev/null +++ b/test/has_float128_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Aug 13 16:29:35 2015 +// by libs/config/tools/generate.cpp +// Copyright John Maddock 2002-4. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for the most recent version.// +// Revision $Id$ +// + + +// Test file for macro BOOST_HAS_FLOAT128 +// This file should not compile, if it does then +// BOOST_HAS_FLOAT128 should be defined. +// See file boost_has_float128.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_FLOAT128 +#include "boost_has_float128.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_has_float128::test(); +} + diff --git a/test/has_float128_pass.cpp b/test/has_float128_pass.cpp new file mode 100644 index 00000000..fb0a5683 --- /dev/null +++ b/test/has_float128_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Aug 13 16:29:35 2015 +// by libs/config/tools/generate.cpp +// Copyright John Maddock 2002-4. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for the most recent version.// +// Revision $Id$ +// + + +// Test file for macro BOOST_HAS_FLOAT128 +// This file should compile, if it does not then +// BOOST_HAS_FLOAT128 should not be defined. +// See file boost_has_float128.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_FLOAT128 +#include "boost_has_float128.ipp" +#else +namespace boost_has_float128 = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_has_float128::test(); +} + From cdcb3fc1aa910bd68807e17e183df07530722c85 Mon Sep 17 00:00:00 2001 From: morinmorin Date: Thu, 3 Sep 2015 18:32:02 +0900 Subject: [PATCH 09/16] Remove the detection code for 'unused' attribute on Clang. --- include/boost/config/compiler/clang.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index c78edb24..90f747c0 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -260,9 +260,8 @@ # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif -#if __has_attribute(unused) -# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) -#endif +// Clang has supported the 'unused' attribute since the first release. +#define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ From 2656ae42d49eae203c40ed537249a88e62bf96a6 Mon Sep 17 00:00:00 2001 From: morinmorin Date: Thu, 3 Sep 2015 19:02:48 +0900 Subject: [PATCH 10/16] Guard attribute names with double underscores. --- include/boost/config/compiler/clang.hpp | 2 +- include/boost/config/compiler/gcc.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 90f747c0..1ecd85e3 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -261,7 +261,7 @@ #endif // Clang has supported the 'unused' attribute since the first release. -#define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) +#define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 07147ee0..350431d0 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -276,7 +276,7 @@ // // Unused attribute: #if __GNUC__ >= 4 -# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) +# define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) #endif #ifndef BOOST_COMPILER From c99044f49298f461300d3c656d54d92de8608b96 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 5 Sep 2015 21:34:42 +0100 Subject: [PATCH 11/16] Version bump --- 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 7b64aedb..fce02ec7 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 105900 +#define BOOST_VERSION 106000 // // 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_59" +#define BOOST_LIB_VERSION "1_60" #endif From a17884f425f14fbaba88a14410a8332f4ed04e57 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 16 Sep 2015 18:27:48 +0100 Subject: [PATCH 12/16] Add support for __unreachable_return on clang and GCC. See https://svn.boost.org/trac/boost/ticket/11661. --- include/boost/config/compiler/clang.hpp | 5 +++++ include/boost/config/compiler/gcc.hpp | 5 +++++ include/boost/config/suffix.hpp | 10 ++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 47ea65b0..897f9f07 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -255,6 +255,11 @@ // All versions with __cplusplus above this value seem to support this: # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif +// +// __builtin_unreachable: +#if defined(__has_builtin) && __has_builtin(__builtin_unreachable) +#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); +#endif // Unused attribute: diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 07147ee0..6d32b5bb 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -278,6 +278,11 @@ #if __GNUC__ >= 4 # define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) #endif +// +// __builtin_unreachable: +#if BOOST_GCC_VERSION >= 40800 +#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); +#endif #ifndef BOOST_COMPILER # define BOOST_COMPILER "GNU C++ version " __VERSION__ diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 91a62acb..17bf1020 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -444,10 +444,12 @@ namespace std { // is defined, in which case it evaluates to return x; Use when you have a return // statement that can never be reached. -#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION -# define BOOST_UNREACHABLE_RETURN(x) return x; -#else -# define BOOST_UNREACHABLE_RETURN(x) +#ifndef BOOST_UNREACHABLE_RETURN +# ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION +# define BOOST_UNREACHABLE_RETURN(x) return x; +# else +# define BOOST_UNREACHABLE_RETURN(x) +# endif #endif // BOOST_DEDUCED_TYPENAME workaround ------------------------------------------// From 7d67f4171fe9573ef363d3972ed5480c42d5f148 Mon Sep 17 00:00:00 2001 From: Mikael Olenfalk Date: Fri, 18 Sep 2015 12:01:35 +0200 Subject: [PATCH 13/16] Make cstdint.hpp work on QNX 6.6 --- include/boost/cstdint.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/cstdint.hpp b/include/boost/cstdint.hpp index 69888352..bf7097ec 100644 --- a/include/boost/cstdint.hpp +++ b/include/boost/cstdint.hpp @@ -69,7 +69,7 @@ # endif -#ifdef __QNX__ +#if defined(__QNX__) && defined(__EXT_QNX) // QNX (Dinkumware stdlib) defines these as non-standard names. // Reflect to the standard names. From 85288108c0c1f71f351a76b2d172349caac97db2 Mon Sep 17 00:00:00 2001 From: akumta Date: Thu, 1 Oct 2015 11:26:08 -0700 Subject: [PATCH 14/16] Update for C++ version 5.14 --- include/boost/config/compiler/sunpro_cc.hpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/include/boost/config/compiler/sunpro_cc.hpp b/include/boost/config/compiler/sunpro_cc.hpp index 2fd6d3ec..6017660c 100644 --- a/include/boost/config/compiler/sunpro_cc.hpp +++ b/include/boost/config/compiler/sunpro_cc.hpp @@ -125,19 +125,15 @@ #define BOOST_NO_CXX11_FINAL #endif -// -// Issues that effect all known versions: -// -// Variadic templates pass our test case, but enabling this -// causes the compiler to issue a signal 11 and bail out -// in various libraries. The others fail our test cases. -// +#if (__SUNPRO_CC < 0x5140) || (__cplusplus < 201103) #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_REF_QUALIFIERS +#endif + #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // // C++0x features From ad3141cebdef5271d00d49cd993f86a2a81a0ac9 Mon Sep 17 00:00:00 2001 From: Mikael Olenfalk Date: Sun, 4 Oct 2015 14:23:22 +0200 Subject: [PATCH 15/16] universal-windows: Dont use Windows ANSI APIs when compiling for winrt --- include/boost/config/platform/win32.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/config/platform/win32.hpp b/include/boost/config/platform/win32.hpp index 60a29abe..450158fb 100644 --- a/include/boost/config/platform/win32.hpp +++ b/include/boost/config/platform/win32.hpp @@ -74,6 +74,14 @@ # define BOOST_HAS_GETSYSTEMTIMEASFILETIME #endif +// +// Windows Runtime +// +#if defined(WINAPI_FAMILY) && \ + (WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) +# define BOOST_NO_ANSI_APIS +#endif + #ifndef BOOST_DISABLE_WIN32 // WEK: Added #define BOOST_HAS_FTIME From ca7967820b76f896b468c8d6660fc4f82d514ec0 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 8 Oct 2015 10:39:09 +0100 Subject: [PATCH 16/16] Remove dependency to Boost.Test. --- test/Jamfile.v2 | 2 +- test/limits_test.cpp | 56 ++++++++++++++++++++++---------------------- tools/generate.cpp | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index f0ee88da..2f6a122a 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -78,7 +78,7 @@ test-suite config [ run config_info.cpp : : : always_show_run_output off : config_info_no_except ] [ run math_info.cpp : : : always_show_run_output borland:static borland:static ] [ run abi/abi_test.cpp abi/main.cpp ] - [ run limits_test.cpp ../../test/build//boost_test_exec_monitor ] + [ run limits_test.cpp ] [ run link/main.cpp link//link_test : #args : #input-files diff --git a/test/limits_test.cpp b/test/limits_test.cpp index 3a4cd3a6..62444965 100644 --- a/test/limits_test.cpp +++ b/test/limits_test.cpp @@ -9,8 +9,8 @@ */ #include -#define BOOST_INCLUDE_MAIN -#include +#include +#include #include /* @@ -82,10 +82,10 @@ void test_integral_limits(const T &, const char * msg) << ", max: " << make_char_numeric_for_streaming((lim::max)()) << std::endl; - BOOST_CHECK(static_cast(lim::is_specialized)); - BOOST_CHECK(static_cast(lim::is_integer)); - // BOOST_CHECK(lim::is_modulo); - BOOST_CHECK(static_cast((lim::min)() < (lim::max)())); + BOOST_TEST(static_cast(lim::is_specialized)); + BOOST_TEST(static_cast(lim::is_integer)); + // BOOST_TEST(lim::is_modulo); + BOOST_TEST(static_cast((lim::min)() < (lim::max)())); } template @@ -107,10 +107,10 @@ void test_float_limits(const T &, const char * msg) std::cout << "\nTesting " << msg << std::endl; typedef std::numeric_limits lim; - BOOST_CHECK(static_cast(lim::is_specialized)); - BOOST_CHECK(static_cast(!lim::is_modulo)); - BOOST_CHECK(static_cast(!lim::is_integer)); - BOOST_CHECK(static_cast(lim::is_signed)); + BOOST_TEST(static_cast(lim::is_specialized)); + BOOST_TEST(static_cast(!lim::is_modulo)); + BOOST_TEST(static_cast(!lim::is_integer)); + BOOST_TEST(static_cast(lim::is_signed)); const T infinity = lim::infinity(); const T qnan = lim::quiet_NaN(); @@ -127,15 +127,15 @@ void test_float_limits(const T &, const char * msg) print_hex_val(qnan, "qnan"); print_hex_val(snan, "snan"); - BOOST_CHECK((lim::max)() > 1000); - BOOST_CHECK((lim::min)() > 0); - BOOST_CHECK((lim::min)() < 0.001); - BOOST_CHECK(lim::epsilon() > 0); + BOOST_TEST((lim::max)() > 1000); + BOOST_TEST((lim::min)() > 0); + BOOST_TEST((lim::min)() < 0.001); + BOOST_TEST(lim::epsilon() > 0); if(lim::is_iec559) { - BOOST_CHECK(static_cast(lim::has_infinity)); - BOOST_CHECK(static_cast(lim::has_quiet_NaN)); - BOOST_CHECK(static_cast(lim::has_signaling_NaN)); + BOOST_TEST(static_cast(lim::has_infinity)); + BOOST_TEST(static_cast(lim::has_quiet_NaN)); + BOOST_TEST(static_cast(lim::has_signaling_NaN)); } else { std::cout << "Does not claim IEEE conformance" << std::endl; } @@ -143,8 +143,8 @@ void test_float_limits(const T &, const char * msg) if(lim::has_infinity) { // Make sure those values are not 0 or similar nonsense. // Infinity must compare as if larger than the maximum representable value. - BOOST_CHECK(infinity > (lim::max)()); - BOOST_CHECK(-infinity < -(lim::max)()); + BOOST_TEST(infinity > (lim::max)()); + BOOST_TEST(-infinity < -(lim::max)()); } else { std::cout << "Does not have infinity" << std::endl; } @@ -153,26 +153,26 @@ void test_float_limits(const T &, const char * msg) // NaNs shall always compare "false" when compared for equality // If one of these fail, your compiler may be optimizing incorrectly, // or the standard library is incorrectly configured. - BOOST_CHECK(! (qnan == 42)); - BOOST_CHECK(qnan != 42); + BOOST_TEST(! (qnan == 42)); + BOOST_TEST(qnan != 42); if(lim::is_iec559) { - BOOST_CHECK(! (qnan == qnan)); - BOOST_CHECK(qnan != qnan); + BOOST_TEST(! (qnan == qnan)); + BOOST_TEST(qnan != qnan); } // The following tests may cause arithmetic traps. - // BOOST_CHECK(! (qnan < 42)); - // BOOST_CHECK(! (qnan > 42)); - // BOOST_CHECK(! (qnan <= 42)); - // BOOST_CHECK(! (qnan >= 42)); + // BOOST_TEST(! (qnan < 42)); + // BOOST_TEST(! (qnan > 42)); + // BOOST_TEST(! (qnan <= 42)); + // BOOST_TEST(! (qnan >= 42)); } else { std::cout << "Does not have QNaN" << std::endl; } } -int test_main(int, char*[]) +int cpp_main(int, char*[]) { test_integral_limits(bool(), "bool"); test_integral_limits(char(), "char"); diff --git a/tools/generate.cpp b/tools/generate.cpp index 8a8e7708..625e93f3 100644 --- a/tools/generate.cpp +++ b/tools/generate.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include