borland.hpp
Go to the documentation of this file.
00001 //  (C) Copyright John Maddock 2001 - 2003.
00002 //  (C) Copyright David Abrahams 2002 - 2003.
00003 //  (C) Copyright Aleksey Gurtovoy 2002.
00004 //  Use, modification and distribution are subject to the
00005 //  Boost Software License, Version 1.0. (See accompanying file
00006 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00007 
00008 //  See http://www.boost.org for most recent version.
00009 
00010 //  Borland C++ compiler setup:
00011 
00012 //
00013 // versions check:
00014 // we don't support Borland prior to version 5.4:
00015 #if __BORLANDC__ < 0x540
00016 #  error "Compiler not supported or configured - please reconfigure"
00017 #endif
00018 
00019 // last known compiler version:
00020 #if (__BORLANDC__ > 0x610)
00021 //#  if defined(BOOST_ASSERT_CONFIG)
00022 #     error "Unknown compiler version - please run the configure tests and report the results"
00023 //#  else
00024 //#     pragma message( "Unknown compiler version - please run the configure tests and report the results")
00025 //#  endif
00026 #elif (__BORLANDC__ == 0x600)
00027 #  error "CBuilderX preview compiler is no longer supported"
00028 #endif
00029 
00030 //
00031 // Support macros to help with standard library detection
00032 #if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL)
00033 #  define BOOST_BCB_WITH_ROGUE_WAVE
00034 #elif __BORLANDC__ < 0x570
00035 #  define BOOST_BCB_WITH_STLPORT
00036 #else
00037 #  define BOOST_BCB_WITH_DINKUMWARE
00038 #endif
00039 
00040 //
00041 // Version 5.0 and below:
00042 #   if __BORLANDC__ <= 0x0550
00043 // Borland C++Builder 4 and 5:
00044 #     define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
00045 #     if __BORLANDC__ == 0x0550
00046 // Borland C++Builder 5, command-line compiler 5.5:
00047 #       define BOOST_NO_OPERATORS_IN_NAMESPACE
00048 #     endif
00049 #   endif
00050 
00051 // Version 5.51 and below:
00052 #if (__BORLANDC__ <= 0x551)
00053 #  define BOOST_NO_CV_SPECIALIZATIONS
00054 #  define BOOST_NO_CV_VOID_SPECIALIZATIONS
00055 #  define BOOST_NO_DEDUCED_TYPENAME
00056 // workaround for missing WCHAR_MAX/WCHAR_MIN:
00057 #include <climits>
00058 #include <cwchar>
00059 #ifndef WCHAR_MAX
00060 #  define WCHAR_MAX 0xffff
00061 #endif
00062 #ifndef WCHAR_MIN
00063 #  define WCHAR_MIN 0
00064 #endif
00065 #endif
00066 
00067 // Borland C++ Builder 6 and below:
00068 #if (__BORLANDC__ <= 0x564)
00069 #  define BOOST_NO_INTEGRAL_INT64_T
00070 
00071 #  ifdef NDEBUG
00072       // fix broken <cstring> so that Boost.test works:
00073 #     include <cstring>
00074 #     undef strcmp
00075 #  endif
00076    // fix broken errno declaration:
00077 #  include <errno.h>
00078 #  ifndef errno
00079 #     define errno errno
00080 #  endif
00081 
00082 #endif
00083 
00084 //
00085 // new bug in 5.61:
00086 #if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580)
00087    // this seems to be needed by the command line compiler, but not the IDE:
00088 #  define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
00089 #endif
00090 
00091 // Borland C++ Builder 2006 Update 2 and below:
00092 #if (__BORLANDC__ <= 0x582)
00093 #  define BOOST_NO_SFINAE
00094 #  define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
00095 #  define BOOST_NO_TEMPLATE_TEMPLATES
00096 
00097 #  define BOOST_NO_PRIVATE_IN_AGGREGATE
00098 
00099 #  ifdef _WIN32
00100 #     define BOOST_NO_SWPRINTF
00101 #  elif defined(linux) || defined(__linux__) || defined(__linux)
00102       // we should really be able to do without this
00103       // but the wcs* functions aren't imported into std::
00104 #     define BOOST_NO_STDC_NAMESPACE
00105       // _CPPUNWIND doesn't get automatically set for some reason:
00106 #     pragma defineonoption BOOST_CPPUNWIND -x
00107 #  endif
00108 #endif
00109 
00110 // Borland C++ Builder 2007 December 2007 Update and below:
00111 //#if (__BORLANDC__ <= 0x593)
00112 #if (__BORLANDC__ <= 0x610)  // Beman has asked Alisdair for more info
00113    // we shouldn't really need this - but too many things choke
00114    // without it, this needs more investigation:
00115 #  define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
00116 #  define BOOST_NO_IS_ABSTRACT
00117 #  define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
00118 
00119 // Temporary workaround
00120 #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
00121 #endif
00122 
00123 // Borland C++ Builder 2008 and below:
00124 #if (__BORLANDC__ <= 0x601)
00125 #  define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
00126 #  define BOOST_ILLEGAL_CV_REFERENCES
00127 #  define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
00128 #  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
00129 #  define BOOST_NO_TWO_PHASE_NAME_LOOKUP
00130 #  define BOOST_NO_USING_TEMPLATE
00131 #  define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
00132 #endif
00133 
00134 //
00135 //  Positive Feature detection
00136 //
00137 // Borland C++ Builder 2008 and below:
00138 #if (__BORLANDC__ >= 0x599)
00139 #  pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax
00140 #endif
00141 //
00142 // C++0x Macros:
00143 //
00144 #if defined( BOOST_CODEGEAR_0X_SUPPORT ) && (__BORLANDC__ >= 0x610)
00145 #  define BOOST_HAS_ALIGNOF
00146 #  define BOOST_HAS_CHAR16_T
00147 #  define BOOST_HAS_CHAR32_T
00148 #  define BOOST_HAS_DECLTYPE
00149 #  define BOOST_HAS_EXPLICIT_CONVERSION_OPS
00150 #  define BOOST_HAS_REF_QUALIFIER
00151 #  define BOOST_HAS_RVALUE_REFS
00152 #  define BOOST_HAS_STATIC_ASSERT
00153 
00154 #  define BOOST_NO_EXTERN_TEMPLATE
00155 #  define BOOST_NO_SCOPED_ENUMS
00156 #  define BOOST_NO_VARIADIC_TEMPLATES
00157 #  define BOOST_NO_CONSTEXPR
00158 #  define BOOST_NO_DEFAULTED_FUNCTIONS
00159 #  define BOOST_NO_DELETED_FUNCTIONS
00160 #  define BOOST_NO_RAW_LITERALS
00161 #  define BOOST_NO_UNICODE_LITERALS       // UTF-8 still not supported
00162 #else
00163 #  define BOOST_NO_CHAR16_T
00164 #  define BOOST_NO_CHAR32_T
00165 #  define BOOST_NO_DECLTYPE
00166 #  define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
00167 #  define BOOST_NO_EXTERN_TEMPLATE
00168 #  define BOOST_NO_SCOPED_ENUMS
00169 #  define BOOST_NO_STATIC_ASSERT
00170 #  define BOOST_NO_RVALUE_REFERENCES
00171 #  define BOOST_NO_VARIADIC_TEMPLATES
00172 #  define BOOST_NO_CONSTEXPR
00173 #  define BOOST_NO_DEFAULTED_FUNCTIONS
00174 #  define BOOST_NO_DELETED_FUNCTIONS
00175 #  define BOOST_NO_RAW_LITERALS
00176 #  define BOOST_NO_UNICODE_LITERALS
00177 #endif
00178 
00179 #define BOOST_NO_AUTO_DECLARATIONS
00180 #define BOOST_NO_AUTO_MULTIDECLARATIONS
00181 #define BOOST_NO_INITIALIZER_LISTS
00182 
00183 #if __BORLANDC__ >= 0x590
00184 #  define BOOST_HAS_TR1_HASH
00185 
00186 #  define BOOST_HAS_MACRO_USE_FACET
00187 #endif
00188 
00189 //
00190 // Post 0x561 we have long long and stdint.h:
00191 #if __BORLANDC__ >= 0x561
00192 #  ifndef __NO_LONG_LONG
00193 #     define BOOST_HAS_LONG_LONG
00194 #  else
00195 #     define BOOST_NO_LONG_LONG
00196 #  endif
00197    // On non-Win32 platforms let the platform config figure this out:
00198 #  ifdef _WIN32
00199 #      define BOOST_HAS_STDINT_H
00200 #  endif
00201 #endif
00202 
00203 // Borland C++Builder 6 defaults to using STLPort.  If _USE_OLD_RW_STL is
00204 // defined, then we have 0x560 or greater with the Rogue Wave implementation
00205 // which presumably has the std::DBL_MAX bug.
00206 #if defined( BOOST_BCB_WITH_ROGUE_WAVE )
00207 // <climits> is partly broken, some macros define symbols that are really in
00208 // namespace std, so you end up having to use illegal constructs like
00209 // std::DBL_MAX, as a fix we'll just include float.h and have done with:
00210 #include <float.h>
00211 #endif
00212 //
00213 // __int64:
00214 //
00215 #if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)
00216 #  define BOOST_HAS_MS_INT64
00217 #endif
00218 //
00219 // check for exception handling support:
00220 //
00221 #if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
00222 #  define BOOST_NO_EXCEPTIONS
00223 #endif
00224 //
00225 // all versions have a <dirent.h>:
00226 //
00227 #ifndef __STRICT_ANSI__
00228 #  define BOOST_HAS_DIRENT_H
00229 #endif
00230 //
00231 // all versions support __declspec:
00232 //
00233 #ifndef __STRICT_ANSI__
00234 #  define BOOST_HAS_DECLSPEC
00235 #endif
00236 //
00237 // ABI fixing headers:
00238 //
00239 #if __BORLANDC__ < 0x600 // not implemented for version 6 compiler yet
00240 #ifndef BOOST_ABI_PREFIX
00241 #  define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
00242 #endif
00243 #ifndef BOOST_ABI_SUFFIX
00244 #  define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
00245 #endif
00246 #endif
00247 //
00248 // Disable Win32 support in ANSI mode:
00249 //
00250 #if __BORLANDC__ < 0x600
00251 #  pragma defineonoption BOOST_DISABLE_WIN32 -A
00252 #elif defined(__STRICT_ANSI__)
00253 #  define BOOST_DISABLE_WIN32
00254 #endif
00255 //
00256 // MSVC compatibility mode does some nasty things:
00257 // TODO: look up if this doesn't apply to the whole 12xx range
00258 //
00259 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
00260 #  define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
00261 #  define BOOST_NO_VOID_RETURNS
00262 #endif
00263 
00264 #define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
00265 
00266 
00267 


appl
Author(s): petercai
autogenerated on Tue Jan 7 2014 11:02:28