Chris@16: // Boost config.hpp configuration header file ------------------------------// Chris@101: // boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file Chris@16: Chris@16: // Copyright (c) 2001-2003 John Maddock Chris@16: // Copyright (c) 2001 Darin Adler Chris@16: // Copyright (c) 2001 Peter Dimov Chris@16: // Copyright (c) 2002 Bill Kempf Chris@16: // Copyright (c) 2002 Jens Maurer Chris@16: // Copyright (c) 2002-2003 David Abrahams Chris@16: // Copyright (c) 2003 Gennaro Prota Chris@16: // Copyright (c) 2003 Eric Friedman Chris@16: // Copyright (c) 2010 Eric Jourdanneau, Joel Falcou Chris@16: // Distributed under the Boost Software License, Version 1.0. (See Chris@16: // accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // See http://www.boost.org/ for most recent version. Chris@16: Chris@16: // Boost config.hpp policy and rationale documentation has been moved to Chris@16: // http://www.boost.org/libs/config/ Chris@16: // Chris@16: // This file is intended to be stable, and relatively unchanging. Chris@16: // It should contain boilerplate code only - no compiler specific Chris@16: // code unless it is unavoidable - no changes unless unavoidable. Chris@16: Chris@16: #ifndef BOOST_CONFIG_SUFFIX_HPP Chris@16: #define BOOST_CONFIG_SUFFIX_HPP Chris@16: Chris@16: #if defined(__GNUC__) && (__GNUC__ >= 4) Chris@16: // Chris@16: // Some GCC-4.x versions issue warnings even when __extension__ is used, Chris@16: // so use this as a workaround: Chris@16: // Chris@16: #pragma GCC system_header Chris@16: #endif Chris@16: Chris@16: // Chris@16: // ensure that visibility macros are always defined, thus symplifying use Chris@16: // Chris@16: #ifndef BOOST_SYMBOL_EXPORT Chris@16: # define BOOST_SYMBOL_EXPORT Chris@16: #endif Chris@16: #ifndef BOOST_SYMBOL_IMPORT Chris@16: # define BOOST_SYMBOL_IMPORT Chris@16: #endif Chris@16: #ifndef BOOST_SYMBOL_VISIBLE Chris@16: # define BOOST_SYMBOL_VISIBLE Chris@16: #endif Chris@16: Chris@16: // Chris@16: // look for long long by looking for the appropriate macros in . Chris@16: // Note that we use limits.h rather than climits for maximal portability, Chris@16: // remember that since these just declare a bunch of macros, there should be Chris@16: // no namespace issues from this. Chris@16: // Chris@16: #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \ Chris@16: && !defined(BOOST_MSVC) && !defined(__BORLANDC__) Chris@16: # include Chris@16: # if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) Chris@16: # define BOOST_HAS_LONG_LONG Chris@16: # else Chris@16: # define BOOST_NO_LONG_LONG Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: // GCC 3.x will clean up all of those nasty macro definitions that Chris@16: // BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine Chris@16: // it under GCC 3.x. Chris@16: #if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS) Chris@16: # undef BOOST_NO_CTYPE_FUNCTIONS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Assume any extensions are in namespace std:: unless stated otherwise: Chris@16: // Chris@16: # ifndef BOOST_STD_EXTENSION_NAMESPACE Chris@16: # define BOOST_STD_EXTENSION_NAMESPACE std Chris@16: # endif Chris@16: Chris@16: // Chris@16: // If cv-qualified specializations are not allowed, then neither are cv-void ones: Chris@16: // Chris@16: # if defined(BOOST_NO_CV_SPECIALIZATIONS) \ Chris@16: && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) Chris@16: # define BOOST_NO_CV_VOID_SPECIALIZATIONS Chris@16: # endif Chris@16: Chris@16: // Chris@16: // If there is no numeric_limits template, then it can't have any compile time Chris@16: // constants either! Chris@16: // Chris@16: # if defined(BOOST_NO_LIMITS) \ Chris@16: && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) Chris@16: # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS Chris@16: # define BOOST_NO_MS_INT64_NUMERIC_LIMITS Chris@16: # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS Chris@16: # endif Chris@16: Chris@16: // Chris@16: // if there is no long long then there is no specialisation Chris@16: // for numeric_limits either: Chris@16: // Chris@16: #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS) Chris@16: # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // if there is no __int64 then there is no specialisation Chris@16: // for numeric_limits<__int64> either: Chris@16: // Chris@16: #if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS) Chris@16: # define BOOST_NO_MS_INT64_NUMERIC_LIMITS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // if member templates are supported then so is the Chris@16: // VC6 subset of member templates: Chris@16: // Chris@16: # if !defined(BOOST_NO_MEMBER_TEMPLATES) \ Chris@16: && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) Chris@16: # define BOOST_MSVC6_MEMBER_TEMPLATES Chris@16: # endif Chris@16: Chris@16: // Chris@16: // Without partial specialization, can't test for partial specialisation bugs: Chris@16: // Chris@16: # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ Chris@16: && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) Chris@16: # define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG Chris@16: # endif Chris@16: Chris@16: // Chris@16: // Without partial specialization, we can't have array-type partial specialisations: Chris@16: // Chris@16: # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ Chris@16: && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) Chris@16: # define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS Chris@16: # endif Chris@16: Chris@16: // Chris@16: // Without partial specialization, std::iterator_traits can't work: Chris@16: // Chris@16: # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ Chris@16: && !defined(BOOST_NO_STD_ITERATOR_TRAITS) Chris@16: # define BOOST_NO_STD_ITERATOR_TRAITS Chris@16: # endif Chris@16: Chris@16: // Chris@16: // Without partial specialization, partial Chris@16: // specialization with default args won't work either: Chris@16: // Chris@16: # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ Chris@16: && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) Chris@16: # define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS Chris@16: # endif Chris@16: Chris@16: // Chris@16: // Without member template support, we can't have template constructors Chris@16: // in the standard library either: Chris@16: // Chris@16: # if defined(BOOST_NO_MEMBER_TEMPLATES) \ Chris@16: && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ Chris@16: && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) Chris@16: # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS Chris@16: # endif Chris@16: Chris@16: // Chris@16: // Without member template support, we can't have a conforming Chris@16: // std::allocator template either: Chris@16: // Chris@16: # if defined(BOOST_NO_MEMBER_TEMPLATES) \ Chris@16: && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ Chris@16: && !defined(BOOST_NO_STD_ALLOCATOR) Chris@16: # define BOOST_NO_STD_ALLOCATOR Chris@16: # endif Chris@16: Chris@16: // Chris@16: // without ADL support then using declarations will break ADL as well: Chris@16: // Chris@16: #if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) Chris@16: # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Without typeid support we have no dynamic RTTI either: Chris@16: // Chris@16: #if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI) Chris@16: # define BOOST_NO_RTTI Chris@16: #endif Chris@16: Chris@16: // Chris@16: // If we have a standard allocator, then we have a partial one as well: Chris@16: // Chris@16: #if !defined(BOOST_NO_STD_ALLOCATOR) Chris@16: # define BOOST_HAS_PARTIAL_STD_ALLOCATOR Chris@16: #endif Chris@16: Chris@16: // Chris@16: // We can't have a working std::use_facet if there is no std::locale: Chris@16: // Chris@16: # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET) Chris@16: # define BOOST_NO_STD_USE_FACET Chris@16: # endif Chris@16: Chris@16: // Chris@16: // We can't have a std::messages facet if there is no std::locale: Chris@16: // Chris@16: # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES) Chris@16: # define BOOST_NO_STD_MESSAGES Chris@16: # endif Chris@16: Chris@16: // Chris@16: // We can't have a working std::wstreambuf if there is no std::locale: Chris@16: // Chris@16: # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF) Chris@16: # define BOOST_NO_STD_WSTREAMBUF Chris@16: # endif Chris@16: Chris@16: // Chris@16: // We can't have a if there is no : Chris@16: // Chris@16: # if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE) Chris@16: # define BOOST_NO_CWCTYPE Chris@16: # endif Chris@16: Chris@16: // Chris@16: // We can't have a swprintf if there is no : Chris@16: // Chris@16: # if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF) Chris@16: # define BOOST_NO_SWPRINTF Chris@16: # endif Chris@16: Chris@16: // Chris@16: // If Win32 support is turned off, then we must turn off Chris@16: // threading support also, unless there is some other Chris@16: // thread API enabled: Chris@16: // Chris@16: #if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \ Chris@16: && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS) Chris@16: # define BOOST_DISABLE_THREADS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Turn on threading support if the compiler thinks that it's in Chris@16: // multithreaded mode. We put this here because there are only a Chris@16: // limited number of macros that identify this (if there's any missing Chris@16: // from here then add to the appropriate compiler section): Chris@16: // Chris@16: #if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \ Chris@16: || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \ Chris@16: && !defined(BOOST_HAS_THREADS) Chris@16: # define BOOST_HAS_THREADS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Turn threading support off if BOOST_DISABLE_THREADS is defined: Chris@16: // Chris@16: #if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS) Chris@16: # undef BOOST_HAS_THREADS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Turn threading support off if we don't recognise the threading API: Chris@16: // Chris@16: #if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\ Chris@16: && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\ Chris@16: && !defined(BOOST_HAS_MPTASKS) Chris@16: # undef BOOST_HAS_THREADS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Turn threading detail macros off if we don't (want to) use threading Chris@16: // Chris@16: #ifndef BOOST_HAS_THREADS Chris@16: # undef BOOST_HAS_PTHREADS Chris@16: # undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE Chris@16: # undef BOOST_HAS_PTHREAD_YIELD Chris@16: # undef BOOST_HAS_PTHREAD_DELAY_NP Chris@16: # undef BOOST_HAS_WINTHREADS Chris@16: # undef BOOST_HAS_BETHREADS Chris@16: # undef BOOST_HAS_MPTASKS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // If the compiler claims to be C99 conformant, then it had better Chris@16: // have a : Chris@16: // Chris@16: # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) Chris@16: # define BOOST_HAS_STDINT_H Chris@16: # ifndef BOOST_HAS_LOG1P Chris@16: # define BOOST_HAS_LOG1P Chris@16: # endif Chris@16: # ifndef BOOST_HAS_EXPM1 Chris@16: # define BOOST_HAS_EXPM1 Chris@16: # endif Chris@16: # endif Chris@16: Chris@16: // Chris@16: // Define BOOST_NO_SLIST and BOOST_NO_HASH if required. Chris@16: // Note that this is for backwards compatibility only. Chris@16: // Chris@16: # if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST) Chris@16: # define BOOST_NO_SLIST Chris@16: # endif Chris@16: Chris@16: # if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH) Chris@16: # define BOOST_NO_HASH Chris@16: # endif Chris@16: Chris@16: // Chris@16: // Set BOOST_SLIST_HEADER if not set already: Chris@16: // Chris@16: #if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER) Chris@16: # define BOOST_SLIST_HEADER Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Set BOOST_HASH_SET_HEADER if not set already: Chris@16: // Chris@16: #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER) Chris@16: # define BOOST_HASH_SET_HEADER Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Set BOOST_HASH_MAP_HEADER if not set already: Chris@16: // Chris@16: #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER) Chris@16: # define BOOST_HASH_MAP_HEADER Chris@16: #endif Chris@16: Chris@16: // BOOST_HAS_ABI_HEADERS Chris@16: // This macro gets set if we have headers that fix the ABI, Chris@16: // and prevent ODR violations when linking to external libraries: Chris@16: #if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS) Chris@16: # define BOOST_HAS_ABI_HEADERS Chris@16: #endif Chris@16: Chris@16: #if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS) Chris@16: # undef BOOST_HAS_ABI_HEADERS Chris@16: #endif Chris@16: Chris@16: // BOOST_NO_STDC_NAMESPACE workaround --------------------------------------// Chris@16: // Because std::size_t usage is so common, even in boost headers which do not Chris@16: // otherwise use the C library, the workaround is included here so Chris@16: // that ugly workaround code need not appear in many other boost headers. Chris@16: // NOTE WELL: This is a workaround for non-conforming compilers; Chris@16: // must still be #included in the usual places so that inclusion Chris@16: // works as expected with standard conforming compilers. The resulting Chris@16: // double inclusion of is harmless. Chris@16: Chris@16: # if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus) Chris@16: # include Chris@16: namespace std { using ::ptrdiff_t; using ::size_t; } Chris@16: # endif Chris@16: Chris@16: // Workaround for the unfortunate min/max macros defined by some platform headers Chris@16: Chris@16: #define BOOST_PREVENT_MACRO_SUBSTITUTION Chris@16: Chris@16: #ifndef BOOST_USING_STD_MIN Chris@16: # define BOOST_USING_STD_MIN() using std::min Chris@16: #endif Chris@16: Chris@16: #ifndef BOOST_USING_STD_MAX Chris@16: # define BOOST_USING_STD_MAX() using std::max Chris@16: #endif Chris@16: Chris@16: // BOOST_NO_STD_MIN_MAX workaround -----------------------------------------// Chris@16: Chris@16: # if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus) Chris@16: Chris@16: namespace std { Chris@16: template Chris@16: inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { Chris@16: return __b < __a ? __b : __a; Chris@16: } Chris@16: template Chris@16: inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { Chris@16: return __a < __b ? __b : __a; Chris@16: } Chris@16: } Chris@16: Chris@16: # endif Chris@16: Chris@16: // BOOST_STATIC_CONSTANT workaround --------------------------------------- // Chris@16: // On compilers which don't allow in-class initialization of static integral Chris@16: // constant members, we must use enums as a workaround if we want the constants Chris@16: // to be available at compile-time. This macro gives us a convenient way to Chris@16: // declare such constants. Chris@16: Chris@16: # ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION Chris@16: # define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment } Chris@16: # else Chris@16: # define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment Chris@16: # endif Chris@16: Chris@16: // BOOST_USE_FACET / HAS_FACET workaround ----------------------------------// Chris@16: // When the standard library does not have a conforming std::use_facet there Chris@16: // are various workarounds available, but they differ from library to library. Chris@16: // The same problem occurs with has_facet. Chris@16: // These macros provide a consistent way to access a locale's facets. Chris@16: // Usage: Chris@16: // replace Chris@16: // std::use_facet(loc); Chris@16: // with Chris@16: // BOOST_USE_FACET(Type, loc); Chris@16: // Note do not add a std:: prefix to the front of BOOST_USE_FACET! Chris@16: // Use for BOOST_HAS_FACET is analogous. Chris@16: Chris@16: #if defined(BOOST_NO_STD_USE_FACET) Chris@16: # ifdef BOOST_HAS_TWO_ARG_USE_FACET Chris@16: # define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast(0)) Chris@16: # define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast(0)) Chris@16: # elif defined(BOOST_HAS_MACRO_USE_FACET) Chris@16: # define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type) Chris@16: # define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type) Chris@16: # elif defined(BOOST_HAS_STLP_USE_FACET) Chris@16: # define BOOST_USE_FACET(Type, loc) (*std::_Use_facet(loc)) Chris@16: # define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) Chris@16: # endif Chris@16: #else Chris@16: # define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc) Chris@16: # define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) Chris@16: #endif Chris@16: Chris@16: // BOOST_NESTED_TEMPLATE workaround ------------------------------------------// Chris@16: // Member templates are supported by some compilers even though they can't use Chris@16: // the A::template member syntax, as a workaround replace: Chris@16: // Chris@16: // typedef typename A::template rebind binder; Chris@16: // Chris@16: // with: Chris@16: // Chris@16: // typedef typename A::BOOST_NESTED_TEMPLATE rebind binder; Chris@16: Chris@16: #ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD Chris@16: # define BOOST_NESTED_TEMPLATE template Chris@16: #else Chris@16: # define BOOST_NESTED_TEMPLATE Chris@16: #endif Chris@16: Chris@16: // BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------// Chris@16: // Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION Chris@16: // is defined, in which case it evaluates to return x; Use when you have a return Chris@16: // statement that can never be reached. Chris@16: Chris@16: #ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION Chris@16: # define BOOST_UNREACHABLE_RETURN(x) return x; Chris@16: #else Chris@16: # define BOOST_UNREACHABLE_RETURN(x) Chris@16: #endif Chris@16: Chris@16: // BOOST_DEDUCED_TYPENAME workaround ------------------------------------------// Chris@16: // Chris@16: // Some compilers don't support the use of `typename' for dependent Chris@16: // types in deduced contexts, e.g. Chris@16: // Chris@16: // template void f(T, typename T::type); Chris@16: // ^^^^^^^^ Chris@16: // Replace these declarations with: Chris@16: // Chris@16: // template void f(T, BOOST_DEDUCED_TYPENAME T::type); Chris@16: Chris@16: #ifndef BOOST_NO_DEDUCED_TYPENAME Chris@16: # define BOOST_DEDUCED_TYPENAME typename Chris@16: #else Chris@16: # define BOOST_DEDUCED_TYPENAME Chris@16: #endif Chris@16: Chris@16: #ifndef BOOST_NO_TYPENAME_WITH_CTOR Chris@16: # define BOOST_CTOR_TYPENAME typename Chris@16: #else Chris@16: # define BOOST_CTOR_TYPENAME Chris@16: #endif Chris@16: Chris@16: // long long workaround ------------------------------------------// Chris@16: // On gcc (and maybe other compilers?) long long is alway supported Chris@16: // but it's use may generate either warnings (with -ansi), or errors Chris@16: // (with -pedantic -ansi) unless it's use is prefixed by __extension__ Chris@16: // Chris@16: #if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus) Chris@16: namespace boost{ Chris@16: # ifdef __GNUC__ Chris@16: __extension__ typedef long long long_long_type; Chris@16: __extension__ typedef unsigned long long ulong_long_type; Chris@16: # else Chris@16: typedef long long long_long_type; Chris@16: typedef unsigned long long ulong_long_type; Chris@16: # endif Chris@16: } Chris@16: #endif Chris@16: // same again for __int128: Chris@16: #if defined(BOOST_HAS_INT128) && defined(__cplusplus) Chris@16: namespace boost{ Chris@16: # ifdef __GNUC__ Chris@16: __extension__ typedef __int128 int128_type; Chris@16: __extension__ typedef unsigned __int128 uint128_type; Chris@16: # else Chris@16: typedef __int128 int128_type; Chris@16: typedef unsigned __int128 uint128_type; Chris@16: # endif Chris@16: } Chris@16: #endif Chris@16: Chris@16: // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// Chris@16: Chris@16: // These macros are obsolete. Port away and remove. Chris@16: Chris@16: # define BOOST_EXPLICIT_TEMPLATE_TYPE(t) Chris@16: # define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) Chris@16: # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) Chris@16: # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) Chris@16: Chris@16: # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) Chris@16: # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) Chris@16: # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) Chris@16: # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) Chris@16: Chris@16: // When BOOST_NO_STD_TYPEINFO is defined, we can just import Chris@16: // the global definition into std namespace: Chris@16: #if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus) Chris@16: #include Chris@16: namespace std{ using ::type_info; } Chris@16: #endif Chris@16: Chris@16: // ---------------------------------------------------------------------------// Chris@16: Chris@16: // Chris@16: // Helper macro BOOST_STRINGIZE: Chris@16: // Converts the parameter X to a string after macro replacement Chris@16: // on X has been performed. Chris@16: // Chris@16: #define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) Chris@16: #define BOOST_DO_STRINGIZE(X) #X Chris@16: Chris@16: // Chris@16: // Helper macro BOOST_JOIN: Chris@16: // The following piece of macro magic joins the two Chris@16: // arguments together, even when one of the arguments is Chris@16: // itself a macro (see 16.3.1 in C++ standard). The key Chris@16: // is that macro expansion of macro arguments does not Chris@16: // occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN. Chris@16: // Chris@16: #define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y ) Chris@16: #define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y) Chris@16: #define BOOST_DO_JOIN2( X, Y ) X##Y Chris@16: Chris@16: // Chris@16: // Set some default values for compiler/library/platform names. Chris@16: // These are for debugging config setup only: Chris@16: // Chris@16: # ifndef BOOST_COMPILER Chris@16: # define BOOST_COMPILER "Unknown ISO C++ Compiler" Chris@16: # endif Chris@16: # ifndef BOOST_STDLIB Chris@16: # define BOOST_STDLIB "Unknown ISO standard library" Chris@16: # endif Chris@16: # ifndef BOOST_PLATFORM Chris@16: # if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \ Chris@16: || defined(_POSIX_SOURCE) Chris@16: # define BOOST_PLATFORM "Generic Unix" Chris@16: # else Chris@16: # define BOOST_PLATFORM "Unknown" Chris@16: # endif Chris@16: # endif Chris@16: Chris@16: // Chris@16: // Set some default values GPU support Chris@16: // Chris@16: # ifndef BOOST_GPU_ENABLED Chris@16: # define BOOST_GPU_ENABLED Chris@16: # endif Chris@16: Chris@16: // BOOST_FORCEINLINE ---------------------------------------------// Chris@16: // Macro to use in place of 'inline' to force a function to be inline Chris@16: #if !defined(BOOST_FORCEINLINE) Chris@16: # if defined(_MSC_VER) Chris@16: # define BOOST_FORCEINLINE __forceinline Chris@16: # elif defined(__GNUC__) && __GNUC__ > 3 Chris@16: // Clang also defines __GNUC__ (as 4) Chris@16: # define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__)) Chris@16: # else Chris@16: # define BOOST_FORCEINLINE inline Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: // BOOST_NOINLINE ---------------------------------------------// Chris@16: // Macro to use in place of 'inline' to prevent a function to be inlined Chris@16: #if !defined(BOOST_NOINLINE) Chris@16: # if defined(_MSC_VER) Chris@16: # define BOOST_NOINLINE __declspec(noinline) Chris@16: # elif defined(__GNUC__) && __GNUC__ > 3 Chris@16: // Clang also defines __GNUC__ (as 4) Chris@101: # if defined(__CUDACC__) Chris@101: // nvcc doesn't always parse __noinline__, Chris@101: // see: https://svn.boost.org/trac/boost/ticket/9392 Chris@101: # define BOOST_NOINLINE __attribute__ ((noinline)) Chris@101: # else Chris@101: # define BOOST_NOINLINE __attribute__ ((__noinline__)) Chris@101: # endif Chris@16: # else Chris@16: # define BOOST_NOINLINE Chris@16: # endif Chris@16: #endif Chris@16: Chris@101: // BOOST_NORETURN ---------------------------------------------// Chris@101: // Macro to use before a function declaration/definition to designate Chris@101: // the function as not returning normally (i.e. with a return statement Chris@101: // or by leaving the function scope, if the function return type is void). Chris@101: #if !defined(BOOST_NORETURN) Chris@101: # if defined(_MSC_VER) Chris@101: # define BOOST_NORETURN __declspec(noreturn) Chris@101: # elif defined(__GNUC__) Chris@101: # define BOOST_NORETURN __attribute__ ((__noreturn__)) Chris@101: # else Chris@101: # define BOOST_NO_NORETURN Chris@101: # define BOOST_NORETURN Chris@101: # endif Chris@101: #endif Chris@101: Chris@16: // Branch prediction hints Chris@16: // These macros are intended to wrap conditional expressions that yield true or false Chris@16: // Chris@16: // if (BOOST_LIKELY(var == 10)) Chris@16: // { Chris@16: // // the most probable code here Chris@16: // } Chris@16: // Chris@16: #if !defined(BOOST_LIKELY) Chris@16: # define BOOST_LIKELY(x) x Chris@16: #endif Chris@16: #if !defined(BOOST_UNLIKELY) Chris@16: # define BOOST_UNLIKELY(x) x Chris@16: #endif Chris@16: Chris@16: // Type and data alignment specification Chris@16: // Chris@16: #if !defined(BOOST_NO_CXX11_ALIGNAS) Chris@16: # define BOOST_ALIGNMENT(x) alignas(x) Chris@16: #elif defined(_MSC_VER) Chris@16: # define BOOST_ALIGNMENT(x) __declspec(align(x)) Chris@16: #elif defined(__GNUC__) Chris@16: # define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x))) Chris@16: #else Chris@16: # define BOOST_NO_ALIGNMENT Chris@16: # define BOOST_ALIGNMENT(x) Chris@16: #endif Chris@16: Chris@101: // Lack of non-public defaulted functions is implied by the lack of any defaulted functions Chris@101: #if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) Chris@101: # define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS Chris@101: #endif Chris@101: Chris@16: // Defaulted and deleted function declaration helpers Chris@16: // These macros are intended to be inside a class definition. Chris@16: // BOOST_DEFAULTED_FUNCTION accepts the function declaration and its Chris@16: // body, which will be used if the compiler doesn't support defaulted functions. Chris@16: // BOOST_DELETED_FUNCTION only accepts the function declaration. It Chris@16: // will expand to a private function declaration, if the compiler doesn't support Chris@16: // deleted functions. Because of this it is recommended to use BOOST_DELETED_FUNCTION Chris@16: // in the end of the class definition. Chris@16: // Chris@16: // class my_class Chris@16: // { Chris@16: // public: Chris@16: // // Default-constructible Chris@16: // BOOST_DEFAULTED_FUNCTION(my_class(), {}) Chris@16: // // Copying prohibited Chris@16: // BOOST_DELETED_FUNCTION(my_class(my_class const&)) Chris@16: // BOOST_DELETED_FUNCTION(my_class& operator= (my_class const&)) Chris@16: // }; Chris@16: // Chris@16: #if !(defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)) Chris@16: # define BOOST_DEFAULTED_FUNCTION(fun, body) fun = default; Chris@16: #else Chris@16: # define BOOST_DEFAULTED_FUNCTION(fun, body) fun body Chris@16: #endif Chris@16: Chris@16: #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) Chris@16: # define BOOST_DELETED_FUNCTION(fun) fun = delete; Chris@16: #else Chris@16: # define BOOST_DELETED_FUNCTION(fun) private: fun; Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined Chris@16: // Chris@16: #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276) Chris@101: #define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE Chris@16: #endif Chris@16: Chris@16: // -------------------- Deprecated macros for 1.50 --------------------------- Chris@16: // These will go away in a future release Chris@16: Chris@16: // Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP Chris@16: // instead of BOOST_NO_STD_UNORDERED Chris@16: #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET) Chris@16: # ifndef BOOST_NO_CXX11_STD_UNORDERED Chris@16: # define BOOST_NO_CXX11_STD_UNORDERED Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: // Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS Chris@16: #if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS) Chris@16: # define BOOST_NO_INITIALIZER_LISTS Chris@16: #endif Chris@16: Chris@16: // Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY Chris@16: #if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY) Chris@16: # define BOOST_NO_0X_HDR_ARRAY Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO Chris@16: #if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO) Chris@16: # define BOOST_NO_0X_HDR_CHRONO Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT Chris@16: #if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT) Chris@16: # define BOOST_NO_0X_HDR_CODECVT Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE Chris@16: #if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE) Chris@16: # define BOOST_NO_0X_HDR_CONDITION_VARIABLE Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST Chris@16: #if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST) Chris@16: # define BOOST_NO_0X_HDR_FORWARD_LIST Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE Chris@16: #if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE) Chris@16: # define BOOST_NO_0X_HDR_FUTURE Chris@16: #endif Chris@16: Chris@16: // Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST Chris@16: // instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS Chris@16: #ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST Chris@16: # ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST Chris@16: # define BOOST_NO_0X_HDR_INITIALIZER_LIST Chris@16: # endif Chris@16: # ifndef BOOST_NO_INITIALIZER_LISTS Chris@16: # define BOOST_NO_INITIALIZER_LISTS Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: // Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX Chris@16: #if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX) Chris@16: # define BOOST_NO_0X_HDR_MUTEX Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM Chris@16: #if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM) Chris@16: # define BOOST_NO_0X_HDR_RANDOM Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO Chris@16: #if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO) Chris@16: # define BOOST_NO_0X_HDR_RATIO Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX Chris@16: #if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX) Chris@16: # define BOOST_NO_0X_HDR_REGEX Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR Chris@16: #if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR) Chris@16: # define BOOST_NO_0X_HDR_SYSTEM_ERROR Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD Chris@16: #if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD) Chris@16: # define BOOST_NO_0X_HDR_THREAD Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE Chris@16: #if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE) Chris@16: # define BOOST_NO_0X_HDR_TUPLE Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS Chris@16: #if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS) Chris@16: # define BOOST_NO_0X_HDR_TYPE_TRAITS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX Chris@16: #if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX) Chris@16: # define BOOST_NO_0X_HDR_TYPEINDEX Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP Chris@16: #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP) Chris@16: # define BOOST_NO_0X_HDR_UNORDERED_MAP Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET Chris@16: #if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET) Chris@16: # define BOOST_NO_0X_HDR_UNORDERED_SET Chris@16: #endif Chris@16: Chris@16: // ------------------ End of deprecated macros for 1.50 --------------------------- Chris@16: Chris@16: // -------------------- Deprecated macros for 1.51 --------------------------- Chris@16: // These will go away in a future release Chris@16: Chris@16: // Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS Chris@16: #if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS) Chris@16: # define BOOST_NO_AUTO_DECLARATIONS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS Chris@16: #if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS) Chris@16: # define BOOST_NO_AUTO_MULTIDECLARATIONS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T Chris@16: #if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T) Chris@16: # define BOOST_NO_CHAR16_T Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T Chris@16: #if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T) Chris@16: # define BOOST_NO_CHAR32_T Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES Chris@16: #if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES) Chris@16: # define BOOST_NO_TEMPLATE_ALIASES Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR Chris@16: #if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR) Chris@16: # define BOOST_NO_CONSTEXPR Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276 Chris@16: #if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276) Chris@16: # define BOOST_NO_DECLTYPE_N3276 Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE Chris@16: #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE) Chris@16: # define BOOST_NO_DECLTYPE Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS Chris@16: #if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS) Chris@16: # define BOOST_NO_DEFAULTED_FUNCTIONS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS Chris@16: #if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS) Chris@16: # define BOOST_NO_DELETED_FUNCTIONS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS Chris@16: #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS) Chris@16: # define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE Chris@16: #if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE) Chris@16: # define BOOST_NO_EXTERN_TEMPLATE Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS Chris@16: #if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS) Chris@16: # define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS Chris@16: #if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS) Chris@16: # define BOOST_NO_LAMBDAS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS Chris@16: #if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS) Chris@16: # define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT Chris@16: #if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT) Chris@16: # define BOOST_NO_NOEXCEPT Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR Chris@16: #if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR) Chris@16: # define BOOST_NO_NULLPTR Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS Chris@16: #if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS) Chris@16: # define BOOST_NO_RAW_LITERALS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES Chris@16: #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES) Chris@16: # define BOOST_NO_RVALUE_REFERENCES Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS Chris@16: #if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS) Chris@16: # define BOOST_NO_SCOPED_ENUMS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT Chris@16: #if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT) Chris@16: # define BOOST_NO_STATIC_ASSERT Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED Chris@16: #if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED) Chris@16: # define BOOST_NO_STD_UNORDERED Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS Chris@16: #if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS) Chris@16: # define BOOST_NO_UNICODE_LITERALS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX Chris@16: #if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX) Chris@16: # define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES Chris@16: #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES) Chris@16: # define BOOST_NO_VARIADIC_TEMPLATES Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS Chris@16: #if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS) Chris@16: # define BOOST_NO_VARIADIC_MACROS Chris@16: #endif Chris@16: // Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST Chris@16: #if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST) Chris@16: # define BOOST_NO_NUMERIC_LIMITS_LOWEST Chris@16: #endif Chris@16: // ------------------ End of deprecated macros for 1.51 --------------------------- Chris@16: Chris@16: Chris@16: Chris@16: // Chris@16: // Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR Chris@16: // These aid the transition to C++11 while still supporting C++03 compilers Chris@16: // Chris@16: #ifdef BOOST_NO_CXX11_NOEXCEPT Chris@16: # define BOOST_NOEXCEPT Chris@16: # define BOOST_NOEXCEPT_OR_NOTHROW throw() Chris@16: # define BOOST_NOEXCEPT_IF(Predicate) Chris@16: # define BOOST_NOEXCEPT_EXPR(Expression) false Chris@16: #else Chris@16: # define BOOST_NOEXCEPT noexcept Chris@16: # define BOOST_NOEXCEPT_OR_NOTHROW noexcept Chris@16: # define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate)) Chris@16: # define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression)) Chris@16: #endif Chris@16: // Chris@16: // Helper macro BOOST_FALLTHROUGH Chris@16: // Fallback definition of BOOST_FALLTHROUGH macro used to mark intended Chris@16: // fall-through between case labels in a switch statement. We use a definition Chris@16: // that requires a semicolon after it to avoid at least one type of misuse even Chris@16: // on unsupported compilers. Chris@16: // Chris@16: #ifndef BOOST_FALLTHROUGH Chris@16: # define BOOST_FALLTHROUGH ((void)0) Chris@16: #endif Chris@16: Chris@16: // Chris@16: // constexpr workarounds Chris@16: // Chris@16: #if defined(BOOST_NO_CXX11_CONSTEXPR) Chris@16: #define BOOST_CONSTEXPR Chris@16: #define BOOST_CONSTEXPR_OR_CONST const Chris@16: #else Chris@16: #define BOOST_CONSTEXPR constexpr Chris@16: #define BOOST_CONSTEXPR_OR_CONST constexpr Chris@16: #endif Chris@101: #if defined(BOOST_NO_CXX14_CONSTEXPR) Chris@101: #define BOOST_CXX14_CONSTEXPR Chris@101: #else Chris@101: #define BOOST_CXX14_CONSTEXPR constexpr Chris@101: #endif Chris@101: Chris@101: // Chris@101: // Unused variable/typedef workarounds: Chris@101: // Chris@101: #ifndef BOOST_ATTRIBUTE_UNUSED Chris@101: # define BOOST_ATTRIBUTE_UNUSED Chris@101: #endif Chris@16: Chris@16: #define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST Chris@16: Chris@16: // Chris@16: // Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined Chris@16: // Chris@16: #if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT) Chris@16: # define BOOST_HAS_STATIC_ASSERT Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined Chris@16: // Chris@16: #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS) Chris@16: #define BOOST_HAS_RVALUE_REFS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined Chris@16: // Chris@16: #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL) Chris@16: #define BOOST_HAS_VARIADIC_TMPL Chris@16: #endif Chris@101: // Chris@101: // Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when Chris@101: // BOOST_NO_CXX11_VARIADIC_TEMPLATES is set: Chris@101: // Chris@101: #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS) Chris@101: # define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS Chris@101: #endif Chris@16: Chris@101: // Chris@101: // Finish off with checks for macros that are depricated / no longer supported, Chris@101: // if any of these are set then it's very likely that much of Boost will no Chris@101: // longer work. So stop with a #error for now, but give the user a chance Chris@101: // to continue at their own risk if they really want to: Chris@101: // Chris@101: #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED) Chris@101: # error "You are using a compiler which lacks features which are now a minimum requirement in order to use Boost, define BOOST_CONFIG_ALLOW_DEPRECATED if you want to continue at your own risk!!!" Chris@101: #endif Chris@16: Chris@16: #endif