From 5879c6d0952d489a5587c82441ad59981eb419e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Fri, 28 Feb 2020 18:51:27 +0100 Subject: [PATCH 01/24] Document BOOST_LIBSTDCXX_VERSION macro --- doc/macro_reference.qbk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index e37efac1..394d5d04 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -1406,6 +1406,11 @@ library in use. Mainly for debugging the configuration. Defined as a string describing the name of the platform. Mainly for debugging the configuration. ]] +[[`BOOST_LIBSTDCXX_VERSION`][``][ +Defined if the libstdc++ standard library is in use. +Has the value of normalised 5 digit integer of the form VVMMM where +VV is the major version number, MM is the minor version number. +]] ] [endsect] From 0173564c24d2665429e6f766cfe456df97def441 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 1 Mar 2020 12:53:47 +0300 Subject: [PATCH 02/24] Added tests for alignas involving constant expressions. Some compilers (e.g. gcc 4.8) are known to require a literal constant in alignas and not supporting a constant expression. The test was modified to detect that. --- test/boost_no_cxx11_alignas.ipp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/test/boost_no_cxx11_alignas.ipp b/test/boost_no_cxx11_alignas.ipp index afd428f6..53342215 100644 --- a/test/boost_no_cxx11_alignas.ipp +++ b/test/boost_no_cxx11_alignas.ipp @@ -1,4 +1,4 @@ -// (C) Copyright Andrey Semashev 2013 +// (C) Copyright Andrey Semashev 2013, 2020 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file @@ -12,6 +12,12 @@ namespace boost_no_cxx11_alignas { +template< unsigned int Alignment > +struct alignment +{ + static const unsigned int value = Alignment; +}; + struct alignas(16) my_data1 { char data[10]; @@ -22,10 +28,17 @@ struct alignas(double) my_data2 char data[16]; }; +struct alignas(alignment< 16u >::value) my_data3 +{ + char data[16]; +}; + my_data1 dummy1[2]; my_data2 dummy2; -alignas(16) char dummy3[10]; -alignas(double) char dummy4[32]; +my_data3 dummy3; +alignas(16) char dummy4[10]; +alignas(double) char dummy5[32]; +alignas(alignment< 16u >::value) char dummy6[32]; int test() { From c3f81f3c7024ab5428859b8fa9cdf256c73c93ee Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 1 Mar 2020 12:59:03 +0300 Subject: [PATCH 03/24] Increase gcc version to 4.9 for alignas. gcc 4.8 is known to not support alignas with constant expressions. --- include/boost/config/compiler/gcc.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 78f1ae39..d6fbda0e 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -254,7 +254,6 @@ // C++0x features in 4.8.n and later // #if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_ALIGNAS # define BOOST_NO_CXX11_THREAD_LOCAL # define BOOST_NO_CXX11_SFINAE_EXPR #endif @@ -267,6 +266,14 @@ # define BOOST_NO_CXX14_BINARY_LITERALS #endif +// C++0x features in 4.9.n and later +// +#if (BOOST_GCC_VERSION < 40900) || !defined(BOOST_GCC_CXX11) +// Although alignas support is added in gcc 4.8, it does not accept +// constant expressions as an argument until gcc 4.9. +# define BOOST_NO_CXX11_ALIGNAS +#endif + // C++0x features in 5.1 and later // #if (BOOST_GCC_VERSION < 50100) || !defined(BOOST_GCC_CXX11) From 0e3b487200ad86edfa6237ed73d930d159c090ba Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Fri, 6 Mar 2020 09:01:32 +0100 Subject: [PATCH 04/24] Support auto-linking for non-Boost libraries Check for `BOOST_AUTO_LINK_NOMANGLE` before any other layouts. This way, `BOOST_AUTO_LINK_NOMANGLE` can be defined temporarily to link to non-Boost libraries even if `BOOST_AUTO_LINK_TAGGED` or `BOOST_AUTO_LINK_SYSTEM` are defined. Boost.UUID does this: https://github.com/boostorg/uuid/blob/24e3e0db36adfae963c9fc523d0d1e3b1f171950/include/boost/uuid/detail/random_provider_bcrypt.ipp#L20 https://github.com/boostorg/uuid/blob/24e3e0db36adfae963c9fc523d0d1e3b1f171950/include/boost/uuid/detail/random_provider_wincrypt.ipp#L24 --- include/boost/config/auto_link.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index e74f3c10..480232e2 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -415,7 +415,12 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. && defined(BOOST_LIB_ARCH_AND_MODEL_OPT) \ && defined(BOOST_LIB_VERSION) -#ifdef BOOST_AUTO_LINK_TAGGED +#ifdef BOOST_AUTO_LINK_NOMANGLE +# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# endif +#elif defined(BOOST_AUTO_LINK_TAGGED) # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT ".lib") # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT ".lib") @@ -425,11 +430,6 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # endif -#elif defined(BOOST_AUTO_LINK_NOMANGLE) -# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") -# ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") -# endif #elif defined(BOOST_LIB_BUILDID) # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") # ifdef BOOST_LIB_DIAGNOSTIC From aa90bfdb4a2d541cc5828e235b62d87ca54fe6d7 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 18 Mar 2020 20:23:04 -0400 Subject: [PATCH 05/24] Support for Embarcadero clang-based C++ compilers in Boost Config. --- include/boost/config/abi_prefix.hpp | 2 +- include/boost/config/abi_suffix.hpp | 4 +- include/boost/config/auto_link.hpp | 73 +++++++--- include/boost/config/compiler/borland.hpp | 3 +- include/boost/config/compiler/codegear.hpp | 132 ++++++++++++++++++ .../config/detail/select_compiler_config.hpp | 2 +- include/boost/config/detail/suffix.hpp | 2 +- include/boost/config/stdlib/dinkumware.hpp | 6 +- include/boost/config/stdlib/roguewave.hpp | 2 +- include/boost/config/stdlib/stlport.hpp | 10 +- include/boost/config/workaround.hpp | 15 ++ 11 files changed, 218 insertions(+), 33 deletions(-) diff --git a/include/boost/config/abi_prefix.hpp b/include/boost/config/abi_prefix.hpp index 3b134749..bcdc26d9 100644 --- a/include/boost/config/abi_prefix.hpp +++ b/include/boost/config/abi_prefix.hpp @@ -19,7 +19,7 @@ # include BOOST_ABI_PREFIX #endif -#if defined( __BORLANDC__ ) +#if defined( BOOST_BORLANDC ) #pragma nopushoptwarn #endif diff --git a/include/boost/config/abi_suffix.hpp b/include/boost/config/abi_suffix.hpp index 93916166..a1eb78db 100644 --- a/include/boost/config/abi_suffix.hpp +++ b/include/boost/config/abi_suffix.hpp @@ -20,8 +20,6 @@ # include BOOST_ABI_SUFFIX #endif -#if defined( __BORLANDC__ ) +#if defined( BOOST_BORLANDC ) #pragma nopushoptwarn #endif - - diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index e74f3c10..30b87021 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -51,6 +51,7 @@ BOOST_LIB_PREFIX + BOOST_LIB_ARCH_AND_MODEL_OPT "-" + BOOST_LIB_VERSION + + BOOST_LIB_SUFFIX These are defined as: @@ -78,6 +79,7 @@ BOOST_LIB_ARCH_AND_MODEL_OPT: The architecture and address model BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. +BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the compiler. ***************************************************************************/ @@ -97,7 +99,8 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. // Only include what follows for known and supported compilers: // #if defined(BOOST_MSVC) \ - || defined(__BORLANDC__) \ + || defined(BOOST_EMBTC_WINDOWS) \ + || defined(BOOST_BORLANDC) \ || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \ || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \ || (defined(BOOST_CLANG) && defined(BOOST_WINDOWS) && defined(_MSC_VER) && (__clang_major__ >= 4)) @@ -184,7 +187,16 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. // vc14.2: # define BOOST_LIB_TOOLSET "vc142" -# elif defined(__BORLANDC__) +# elif defined(BOOST_EMBTC_WINDOWS) + + // Embarcadero Clang based compilers: +# if defined(BOOST_EMBTC_WIN32C) +# define BOOST_LIB_TOOLSET "bcb32" +# elif defined(BOOST_EMBTC_WIN64) +# define BOOST_LIB_TOOLSET "bcb64" +# endif + +# elif defined(BOOST_BORLANDC) // CBuilder 6: # define BOOST_LIB_TOOLSET "bcb" @@ -334,12 +346,32 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # endif -#elif defined(__BORLANDC__) +#elif defined(BOOST_EMBTC_WINDOWS) + +# ifdef _RTLDLL + +# if defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-d" +# else +# define BOOST_LIB_RT_OPT +# endif + +# else + +# if defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sd" +# else +# define BOOST_LIB_RT_OPT "-s" +# endif + +# endif + +#elif defined(BOOST_BORLANDC) // // figure out whether we want the debug builds or not: // -#if __BORLANDC__ > 0x561 +#if BOOST_BORLANDC > 0x561 #pragma defineonoption BOOST_BORLAND_DEBUG -v #endif // @@ -357,7 +389,7 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # elif defined(BOOST_BORLAND_DEBUG) # define BOOST_LIB_RT_OPT "-d" # elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT -y +# define BOOST_LIB_RT_OPT "-y" # else # define BOOST_LIB_RT_OPT # endif @@ -415,30 +447,36 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. && defined(BOOST_LIB_ARCH_AND_MODEL_OPT) \ && defined(BOOST_LIB_VERSION) +#if defined(BOOST_EMBTC_WIN64) +# define BOOST_LIB_SUFFIX ".a" +#else +# define BOOST_LIB_SUFFIX ".lib" +#endif + #ifdef BOOST_AUTO_LINK_TAGGED -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) # endif #elif defined(BOOST_AUTO_LINK_SYSTEM) -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # endif #elif defined(BOOST_AUTO_LINK_NOMANGLE) -# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # endif #elif defined(BOOST_LIB_BUILDID) -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) BOOST_LIB_SUFFIX) # endif #else -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION BOOST_LIB_SUFFIX) # endif #endif @@ -481,5 +519,6 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. #if defined(BOOST_DYN_LINK) # undef BOOST_DYN_LINK #endif - - +#if defined(BOOST_LIB_SUFFIX) +# undef BOOST_LIB_SUFFIX +#endif diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index cd4710ab..12872435 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -333,4 +333,5 @@ // (Niels Dekker, LKEB, April 2010) #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) +#define BOOST_BORLANDC __BORLANDC__ +#define BOOST_COMPILER "Classic Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index 91f40a92..0912412d 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -9,6 +9,137 @@ // CodeGear C++ compiler setup: +#ifdef __clang__ // Clang enhanced Windows compiler + +# include "clang.hpp" +# define BOOST_NO_CXX11_THREAD_LOCAL +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR + +# ifndef __MT__ /* If compiling in single-threaded mode, assume there is no CXX11_HDR_ATOMIC */ +# define BOOST_NO_CXX11_HDR_ATOMIC +# endif + +#define BOOST_NO_FENV_H /* temporarily disable this until we can link against fegetround fesetround feholdexcept */ + +/* + +// On non-Win32 platforms let the platform config figure this out: +#ifdef _WIN32 +# define BOOST_HAS_STDINT_H +#endif + +// +// __int64: +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_MS_INT64 +#endif +// +// check for exception handling support: +// +#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif +// +// all versions have a : +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_DIRENT_H +#endif +// +// Disable Win32 support in ANSI mode: +// +# pragma defineonoption BOOST_DISABLE_WIN32 -A +// +// MSVC compatibility mode does some nasty things: +// TODO: look up if this doesn't apply to the whole 12xx range +// +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# define BOOST_NO_VOID_RETURNS +#endif +// + +*/ + +// Specific settings for Embarcadero drivers +# define BOOST_EMBTC __CODEGEARC__ +# define BOOST_EMBTC_FULL_VER ((__clang_major__ << 16) | \ + (__clang_minor__ << 8) | \ + __clang_patchlevel__ ) + +// Detecting which Embarcadero driver is being used +#if defined(BOOST_EMBTC) +# if defined(_WIN64) +# define BOOST_EMBTC_WIN64 +# define BOOST_EMBTC_WINDOWS +# ifndef BOOST_USE_WINDOWS_H +# define BOOST_USE_WINDOWS_H +# endif +# elif defined(_WIN32) +# define BOOST_EMBTC_WIN32C +# define BOOST_EMBTC_WINDOWS +# ifndef BOOST_USE_WINDOWS_H +# define BOOST_USE_WINDOWS_H +# endif +# elif defined(__APPLE__) && defined(__arm__) +# define BOOST_EMBTC_IOSARM +# define BOOST_EMBTC_IOS +# elif defined(__APPLE__) && defined(__aarch64__) +# define BOOST_EMBTC_IOSARM64 +# define BOOST_EMBTC_IOS +# elif defined(__ANDROID__) && defined(__arm__) +# define BOOST_EMBTC_AARM +# define BOOST_EMBTC_ANDROID +# elif +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown Embarcadero driver" +# else +# warning "Unknown Embarcadero driver" +# endif /* defined(BOOST_ASSERT_CONFIG) */ +# endif +#endif /* defined(BOOST_EMBTC) */ + +#if defined(BOOST_EMBTC_WINDOWS) + // About TR1 headers and features: + // BOOST_HAS_TR1_*-style definitions are placed in "boost\tr1\detail\config.hpp", + // because there, they will always be found, but here, they may be not check. + + // // This is needed to allow 64-bit integers in cstdint.hpp + //# define BOOST_HAS_MS_INT64 + + //# define BOOST_HAS_RVALUE_REFS + + // // Boost.Fusion should not use its preprocessed templates, + // // due to we can use its variadic cpp11 templates. If that + // // macro is not defined it tries to use both at the same time + // // giving a redefinition error. + //# define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + + // // Bcc64 don't have this header + //# define BOOST_NO_FENV_H + + // // This is not necessary with the last versions of bcc64 + //# if !defined(__FUNC__) + //# define __FUNC__ __func__ + //# endif + + // FVTODO: This was uncommended with 1_55 - prolly worth testing this by uncommenting it. + // Dinkumware on Win32 and Win64 platforms has + // # define BOOST_HAS_STDINT_H +#endif /* BOOST_EMBTC_WINDOWS */ + +# undef BOOST_COMPILER +# define BOOST_COMPILER "Embarcadero-Clang C++ version " BOOST_STRINGIZE(__CODEGEARC__) " clang: " __clang_version__ +// # define __CODEGEARC_CLANG__ __CODEGEARC__ +// # define __EMBARCADERO_CLANG__ __CODEGEARC__ +// # define __BORLANDC_CLANG__ __BORLANDC__ + +#else // #if !defined(__clang__) + +# define BOOST_CODEGEARC __CODEGEARC__ +# define BOOST_BORLANDC __BORLANDC__ + #if !defined( BOOST_WITH_CODEGEAR_WARNINGS ) // these warnings occur frequently in optimized template code # pragma warn -8004 // var assigned value, but never used @@ -238,3 +369,4 @@ #define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__) +#endif // #if !defined(__clang__) diff --git a/include/boost/config/detail/select_compiler_config.hpp b/include/boost/config/detail/select_compiler_config.hpp index 8970dffb..c3d99e1a 100644 --- a/include/boost/config/detail/select_compiler_config.hpp +++ b/include/boost/config/detail/select_compiler_config.hpp @@ -39,7 +39,7 @@ // Intel # define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" -#elif defined __clang__ && !defined(__ibmxl__) +#elif defined __clang__ && !defined(__ibmxl__) && !defined(__CODEGEARC__) // Clang C++ emulates GCC, so it has to appear early. # define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp index d3c4e083..2f862b44 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -54,7 +54,7 @@ // no namespace issues from this. // #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \ - && !defined(BOOST_MSVC) && !defined(__BORLANDC__) + && !defined(BOOST_MSVC) && !defined(BOOST_BORLANDC) # include # if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) # define BOOST_HAS_LONG_LONG diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 10980420..b638286b 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -22,7 +22,7 @@ #if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306) // full dinkumware 3.06 and above // fully conforming provided the compiler supports it: -# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h +# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(BOOST_BORLANDC) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h # define BOOST_NO_STDC_NAMESPACE # endif # if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC) @@ -68,12 +68,12 @@ // the same applies to other compilers that sit on top // of vc7.1 (Intel and Comeau): // -#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__) +#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(BOOST_BORLANDC) # define BOOST_STD_EXTENSION_NAMESPACE stdext #endif -#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306) +#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(BOOST_BORLANDC)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306) // if we're using a dinkum lib that's // been configured for VC6/7 then there is // no iterator traits (true even for icl) diff --git a/include/boost/config/stdlib/roguewave.hpp b/include/boost/config/stdlib/roguewave.hpp index 0c5c113e..03a65768 100644 --- a/include/boost/config/stdlib/roguewave.hpp +++ b/include/boost/config/stdlib/roguewave.hpp @@ -59,7 +59,7 @@ // // Borland version of numeric_limits lacks __int64 specialisation: // -#ifdef __BORLANDC__ +#ifdef BOOST_BORLANDC # define BOOST_NO_MS_INT64_NUMERIC_LIMITS #endif diff --git a/include/boost/config/stdlib/stlport.hpp b/include/boost/config/stdlib/stlport.hpp index 094e27bb..38bc763f 100644 --- a/include/boost/config/stdlib/stlport.hpp +++ b/include/boost/config/stdlib/stlport.hpp @@ -62,11 +62,11 @@ // then the io stream facets are not available in namespace std:: // #ifdef _STLPORT_VERSION -# if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) +# if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(BOOST_BORLANDC) # define BOOST_NO_STD_LOCALE # endif #else -# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) +# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(BOOST_BORLANDC) # define BOOST_NO_STD_LOCALE # endif #endif @@ -128,7 +128,7 @@ // BCB6 does cause problems. If we detect C++ Builder, then don't define // BOOST_NO_STDC_NAMESPACE // -#if !defined(__BORLANDC__) && !defined(__DMC__) +#if !defined(BOOST_BORLANDC) && !defined(__DMC__) // // If STLport is using it's own namespace, and the real names are in // the global namespace, then we duplicate STLport's using declarations @@ -143,7 +143,7 @@ # define BOOST_NO_STDC_NAMESPACE # define BOOST_NO_EXCEPTION_STD_NAMESPACE # endif -#elif defined(__BORLANDC__) && __BORLANDC__ < 0x560 +#elif defined(BOOST_BORLANDC) && BOOST_BORLANDC < 0x560 // STLport doesn't import std::abs correctly: #include namespace std { using ::abs; } @@ -192,7 +192,7 @@ namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; // Borland ships a version of STLport with C++ Builder 6 that lacks // hashtables and the like: // -#if defined(__BORLANDC__) && (__BORLANDC__ == 0x560) +#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x560) # undef BOOST_HAS_HASH #endif diff --git a/include/boost/config/workaround.hpp b/include/boost/config/workaround.hpp index fca8f3ab..7c6a2e62 100644 --- a/include/boost/config/workaround.hpp +++ b/include/boost/config/workaround.hpp @@ -50,6 +50,21 @@ #else #define __CODEGEARC___WORKAROUND_GUARD 0 #endif +#ifndef BOOST_BORLANDC +#define BOOST_BORLANDC_WORKAROUND_GUARD 1 +#else +#define BOOST_BORLANDC_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_CODEGEARC +#define BOOST_CODEGEARC_WORKAROUND_GUARD 1 +#else +#define BOOST_CODEGEARC_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_EMBTC +#define BOOST_EMBTC_WORKAROUND_GUARD 1 +#else +#define BOOST_EMBTC_WORKAROUND_GUARD 0 +#endif #ifndef _MSC_VER #define _MSC_VER_WORKAROUND_GUARD 1 #else From f9e74d8a12a684b661fdb9df2963a2c274a63a85 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Fri, 20 Mar 2020 12:29:35 -0400 Subject: [PATCH 06/24] Updated configuration for Embarcadero clang based compilers --- include/boost/config/auto_link.hpp | 2 +- include/boost/config/compiler/borland.hpp | 2 +- include/boost/config/compiler/codegear.hpp | 12 +++++------- include/boost/config/requires_threads.hpp | 2 +- include/boost/cstdint.hpp | 4 ++-- test/Jamfile.v2 | 1 + test/abi/main.cpp | 2 +- test/boost_no_is_abstract.ipp | 2 +- test/cstdint_test.cpp | 2 +- test/cstdint_test2.cpp | 2 +- test/math_info.cpp | 2 +- 11 files changed, 16 insertions(+), 17 deletions(-) diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index 30b87021..98a1e39e 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -485,7 +485,7 @@ BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the c #endif -#endif // _MSC_VER || __BORLANDC__ +#endif // _MSC_VER || BOOST_BORLANDC // // finally undef any macros we may have set: diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index 12872435..f0b0b20f 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -17,7 +17,7 @@ #endif // last known compiler version: -#if (__BORLANDC__ > 0x613) +#if (__BORLANDC__ > 0x740) //# if defined(BOOST_ASSERT_CONFIG) # error "boost: Unknown compiler version - please run the configure tests and report the results" //# else diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index 0912412d..d197e1ec 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -20,6 +20,7 @@ # endif #define BOOST_NO_FENV_H /* temporarily disable this until we can link against fegetround fesetround feholdexcept */ +#define BOOST_NO_CXX11_HDR_EXCEPTION /* Reported this bug to Embarcadero with the latest C++ Builder Rio release */ /* @@ -35,12 +36,6 @@ # define BOOST_HAS_MS_INT64 #endif // -// check for exception handling support: -// -#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif -// // all versions have a : // #if !defined(__STRICT_ANSI__) @@ -151,7 +146,7 @@ // // versions check: // last known and checked version is 0x621 -#if (__CODEGEARC__ > 0x621) +#if (__CODEGEARC__ > 0x740) # if defined(BOOST_ASSERT_CONFIG) # error "boost: Unknown compiler version - please run the configure tests and report the results" # else @@ -209,6 +204,8 @@ # define BOOST_HAS_PRAGMA_ONCE #endif +#define BOOST_NO_FENV_H + // // C++0x macros: // @@ -255,6 +252,7 @@ #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL #define BOOST_NO_CXX11_THREAD_LOCAL +#define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_UNRESTRICTED_UNION // C++ 14: diff --git a/include/boost/config/requires_threads.hpp b/include/boost/config/requires_threads.hpp index cfaff230..c23a2ce3 100644 --- a/include/boost/config/requires_threads.hpp +++ b/include/boost/config/requires_threads.hpp @@ -54,7 +54,7 @@ // Compaq Tru64 Unix cxx # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread" -#elif defined __BORLANDC__ +#elif defined BOOST_BORLANDC // Borland # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM" diff --git a/include/boost/cstdint.hpp b/include/boost/cstdint.hpp index 9c88d13b..967aacfd 100644 --- a/include/boost/cstdint.hpp +++ b/include/boost/cstdint.hpp @@ -306,7 +306,7 @@ namespace boost // 64-bit types + intmax_t and uintmax_t ----------------------------------// # if defined(BOOST_HAS_LONG_LONG) && \ - !defined(BOOST_MSVC) && !defined(__BORLANDC__) && \ + !defined(BOOST_MSVC) && !defined(BOOST_BORLANDC) && \ (!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \ (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) # if defined(__hpux) @@ -451,7 +451,7 @@ INT#_C macros if they're not already defined (John Maddock). #ifndef INT64_C # define INT64_C(value) value##i64 #endif -# ifdef __BORLANDC__ +# ifdef BOOST_BORLANDC // Borland bug: appending ui8 makes the type a signed char # define UINT8_C(value) static_cast(value##u) # else diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 5b2a9ad9..f1104497 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -61,6 +61,7 @@ test-suite config : #requirements off gcc-4.4.7,0x:no # does not compile with -fno-rtti + embarcadero: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 ] diff --git a/test/abi/main.cpp b/test/abi/main.cpp index e8f9d139..808c583d 100644 --- a/test/abi/main.cpp +++ b/test/abi/main.cpp @@ -11,7 +11,7 @@ #include #ifdef BOOST_MSVC #pragma pack(1) -#elif defined(__BORLANDC__) +#elif defined(BOOST_BORLANDC) #pragma option -Ve- -Vx- -a1 -b- #endif #include diff --git a/test/boost_no_is_abstract.ipp b/test/boost_no_is_abstract.ipp index 257318ee..93370d61 100644 --- a/test/boost_no_is_abstract.ipp +++ b/test/boost_no_is_abstract.ipp @@ -12,7 +12,7 @@ namespace boost_no_is_abstract{ -#if defined(__CODEGEARC__) +#if defined(BOOST_CODEGEARC) template struct is_abstract_test { diff --git a/test/cstdint_test.cpp b/test/cstdint_test.cpp index f3cbd9bb..d2223118 100644 --- a/test/cstdint_test.cpp +++ b/test/cstdint_test.cpp @@ -93,7 +93,7 @@ void integral_constant_checker::check() // the following function simply verifies that the type // of an integral constant is correctly defined: // -#ifdef __BORLANDC__ +#ifdef BOOST_BORLANDC #pragma option -w-8008 #pragma option -w-8066 #endif diff --git a/test/cstdint_test2.cpp b/test/cstdint_test2.cpp index 91ff28f4..f2e2d276 100644 --- a/test/cstdint_test2.cpp +++ b/test/cstdint_test2.cpp @@ -103,7 +103,7 @@ void integral_constant_checker::check() // the following function simply verifies that the type // of an integral constant is correctly defined: // -#ifdef __BORLANDC__ +#ifdef BOOST_BORLANDC #pragma option -w-8008 #pragma option -w-8066 #endif diff --git a/test/math_info.cpp b/test/math_info.cpp index 47fe9ffe..98f5d73b 100644 --- a/test/math_info.cpp +++ b/test/math_info.cpp @@ -281,7 +281,7 @@ int main() "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" "Macros from " << std::endl; -#ifdef __BORLANDC__ +#ifdef BOOST_BORLANDC // Turn off hardware exceptions so we don't just abort // when calling numeric_limits members. _control87(MCW_EM,MCW_EM); From a592d243c6adde989c188ef6428eeb7b296e1f0c Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sat, 21 Mar 2020 18:49:15 -0400 Subject: [PATCH 07/24] Fix for Issue about config-link-test. Added some code for making sure BOOST_NO_EXCEPTIONS is defined if it needs to be. --- include/boost/config/compiler/codegear.hpp | 7 +++++++ test/Jamfile.v2 | 1 + 2 files changed, 8 insertions(+) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index d197e1ec..f13b2d62 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -22,6 +22,13 @@ #define BOOST_NO_FENV_H /* temporarily disable this until we can link against fegetround fesetround feholdexcept */ #define BOOST_NO_CXX11_HDR_EXCEPTION /* Reported this bug to Embarcadero with the latest C++ Builder Rio release */ +// +// check for exception handling support: +// +#if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + /* // On non-Win32 platforms let the platform config figure this out: diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index f1104497..afe06f04 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -92,6 +92,7 @@ test-suite config : #input-files : #requirements shared + single BOOST_DYN_LINK=1 BOOST_CONFIG_NO_LIB=1 vxworks:shared From 1ec083d6c29c22e5fdae625974a5e510ef7a4f65 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Tue, 24 Mar 2020 21:07:55 -0400 Subject: [PATCH 08/24] Update to match latest Boost develop branch change --- include/boost/config/auto_link.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index 98a1e39e..5513bf3f 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -453,7 +453,12 @@ BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the c # define BOOST_LIB_SUFFIX ".lib" #endif -#ifdef BOOST_AUTO_LINK_TAGGED +#ifdef BOOST_AUTO_LINK_NOMANGLE +# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) +# endif +#elif defined(BOOST_AUTO_LINK_TAGGED) # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) @@ -463,11 +468,6 @@ BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the c # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # endif -#elif defined(BOOST_AUTO_LINK_NOMANGLE) -# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) -# ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) -# endif #elif defined(BOOST_LIB_BUILDID) # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC From 4916249f72314ecab55ba44a64ca6df342645830 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Tue, 24 Mar 2020 21:25:46 -0400 Subject: [PATCH 09/24] Move block so git does not think there is a conflict. --- include/boost/config/auto_link.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index 5513bf3f..ebb088ac 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -436,6 +436,12 @@ BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the c # define BOOST_LIB_PREFIX "lib" #endif +#if defined(BOOST_EMBTC_WIN64) +# define BOOST_LIB_SUFFIX ".a" +#else +# define BOOST_LIB_SUFFIX ".lib" +#endif + // // now include the lib: // @@ -447,12 +453,6 @@ BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the c && defined(BOOST_LIB_ARCH_AND_MODEL_OPT) \ && defined(BOOST_LIB_VERSION) -#if defined(BOOST_EMBTC_WIN64) -# define BOOST_LIB_SUFFIX ".a" -#else -# define BOOST_LIB_SUFFIX ".lib" -#endif - #ifdef BOOST_AUTO_LINK_NOMANGLE # pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC From 0f5f39d1bd1a2a299d42fd0233b8fbb79052fa34 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 25 Mar 2020 01:18:18 -0400 Subject: [PATCH 10/24] Try to resolve conflict. --- include/boost/config/auto_link.hpp | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index ebb088ac..37975777 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -436,12 +436,6 @@ BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the c # define BOOST_LIB_PREFIX "lib" #endif -#if defined(BOOST_EMBTC_WIN64) -# define BOOST_LIB_SUFFIX ".a" -#else -# define BOOST_LIB_SUFFIX ".lib" -#endif - // // now include the lib: // @@ -454,29 +448,29 @@ BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the c && defined(BOOST_LIB_VERSION) #ifdef BOOST_AUTO_LINK_NOMANGLE -# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) +# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) +# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # endif #elif defined(BOOST_AUTO_LINK_TAGGED) -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT ".lib") # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT ".lib") # endif #elif defined(BOOST_AUTO_LINK_SYSTEM) -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # endif #elif defined(BOOST_LIB_BUILDID) -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) BOOST_LIB_SUFFIX) +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) BOOST_LIB_SUFFIX) +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") # endif #else -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION BOOST_LIB_SUFFIX) +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib") # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION BOOST_LIB_SUFFIX) +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib") # endif #endif @@ -485,7 +479,7 @@ BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the c #endif -#endif // _MSC_VER || BOOST_BORLANDC +#endif // _MSC_VER || __BORLANDC__ // // finally undef any macros we may have set: From 835b765973c30e8ece61aa8a2cb774a0e7038257 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 25 Mar 2020 01:23:25 -0400 Subject: [PATCH 11/24] Next change --- include/boost/config/auto_link.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index 37975777..51031d25 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -447,6 +447,12 @@ BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the c && defined(BOOST_LIB_ARCH_AND_MODEL_OPT) \ && defined(BOOST_LIB_VERSION) +#if defined(BOOST_EMBTC_WIN64) +# define BOOST_LIB_SUFFIX ".a" +#else +# define BOOST_LIB_SUFFIX ".lib" +#endif + #ifdef BOOST_AUTO_LINK_NOMANGLE # pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # ifdef BOOST_LIB_DIAGNOSTIC From 03d2c4963eab7c5495e238d074b32a9e9408350e Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 25 Mar 2020 01:47:55 -0400 Subject: [PATCH 12/24] Final change to autolink.hpp --- include/boost/config/auto_link.hpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index 51031d25..1ea6faa7 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -454,29 +454,29 @@ BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the c #endif #ifdef BOOST_AUTO_LINK_NOMANGLE -# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # endif #elif defined(BOOST_AUTO_LINK_TAGGED) -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) # endif #elif defined(BOOST_AUTO_LINK_SYSTEM) -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # endif #elif defined(BOOST_LIB_BUILDID) -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) BOOST_LIB_SUFFIX) # endif #else -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION BOOST_LIB_SUFFIX) # endif #endif From 2d926e384c1649b6495649289843f7295895ce39 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 25 Mar 2020 12:35:28 -0400 Subject: [PATCH 13/24] Final fix for autolink --- include/boost/config/auto_link.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index 6a1e251f..1ea6faa7 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -461,7 +461,7 @@ BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the c #elif defined(BOOST_AUTO_LINK_TAGGED) # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) # endif #elif defined(BOOST_AUTO_LINK_SYSTEM) # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) From efaceea8c3657bf698d14a9d0d14f2532ae9bd31 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Fri, 3 Apr 2020 20:53:01 -0400 Subject: [PATCH 14/24] Updated configuration for Embarcadero C++ clang-based compilers. Created a better test for CWCHAR compatibility which involves a minimum of multi-byte character functionality also. --- include/boost/config/compiler/codegear.hpp | 52 ++++++++++++---------- include/boost/config/stdlib/dinkumware.hpp | 2 +- test/boost_no_cwchar.ipp | 3 ++ 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index f13b2d62..14d0abb9 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -15,12 +15,21 @@ # define BOOST_NO_CXX11_THREAD_LOCAL # define BOOST_NO_CXX11_ATOMIC_SMART_PTR +// 32 functions are missing from the current RTL in cwchar, so it really can not be used even if it exists + +# define BOOST_NO_CWCHAR + # ifndef __MT__ /* If compiling in single-threaded mode, assume there is no CXX11_HDR_ATOMIC */ # define BOOST_NO_CXX11_HDR_ATOMIC # endif -#define BOOST_NO_FENV_H /* temporarily disable this until we can link against fegetround fesetround feholdexcept */ -#define BOOST_NO_CXX11_HDR_EXCEPTION /* Reported this bug to Embarcadero with the latest C++ Builder Rio release */ +/* temporarily disable this until we can link against fegetround fesetround feholdexcept */ + +#define BOOST_NO_FENV_H + +/* Reported this bug to Embarcadero with the latest C++ Builder Rio release */ + +#define BOOST_NO_CXX11_HDR_EXCEPTION // // check for exception handling support: @@ -103,33 +112,28 @@ #endif /* defined(BOOST_EMBTC) */ #if defined(BOOST_EMBTC_WINDOWS) - // About TR1 headers and features: - // BOOST_HAS_TR1_*-style definitions are placed in "boost\tr1\detail\config.hpp", - // because there, they will always be found, but here, they may be not check. - // // This is needed to allow 64-bit integers in cstdint.hpp - //# define BOOST_HAS_MS_INT64 +/* The Windows SDK for Embarcadero has the deprecated 'chdir' function for _chdir + so make sure any call to _chdir becomes a call to chdir */ + +# define _chdir chdir - //# define BOOST_HAS_RVALUE_REFS +/* Undefine the symbols and the Windows platform will automatically define them for us + as appropriate */ + +#if defined(BOOST_SYMBOL_EXPORT) +#undef BOOST_SYMBOL_EXPORT +#endif - // // Boost.Fusion should not use its preprocessed templates, - // // due to we can use its variadic cpp11 templates. If that - // // macro is not defined it tries to use both at the same time - // // giving a redefinition error. - //# define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +#if defined(BOOST_SYMBOL_IMPORT) +#undef BOOST_SYMBOL_IMPORT +#endif - // // Bcc64 don't have this header - //# define BOOST_NO_FENV_H +#if defined(BOOST_SYMBOL_VISIBLE) +#undef BOOST_SYMBOL_VISIBLE +#endif - // // This is not necessary with the last versions of bcc64 - //# if !defined(__FUNC__) - //# define __FUNC__ __func__ - //# endif - - // FVTODO: This was uncommended with 1_55 - prolly worth testing this by uncommenting it. - // Dinkumware on Win32 and Win64 platforms has - // # define BOOST_HAS_STDINT_H -#endif /* BOOST_EMBTC_WINDOWS */ +#endif # undef BOOST_COMPILER # define BOOST_COMPILER "Embarcadero-Clang C++ version " BOOST_STRINGIZE(__CODEGEARC__) " clang: " __clang_version__ diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index b638286b..2d4dbc71 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -98,7 +98,7 @@ #endif #include #if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (defined(__ghs__) && !_HAS_NAMESPACE) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) \ - && !defined(__VXWORKS__) + && !defined(__VXWORKS__) && !defined(BOOST_EMBTC_WINDOWS) # define BOOST_NO_STD_TYPEINFO #endif #endif diff --git a/test/boost_no_cwchar.ipp b/test/boost_no_cwchar.ipp index 698dbd63..91f88719 100644 --- a/test/boost_no_cwchar.ipp +++ b/test/boost_no_cwchar.ipp @@ -18,6 +18,9 @@ int test() { wchar_t c1[2] = { 0 }; wchar_t c2[2] = { 0 }; + char c3[2] = { 0 }; + mbstate_t mb = mbstate_t(); + if(!mbsinit(&mb) || mbrlen(c3,1,&mb)) return -1; if(wcscmp(c1,c2) || wcslen(c1)) return -1; //wcscpy(c1,c2); wcsxfrm(c1,c2,0); From e680a13d8a618121d2565933c0c8e2f1a2decf9e Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sun, 5 Apr 2020 01:04:18 -0400 Subject: [PATCH 15/24] Removed unnecessary changes. Corrected spelling mistake in a comment. --- include/boost/config/compiler/codegear.hpp | 24 ---------------------- include/boost/config/detail/suffix.hpp | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index 14d0abb9..4b471063 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -111,30 +111,6 @@ # endif #endif /* defined(BOOST_EMBTC) */ -#if defined(BOOST_EMBTC_WINDOWS) - -/* The Windows SDK for Embarcadero has the deprecated 'chdir' function for _chdir - so make sure any call to _chdir becomes a call to chdir */ - -# define _chdir chdir - -/* Undefine the symbols and the Windows platform will automatically define them for us - as appropriate */ - -#if defined(BOOST_SYMBOL_EXPORT) -#undef BOOST_SYMBOL_EXPORT -#endif - -#if defined(BOOST_SYMBOL_IMPORT) -#undef BOOST_SYMBOL_IMPORT -#endif - -#if defined(BOOST_SYMBOL_VISIBLE) -#undef BOOST_SYMBOL_VISIBLE -#endif - -#endif - # undef BOOST_COMPILER # define BOOST_COMPILER "Embarcadero-Clang C++ version " BOOST_STRINGIZE(__CODEGEARC__) " clang: " __clang_version__ // # define __CODEGEARC_CLANG__ __CODEGEARC__ diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp index 2f862b44..ffe39cfe 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -35,7 +35,7 @@ #endif // -// ensure that visibility macros are always defined, thus symplifying use +// ensure that visibility macros are always defined, thus simplifying use // #ifndef BOOST_SYMBOL_EXPORT # define BOOST_SYMBOL_EXPORT From 2c70a870d9d7de870f86e80ae21955f1ae22f06f Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sun, 5 Apr 2020 15:56:42 -0400 Subject: [PATCH 16/24] Embarcadero C++ clang-based compilers have chdir and dup2 but not _chdir and _dup2. --- include/boost/config/compiler/codegear.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index 4b471063..dbddb703 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -111,6 +111,18 @@ # endif #endif /* defined(BOOST_EMBTC) */ +#if defined(BOOST_EMBTC_WINDOWS) + +#if !defined(_chdir) +#define _chdir(x) chdir(x) +#endif + +#if !defined(_dup2) +#define _dup2(x,y) dup2(x,y) +#endif + +#endif + # undef BOOST_COMPILER # define BOOST_COMPILER "Embarcadero-Clang C++ version " BOOST_STRINGIZE(__CODEGEARC__) " clang: " __clang_version__ // # define __CODEGEARC_CLANG__ __CODEGEARC__ From 221273f1a069cb078a1566af76ff5974db6dfc8c Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sun, 5 Apr 2020 17:30:25 -0400 Subject: [PATCH 17/24] Move version check to the front. --- include/boost/config/compiler/codegear.hpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index dbddb703..6e348afc 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -9,6 +9,17 @@ // CodeGear C++ compiler setup: +// +// versions check: +// last known and checked version is 0x740 +#if (__CODEGEARC__ > 0x740) +# if defined(BOOST_ASSERT_CONFIG) +# error "boost: Unknown compiler version - please run the configure tests and report the results" +# else +# pragma message( "boost: Unknown compiler version - please run the configure tests and report the results") +# endif +#endif + #ifdef __clang__ // Clang enhanced Windows compiler # include "clang.hpp" @@ -142,16 +153,6 @@ # pragma warn -8104 // static members with ctors not threadsafe # pragma warn -8105 // reference member in class without ctors #endif -// -// versions check: -// last known and checked version is 0x621 -#if (__CODEGEARC__ > 0x740) -# if defined(BOOST_ASSERT_CONFIG) -# error "boost: Unknown compiler version - please run the configure tests and report the results" -# else -# pragma message( "boost: Unknown compiler version - please run the configure tests and report the results") -# endif -#endif // CodeGear C++ Builder 2009 #if (__CODEGEARC__ <= 0x613) From c6817bf70e220fc0bbe908212ee4d5194dcfca75 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Thu, 9 Apr 2020 13:10:15 -0400 Subject: [PATCH 18/24] Implement BOOST_OVERRIDE --- checks/Jamfile.v2 | 1 + checks/test_case.cpp | 5 +++ doc/macro_reference.qbk | 6 +++ include/boost/config/compiler/borland.hpp | 1 + include/boost/config/compiler/clang.hpp | 1 + include/boost/config/compiler/codegear.hpp | 1 + include/boost/config/compiler/common_edg.hpp | 1 + include/boost/config/compiler/cray.hpp | 3 ++ include/boost/config/compiler/digitalmars.hpp | 1 + include/boost/config/compiler/gcc.hpp | 1 + include/boost/config/compiler/gcc_xml.hpp | 1 + include/boost/config/compiler/intel.hpp | 2 + include/boost/config/compiler/metrowerks.hpp | 1 + include/boost/config/compiler/mpw.hpp | 1 + include/boost/config/compiler/pathscale.hpp | 1 + include/boost/config/compiler/sunpro_cc.hpp | 1 + include/boost/config/compiler/vacpp.hpp | 1 + include/boost/config/compiler/visualc.hpp | 1 + include/boost/config/compiler/xlcpp.hpp | 1 + include/boost/config/compiler/xlcpp_zos.hpp | 1 + include/boost/config/detail/suffix.hpp | 6 +++ test/Jamfile.v2 | 1 + test/all/Jamfile.v2 | 5 ++- test/boost_no_cxx11_override.ipp | 32 ++++++++++++++++ test/boost_override_test.cpp | 19 ++++++++++ test/config_info.cpp | 2 + test/config_test.cpp | 12 +++++- test/no_cxx11_override_fail.cpp | 37 +++++++++++++++++++ test/no_cxx11_override_pass.cpp | 37 +++++++++++++++++++ 29 files changed, 181 insertions(+), 2 deletions(-) create mode 100644 test/boost_no_cxx11_override.ipp create mode 100644 test/boost_override_test.cpp create mode 100644 test/no_cxx11_override_fail.cpp create mode 100644 test/no_cxx11_override_pass.cpp diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index 5c0c93a3..a602c4e4 100644 --- a/checks/Jamfile.v2 +++ b/checks/Jamfile.v2 @@ -93,6 +93,7 @@ obj cxx11_hdr_unordered_set : test_case.cpp : TEST_BOOST_NO_CXX11_HDR_UN obj cxx11_inline_namespaces : test_case.cpp : TEST_BOOST_NO_CXX11_INLINE_NAMESPACES ; obj cxx11_non_public_defaulted_functions : test_case.cpp : TEST_BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS ; obj cxx11_numeric_limits : test_case.cpp : TEST_BOOST_NO_CXX11_NUMERIC_LIMITS ; +obj cxx11_override : test_case.cpp : TEST_BOOST_NO_CXX11_OVERRIDE ; obj cxx11_pointer_traits : test_case.cpp : TEST_BOOST_NO_CXX11_POINTER_TRAITS ; obj cxx11_ref_qualifiers : test_case.cpp : TEST_BOOST_NO_CXX11_REF_QUALIFIERS ; obj cxx11_sfinae_expr : test_case.cpp : TEST_BOOST_NO_CXX11_SFINAE_EXPR ; diff --git a/checks/test_case.cpp b/checks/test_case.cpp index 69989254..fcc5b6ca 100644 --- a/checks/test_case.cpp +++ b/checks/test_case.cpp @@ -421,6 +421,11 @@ # error "Defect macro BOOST_NO_CXX11_NUMERIC_LIMITS is defined." # endif #endif +#ifdef TEST_BOOST_NO_CXX11_OVERRIDE +# ifdef BOOST_NO_CXX11_OVERRIDE +# error "Defect macro BOOST_NO_CXX11_OVERRIDE is defined." +# endif +#endif #ifdef TEST_BOOST_NO_CXX11_POINTER_TRAITS # ifdef BOOST_NO_CXX11_POINTER_TRAITS # error "Defect macro BOOST_NO_CXX11_POINTER_TRAITS is defined." diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 394d5d04..fcf4c21c 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -685,6 +685,8 @@ compilers implementing an early draft of the C++11 standard (in particular, inco [[`BOOST_NO_CXX11_NUMERIC_LIMITS`][The standard library `` header does not support the C++11 version of `numeric_limits`. ]] +[[`BOOST_NO_CXX11_OVERRIDE`][The compiler does not support `override`. +]] [[`BOOST_NO_CXX11_POINTER_TRAITS`][The standard library does not provide a C++11 version of `std::pointer_traits` in .]] [[`BOOST_NO_CXX11_RANGE_BASED_FOR`][The compiler does not support @@ -793,6 +795,10 @@ with: static BOOST_CONSTEXPR_OR_CONST UIntType xor_mask = a; `` ]] +[[`BOOST_OVERRIDE`][ +If `BOOST_NO_CXX11_OVERRIDE` is not defined (i.e. C++11 compliant compilers), +expands to `override` keyword, otherwise expands to nothing. +]] [[`BOOST_STATIC_CONSTEXPR`][ This is a shortcut for `static BOOST_CONSTEXPR_OR_CONST`. For example, when defining const expr variables replace: `` diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index f0b0b20f..366cd904 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -198,6 +198,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_OVERRIDE #define BOOST_NO_CXX11_THREAD_LOCAL #define BOOST_NO_CXX11_UNRESTRICTED_UNION diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 1a15f6b0..9d8ba7d7 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -250,6 +250,7 @@ #if !__has_feature(cxx_override_control) # define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_OVERRIDE #endif #if !__has_feature(cxx_unrestricted_unions) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index 6e348afc..3dd71e7e 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -251,6 +251,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_OVERRIDE #define BOOST_NO_CXX11_THREAD_LOCAL #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_UNRESTRICTED_UNION diff --git a/include/boost/config/compiler/common_edg.hpp b/include/boost/config/compiler/common_edg.hpp index 1cb3c98e..6597cd2a 100644 --- a/include/boost/config/compiler/common_edg.hpp +++ b/include/boost/config/compiler/common_edg.hpp @@ -107,6 +107,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_OVERRIDE #define BOOST_NO_CXX11_THREAD_LOCAL #define BOOST_NO_CXX11_UNRESTRICTED_UNION diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index 4c73e9ac..2f1e9e8e 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -201,6 +201,7 @@ #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_OVERRIDE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS @@ -275,6 +276,7 @@ #undef BOOST_NO_CXX11_DELETED_FUNCTIONS #undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #undef BOOST_NO_CXX11_FINAL +#undef BOOST_NO_CXX11_OVERRIDE #undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #undef BOOST_NO_CXX11_LAMBDAS #undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS @@ -346,6 +348,7 @@ #undef BOOST_NO_CXX11_CHAR32_T #undef BOOST_NO_CXX11_INLINE_NAMESPACES #undef BOOST_NO_CXX11_FINAL +#undef BOOST_NO_CXX11_OVERRIDE #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. diff --git a/include/boost/config/compiler/digitalmars.hpp b/include/boost/config/compiler/digitalmars.hpp index 82029f90..7641ee8a 100644 --- a/include/boost/config/compiler/digitalmars.hpp +++ b/include/boost/config/compiler/digitalmars.hpp @@ -83,6 +83,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_OVERRIDE #define BOOST_NO_CXX11_THREAD_LOCAL #define BOOST_NO_CXX11_UNRESTRICTED_UNION diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index d6fbda0e..da1a4322 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -249,6 +249,7 @@ # define BOOST_NO_CXX11_TEMPLATE_ALIASES # define BOOST_NO_CXX11_USER_DEFINED_LITERALS # define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +# define BOOST_NO_CXX11_OVERRIDE #endif // C++0x features in 4.8.n and later diff --git a/include/boost/config/compiler/gcc_xml.hpp b/include/boost/config/compiler/gcc_xml.hpp index 4d14b42a..fd6896a8 100644 --- a/include/boost/config/compiler/gcc_xml.hpp +++ b/include/boost/config/compiler/gcc_xml.hpp @@ -61,6 +61,7 @@ # define BOOST_NO_CXX11_INLINE_NAMESPACES # define BOOST_NO_CXX11_REF_QUALIFIERS # define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_OVERRIDE # define BOOST_NO_CXX11_THREAD_LOCAL # define BOOST_NO_CXX11_UNRESTRICTED_UNION diff --git a/include/boost/config/compiler/intel.hpp b/include/boost/config/compiler/intel.hpp index 2247bc71..9a06d2fe 100644 --- a/include/boost/config/compiler/intel.hpp +++ b/include/boost/config/compiler/intel.hpp @@ -501,8 +501,10 @@ template<> struct assert_intrinsic_wchar_t {}; #endif // BOOST_NO_CXX11_FINAL +// BOOST_NO_CXX11_OVERRIDE #if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) # undef BOOST_NO_CXX11_FINAL +# undef BOOST_NO_CXX11_OVERRIDE #endif // BOOST_NO_CXX11_UNRESTRICTED_UNION diff --git a/include/boost/config/compiler/metrowerks.hpp b/include/boost/config/compiler/metrowerks.hpp index 2e6cf70b..32c1ca9a 100644 --- a/include/boost/config/compiler/metrowerks.hpp +++ b/include/boost/config/compiler/metrowerks.hpp @@ -126,6 +126,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_OVERRIDE #define BOOST_NO_CXX11_THREAD_LOCAL #define BOOST_NO_CXX11_UNRESTRICTED_UNION diff --git a/include/boost/config/compiler/mpw.hpp b/include/boost/config/compiler/mpw.hpp index 8d7e8c28..750d5884 100644 --- a/include/boost/config/compiler/mpw.hpp +++ b/include/boost/config/compiler/mpw.hpp @@ -75,6 +75,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_OVERRIDE #define BOOST_NO_CXX11_THREAD_LOCAL #define BOOST_NO_CXX11_UNRESTRICTED_UNION diff --git a/include/boost/config/compiler/pathscale.hpp b/include/boost/config/compiler/pathscale.hpp index ec6bfd5e..683b0d31 100644 --- a/include/boost/config/compiler/pathscale.hpp +++ b/include/boost/config/compiler/pathscale.hpp @@ -88,6 +88,7 @@ # define BOOST_NO_CXX11_INLINE_NAMESPACES # define BOOST_NO_CXX11_REF_QUALIFIERS # define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_OVERRIDE # define BOOST_NO_CXX11_THREAD_LOCAL # define BOOST_NO_CXX11_UNRESTRICTED_UNION diff --git a/include/boost/config/compiler/sunpro_cc.hpp b/include/boost/config/compiler/sunpro_cc.hpp index 7d838fc9..c674e8ab 100644 --- a/include/boost/config/compiler/sunpro_cc.hpp +++ b/include/boost/config/compiler/sunpro_cc.hpp @@ -123,6 +123,7 @@ #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_OVERRIDE #define BOOST_NO_CXX11_UNRESTRICTED_UNION #endif diff --git a/include/boost/config/compiler/vacpp.hpp b/include/boost/config/compiler/vacpp.hpp index 2c4e2c96..0280fe29 100644 --- a/include/boost/config/compiler/vacpp.hpp +++ b/include/boost/config/compiler/vacpp.hpp @@ -137,6 +137,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_OVERRIDE #define BOOST_NO_CXX11_THREAD_LOCAL #define BOOST_NO_CXX11_UNRESTRICTED_UNION diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 4c47b120..7335540d 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -144,6 +144,7 @@ # define BOOST_NO_CXX11_FINAL # define BOOST_NO_CXX11_RANGE_BASED_FOR # define BOOST_NO_CXX11_SCOPED_ENUMS +# define BOOST_NO_CXX11_OVERRIDE #endif // _MSC_VER < 1700 // C++11 features supported by VC++ 12 (aka 2013). diff --git a/include/boost/config/compiler/xlcpp.hpp b/include/boost/config/compiler/xlcpp.hpp index 95f5e1d9..c24b2c51 100644 --- a/include/boost/config/compiler/xlcpp.hpp +++ b/include/boost/config/compiler/xlcpp.hpp @@ -194,6 +194,7 @@ #if !__has_feature(cxx_override_control) # define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_OVERRIDE #endif #if !__has_feature(cxx_unrestricted_unions) diff --git a/include/boost/config/compiler/xlcpp_zos.hpp b/include/boost/config/compiler/xlcpp_zos.hpp index b62bd9a7..bc5b7e83 100644 --- a/include/boost/config/compiler/xlcpp_zos.hpp +++ b/include/boost/config/compiler/xlcpp_zos.hpp @@ -140,6 +140,7 @@ #define BOOST_NO_CXX11_THREAD_LOCAL #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_OVERRIDE #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_UNRESTRICTED_UNION #define BOOST_NO_CXX14_VARIABLE_TEMPLATES diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp index ffe39cfe..9fcde0cd 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -667,6 +667,12 @@ namespace std{ using ::type_info; } # define BOOST_UNLIKELY(x) x #endif +#if !defined(BOOST_NO_CXX11_OVERRIDE) +# define BOOST_OVERRIDE override +#else +# define BOOST_OVERRIDE +#endif + // Type and data alignment specification // #if !defined(BOOST_ALIGNMENT) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index afe06f04..2f4c974e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -110,6 +110,7 @@ test-suite config [ run helper_macros_test.cpp ] [ compile pragma_message_test.cpp ] [ compile header_deprecated_test.cpp ] + [ compile boost_override_test.cpp ] ; obj has_clang_implicit_fallthrough : cmd_line_check.cpp : diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index f804b20b..3b769522 100644 --- a/test/all/Jamfile.v2 +++ b/test/all/Jamfile.v2 @@ -1,7 +1,7 @@ # # Regression test Jamfile for boost configuration setup. # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Mon Dec 09 09:47:37 2019 +# This file was automatically generated on Thu Apr 9 14:27:07 2020 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -268,6 +268,9 @@ test-suite "BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS" : test-suite "BOOST_NO_CXX11_NUMERIC_LIMITS" : [ run ../no_cxx11_numeric_limits_pass.cpp ] [ compile-fail ../no_cxx11_numeric_limits_fail.cpp ] ; +test-suite "BOOST_NO_CXX11_OVERRIDE" : +[ run ../no_cxx11_override_pass.cpp ] +[ compile-fail ../no_cxx11_override_fail.cpp ] ; test-suite "BOOST_NO_CXX11_POINTER_TRAITS" : [ run ../no_cxx11_pointer_traits_pass.cpp ] [ compile-fail ../no_cxx11_pointer_traits_fail.cpp ] ; diff --git a/test/boost_no_cxx11_override.ipp b/test/boost_no_cxx11_override.ipp new file mode 100644 index 00000000..20bfed08 --- /dev/null +++ b/test/boost_no_cxx11_override.ipp @@ -0,0 +1,32 @@ +/* +Copyright 2020 Glen Joseph Fernandes +(glenjofe@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_CXX11_OVERRIDE +// TITLE: C++11 SFINAE for expressions +// DESCRIPTION: C++11 SFINAE for expressions not supported. + +namespace boost_no_cxx11_override { + +struct base { + virtual void first() = 0; + virtual void second() { } +}; + +struct derived + : base { + void first() override { } + void second() override { } +}; + +int test() +{ + return 0; +} + +} /* boost_no_cxx11_override */ diff --git a/test/boost_override_test.cpp b/test/boost_override_test.cpp new file mode 100644 index 00000000..bb639018 --- /dev/null +++ b/test/boost_override_test.cpp @@ -0,0 +1,19 @@ +/* +Copyright 2020 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#include + +struct base { + virtual void first() = 0; + virtual void second() { } +}; + +struct derived + : base { + void first() BOOST_OVERRIDE { } + void second() BOOST_OVERRIDE { } +}; diff --git a/test/config_info.cpp b/test/config_info.cpp index 3a0c19ee..38ce96bd 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -1131,6 +1131,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS); PRINT_MACRO(BOOST_NO_CXX11_NULLPTR); PRINT_MACRO(BOOST_NO_CXX11_NUMERIC_LIMITS); + PRINT_MACRO(BOOST_NO_CXX11_OVERRIDE); PRINT_MACRO(BOOST_NO_CXX11_POINTER_TRAITS); PRINT_MACRO(BOOST_NO_CXX11_RANGE_BASED_FOR); PRINT_MACRO(BOOST_NO_CXX11_RAW_LITERALS); @@ -1234,6 +1235,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 f5c1137e..d1c92025 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Mon Dec 09 09:47:37 2019 +// This file was automatically generated on Thu Apr 9 14:27:07 2020 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -247,6 +247,11 @@ namespace boost_no_cxx11_non_public_defaulted_functions = empty_boost; #else namespace boost_no_cxx11_numeric_limits = empty_boost; #endif +#ifndef BOOST_NO_CXX11_OVERRIDE +#include "boost_no_cxx11_override.ipp" +#else +namespace boost_no_cxx11_override = empty_boost; +#endif #ifndef BOOST_NO_CXX11_POINTER_TRAITS #include "boost_no_cxx11_pointer_traits.ipp" #else @@ -1431,6 +1436,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_CXX11_NUMERIC_LIMITS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_cxx11_override::test()) + { + std::cerr << "Failed test for BOOST_NO_CXX11_OVERRIDE at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_no_cxx11_pointer_traits::test()) { std::cerr << "Failed test for BOOST_NO_CXX11_POINTER_TRAITS at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/no_cxx11_override_fail.cpp b/test/no_cxx11_override_fail.cpp new file mode 100644 index 00000000..494df796 --- /dev/null +++ b/test/no_cxx11_override_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Apr 9 14:27:07 2020 +// 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_OVERRIDE +// This file should not compile, if it does then +// BOOST_NO_CXX11_OVERRIDE should not be defined. +// See file boost_no_cxx11_override.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_OVERRIDE +#include "boost_no_cxx11_override.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx11_override::test(); +} + diff --git a/test/no_cxx11_override_pass.cpp b/test/no_cxx11_override_pass.cpp new file mode 100644 index 00000000..4faee3bd --- /dev/null +++ b/test/no_cxx11_override_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Apr 9 14:27:07 2020 +// 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_OVERRIDE +// This file should compile, if it does not then +// BOOST_NO_CXX11_OVERRIDE should be defined. +// See file boost_no_cxx11_override.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_OVERRIDE +#include "boost_no_cxx11_override.ipp" +#else +namespace boost_no_cxx11_override = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx11_override::test(); +} + From 2dcb3f09c009ed9de7f50b2490ca8061501fc019 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sat, 11 Apr 2020 12:41:56 -0400 Subject: [PATCH 19/24] Turn off 128-bit integer for Embarcadero C++ clang-based compilers. Update the test for 128-bit integers. --- include/boost/config/compiler/codegear.hpp | 6 ++++++ test/boost_has_int128.ipp | 3 +++ 2 files changed, 9 insertions(+) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index 6e348afc..c2ee6cd0 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -26,6 +26,12 @@ # define BOOST_NO_CXX11_THREAD_LOCAL # define BOOST_NO_CXX11_ATOMIC_SMART_PTR +// This bug has been reported to Embarcadero + +#if defined(BOOST_HAS_INT128) +#undef BOOST_HAS_INT128 +#endif + // 32 functions are missing from the current RTL in cwchar, so it really can not be used even if it exists # define BOOST_NO_CWCHAR diff --git a/test/boost_has_int128.ipp b/test/boost_has_int128.ipp index b7e10a40..c581acc6 100644 --- a/test/boost_has_int128.ipp +++ b/test/boost_has_int128.ipp @@ -63,6 +63,9 @@ int test() fputs("Incorrect computation result.", stderr); return 1; } + + my_uint128_t i(2), j(1), k; + k = i / j; return 0; } From 869cc06e30fe219764fa7df717f6b2b3501dbc80 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sat, 11 Apr 2020 15:00:14 -0400 Subject: [PATCH 20/24] Turned off 128 bit float for Embarcadero and updated 128 float test. --- include/boost/config/compiler/codegear.hpp | 3 +++ test/boost_has_float128.ipp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index c2ee6cd0..bfa4df56 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -31,6 +31,9 @@ #if defined(BOOST_HAS_INT128) #undef BOOST_HAS_INT128 #endif +#if defined(BOOST_HAS_FLOAT128) +#undef BOOST_HAS_FLOAT128 +#endif // 32 functions are missing from the current RTL in cwchar, so it really can not be used even if it exists diff --git a/test/boost_has_float128.ipp b/test/boost_has_float128.ipp index 80b211c1..1c36fd40 100644 --- a/test/boost_has_float128.ipp +++ b/test/boost_has_float128.ipp @@ -22,6 +22,10 @@ int test() __float128 big_float = 0.0Q; #endif (void)&big_float; + + __float128 i(2.00), j(1.00), k; + k = i / j; + return 0; } From db53db48e5ede4e478a8474676e2e0af269d2cda Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sun, 12 Apr 2020 06:30:42 -0400 Subject: [PATCH 21/24] Corrected code. --- test/boost_has_int128.ipp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/boost_has_int128.ipp b/test/boost_has_int128.ipp index c581acc6..abc10063 100644 --- a/test/boost_has_int128.ipp +++ b/test/boost_has_int128.ipp @@ -64,8 +64,8 @@ int test() return 1; } - my_uint128_t i(2), j(1), k; - k = i / j; + my_uint128_t ii(2), jj(1), kk; + kk = ii / jj; return 0; } From 3e9a8d9fcdffa7617175d76e2642e0150acfe488 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Fri, 17 Apr 2020 05:49:29 -0400 Subject: [PATCH 22/24] Atomic exchange for 16 bytes does not work for Embarcadero C++ clang-based compilers. --- include/boost/config/compiler/codegear.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index bdb43f03..3fdaa97a 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -35,6 +35,10 @@ #undef BOOST_HAS_FLOAT128 #endif +// The clang-based compilers can not do 128 atomic exchanges + +#define BOOST_ATOMIC_NO_CMPXCHG16B + // 32 functions are missing from the current RTL in cwchar, so it really can not be used even if it exists # define BOOST_NO_CWCHAR From 4433fe3355d53fb9c1fdc30d54c90d080ad200c1 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Thu, 23 Apr 2020 11:54:24 -0400 Subject: [PATCH 23/24] Define BOOST_NORETURN for Embarcadero the same as gcc/clang --- 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 9fcde0cd..843b922e 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -634,7 +634,7 @@ namespace std{ using ::type_info; } #if !defined(BOOST_NORETURN) # if defined(_MSC_VER) # define BOOST_NORETURN __declspec(noreturn) -# elif defined(__GNUC__) +# elif defined(__GNUC__) || defined(__CODEGEARC__) && defined(__clang__) # define BOOST_NORETURN __attribute__ ((__noreturn__)) # elif defined(__has_attribute) && defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x5130) # if __has_attribute(noreturn) From 9baf468ecbbb78e6dc4f68161a572566e51221a5 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Mon, 27 Apr 2020 21:21:11 -0700 Subject: [PATCH 24/24] Bump version to 1.74.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 ce7aa4d6..d35fdf51 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 107300 +#define BOOST_VERSION 107400 // // 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_73" +#define BOOST_LIB_VERSION "1_74" #endif