Chris@16: // (C) Copyright John Maddock 2001 - 2003. Chris@16: // (C) Copyright David Abrahams 2002 - 2003. Chris@16: // (C) Copyright Aleksey Gurtovoy 2002. Chris@16: // Use, modification and distribution are subject to the Chris@16: // Boost Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at 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: // Borland C++ compiler setup: Chris@16: Chris@16: // Chris@16: // versions check: Chris@16: // we don't support Borland prior to version 5.4: Chris@16: #if __BORLANDC__ < 0x540 Chris@16: # error "Compiler not supported or configured - please reconfigure" Chris@16: #endif Chris@16: Chris@16: // last known compiler version: Chris@16: #if (__BORLANDC__ > 0x613) Chris@16: //# if defined(BOOST_ASSERT_CONFIG) Chris@16: # error "Unknown compiler version - please run the configure tests and report the results" Chris@16: //# else Chris@16: //# pragma message( "Unknown compiler version - please run the configure tests and report the results") Chris@16: //# endif Chris@16: #elif (__BORLANDC__ == 0x600) Chris@16: # error "CBuilderX preview compiler is no longer supported" Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Support macros to help with standard library detection Chris@16: #if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL) Chris@16: # define BOOST_BCB_WITH_ROGUE_WAVE Chris@16: #elif __BORLANDC__ < 0x570 Chris@16: # define BOOST_BCB_WITH_STLPORT Chris@16: #else Chris@16: # define BOOST_BCB_WITH_DINKUMWARE Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Version 5.0 and below: Chris@16: # if __BORLANDC__ <= 0x0550 Chris@16: // Borland C++Builder 4 and 5: Chris@16: # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS Chris@16: # if __BORLANDC__ == 0x0550 Chris@16: // Borland C++Builder 5, command-line compiler 5.5: Chris@16: # define BOOST_NO_OPERATORS_IN_NAMESPACE Chris@16: # endif Chris@16: // Variadic macros do not exist for C++ Builder versions 5 and below Chris@16: #define BOOST_NO_CXX11_VARIADIC_MACROS Chris@16: # endif Chris@16: Chris@16: // Version 5.51 and below: Chris@16: #if (__BORLANDC__ <= 0x551) Chris@16: # define BOOST_NO_CV_SPECIALIZATIONS Chris@16: # define BOOST_NO_CV_VOID_SPECIALIZATIONS Chris@16: # define BOOST_NO_DEDUCED_TYPENAME Chris@16: // workaround for missing WCHAR_MAX/WCHAR_MIN: Chris@16: #ifdef __cplusplus Chris@16: #include Chris@16: #include Chris@16: #else Chris@16: #include Chris@16: #include Chris@16: #endif // __cplusplus Chris@16: #ifndef WCHAR_MAX Chris@16: # define WCHAR_MAX 0xffff Chris@16: #endif Chris@16: #ifndef WCHAR_MIN Chris@16: # define WCHAR_MIN 0 Chris@16: #endif Chris@16: #endif Chris@16: Chris@16: // Borland C++ Builder 6 and below: Chris@16: #if (__BORLANDC__ <= 0x564) Chris@16: Chris@16: # if defined(NDEBUG) && defined(__cplusplus) Chris@16: // fix broken so that Boost.test works: Chris@16: # include Chris@16: # undef strcmp Chris@16: # endif Chris@16: // fix broken errno declaration: Chris@16: # include Chris@16: # ifndef errno Chris@16: # define errno errno Chris@16: # endif Chris@16: Chris@16: #endif Chris@16: Chris@16: // Chris@16: // new bug in 5.61: Chris@16: #if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580) Chris@16: // this seems to be needed by the command line compiler, but not the IDE: Chris@16: # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS Chris@16: #endif Chris@16: Chris@16: // Borland C++ Builder 2006 Update 2 and below: Chris@16: #if (__BORLANDC__ <= 0x582) Chris@16: # define BOOST_NO_SFINAE Chris@16: # define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG Chris@16: # define BOOST_NO_TEMPLATE_TEMPLATES Chris@16: Chris@16: # define BOOST_NO_PRIVATE_IN_AGGREGATE Chris@16: Chris@16: # ifdef _WIN32 Chris@16: # define BOOST_NO_SWPRINTF Chris@16: # elif defined(linux) || defined(__linux__) || defined(__linux) Chris@16: // we should really be able to do without this Chris@16: // but the wcs* functions aren't imported into std:: Chris@16: # define BOOST_NO_STDC_NAMESPACE Chris@16: // _CPPUNWIND doesn't get automatically set for some reason: Chris@16: # pragma defineonoption BOOST_CPPUNWIND -x Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: #if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info Chris@16: // we shouldn't really need this - but too many things choke Chris@16: // without it, this needs more investigation: Chris@16: # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS Chris@16: # define BOOST_NO_IS_ABSTRACT Chris@16: # define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS Chris@16: # define BOOST_NO_USING_TEMPLATE Chris@16: # define BOOST_SP_NO_SP_CONVERTIBLE Chris@16: Chris@16: // Temporary workaround Chris@16: #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS Chris@16: #endif Chris@16: Chris@16: // Borland C++ Builder 2008 and below: Chris@16: # define BOOST_NO_INTEGRAL_INT64_T Chris@16: # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL Chris@16: # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS Chris@16: # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS Chris@16: # define BOOST_NO_TWO_PHASE_NAME_LOOKUP Chris@16: # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE Chris@16: # define BOOST_NO_NESTED_FRIENDSHIP Chris@16: # define BOOST_NO_TYPENAME_WITH_CTOR Chris@16: #if (__BORLANDC__ < 0x600) Chris@16: # define BOOST_ILLEGAL_CV_REFERENCES Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Positive Feature detection Chris@16: // Chris@16: // Borland C++ Builder 2008 and below: Chris@16: #if (__BORLANDC__ >= 0x599) Chris@16: # pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax Chris@16: #endif Chris@16: // Chris@16: // C++0x Macros: Chris@16: // Chris@16: #if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610) Chris@16: # define BOOST_NO_CXX11_CHAR16_T Chris@16: # define BOOST_NO_CXX11_CHAR32_T Chris@16: # define BOOST_NO_CXX11_DECLTYPE Chris@16: # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS Chris@16: # define BOOST_NO_CXX11_EXTERN_TEMPLATE Chris@16: # define BOOST_NO_CXX11_RVALUE_REFERENCES Chris@16: # define BOOST_NO_CXX11_SCOPED_ENUMS Chris@16: # define BOOST_NO_CXX11_STATIC_ASSERT Chris@16: #else Chris@16: # define BOOST_HAS_ALIGNOF Chris@16: # define BOOST_HAS_CHAR16_T Chris@16: # define BOOST_HAS_CHAR32_T Chris@16: # define BOOST_HAS_DECLTYPE Chris@16: # define BOOST_HAS_EXPLICIT_CONVERSION_OPS Chris@16: # define BOOST_HAS_REF_QUALIFIER Chris@16: # define BOOST_HAS_RVALUE_REFS Chris@16: # define BOOST_HAS_STATIC_ASSERT Chris@16: #endif Chris@16: Chris@16: #define BOOST_NO_CXX11_AUTO_DECLARATIONS Chris@16: #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS Chris@16: #define BOOST_NO_CXX11_CONSTEXPR Chris@16: #define BOOST_NO_CXX11_DECLTYPE_N3276 Chris@16: #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS Chris@16: #define BOOST_NO_CXX11_DELETED_FUNCTIONS Chris@16: #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS Chris@16: #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST Chris@16: #define BOOST_NO_CXX11_LAMBDAS Chris@16: #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS Chris@16: #define BOOST_NO_CXX11_NULLPTR Chris@16: #define BOOST_NO_CXX11_RANGE_BASED_FOR Chris@16: #define BOOST_NO_CXX11_RAW_LITERALS Chris@16: #define BOOST_NO_CXX11_RVALUE_REFERENCES Chris@16: #define BOOST_NO_CXX11_SCOPED_ENUMS Chris@16: #define BOOST_NO_SFINAE_EXPR Chris@16: #define BOOST_NO_CXX11_TEMPLATE_ALIASES Chris@16: #define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported Chris@16: #define BOOST_NO_CXX11_VARIADIC_TEMPLATES Chris@16: #define BOOST_NO_CXX11_NOEXCEPT Chris@16: #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX Chris@16: #define BOOST_NO_CXX11_USER_DEFINED_LITERALS Chris@16: #define BOOST_NO_CXX11_ALIGNAS Chris@16: #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES Chris@16: #define BOOST_NO_CXX11_INLINE_NAMESPACES Chris@101: #define BOOST_NO_CXX11_REF_QUALIFIERS Chris@101: #define BOOST_NO_CXX11_FINAL Chris@101: Chris@101: // C++ 14: Chris@101: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) Chris@101: # define BOOST_NO_CXX14_AGGREGATE_NSDMI Chris@101: #endif Chris@101: #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) Chris@101: # define BOOST_NO_CXX14_BINARY_LITERALS Chris@101: #endif Chris@101: #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) Chris@101: # define BOOST_NO_CXX14_CONSTEXPR Chris@101: #endif Chris@101: #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) Chris@101: # define BOOST_NO_CXX14_DECLTYPE_AUTO Chris@101: #endif Chris@101: #if (__cplusplus < 201304) // There's no SD6 check for this.... Chris@101: # define BOOST_NO_CXX14_DIGIT_SEPARATORS Chris@101: #endif Chris@101: #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) Chris@101: # define BOOST_NO_CXX14_GENERIC_LAMBDAS Chris@101: #endif Chris@101: #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) Chris@101: # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES Chris@101: #endif Chris@101: #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) Chris@101: # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION Chris@101: #endif Chris@101: #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) Chris@101: # define BOOST_NO_CXX14_VARIABLE_TEMPLATES Chris@101: #endif Chris@16: Chris@16: #if __BORLANDC__ >= 0x590 Chris@16: # define BOOST_HAS_TR1_HASH Chris@16: Chris@16: # define BOOST_HAS_MACRO_USE_FACET Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Post 0x561 we have long long and stdint.h: Chris@16: #if __BORLANDC__ >= 0x561 Chris@16: # ifndef __NO_LONG_LONG Chris@16: # define BOOST_HAS_LONG_LONG Chris@16: # else Chris@16: # define BOOST_NO_LONG_LONG Chris@16: # endif Chris@16: // On non-Win32 platforms let the platform config figure this out: Chris@16: # ifdef _WIN32 Chris@16: # define BOOST_HAS_STDINT_H Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: // Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is Chris@16: // defined, then we have 0x560 or greater with the Rogue Wave implementation Chris@16: // which presumably has the std::DBL_MAX bug. Chris@16: #if defined( BOOST_BCB_WITH_ROGUE_WAVE ) Chris@16: // is partly broken, some macros define symbols that are really in Chris@16: // namespace std, so you end up having to use illegal constructs like Chris@16: // std::DBL_MAX, as a fix we'll just include float.h and have done with: Chris@16: #include Chris@16: #endif Chris@16: // Chris@16: // __int64: Chris@16: // Chris@16: #if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__) Chris@16: # define BOOST_HAS_MS_INT64 Chris@16: #endif Chris@16: // Chris@16: // check for exception handling support: Chris@16: // Chris@16: #if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) Chris@16: # define BOOST_NO_EXCEPTIONS Chris@16: #endif Chris@16: // Chris@16: // all versions have a : Chris@16: // Chris@16: #ifndef __STRICT_ANSI__ Chris@16: # define BOOST_HAS_DIRENT_H Chris@16: #endif Chris@16: // Chris@16: // all versions support __declspec: Chris@16: // Chris@16: #if defined(__STRICT_ANSI__) Chris@16: // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined Chris@16: # define BOOST_SYMBOL_EXPORT Chris@16: #endif Chris@16: // Chris@16: // ABI fixing headers: Chris@16: // Chris@16: #if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet Chris@16: #ifndef BOOST_ABI_PREFIX Chris@16: # define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" Chris@16: #endif Chris@16: #ifndef BOOST_ABI_SUFFIX Chris@16: # define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" Chris@16: #endif Chris@16: #endif Chris@16: // Chris@16: // Disable Win32 support in ANSI mode: Chris@16: // Chris@16: #if __BORLANDC__ < 0x600 Chris@16: # pragma defineonoption BOOST_DISABLE_WIN32 -A Chris@16: #elif defined(__STRICT_ANSI__) Chris@16: # define BOOST_DISABLE_WIN32 Chris@16: #endif Chris@16: // Chris@16: // MSVC compatibility mode does some nasty things: Chris@16: // TODO: look up if this doesn't apply to the whole 12xx range Chris@16: // Chris@16: #if defined(_MSC_VER) && (_MSC_VER <= 1200) Chris@16: # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP Chris@16: # define BOOST_NO_VOID_RETURNS Chris@16: #endif Chris@16: Chris@16: // Borland did not implement value-initialization completely, as I reported Chris@16: // in 2007, Borland Report 51854, "Value-initialization: POD struct should be Chris@16: // zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854 Chris@16: // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues Chris@16: // (Niels Dekker, LKEB, April 2010) Chris@16: #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION Chris@16: Chris@16: #define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)