1 // (C) Copyright John Maddock 2001 - 2003.
2 // (C) Copyright David Abrahams 2002 - 2003.
3 // (C) Copyright Aleksey Gurtovoy 2002.
4 // Use, modification and distribution are subject to the
5 // Boost Software License, Version 1.0. (See accompanying file
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 // See http://www.boost.org for most recent version.
10 // CodeGear C++ compiler setup:
14 // last known and checked version is 0x740
15 #if (__CODEGEARC__ > 0x740)
16 # if defined(BOOST_ASSERT_CONFIG)
17 # error "boost: Unknown compiler version - please run the configure tests and report the results"
19 # pragma message( "boost: Unknown compiler version - please run the configure tests and report the results")
23 #ifdef __clang__ // Clang enhanced Windows compiler
26 # define BOOST_NO_CXX11_THREAD_LOCAL
27 # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
29 // This bug has been reported to Embarcadero
31 #if defined(BOOST_HAS_INT128)
32 #undef BOOST_HAS_INT128
34 #if defined(BOOST_HAS_FLOAT128)
35 #undef BOOST_HAS_FLOAT128
38 // The clang-based compilers can not do 128 atomic exchanges
40 #define BOOST_ATOMIC_NO_CMPXCHG16B
42 // 32 functions are missing from the current RTL in cwchar, so it really can not be used even if it exists
44 # define BOOST_NO_CWCHAR
46 # ifndef __MT__ /* If compiling in single-threaded mode, assume there is no CXX11_HDR_ATOMIC */
47 # define BOOST_NO_CXX11_HDR_ATOMIC
50 /* temporarily disable this until we can link against fegetround fesetround feholdexcept */
52 #define BOOST_NO_FENV_H
54 /* Reported this bug to Embarcadero with the latest C++ Builder Rio release */
56 #define BOOST_NO_CXX11_HDR_EXCEPTION
59 // check for exception handling support:
61 #if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
62 # define BOOST_NO_EXCEPTIONS
67 // On non-Win32 platforms let the platform config figure this out:
69 # define BOOST_HAS_STDINT_H
75 #if !defined(__STRICT_ANSI__)
76 # define BOOST_HAS_MS_INT64
79 // all versions have a <dirent.h>:
81 #if !defined(__STRICT_ANSI__)
82 # define BOOST_HAS_DIRENT_H
85 // Disable Win32 support in ANSI mode:
87 # pragma defineonoption BOOST_DISABLE_WIN32 -A
89 // MSVC compatibility mode does some nasty things:
90 // TODO: look up if this doesn't apply to the whole 12xx range
92 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
93 # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
94 # define BOOST_NO_VOID_RETURNS
100 // Specific settings for Embarcadero drivers
101 # define BOOST_EMBTC __CODEGEARC__
102 # define BOOST_EMBTC_FULL_VER ((__clang_major__ << 16) | \
103 (__clang_minor__ << 8) | \
104 __clang_patchlevel__ )
106 // Detecting which Embarcadero driver is being used
107 #if defined(BOOST_EMBTC)
109 # define BOOST_EMBTC_WIN64 1
110 # define BOOST_EMBTC_WINDOWS 1
111 # ifndef BOOST_USE_WINDOWS_H
112 # define BOOST_USE_WINDOWS_H
114 # elif defined(_WIN32)
115 # define BOOST_EMBTC_WIN32C 1
116 # define BOOST_EMBTC_WINDOWS 1
117 # ifndef BOOST_USE_WINDOWS_H
118 # define BOOST_USE_WINDOWS_H
120 # elif defined(__APPLE__) && defined(__arm__)
121 # define BOOST_EMBTC_IOSARM 1
122 # define BOOST_EMBTC_IOS 1
123 # elif defined(__APPLE__) && defined(__aarch64__)
124 # define BOOST_EMBTC_IOSARM64 1
125 # define BOOST_EMBTC_IOS 1
126 # elif defined(__ANDROID__) && defined(__arm__)
127 # define BOOST_EMBTC_AARM 1
128 # define BOOST_EMBTC_ANDROID 1
130 # if defined(BOOST_ASSERT_CONFIG)
131 # error "Unknown Embarcadero driver"
133 # warning "Unknown Embarcadero driver"
134 # endif /* defined(BOOST_ASSERT_CONFIG) */
136 #endif /* defined(BOOST_EMBTC) */
138 #if defined(BOOST_EMBTC_WINDOWS)
141 #define _chdir(x) chdir(x)
145 #define _dup2(x,y) dup2(x,y)
150 # undef BOOST_COMPILER
151 # define BOOST_COMPILER "Embarcadero-Clang C++ version " BOOST_STRINGIZE(__CODEGEARC__) " clang: " __clang_version__
152 // # define __CODEGEARC_CLANG__ __CODEGEARC__
153 // # define __EMBARCADERO_CLANG__ __CODEGEARC__
154 // # define __BORLANDC_CLANG__ __BORLANDC__
156 #else // #if !defined(__clang__)
158 # define BOOST_CODEGEARC __CODEGEARC__
159 # define BOOST_BORLANDC __BORLANDC__
161 #if !defined( BOOST_WITH_CODEGEAR_WARNINGS )
162 // these warnings occur frequently in optimized template code
163 # pragma warn -8004 // var assigned value, but never used
164 # pragma warn -8008 // condition always true/false
165 # pragma warn -8066 // dead code can never execute
166 # pragma warn -8104 // static members with ctors not threadsafe
167 # pragma warn -8105 // reference member in class without ctors
170 // CodeGear C++ Builder 2009
171 #if (__CODEGEARC__ <= 0x613)
172 # define BOOST_NO_INTEGRAL_INT64_T
173 # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
174 # define BOOST_NO_PRIVATE_IN_AGGREGATE
175 # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
176 // we shouldn't really need this - but too many things choke
177 // without it, this needs more investigation:
178 # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
179 # define BOOST_SP_NO_SP_CONVERTIBLE
182 // CodeGear C++ Builder 2010
183 #if (__CODEGEARC__ <= 0x621)
184 # define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type
185 # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
186 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
187 # define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member
188 # define BOOST_NO_USING_TEMPLATE
189 # define BOOST_NO_TWO_PHASE_NAME_LOOKUP
190 // Temporary hack, until specific MPL preprocessed headers are generated
191 # define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
193 // CodeGear has not yet completely implemented value-initialization, for
194 // example for array types, as I reported in 2010: Embarcadero Report 83751,
195 // "Value-initialization: arrays should have each element value-initialized",
196 // http://qc.embarcadero.com/wc/qcmain.aspx?d=83751
197 // Last checked version: Embarcadero C++ 6.21
198 // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
199 // (Niels Dekker, LKEB, April 2010)
200 # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
202 # if defined(NDEBUG) && defined(__cplusplus)
203 // fix broken <cstring> so that Boost.test works:
207 // fix broken errno declaration:
215 // Reportedly, #pragma once is supported since C++ Builder 2010
216 #if (__CODEGEARC__ >= 0x620)
217 # define BOOST_HAS_PRAGMA_ONCE
220 #define BOOST_NO_FENV_H
225 #if (__CODEGEARC__ <= 0x620)
226 #define BOOST_NO_CXX11_STATIC_ASSERT
228 #define BOOST_HAS_STATIC_ASSERT
230 #define BOOST_HAS_CHAR16_T
231 #define BOOST_HAS_CHAR32_T
232 #define BOOST_HAS_LONG_LONG
233 // #define BOOST_HAS_ALIGNOF
234 #define BOOST_HAS_DECLTYPE
235 #define BOOST_HAS_EXPLICIT_CONVERSION_OPS
236 // #define BOOST_HAS_RVALUE_REFS
237 #define BOOST_HAS_SCOPED_ENUM
238 // #define BOOST_HAS_STATIC_ASSERT
239 #define BOOST_HAS_STD_TYPE_TRAITS
241 #define BOOST_NO_CXX11_AUTO_DECLARATIONS
242 #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
243 #define BOOST_NO_CXX11_CONSTEXPR
244 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
245 #define BOOST_NO_CXX11_DELETED_FUNCTIONS
246 #define BOOST_NO_CXX11_EXTERN_TEMPLATE
247 #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
248 #define BOOST_NO_CXX11_LAMBDAS
249 #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
250 #define BOOST_NO_CXX11_NOEXCEPT
251 #define BOOST_NO_CXX11_NULLPTR
252 #define BOOST_NO_CXX11_RANGE_BASED_FOR
253 #define BOOST_NO_CXX11_RAW_LITERALS
254 #define BOOST_NO_CXX11_RVALUE_REFERENCES
255 #define BOOST_NO_SFINAE_EXPR
256 #define BOOST_NO_CXX11_SFINAE_EXPR
257 #define BOOST_NO_CXX11_TEMPLATE_ALIASES
258 #define BOOST_NO_CXX11_UNICODE_LITERALS
259 #define BOOST_NO_CXX11_VARIADIC_TEMPLATES
260 #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
261 #define BOOST_NO_CXX11_USER_DEFINED_LITERALS
262 #define BOOST_NO_CXX11_ALIGNAS
263 #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
264 #define BOOST_NO_CXX11_INLINE_NAMESPACES
265 #define BOOST_NO_CXX11_REF_QUALIFIERS
266 #define BOOST_NO_CXX11_FINAL
267 #define BOOST_NO_CXX11_OVERRIDE
268 #define BOOST_NO_CXX11_THREAD_LOCAL
269 #define BOOST_NO_CXX11_DECLTYPE_N3276
270 #define BOOST_NO_CXX11_UNRESTRICTED_UNION
273 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
274 # define BOOST_NO_CXX14_AGGREGATE_NSDMI
276 #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
277 # define BOOST_NO_CXX14_BINARY_LITERALS
279 #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
280 # define BOOST_NO_CXX14_CONSTEXPR
282 #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
283 # define BOOST_NO_CXX14_DECLTYPE_AUTO
285 #if (__cplusplus < 201304) // There's no SD6 check for this....
286 # define BOOST_NO_CXX14_DIGIT_SEPARATORS
288 #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
289 # define BOOST_NO_CXX14_GENERIC_LAMBDAS
291 #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
292 # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
294 #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
295 # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
297 #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
298 # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
302 #if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
303 # define BOOST_NO_CXX17_STRUCTURED_BINDINGS
306 #if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
307 # define BOOST_NO_CXX17_INLINE_VARIABLES
310 #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
311 # define BOOST_NO_CXX17_FOLD_EXPRESSIONS
314 #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
315 # define BOOST_NO_CXX17_IF_CONSTEXPR
321 #define BOOST_HAS_TR1_HASH
322 #define BOOST_HAS_TR1_TYPE_TRAITS
323 #define BOOST_HAS_TR1_UNORDERED_MAP
324 #define BOOST_HAS_TR1_UNORDERED_SET
326 #define BOOST_HAS_MACRO_USE_FACET
328 #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
330 // On non-Win32 platforms let the platform config figure this out:
332 # define BOOST_HAS_STDINT_H
338 #if !defined(__STRICT_ANSI__)
339 # define BOOST_HAS_MS_INT64
342 // check for exception handling support:
344 #if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
345 # define BOOST_NO_EXCEPTIONS
348 // all versions have a <dirent.h>:
350 #if !defined(__STRICT_ANSI__)
351 # define BOOST_HAS_DIRENT_H
354 // all versions support __declspec:
356 #if defined(__STRICT_ANSI__)
357 // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
358 # define BOOST_SYMBOL_EXPORT
361 // ABI fixing headers:
363 #ifndef BOOST_ABI_PREFIX
364 # define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
366 #ifndef BOOST_ABI_SUFFIX
367 # define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
370 // Disable Win32 support in ANSI mode:
372 # pragma defineonoption BOOST_DISABLE_WIN32 -A
374 // MSVC compatibility mode does some nasty things:
375 // TODO: look up if this doesn't apply to the whole 12xx range
377 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
378 # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
379 # define BOOST_NO_VOID_RETURNS
382 #define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__)
384 #endif // #if !defined(__clang__)