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 e37efac1..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: `` @@ -1406,6 +1412,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] 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..1ea6faa7 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) -#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") +#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 -# 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_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) # 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") -# 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") +# 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 @@ -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..366cd904 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 @@ -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 @@ -333,4 +334,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/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 91f40a92..3fdaa97a 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -9,6 +9,155 @@ // 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" +# 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 +#if defined(BOOST_HAS_FLOAT128) +#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 + +# ifndef __MT__ /* If compiling in single-threaded mode, assume there is no CXX11_HDR_ATOMIC */ +# define BOOST_NO_CXX11_HDR_ATOMIC +# endif + +/* 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: +// +#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: +#ifdef _WIN32 +# define BOOST_HAS_STDINT_H +#endif + +// +// __int64: +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_MS_INT64 +#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) + +#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__ +// # 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 @@ -17,16 +166,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__ > 0x621) -# 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) @@ -78,6 +217,8 @@ # define BOOST_HAS_PRAGMA_ONCE #endif +#define BOOST_NO_FENV_H + // // C++0x macros: // @@ -123,7 +264,9 @@ #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 // C++ 14: @@ -238,3 +381,4 @@ #define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__) +#endif // #if !defined(__clang__) 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 78f1ae39..da1a4322 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -249,12 +249,12 @@ # 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 // #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 +267,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) 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/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..843b922e 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 @@ -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 @@ -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) @@ -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/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/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 10980420..2d4dbc71 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) @@ -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/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 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/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 diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 5b2a9ad9..2f4c974e 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 ] @@ -91,6 +92,7 @@ test-suite config : #input-files : #requirements shared + single BOOST_DYN_LINK=1 BOOST_CONFIG_NO_LIB=1 vxworks:shared @@ -108,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/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/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_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; } diff --git a/test/boost_has_int128.ipp b/test/boost_has_int128.ipp index b7e10a40..abc10063 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 ii(2), jj(1), kk; + kk = ii / jj; return 0; } 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); 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() { 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_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/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/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); 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(); +} +