Chris@16
|
1 // (C) Copyright John Maddock 2001 - 2003.
|
Chris@16
|
2 // (C) Copyright David Abrahams 2002 - 2003.
|
Chris@16
|
3 // (C) Copyright Aleksey Gurtovoy 2002.
|
Chris@16
|
4 // Use, modification and distribution are subject to the
|
Chris@16
|
5 // Boost Software License, Version 1.0. (See accompanying file
|
Chris@16
|
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
7
|
Chris@16
|
8 // See http://www.boost.org for most recent version.
|
Chris@16
|
9
|
Chris@16
|
10 // Borland C++ compiler setup:
|
Chris@16
|
11
|
Chris@16
|
12 //
|
Chris@16
|
13 // versions check:
|
Chris@16
|
14 // we don't support Borland prior to version 5.4:
|
Chris@16
|
15 #if __BORLANDC__ < 0x540
|
Chris@16
|
16 # error "Compiler not supported or configured - please reconfigure"
|
Chris@16
|
17 #endif
|
Chris@16
|
18
|
Chris@16
|
19 // last known compiler version:
|
Chris@16
|
20 #if (__BORLANDC__ > 0x613)
|
Chris@16
|
21 //# if defined(BOOST_ASSERT_CONFIG)
|
Chris@16
|
22 # error "Unknown compiler version - please run the configure tests and report the results"
|
Chris@16
|
23 //# else
|
Chris@16
|
24 //# pragma message( "Unknown compiler version - please run the configure tests and report the results")
|
Chris@16
|
25 //# endif
|
Chris@16
|
26 #elif (__BORLANDC__ == 0x600)
|
Chris@16
|
27 # error "CBuilderX preview compiler is no longer supported"
|
Chris@16
|
28 #endif
|
Chris@16
|
29
|
Chris@16
|
30 //
|
Chris@16
|
31 // Support macros to help with standard library detection
|
Chris@16
|
32 #if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL)
|
Chris@16
|
33 # define BOOST_BCB_WITH_ROGUE_WAVE
|
Chris@16
|
34 #elif __BORLANDC__ < 0x570
|
Chris@16
|
35 # define BOOST_BCB_WITH_STLPORT
|
Chris@16
|
36 #else
|
Chris@16
|
37 # define BOOST_BCB_WITH_DINKUMWARE
|
Chris@16
|
38 #endif
|
Chris@16
|
39
|
Chris@16
|
40 //
|
Chris@16
|
41 // Version 5.0 and below:
|
Chris@16
|
42 # if __BORLANDC__ <= 0x0550
|
Chris@16
|
43 // Borland C++Builder 4 and 5:
|
Chris@16
|
44 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
Chris@16
|
45 # if __BORLANDC__ == 0x0550
|
Chris@16
|
46 // Borland C++Builder 5, command-line compiler 5.5:
|
Chris@16
|
47 # define BOOST_NO_OPERATORS_IN_NAMESPACE
|
Chris@16
|
48 # endif
|
Chris@16
|
49 // Variadic macros do not exist for C++ Builder versions 5 and below
|
Chris@16
|
50 #define BOOST_NO_CXX11_VARIADIC_MACROS
|
Chris@16
|
51 # endif
|
Chris@16
|
52
|
Chris@16
|
53 // Version 5.51 and below:
|
Chris@16
|
54 #if (__BORLANDC__ <= 0x551)
|
Chris@16
|
55 # define BOOST_NO_CV_SPECIALIZATIONS
|
Chris@16
|
56 # define BOOST_NO_CV_VOID_SPECIALIZATIONS
|
Chris@16
|
57 # define BOOST_NO_DEDUCED_TYPENAME
|
Chris@16
|
58 // workaround for missing WCHAR_MAX/WCHAR_MIN:
|
Chris@16
|
59 #ifdef __cplusplus
|
Chris@16
|
60 #include <climits>
|
Chris@16
|
61 #include <cwchar>
|
Chris@16
|
62 #else
|
Chris@16
|
63 #include <limits.h>
|
Chris@16
|
64 #include <wchar.h>
|
Chris@16
|
65 #endif // __cplusplus
|
Chris@16
|
66 #ifndef WCHAR_MAX
|
Chris@16
|
67 # define WCHAR_MAX 0xffff
|
Chris@16
|
68 #endif
|
Chris@16
|
69 #ifndef WCHAR_MIN
|
Chris@16
|
70 # define WCHAR_MIN 0
|
Chris@16
|
71 #endif
|
Chris@16
|
72 #endif
|
Chris@16
|
73
|
Chris@16
|
74 // Borland C++ Builder 6 and below:
|
Chris@16
|
75 #if (__BORLANDC__ <= 0x564)
|
Chris@16
|
76
|
Chris@16
|
77 # if defined(NDEBUG) && defined(__cplusplus)
|
Chris@16
|
78 // fix broken <cstring> so that Boost.test works:
|
Chris@16
|
79 # include <cstring>
|
Chris@16
|
80 # undef strcmp
|
Chris@16
|
81 # endif
|
Chris@16
|
82 // fix broken errno declaration:
|
Chris@16
|
83 # include <errno.h>
|
Chris@16
|
84 # ifndef errno
|
Chris@16
|
85 # define errno errno
|
Chris@16
|
86 # endif
|
Chris@16
|
87
|
Chris@16
|
88 #endif
|
Chris@16
|
89
|
Chris@16
|
90 //
|
Chris@16
|
91 // new bug in 5.61:
|
Chris@16
|
92 #if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580)
|
Chris@16
|
93 // this seems to be needed by the command line compiler, but not the IDE:
|
Chris@16
|
94 # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
Chris@16
|
95 #endif
|
Chris@16
|
96
|
Chris@16
|
97 // Borland C++ Builder 2006 Update 2 and below:
|
Chris@16
|
98 #if (__BORLANDC__ <= 0x582)
|
Chris@16
|
99 # define BOOST_NO_SFINAE
|
Chris@16
|
100 # define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
Chris@16
|
101 # define BOOST_NO_TEMPLATE_TEMPLATES
|
Chris@16
|
102
|
Chris@16
|
103 # define BOOST_NO_PRIVATE_IN_AGGREGATE
|
Chris@16
|
104
|
Chris@16
|
105 # ifdef _WIN32
|
Chris@16
|
106 # define BOOST_NO_SWPRINTF
|
Chris@16
|
107 # elif defined(linux) || defined(__linux__) || defined(__linux)
|
Chris@16
|
108 // we should really be able to do without this
|
Chris@16
|
109 // but the wcs* functions aren't imported into std::
|
Chris@16
|
110 # define BOOST_NO_STDC_NAMESPACE
|
Chris@16
|
111 // _CPPUNWIND doesn't get automatically set for some reason:
|
Chris@16
|
112 # pragma defineonoption BOOST_CPPUNWIND -x
|
Chris@16
|
113 # endif
|
Chris@16
|
114 #endif
|
Chris@16
|
115
|
Chris@16
|
116 #if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info
|
Chris@16
|
117 // we shouldn't really need this - but too many things choke
|
Chris@16
|
118 // without it, this needs more investigation:
|
Chris@16
|
119 # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
Chris@16
|
120 # define BOOST_NO_IS_ABSTRACT
|
Chris@16
|
121 # define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
|
Chris@16
|
122 # define BOOST_NO_USING_TEMPLATE
|
Chris@16
|
123 # define BOOST_SP_NO_SP_CONVERTIBLE
|
Chris@16
|
124
|
Chris@16
|
125 // Temporary workaround
|
Chris@16
|
126 #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
Chris@16
|
127 #endif
|
Chris@16
|
128
|
Chris@16
|
129 // Borland C++ Builder 2008 and below:
|
Chris@16
|
130 # define BOOST_NO_INTEGRAL_INT64_T
|
Chris@16
|
131 # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
Chris@16
|
132 # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
Chris@16
|
133 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
Chris@16
|
134 # define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
Chris@16
|
135 # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
Chris@16
|
136 # define BOOST_NO_NESTED_FRIENDSHIP
|
Chris@16
|
137 # define BOOST_NO_TYPENAME_WITH_CTOR
|
Chris@16
|
138 #if (__BORLANDC__ < 0x600)
|
Chris@16
|
139 # define BOOST_ILLEGAL_CV_REFERENCES
|
Chris@16
|
140 #endif
|
Chris@16
|
141
|
Chris@16
|
142 //
|
Chris@16
|
143 // Positive Feature detection
|
Chris@16
|
144 //
|
Chris@16
|
145 // Borland C++ Builder 2008 and below:
|
Chris@16
|
146 #if (__BORLANDC__ >= 0x599)
|
Chris@16
|
147 # pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax
|
Chris@16
|
148 #endif
|
Chris@16
|
149 //
|
Chris@16
|
150 // C++0x Macros:
|
Chris@16
|
151 //
|
Chris@16
|
152 #if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610)
|
Chris@16
|
153 # define BOOST_NO_CXX11_CHAR16_T
|
Chris@16
|
154 # define BOOST_NO_CXX11_CHAR32_T
|
Chris@16
|
155 # define BOOST_NO_CXX11_DECLTYPE
|
Chris@16
|
156 # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
Chris@16
|
157 # define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
Chris@16
|
158 # define BOOST_NO_CXX11_RVALUE_REFERENCES
|
Chris@16
|
159 # define BOOST_NO_CXX11_SCOPED_ENUMS
|
Chris@16
|
160 # define BOOST_NO_CXX11_STATIC_ASSERT
|
Chris@16
|
161 #else
|
Chris@16
|
162 # define BOOST_HAS_ALIGNOF
|
Chris@16
|
163 # define BOOST_HAS_CHAR16_T
|
Chris@16
|
164 # define BOOST_HAS_CHAR32_T
|
Chris@16
|
165 # define BOOST_HAS_DECLTYPE
|
Chris@16
|
166 # define BOOST_HAS_EXPLICIT_CONVERSION_OPS
|
Chris@16
|
167 # define BOOST_HAS_REF_QUALIFIER
|
Chris@16
|
168 # define BOOST_HAS_RVALUE_REFS
|
Chris@16
|
169 # define BOOST_HAS_STATIC_ASSERT
|
Chris@16
|
170 #endif
|
Chris@16
|
171
|
Chris@16
|
172 #define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
Chris@16
|
173 #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
Chris@16
|
174 #define BOOST_NO_CXX11_CONSTEXPR
|
Chris@16
|
175 #define BOOST_NO_CXX11_DECLTYPE_N3276
|
Chris@16
|
176 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
Chris@16
|
177 #define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
Chris@16
|
178 #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
Chris@16
|
179 #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
Chris@16
|
180 #define BOOST_NO_CXX11_LAMBDAS
|
Chris@16
|
181 #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
Chris@16
|
182 #define BOOST_NO_CXX11_NULLPTR
|
Chris@16
|
183 #define BOOST_NO_CXX11_RANGE_BASED_FOR
|
Chris@16
|
184 #define BOOST_NO_CXX11_RAW_LITERALS
|
Chris@16
|
185 #define BOOST_NO_CXX11_RVALUE_REFERENCES
|
Chris@16
|
186 #define BOOST_NO_CXX11_SCOPED_ENUMS
|
Chris@16
|
187 #define BOOST_NO_SFINAE_EXPR
|
Chris@16
|
188 #define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
Chris@16
|
189 #define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported
|
Chris@16
|
190 #define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
Chris@16
|
191 #define BOOST_NO_CXX11_NOEXCEPT
|
Chris@16
|
192 #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
Chris@16
|
193 #define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
Chris@16
|
194 #define BOOST_NO_CXX11_ALIGNAS
|
Chris@16
|
195 #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
Chris@16
|
196 #define BOOST_NO_CXX11_INLINE_NAMESPACES
|
Chris@101
|
197 #define BOOST_NO_CXX11_REF_QUALIFIERS
|
Chris@101
|
198 #define BOOST_NO_CXX11_FINAL
|
Chris@101
|
199
|
Chris@101
|
200 // C++ 14:
|
Chris@101
|
201 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
|
Chris@101
|
202 # define BOOST_NO_CXX14_AGGREGATE_NSDMI
|
Chris@101
|
203 #endif
|
Chris@101
|
204 #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
|
Chris@101
|
205 # define BOOST_NO_CXX14_BINARY_LITERALS
|
Chris@101
|
206 #endif
|
Chris@101
|
207 #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
|
Chris@101
|
208 # define BOOST_NO_CXX14_CONSTEXPR
|
Chris@101
|
209 #endif
|
Chris@101
|
210 #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
|
Chris@101
|
211 # define BOOST_NO_CXX14_DECLTYPE_AUTO
|
Chris@101
|
212 #endif
|
Chris@101
|
213 #if (__cplusplus < 201304) // There's no SD6 check for this....
|
Chris@101
|
214 # define BOOST_NO_CXX14_DIGIT_SEPARATORS
|
Chris@101
|
215 #endif
|
Chris@101
|
216 #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
|
Chris@101
|
217 # define BOOST_NO_CXX14_GENERIC_LAMBDAS
|
Chris@101
|
218 #endif
|
Chris@101
|
219 #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
|
Chris@101
|
220 # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
|
Chris@101
|
221 #endif
|
Chris@101
|
222 #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
|
Chris@101
|
223 # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
|
Chris@101
|
224 #endif
|
Chris@101
|
225 #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
|
Chris@101
|
226 # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
|
Chris@101
|
227 #endif
|
Chris@16
|
228
|
Chris@16
|
229 #if __BORLANDC__ >= 0x590
|
Chris@16
|
230 # define BOOST_HAS_TR1_HASH
|
Chris@16
|
231
|
Chris@16
|
232 # define BOOST_HAS_MACRO_USE_FACET
|
Chris@16
|
233 #endif
|
Chris@16
|
234
|
Chris@16
|
235 //
|
Chris@16
|
236 // Post 0x561 we have long long and stdint.h:
|
Chris@16
|
237 #if __BORLANDC__ >= 0x561
|
Chris@16
|
238 # ifndef __NO_LONG_LONG
|
Chris@16
|
239 # define BOOST_HAS_LONG_LONG
|
Chris@16
|
240 # else
|
Chris@16
|
241 # define BOOST_NO_LONG_LONG
|
Chris@16
|
242 # endif
|
Chris@16
|
243 // On non-Win32 platforms let the platform config figure this out:
|
Chris@16
|
244 # ifdef _WIN32
|
Chris@16
|
245 # define BOOST_HAS_STDINT_H
|
Chris@16
|
246 # endif
|
Chris@16
|
247 #endif
|
Chris@16
|
248
|
Chris@16
|
249 // Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is
|
Chris@16
|
250 // defined, then we have 0x560 or greater with the Rogue Wave implementation
|
Chris@16
|
251 // which presumably has the std::DBL_MAX bug.
|
Chris@16
|
252 #if defined( BOOST_BCB_WITH_ROGUE_WAVE )
|
Chris@16
|
253 // <climits> is partly broken, some macros define symbols that are really in
|
Chris@16
|
254 // namespace std, so you end up having to use illegal constructs like
|
Chris@16
|
255 // std::DBL_MAX, as a fix we'll just include float.h and have done with:
|
Chris@16
|
256 #include <float.h>
|
Chris@16
|
257 #endif
|
Chris@16
|
258 //
|
Chris@16
|
259 // __int64:
|
Chris@16
|
260 //
|
Chris@16
|
261 #if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)
|
Chris@16
|
262 # define BOOST_HAS_MS_INT64
|
Chris@16
|
263 #endif
|
Chris@16
|
264 //
|
Chris@16
|
265 // check for exception handling support:
|
Chris@16
|
266 //
|
Chris@16
|
267 #if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
|
Chris@16
|
268 # define BOOST_NO_EXCEPTIONS
|
Chris@16
|
269 #endif
|
Chris@16
|
270 //
|
Chris@16
|
271 // all versions have a <dirent.h>:
|
Chris@16
|
272 //
|
Chris@16
|
273 #ifndef __STRICT_ANSI__
|
Chris@16
|
274 # define BOOST_HAS_DIRENT_H
|
Chris@16
|
275 #endif
|
Chris@16
|
276 //
|
Chris@16
|
277 // all versions support __declspec:
|
Chris@16
|
278 //
|
Chris@16
|
279 #if defined(__STRICT_ANSI__)
|
Chris@16
|
280 // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
|
Chris@16
|
281 # define BOOST_SYMBOL_EXPORT
|
Chris@16
|
282 #endif
|
Chris@16
|
283 //
|
Chris@16
|
284 // ABI fixing headers:
|
Chris@16
|
285 //
|
Chris@16
|
286 #if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet
|
Chris@16
|
287 #ifndef BOOST_ABI_PREFIX
|
Chris@16
|
288 # define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
|
Chris@16
|
289 #endif
|
Chris@16
|
290 #ifndef BOOST_ABI_SUFFIX
|
Chris@16
|
291 # define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
|
Chris@16
|
292 #endif
|
Chris@16
|
293 #endif
|
Chris@16
|
294 //
|
Chris@16
|
295 // Disable Win32 support in ANSI mode:
|
Chris@16
|
296 //
|
Chris@16
|
297 #if __BORLANDC__ < 0x600
|
Chris@16
|
298 # pragma defineonoption BOOST_DISABLE_WIN32 -A
|
Chris@16
|
299 #elif defined(__STRICT_ANSI__)
|
Chris@16
|
300 # define BOOST_DISABLE_WIN32
|
Chris@16
|
301 #endif
|
Chris@16
|
302 //
|
Chris@16
|
303 // MSVC compatibility mode does some nasty things:
|
Chris@16
|
304 // TODO: look up if this doesn't apply to the whole 12xx range
|
Chris@16
|
305 //
|
Chris@16
|
306 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
Chris@16
|
307 # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
Chris@16
|
308 # define BOOST_NO_VOID_RETURNS
|
Chris@16
|
309 #endif
|
Chris@16
|
310
|
Chris@16
|
311 // Borland did not implement value-initialization completely, as I reported
|
Chris@16
|
312 // in 2007, Borland Report 51854, "Value-initialization: POD struct should be
|
Chris@16
|
313 // zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854
|
Chris@16
|
314 // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
|
Chris@16
|
315 // (Niels Dekker, LKEB, April 2010)
|
Chris@16
|
316 #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
Chris@16
|
317
|
Chris@16
|
318 #define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
|