diff --git a/doc/configuring_boost.qbk b/doc/configuring_boost.qbk index ee86a9a3f..30fd09c8e 100644 --- a/doc/configuring_boost.qbk +++ b/doc/configuring_boost.qbk @@ -43,17 +43,18 @@ use those configuration macros, such use is acceptable. The configuration macros are documented as to their purpose, usage, and limitations which makes them usable by both Boost library and user code. -Boost [link config_info_macros informational] or [link config_helpers helper] -macros are designed for use by Boost users as well as for our own internal use. -Note however, that the [link config_features feature test] and -[link config_defects defect test] macros were designed for internal use by -Boost libraries, not user code, so they can change at any time (though no -gratuitous changes are made to them). Boost library problems resulting from -changes to the configuration macros are caught by the Boost regression tests, -so the Boost libraries are updated to account for those changes. By contrast, -Boost library user code can be adversely affected by changes to the macros -without warning. The best way to keep abreast of changes to the macros used in -user code is to monitor the discussions on the Boost developers list. +Boost [link config_info_macros informational], [link config_helpers helper] and +[link config_optimisation_macros optimiser-hint] macros are designed for use by +Boost users as well as for our own internal use. Note however, that the +[link config_features feature test] and [link config_defects defect test] macros +were designed for internal use by Boost libraries, not user code, so they can +change at any time (though no gratuitous changes are made to them). Boost +library problems resulting from changes to the configuration macros are caught +by the Boost regression tests, so the Boost libraries are updated to account +for those changes. By contrast, Boost library user code can be adversely +affected by changes to the macros without warning. The best way to keep +abreast of changes to the macros used in user code is to monitor the +discussions on the Boost developers list. [endsect] diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index e99440404..334b9ac6c 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -865,6 +865,19 @@ If `BOOST_NO_CXX11_NOEXCEPT` is not defined (i.e. C++11 compliant compilers) the `` ] ]] +[[`BOOST_NOTHROW_LITE`][ +A nothrow declaration that does not require insertion of runtime correctness checks (otherwise +required by the standard). +MSVC __declspec( nothrow ) +GCC __attribute(( nothrow )) +others BOOST_NOEXCEPT_OR_NOTHROW +}} +[[`BOOST_OVERRIDE`][ +C++11 override +}} +[[`BOOST_FINAL`][ +C++11 final/MSVC sealed +}} [[`BOOST_MSVC_ENABLE_2012_NOV_CTP`][ For Microsoft Visual C++ 2012, enable the C++11 features supplied by the November 2012 Community Technology Preview. These features are not automatically @@ -1138,6 +1151,12 @@ the arguments is itself a macro (see 16.3.1 in C++ standard). This is normally used to create a mangled name in combination with a predefined macro such a \_\_LINE__. ]] + +[endsect] + +[#config_optimisation_macros] + +[section Compiler optimisation control and hints] [[`BOOST_FORCEINLINE`][ This macro can be used in place of the `inline` keyword to instruct the compiler that the function should always be inlined. @@ -1210,6 +1229,125 @@ Usage example: can be used to disable compiler warnings relating to unused types or variables.]] ] +[[`BOOST_ASSUME(X)``BOOST_ASSUME_UNCHECKED(X)`][ +MSVC's __assume(X) +Clang's __builtin_assume(X) +]] +[[`BOOST_UNREACHABLE(X)``BOOST_UNREACHABLE_UNCHECKED(X)`][ +MSVC's __assume(X) +Clang's __builtin_assume(X) +]] +[[`BOOST_NOVTABLE`][ +MSVC/Clang+ms_extensions __declspec( novtable ) +]] + +[[`BOOST_ATTRIBUTES( ... )`][ +GCC __attribute__(( __VA_ARGS__ )) +MSVC __declspec( __VA_ARGS__ ) +]] + +[[`BOOST_RESTRICTED_FUNCTION_L1``BOOST_RESTRICTED_FUNCTION_L2``BOOST_RESTRICTED_FUNCTION_L3`][ +(function attributes) +L1 - MSVC noalias - parameters, first level parameter indirections (read & write), no global references +L2 - GCC pure - parameters, first level parameter indirections (read only), global reads +L3 - GCC const - parameters (no indirections and global references) +https://msdn.microsoft.com/en-us/library/k649tyc7.aspx +http://stackoverflow.com/questions/2798188/pure-const-function-attributes-in-different-compilers +https://lwn.net/Articles/285332 +https://pimiddy.wordpress.com/2012/04/20/pure-functions-in-cc +]] +[[`BOOST_RESTRICTED_FUNCTION_RETURN`][ +(function attribute) +MSVC restrict +GCC malloc +https://msdn.microsoft.com/en-us/library/8bcxafdh.aspx +]] +[[`BOOST_HOT`][ +(function attribute) +hot function - optimise for speed and/or group appropriately +}} +[[`BOOST_COLD`][ +(function attribute) +cold function - optimise for size and/or group appropriately +]] +[[`BOOST_EXCEPTIONLESS`][ +(function attribute) +BOOST_NOTHROW_LITE as an attribute. +]] +[[`BOOST_DOES_NOT_RETURN`][ +(function attribute) +BOOST_NORETURN as an attribute. +]] +[[`BOOST_WARN_UNUSED_RESULT`][ +(function attribute) +Make the compiler issue a warning if the result of a call to the decorated function is not examined. +]] + +[[`BOOST_THREAD_LOCAL_POD`][ +Compiler specific keyword for pre-C++11 'thread local' POD-only values/objects. +]] + +[[`BOOST_OPTIMIZE_FOR_SPEED_BEGIN()` + `BOOST_OPTIMIZE_FOR_SPEED_END()` + `BOOST_OPTIMIZE_FOR_SIZE_BEGIN()` + `BOOST_OPTIMIZE_FOR_SIZE_END()`][ +Mark a group of functions as hot or cold +]] + +[[`BOOST_FAST_MATH_ON_BEGIN()` + `BOOST_FAST_MATH_ON_END()` + `BOOST_FAST_MATH_OFF_BEGIN()` + `BOOST_FAST_MATH_OFF_END()`][ +Mark a group of functions as using relaxed ("fast") or strict +("slow") floating point semantics +]] + +[[`BOOST_CC_CDECL` + `BOOST_CC_STDCALL` + `BOOST_CC_FASTCALL` + `BOOST_CC_VECTORCALL` + `BOOST_CC_STACK` + `BOOST_CC_REG` + `BOOST_CC_REG_ABI` + `BOOST_CC_PP_LIST`][ +Function calling conventions +CDECL -> __cdecl +STCALL -> __stdcall +FASTCALL -> __fastcall +VECTORCALL -> __vectorcall +STACK -> stack based +REG -> register based +REG_ABI -> 'minimal' register based cc supported by all compilers and/or architectures for a given target (e.g. sseregparm is supported by GCC but not Clang or __vectorcall is supported only by MSVC12 or later and with at least SSE2 enabled), IOW a cc safe to use on ABI boundaries +PP_LIST -> a Boost.PP list of all calling conventions supported by the current compiler in the current compilation context (useful for automatic generation of template specialisations)s +]] + +[[`BOOST_RESTRICTED` + `BOOST_RESTRICTED_PTR` + `BOOST_RESTRICTED_REF` + `BOOST_RESTRICTED_THIS` +][ +Some compilers support the restrict keyword only on pointers (e.g MSVC prior to Visual Studio 2015) while some even support restricted this pointers (for member functions) as well as restricted references (e.g. GCC and Clang). +If BOOST_RESTRICTED is defined then the compiler supports all of the aboce (and the said macro can be used in all circumstances). BOOST_RESTRICTED_PTR, BOOST_RESTRICTED_REF and BOOST_RESTRICTED_THIS are defined in any case. +]] + +[[`BOOST_HAS_MAY_ALIAS` + `BOOST_MAY_ALIAS` + `BOOST_HAS_UNION_TYPE_PUNNING_TRICK` + `BOOST_NO_STRICT_ALIASING` +][ +If BOOST_HAS_MAY_ALIAS is defined, BOOST_MAY_ALIAS has a non-empty definition (i.e. the compiler provides a special attribute to mark types and/or variables as possibly aliasing other objects which it otherwise should not alias according to the standard aliasing rules). +BOOST_HAS_UNION_TYPE_PUNNING_TRICK -> compiler provides (the expected) defined semantics for type punning through a union +BOOST_NO_STRICT_ALIASING -> compiler does not use the strict aliasing rules at all (and thus allows any form of type punning) +]] + +[[`BOOST_OVERRIDABLE_SYMBOL` + `BOOST_OVERRIDABLE_MEMBER_SYMBOL` + `BOOST_OVERRIDABLE_FUNCTION` +][ +MSVC __declspec( selectany ) for data, __declspec( noinline ) inline for functions +GCC __attribute(( weak )) +]] + [endsect] [#config_info_macros] diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 150e3c0d5..1066a44a1 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -1,4 +1,5 @@ // (C) Copyright Douglas Gregor 2010 +// (C) Copyright Domagoj Saric 2015 // // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file @@ -8,6 +9,8 @@ // Clang compiler setup. +#include "gcc_compatible.hpp" + #define BOOST_HAS_PRAGMA_ONCE // Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used. @@ -20,7 +23,11 @@ // clang reports a compiler error. So the only workaround found is: #ifndef __has_extension -#define __has_extension __has_feature +# define __has_extension __has_feature +#endif + +#ifndef __has_declspec_attribute +# define __has_declspec_attribute(x) 0 #endif #ifndef __has_attribute @@ -56,14 +63,27 @@ #define BOOST_HAS_NRVO -// Branch prediction hints -#if defined(__has_builtin) -#if __has_builtin(__builtin_expect) -#define BOOST_LIKELY(x) __builtin_expect(x, 1) -#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) +#if __has_builtin( __builtin_assume ) +# define BOOST_ASSUME_UNCHECKED( condition ) __builtin_assume( condition ) +#endif + +#define BOOST_OVERRIDE override +#define BOOST_FINAL final + +// Requires -fms-extensions +#if __has_declspec_attribute( novtable ) + #define BOOST_NOVTABLE __declspec( novtable ) #endif + +#if defined( __SSE2__ ) && __has_attribute( vectorcall ) +# undef BOOST_CC_REG +# define BOOST_CC_REG __attribute__(( vectorcall )) #endif +// No support for fast-math and size<->speed optimisation macros/pragmas yet... +// http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-April/061527.html +// http://comments.gmane.org/gmane.comp.compilers.clang.devel/28958 + // Clang supports "long long" in all compilation modes. #define BOOST_HAS_LONG_LONG diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index e319d0495..c082994e8 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -13,6 +13,8 @@ // GNU C++ compiler setup. +#include "gcc_compatible.hpp" + // // Define BOOST_GCC so we know this is "real" GCC and not some pretender: // @@ -91,10 +93,6 @@ // #define BOOST_HAS_NRVO -// Branch prediction hints -#define BOOST_LIKELY(x) __builtin_expect(x, 1) -#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) - // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // @@ -131,6 +129,59 @@ #endif // +// final & override keywords +// +#if ( ( __GNUC__ * 10 ) + __GNUC_MINOR__ ) >= 47 +# define BOOST_OVERRIDE override +# define BOOST_FINAL final +#endif + +#ifdef __i386__ +# undef BOOST_CC_REG +# define BOOST_CC_REG __attribute__(( regparm( 3 ), stdcall, sseregparm )) +#endif + +#if ( ( ( __GNUC__ * 10 ) + __GNUC_MINOR__ ) >= 44 ) + // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41201 + // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52144 + #define BOOST_OPTIMIZE_FOR_SPEED_BEGIN() \ + _Pragma( "push" ) \ + _Pragma( "GCC push_options" ) \ + _Pragma( "GCC optimize ( \"O3\" )" ) \ + _Pragma( "arm" ) + + #define BOOST_OPTIMIZE_FOR_SPEED_END() \ + _Pragma( "GCC pop_options" ) \ + _Pragma( "pop" ) + + #define BOOST_OPTIMIZE_FOR_SIZE_BEGIN() \ + _Pragma( "push" ) \ + _Pragma( "GCC push_options" ) \ + _Pragma( "GCC optimize ( \"Os\" )" ) \ + _Pragma( "thumb" ) + + #define BOOST_OPTIMIZE_FOR_SIZE_END BOOST_OPTIMIZE_FOR_SPEED_END + + + // http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-April/061527.html + // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50782 + #define BOOST_FAST_MATH_ON() _Pragma( "GCC optimize ( \"associative-math\" )" ) + #define BOOST_FAST_MATH_OFF() _Pragma( "GCC optimize ( \"no-associative-math\" )" ) + + #define BOOST_FAST_MATH_ON_BEGIN() \ + _Pragma( "GCC push_options" ) \ + BOOST_FAST_MATH_ON() + + #define BOOST_FAST_MATH_ON_END() _Pragma( "GCC pop_options" ) + + #define BOOST_FAST_MATH_OFF_BEGIN() \ + _Pragma( "GCC push_options" ) \ + BOOST_FAST_MATH_OFF() + + #define BOOST_FAST_MATH_OFF_END() _Pragma( "GCC pop_options" ) +#endif + +// // Recent GCC versions have __int128 when in 64-bit mode. // // We disable this if the compiler is really nvcc with C++03 as it diff --git a/include/boost/config/compiler/gcc_compatible.hpp b/include/boost/config/compiler/gcc_compatible.hpp new file mode 100644 index 000000000..b5b89a9d8 --- /dev/null +++ b/include/boost/config/compiler/gcc_compatible.hpp @@ -0,0 +1,60 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// \file gcc_compatible.hpp +/// ------------------------ +/// +/// Definitions shared between GCC and its 'compatibles'/'emulators' (e.g. +/// Clang) +/// +/// (c) Copyright Domagoj Saric 2015 - 2016. +/// +/// Use, modification and distribution are subject to the +/// Boost Software License, Version 1.0. (See accompanying file +/// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +/// +/// See http://www.boost.org for most recent version. +/// +//////////////////////////////////////////////////////////////////////////////// +//------------------------------------------------------------------------------ + +// Branch prediction hints +#define BOOST_LIKELY( x ) __builtin_expect( x, true ) +#define BOOST_UNLIKELY( x ) __builtin_expect( x, false ) + +#define BOOST_UNREACHABLE_UNCHECKED() __builtin_unreachable() + +#define BOOST_ATTRIBUTES( ... ) __attribute__(( __VA_ARGS__ )) +#define BOOST_RESTRICTED_FUNCTION_L1 +#define BOOST_RESTRICTED_FUNCTION_L2 pure +#define BOOST_RESTRICTED_FUNCTION_L3 const +#define BOOST_RESTRICTED_FUNCTION_RETURN malloc +#define BOOST_HOT hot +#define BOOST_COLD cold +#define BOOST_EXCEPTIONLESS nothrow +#define BOOST_DOES_NOT_RETURN noreturn +#define BOOST_WARN_UNUSED_RESULT warn_unused_result + +#ifdef __i386__ +# define BOOST_CC_CDECL __attribute__(( cdecl )) +# define BOOST_CC_FASTCALL __attribute__(( fastcall )) +# define BOOST_CC_STDCALL __attribute__(( stdcall )) +# define BOOST_CC_STACK BOOST_CC_STDCALL +# define BOOST_CC_REG_ABI __attribute__(( regparm( 3 ), stdcall )) +# define BOOST_CC_REG BOOST_CC_REG_ABI +#endif + +#define BOOST_NOTHROW_LITE __attribute__(( nothrow )) + +#define BOOST_THREAD_LOCAL_POD __thread + +#define BOOST_RESTRICTED __restrict__ + +#define BOOST_MAY_ALIAS __attribute__(( may_alias )) + +#define BOOST_HAS_UNION_TYPE_PUNNING_TRICK + +#define BOOST_OVERRIDABLE_SYMBOL __attribute__(( weak )) +#define BOOST_OVERRIDABLE_MEMBER_SYMBOL BOOST_OVERRIDABLE_SYMBOL +#define BOOST_OVERRIDABLE_FUNCTION BOOST_OVERRIDABLE_SYMBOL + +//------------------------------------------------------------------------------ diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 72caff497..d0f860941 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -104,6 +104,96 @@ # define BOOST_NO_RTTI #endif +#ifndef BOOST_NO_STRICT_ALIASING +# define BOOST_NO_STRICT_ALIASING +#endif // BOOST_NO_STRICT_ALIASING + +#define BOOST_RESTRICTED_PTR __restrict +#if _MSC_VER >= 1900 +# define BOOST_RESTRICTED_REF __restrict +#endif + +#define BOOST_CC_CDECL __cdecl +#define BOOST_CC_FASTCALL __fastcall +#define BOOST_CC_STDCALL __stdcall +#define BOOST_CC_STACK BOOST_CC_STDCALL +#define BOOST_CC_REG_ABI BOOST_CC_FASTCALL +#define BOOST_CC_REG BOOST_CC_REG_ABI + +#if ( _MSC_VER >= 1800 ) && ( defined( _M_X64 ) || ( _M_IX86_FP >= 2 ) ) +# undef BOOST_CC_REG +# define BOOST_CC_REG __vectorcall +#endif + +#define BOOST_NOTHROW_LITE __declspec( nothrow ) + +#define BOOST_NOVTABLE __declspec( novtable ) + +#define BOOST_THREAD_LOCAL_POD __declspec( thread ) + +#define BOOST_OVERRIDABLE_SYMBOL extern __declspec( selectany ) +#define BOOST_OVERRIDABLE_MEMBER_SYMBOL __declspec( selectany ) +// http://blogs.msdn.com/b/freik/archive/2005/10/26/485276.aspx +#define BOOST_OVERRIDABLE_FUNCTION extern __declspec( noinline ) inline + +#define BOOST_ASSUME_UNCHECKED( condition ) __assume( condition ) + +#define BOOST_ATTRIBUTES( ... ) __declspec( __VA_ARGS__ ) +#define BOOST_RESTRICTED_FUNCTION_L1 noalias +#define BOOST_RESTRICTED_FUNCTION_L2 BOOST_RESTRICTED_FUNCTION_L1 +#define BOOST_RESTRICTED_FUNCTION_L3 BOOST_RESTRICTED_FUNCTION_L2 +#define BOOST_RESTRICTED_FUNCTION_RETURN restrict +#define BOOST_HOT +#define BOOST_COLD +#define BOOST_EXCEPTIONLESS nothrow +#define BOOST_DOES_NOT_RETURN noreturn +#define BOOST_WARN_UNUSED_RESULT "SAL_mustInspect" + +#define BOOST_OPTIMIZE_FOR_SPEED_BEGIN() \ + __pragma( optimize ( "t", on ) ) \ + __pragma( auto_inline ( on ) ) \ + __pragma( inline_recursion( on ) ) \ + __pragma( inline_depth ( 255 ) ) \ + + +#define BOOST_OPTIMIZE_FOR_SPEED_END() \ + __pragma( optimize ( "", on ) ) + +#define BOOST_OPTIMIZE_FOR_SIZE_BEGIN() \ + __pragma( optimize ( "s", on ) ) + +#define BOOST_OPTIMIZE_FOR_SIZE_END BOOST_OPTIMIZE_FOR_SPEED_END + + +// msdn.microsoft.com/en-us/library/45ec64h6.aspx +#define BOOST_FAST_MATH_ON() \ + __pragma( float_control( except , off ) ) \ + __pragma( fenv_access ( off ) ) \ + __pragma( float_control( precise, off ) ) \ + __pragma( fp_contract ( on ) ) + +#define BOOST_FAST_MATH_OFF() \ + __pragma( float_control( precise, on ) ) \ + __pragma( fenv_access ( on ) ) \ + __pragma( float_control( except , on ) ) \ + __pragma( fp_contract ( off ) ) + +#define BOOST_FAST_MATH_ON_BEGIN() \ + __pragma( float_control( push ) ) \ + BOOST_FAST_MATH_ON() + +#define BOOST_FAST_MATH_ON_END() \ + BOOST_FAST_MATH_OFF() \ + __pragma( float_control( pop ) ) + +#define BOOST_FAST_MATH_OFF_BEGIN() \ + __pragma( float_control( push ) ) \ + BOOST_FAST_MATH_OFF() + +#define BOOST_FAST_MATH_OFF_END() \ + BOOST_FAST_MATH_ON() \ + __pragma( float_control( pop ) ) + // // TR1 features: // diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 17bf1020f..32a2d08c0 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -53,7 +53,7 @@ // remember that since these just declare a bunch of macros, there should be // no namespace issues from this. // -#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \ +#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \ && !defined(BOOST_MSVC) && !defined(__BORLANDC__) # include # if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) @@ -645,6 +645,94 @@ namespace std{ using ::type_info; } # define BOOST_UNLIKELY(x) x #endif +#ifndef BOOST_ASSUME_UNCHECKED +# ifdef BOOST_UNREACHABLE_UNCHECKED +# define BOOST_ASSUME_UNCHECKED( condition ) do { if ( !( condition ) ) BOOST_UNREACHABLE_UNCHECKED(); } while ( 0 ) +# else +# define BOOST_ASSUME_UNCHECKED( condition ) +# endif +#endif + +#ifndef BOOST_UNREACHABLE_UNCHECKED +# define BOOST_UNREACHABLE_UNCHECKED() BOOST_ASSUME_UNCHECKED( false ) +#endif // BOOST_UNREACHABLE_UNCHECKED + + +#define BOOST_UNREACHABLE( ) BOOST_ASSERT_MSG( false , "This code should not be reached!" ); BOOST_UNREACHABLE_UNCHECKED() +#define BOOST_ASSUME( condition ) BOOST_ASSERT_MSG( condition, "Assumption broken!" ); BOOST_ASSUME_UNCHECKED( condition ) + +#define BOOST_DEFAULT_CASE_UNREACHABLE_UNCHECKED() default: BOOST_UNREACHABLE_UNCHECKED(); break +#define BOOST_DEFAULT_CASE_UNREACHABLE() default: BOOST_ASSERT_MSG( false, "Unexpected: default case executed!" ); BOOST_UNREACHABLE_UNCHECKED(); break + +#ifndef BOOST_OVERRIDE +# define BOOST_OVERRIDE +# define BOOST_FINAL +#endif // BOOST_OVERRIDE + +#ifndef BOOST_NOVTABLE +# define BOOST_NOVTABLE +#endif // BOOST_NOVTABLE + +#ifndef BOOST_OPTIMIZE_FOR_SPEED_BEGIN +# define BOOST_OPTIMIZE_FOR_SPEED_BEGIN() +# define BOOST_OPTIMIZE_FOR_SPEED_END() +# define BOOST_OPTIMIZE_FOR_SIZE_BEGIN() +# define BOOST_OPTIMIZE_FOR_SIZE_END() +#endif // BOOST_OPTIMIZE_FOR_SPEED_BEGIN + +#ifndef BOOST_FAST_MATH_ON +# define BOOST_FAST_MATH_ON() +# define BOOST_FAST_MATH_OFF() +# define BOOST_FAST_MATH_ON_BEGIN() +# define BOOST_FAST_MATH_ON_END() +# define BOOST_FAST_MATH_OFF_BEGIN() +# define BOOST_FAST_MATH_OFF_END() +#endif // BOOST_FAST_MATH_ON + +#ifndef BOOST_CC_CDECL +# define BOOST_CC_CDECL +#endif // BOOST_CC_CDECL +#ifndef BOOST_CC_FASTCALL +# define BOOST_CC_FASTCALL +#endif // BOOST_CC_FASTCALL +#ifndef BOOST_CC_STDCALL +# define BOOST_CC_STDCALL +#endif // BOOST_CC_STDCALL +#ifndef BOOST_CC_STACK +# define BOOST_CC_STACK +#endif // BOOST_CC_STACK +#ifndef BOOST_CC_REG_ABI +# define BOOST_CC_REG_ABI BOOST_CC_FASTCALL +#endif // BOOST_CC_REG_ABI +#ifndef BOOST_CC_REG +# define BOOST_CC_REG BOOST_CC_REG_ABI +#endif // BOOST_CC_REG + + +#ifdef BOOST_RESTRICTED +# define BOOST_RESTRICTED_PTR BOOST_RESTRICTED +# define BOOST_RESTRICTED_REF BOOST_RESTRICTED +# define BOOST_RESTRICTED_THIS BOOST_RESTRICTED +#else +# ifndef BOOST_RESTRICTED_PTR +# define BOOST_RESTRICTED_PTR +# endif // BOOST_RESTRICTED_PTR +# ifndef BOOST_RESTRICTED_REF +# define BOOST_RESTRICTED_REF +# endif // BOOST_RESTRICTED_REF +# ifndef BOOST_RESTRICTED_THIS +# define BOOST_RESTRICTED_THIS +# endif // BOOST_RESTRICTED_THIS +#endif // BOOST_RESTRICTED + +#ifndef BOOST_ATTRIBUTES +# define BOOST_ATTRIBUTES( attribs ) +#endif // BOOST_ATTRIBUTES + +#ifdef BOOST_MAY_ALIAS +# define BOOST_HAS_MAY_ALIAS +#endif // BOOST_MAY_ALIAS + // Type and data alignment specification // #if !defined(BOOST_NO_CXX11_ALIGNAS) @@ -658,6 +746,22 @@ namespace std{ using ::type_info; } # define BOOST_ALIGNMENT(x) #endif + +#ifdef BOOST_OVERRIDABLE_SYMBOL +# define BOOST_HAS_OVERRIDABLE_SYMBOL +#else +# define BOOST_OVERRIDABLE_SYMBOL +#endif // BOOST_OVERRIDABLE_SYMBOL + +#ifndef BOOST_OVERRIDABLE_FUNCTION +# ifdef BOOST_HAS_OVERRIDABLE_SYMBOL +# define BOOST_OVERRIDABLE_FUNCTION BOOST_HAS_OVERRIDABLE_SYMBOL +# else +# define BOOST_OVERRIDABLE_FUNCTION +# endif // BOOST_HAS_OVERRIDABLE_SYMBOL +#endif // BOOST_OVERRIDABLE_FUNCTION + + // Lack of non-public defaulted functions is implied by the lack of any defaulted functions #if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) # define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS @@ -930,6 +1034,10 @@ namespace std{ using ::type_info; } # define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate)) # define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression)) #endif + +#ifndef BOOST_NOTHROW_LITE +# define BOOST_NOTHROW_LITE BOOST_NOEXCEPT_OR_NOTHROW +#endif // BOOST_NOTHROW_LITE // // Helper macro BOOST_FALLTHROUGH // Fallback definition of BOOST_FALLTHROUGH macro used to mark intended @@ -995,7 +1103,7 @@ namespace std{ using ::type_info; } #endif // -// Finish off with checks for macros that are depricated / no longer supported, +// Finish off with checks for macros that are deprecated / no longer supported, // if any of these are set then it's very likely that much of Boost will no // longer work. So stop with a #error for now, but give the user a chance // to continue at their own risk if they really want to: