1 // Boost config.hpp configuration header file ------------------------------//
2 // boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file
4 // Copyright (c) 2001-2003 John Maddock
5 // Copyright (c) 2001 Darin Adler
6 // Copyright (c) 2001 Peter Dimov
7 // Copyright (c) 2002 Bill Kempf
8 // Copyright (c) 2002 Jens Maurer
9 // Copyright (c) 2002-2003 David Abrahams
10 // Copyright (c) 2003 Gennaro Prota
11 // Copyright (c) 2003 Eric Friedman
12 // Copyright (c) 2010 Eric Jourdanneau, Joel Falcou
13 // Distributed under the Boost Software License, Version 1.0. (See
14 // accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 // See http://www.boost.org/ for most recent version.
19 // Boost config.hpp policy and rationale documentation has been moved to
20 // http://www.boost.org/libs/config/
22 // This file is intended to be stable, and relatively unchanging.
23 // It should contain boilerplate code only - no compiler specific
24 // code unless it is unavoidable - no changes unless unavoidable.
26 #ifndef BOOST_CONFIG_SUFFIX_HPP
27 #define BOOST_CONFIG_SUFFIX_HPP
29 #if defined(__GNUC__) && (__GNUC__ >= 4)
31 // Some GCC-4.x versions issue warnings even when __extension__ is used,
32 // so use this as a workaround:
34 #pragma GCC system_header
38 // ensure that visibility macros are always defined, thus symplifying use
40 #ifndef BOOST_SYMBOL_EXPORT
41 # define BOOST_SYMBOL_EXPORT
43 #ifndef BOOST_SYMBOL_IMPORT
44 # define BOOST_SYMBOL_IMPORT
46 #ifndef BOOST_SYMBOL_VISIBLE
47 # define BOOST_SYMBOL_VISIBLE
51 // look for long long by looking for the appropriate macros in <limits.h>.
52 // Note that we use limits.h rather than climits for maximal portability,
53 // remember that since these just declare a bunch of macros, there should be
54 // no namespace issues from this.
56 #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \
57 && !defined(BOOST_MSVC) && !defined(__BORLANDC__)
59 # if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
60 # define BOOST_HAS_LONG_LONG
62 # define BOOST_NO_LONG_LONG
66 // GCC 3.x will clean up all of those nasty macro definitions that
67 // BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine
69 #if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS)
70 # undef BOOST_NO_CTYPE_FUNCTIONS
74 // Assume any extensions are in namespace std:: unless stated otherwise:
76 # ifndef BOOST_STD_EXTENSION_NAMESPACE
77 # define BOOST_STD_EXTENSION_NAMESPACE std
81 // If cv-qualified specializations are not allowed, then neither are cv-void ones:
83 # if defined(BOOST_NO_CV_SPECIALIZATIONS) \
84 && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
85 # define BOOST_NO_CV_VOID_SPECIALIZATIONS
89 // If there is no numeric_limits template, then it can't have any compile time
92 # if defined(BOOST_NO_LIMITS) \
93 && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
94 # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
95 # define BOOST_NO_MS_INT64_NUMERIC_LIMITS
96 # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
100 // if there is no long long then there is no specialisation
101 // for numeric_limits<long long> either:
103 #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)
104 # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
108 // if there is no __int64 then there is no specialisation
109 // for numeric_limits<__int64> either:
111 #if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
112 # define BOOST_NO_MS_INT64_NUMERIC_LIMITS
116 // if member templates are supported then so is the
117 // VC6 subset of member templates:
119 # if !defined(BOOST_NO_MEMBER_TEMPLATES) \
120 && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
121 # define BOOST_MSVC6_MEMBER_TEMPLATES
125 // Without partial specialization, can't test for partial specialisation bugs:
127 # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
128 && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
129 # define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
133 // Without partial specialization, we can't have array-type partial specialisations:
135 # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
136 && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
137 # define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
141 // Without partial specialization, std::iterator_traits can't work:
143 # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
144 && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
145 # define BOOST_NO_STD_ITERATOR_TRAITS
149 // Without partial specialization, partial
150 // specialization with default args won't work either:
152 # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
153 && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
154 # define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
158 // Without member template support, we can't have template constructors
159 // in the standard library either:
161 # if defined(BOOST_NO_MEMBER_TEMPLATES) \
162 && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
163 && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
164 # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
168 // Without member template support, we can't have a conforming
169 // std::allocator template either:
171 # if defined(BOOST_NO_MEMBER_TEMPLATES) \
172 && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
173 && !defined(BOOST_NO_STD_ALLOCATOR)
174 # define BOOST_NO_STD_ALLOCATOR
178 // without ADL support then using declarations will break ADL as well:
180 #if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
181 # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
185 // Without typeid support we have no dynamic RTTI either:
187 #if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
188 # define BOOST_NO_RTTI
192 // If we have a standard allocator, then we have a partial one as well:
194 #if !defined(BOOST_NO_STD_ALLOCATOR)
195 # define BOOST_HAS_PARTIAL_STD_ALLOCATOR
199 // We can't have a working std::use_facet if there is no std::locale:
201 # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
202 # define BOOST_NO_STD_USE_FACET
206 // We can't have a std::messages facet if there is no std::locale:
208 # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
209 # define BOOST_NO_STD_MESSAGES
213 // We can't have a working std::wstreambuf if there is no std::locale:
215 # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
216 # define BOOST_NO_STD_WSTREAMBUF
220 // We can't have a <cwctype> if there is no <cwchar>:
222 # if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
223 # define BOOST_NO_CWCTYPE
227 // We can't have a swprintf if there is no <cwchar>:
229 # if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
230 # define BOOST_NO_SWPRINTF
234 // If Win32 support is turned off, then we must turn off
235 // threading support also, unless there is some other
236 // thread API enabled:
238 #if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \
239 && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
240 # define BOOST_DISABLE_THREADS
244 // Turn on threading support if the compiler thinks that it's in
245 // multithreaded mode. We put this here because there are only a
246 // limited number of macros that identify this (if there's any missing
247 // from here then add to the appropriate compiler section):
249 #if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
250 || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \
251 && !defined(BOOST_HAS_THREADS)
252 # define BOOST_HAS_THREADS
256 // Turn threading support off if BOOST_DISABLE_THREADS is defined:
258 #if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
259 # undef BOOST_HAS_THREADS
263 // Turn threading support off if we don't recognise the threading API:
265 #if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\
266 && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\
267 && !defined(BOOST_HAS_MPTASKS)
268 # undef BOOST_HAS_THREADS
272 // Turn threading detail macros off if we don't (want to) use threading
274 #ifndef BOOST_HAS_THREADS
275 # undef BOOST_HAS_PTHREADS
276 # undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
277 # undef BOOST_HAS_PTHREAD_YIELD
278 # undef BOOST_HAS_PTHREAD_DELAY_NP
279 # undef BOOST_HAS_WINTHREADS
280 # undef BOOST_HAS_BETHREADS
281 # undef BOOST_HAS_MPTASKS
285 // If the compiler claims to be C99 conformant, then it had better
286 // have a <stdint.h>:
288 # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
289 # define BOOST_HAS_STDINT_H
290 # ifndef BOOST_HAS_LOG1P
291 # define BOOST_HAS_LOG1P
293 # ifndef BOOST_HAS_EXPM1
294 # define BOOST_HAS_EXPM1
299 // Define BOOST_NO_SLIST and BOOST_NO_HASH if required.
300 // Note that this is for backwards compatibility only.
302 # if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST)
303 # define BOOST_NO_SLIST
306 # if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH)
307 # define BOOST_NO_HASH
311 // Set BOOST_SLIST_HEADER if not set already:
313 #if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER)
314 # define BOOST_SLIST_HEADER <slist>
318 // Set BOOST_HASH_SET_HEADER if not set already:
320 #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER)
321 # define BOOST_HASH_SET_HEADER <hash_set>
325 // Set BOOST_HASH_MAP_HEADER if not set already:
327 #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER)
328 # define BOOST_HASH_MAP_HEADER <hash_map>
331 // BOOST_HAS_ABI_HEADERS
332 // This macro gets set if we have headers that fix the ABI,
333 // and prevent ODR violations when linking to external libraries:
334 #if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS)
335 # define BOOST_HAS_ABI_HEADERS
338 #if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS)
339 # undef BOOST_HAS_ABI_HEADERS
342 // BOOST_NO_STDC_NAMESPACE workaround --------------------------------------//
343 // Because std::size_t usage is so common, even in boost headers which do not
344 // otherwise use the C library, the <cstddef> workaround is included here so
345 // that ugly workaround code need not appear in many other boost headers.
346 // NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
347 // must still be #included in the usual places so that <cstddef> inclusion
348 // works as expected with standard conforming compilers. The resulting
349 // double inclusion of <cstddef> is harmless.
351 # if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
353 namespace std { using ::ptrdiff_t; using ::size_t; }
356 // Workaround for the unfortunate min/max macros defined by some platform headers
358 #define BOOST_PREVENT_MACRO_SUBSTITUTION
360 #ifndef BOOST_USING_STD_MIN
361 # define BOOST_USING_STD_MIN() using std::min
364 #ifndef BOOST_USING_STD_MAX
365 # define BOOST_USING_STD_MAX() using std::max
368 // BOOST_NO_STD_MIN_MAX workaround -----------------------------------------//
370 # if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus)
374 inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
375 return __b < __a ? __b : __a;
378 inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
379 return __a < __b ? __b : __a;
385 // BOOST_STATIC_CONSTANT workaround --------------------------------------- //
386 // On compilers which don't allow in-class initialization of static integral
387 // constant members, we must use enums as a workaround if we want the constants
388 // to be available at compile-time. This macro gives us a convenient way to
389 // declare such constants.
391 # ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
392 # define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
394 # define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
397 // BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//
398 // When the standard library does not have a conforming std::use_facet there
399 // are various workarounds available, but they differ from library to library.
400 // The same problem occurs with has_facet.
401 // These macros provide a consistent way to access a locale's facets.
404 // std::use_facet<Type>(loc);
406 // BOOST_USE_FACET(Type, loc);
407 // Note do not add a std:: prefix to the front of BOOST_USE_FACET!
408 // Use for BOOST_HAS_FACET is analogous.
410 #if defined(BOOST_NO_STD_USE_FACET)
411 # ifdef BOOST_HAS_TWO_ARG_USE_FACET
412 # define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
413 # define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))
414 # elif defined(BOOST_HAS_MACRO_USE_FACET)
415 # define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
416 # define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
417 # elif defined(BOOST_HAS_STLP_USE_FACET)
418 # define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
419 # define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
422 # define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
423 # define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
426 // BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
427 // Member templates are supported by some compilers even though they can't use
428 // the A::template member<U> syntax, as a workaround replace:
430 // typedef typename A::template rebind<U> binder;
434 // typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;
436 #ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
437 # define BOOST_NESTED_TEMPLATE template
439 # define BOOST_NESTED_TEMPLATE
442 // BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//
443 // Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION
444 // is defined, in which case it evaluates to return x; Use when you have a return
445 // statement that can never be reached.
447 #ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
448 # define BOOST_UNREACHABLE_RETURN(x) return x;
450 # define BOOST_UNREACHABLE_RETURN(x)
453 // BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
455 // Some compilers don't support the use of `typename' for dependent
456 // types in deduced contexts, e.g.
458 // template <class T> void f(T, typename T::type);
460 // Replace these declarations with:
462 // template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
464 #ifndef BOOST_NO_DEDUCED_TYPENAME
465 # define BOOST_DEDUCED_TYPENAME typename
467 # define BOOST_DEDUCED_TYPENAME
470 #ifndef BOOST_NO_TYPENAME_WITH_CTOR
471 # define BOOST_CTOR_TYPENAME typename
473 # define BOOST_CTOR_TYPENAME
476 // long long workaround ------------------------------------------//
477 // On gcc (and maybe other compilers?) long long is alway supported
478 // but it's use may generate either warnings (with -ansi), or errors
479 // (with -pedantic -ansi) unless it's use is prefixed by __extension__
481 #if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus)
484 __extension__ typedef long long long_long_type;
485 __extension__ typedef unsigned long long ulong_long_type;
487 typedef long long long_long_type;
488 typedef unsigned long long ulong_long_type;
492 // same again for __int128:
493 #if defined(BOOST_HAS_INT128) && defined(__cplusplus)
496 __extension__ typedef __int128 int128_type;
497 __extension__ typedef unsigned __int128 uint128_type;
499 typedef __int128 int128_type;
500 typedef unsigned __int128 uint128_type;
505 // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
507 // Some compilers have problems with function templates whose template
508 // parameters don't appear in the function parameter list (basically
509 // they just link one instantiation of the template in the final
510 // executable). These macros provide a uniform way to cope with the
511 // problem with no effects on the calling syntax.
515 // #include <iostream>
516 // #include <ostream>
517 // #include <typeinfo>
520 // void f() { std::cout << n << ' '; }
522 // template <typename T>
523 // void g() { std::cout << typeid(T).name() << ' '; }
533 // With VC++ 6.0 the output is:
540 // void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... }
542 // template <typename T>
543 // void g(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) { ... }
547 #if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) && defined(__cplusplus)
549 # include "boost/type.hpp"
550 # include "boost/non_type.hpp"
552 # define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type<t>* = 0
553 # define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*
554 # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v>* = 0
555 # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type<t, v>*
557 # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \
558 , BOOST_EXPLICIT_TEMPLATE_TYPE(t)
559 # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \
560 , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
561 # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \
562 , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
563 # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \
564 , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
568 // no workaround needed: expand to nothing
570 # define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
571 # define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
572 # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
573 # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
575 # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
576 # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
577 # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
578 # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
581 #endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
583 // When BOOST_NO_STD_TYPEINFO is defined, we can just import
584 // the global definition into std namespace:
585 #if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)
587 namespace std{ using ::type_info; }
590 // ---------------------------------------------------------------------------//
593 // Helper macro BOOST_STRINGIZE:
594 // Converts the parameter X to a string after macro replacement
595 // on X has been performed.
597 #define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
598 #define BOOST_DO_STRINGIZE(X) #X
601 // Helper macro BOOST_JOIN:
602 // The following piece of macro magic joins the two
603 // arguments together, even when one of the arguments is
604 // itself a macro (see 16.3.1 in C++ standard). The key
605 // is that macro expansion of macro arguments does not
606 // occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
608 #define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
609 #define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
610 #define BOOST_DO_JOIN2( X, Y ) X##Y
613 // Set some default values for compiler/library/platform names.
614 // These are for debugging config setup only:
616 # ifndef BOOST_COMPILER
617 # define BOOST_COMPILER "Unknown ISO C++ Compiler"
619 # ifndef BOOST_STDLIB
620 # define BOOST_STDLIB "Unknown ISO standard library"
622 # ifndef BOOST_PLATFORM
623 # if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
624 || defined(_POSIX_SOURCE)
625 # define BOOST_PLATFORM "Generic Unix"
627 # define BOOST_PLATFORM "Unknown"
632 // Set some default values GPU support
634 # ifndef BOOST_GPU_ENABLED
635 # define BOOST_GPU_ENABLED
638 // BOOST_FORCEINLINE ---------------------------------------------//
639 // Macro to use in place of 'inline' to force a function to be inline
640 #if !defined(BOOST_FORCEINLINE)
641 # if defined(_MSC_VER)
642 # define BOOST_FORCEINLINE __forceinline
643 # elif defined(__GNUC__) && __GNUC__ > 3
644 # define BOOST_FORCEINLINE inline __attribute__ ((always_inline))
646 # define BOOST_FORCEINLINE inline
651 // Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined
653 #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
654 #define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE
657 // -------------------- Deprecated macros for 1.50 ---------------------------
658 // These will go away in a future release
660 // Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP
661 // instead of BOOST_NO_STD_UNORDERED
662 #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET)
663 # ifndef BOOST_NO_CXX11_STD_UNORDERED
664 # define BOOST_NO_CXX11_STD_UNORDERED
668 // Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS
669 #if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
670 # define BOOST_NO_INITIALIZER_LISTS
673 // Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY
674 #if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_BOOST_NO_0X_HDR_ARRAY)
675 # define BOOST_NO_0X_HDR_ARRAY
677 // Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO
678 #if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO)
679 # define BOOST_NO_0X_HDR_CHRONO
681 // Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT
682 #if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT)
683 # define BOOST_NO_0X_HDR_CODECVT
685 // Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE
686 #if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE)
687 # define BOOST_NO_0X_HDR_CONDITION_VARIABLE
689 // Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST
690 #if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST)
691 # define BOOST_NO_0X_HDR_FORWARD_LIST
693 // Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE
694 #if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE)
695 # define BOOST_NO_0X_HDR_FUTURE
698 // Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST
699 // instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS
700 #ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
701 # ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST
702 # define BOOST_NO_0X_HDR_INITIALIZER_LIST
704 # ifndef BOOST_NO_INITIALIZER_LISTS
705 # define BOOST_NO_INITIALIZER_LISTS
709 // Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX
710 #if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX)
711 # define BOOST_NO_0X_HDR_MUTEX
713 // Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM
714 #if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM)
715 # define BOOST_NO_0X_HDR_RANDOM
717 // Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO
718 #if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO)
719 # define BOOST_NO_0X_HDR_RATIO
721 // Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX
722 #if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX)
723 # define BOOST_NO_0X_HDR_REGEX
725 // Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR
726 #if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR)
727 # define BOOST_NO_0X_HDR_SYSTEM_ERROR
729 // Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD
730 #if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD)
731 # define BOOST_NO_0X_HDR_THREAD
733 // Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE
734 #if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE)
735 # define BOOST_NO_0X_HDR_TUPLE
737 // Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS
738 #if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS)
739 # define BOOST_NO_0X_HDR_TYPE_TRAITS
741 // Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX
742 #if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX)
743 # define BOOST_NO_0X_HDR_TYPEINDEX
745 // Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP
746 #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP)
747 # define BOOST_NO_0X_HDR_UNORDERED_MAP
749 // Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET
750 #if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET)
751 # define BOOST_NO_0X_HDR_UNORDERED_SET
754 // ------------------ End of deprecated macros for 1.50 ---------------------------
756 // -------------------- Deprecated macros for 1.51 ---------------------------
757 // These will go away in a future release
759 // Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS
760 #if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS)
761 # define BOOST_NO_AUTO_DECLARATIONS
763 // Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS
764 #if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS)
765 # define BOOST_NO_AUTO_MULTIDECLARATIONS
767 // Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T
768 #if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T)
769 # define BOOST_NO_CHAR16_T
771 // Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T
772 #if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T)
773 # define BOOST_NO_CHAR32_T
775 // Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES
776 #if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES)
777 # define BOOST_NO_TEMPLATE_ALIASES
779 // Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR
780 #if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR)
781 # define BOOST_NO_CONSTEXPR
783 // Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276
784 #if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276)
785 # define BOOST_NO_DECLTYPE_N3276
787 // Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE
788 #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE)
789 # define BOOST_NO_DECLTYPE
791 // Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS
792 #if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS)
793 # define BOOST_NO_DEFAULTED_FUNCTIONS
795 // Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS
796 #if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS)
797 # define BOOST_NO_DELETED_FUNCTIONS
799 // Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
800 #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
801 # define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
803 // Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE
804 #if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE)
805 # define BOOST_NO_EXTERN_TEMPLATE
807 // Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
808 #if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
809 # define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
811 // Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS
812 #if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS)
813 # define BOOST_NO_LAMBDAS
815 // Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
816 #if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS)
817 # define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
819 // Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT
820 #if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT)
821 # define BOOST_NO_NOEXCEPT
823 // Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR
824 #if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR)
825 # define BOOST_NO_NULLPTR
827 // Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS
828 #if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS)
829 # define BOOST_NO_RAW_LITERALS
831 // Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES
832 #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES)
833 # define BOOST_NO_RVALUE_REFERENCES
835 // Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS
836 #if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS)
837 # define BOOST_NO_SCOPED_ENUMS
839 // Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT
840 #if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT)
841 # define BOOST_NO_STATIC_ASSERT
843 // Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED
844 #if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED)
845 # define BOOST_NO_STD_UNORDERED
847 // Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS
848 #if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS)
849 # define BOOST_NO_UNICODE_LITERALS
851 // Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
852 #if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX)
853 # define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
855 // Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES
856 #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
857 # define BOOST_NO_VARIADIC_TEMPLATES
859 // Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS
860 #if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS)
861 # define BOOST_NO_VARIADIC_MACROS
863 // Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST
864 #if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST)
865 # define BOOST_NO_NUMERIC_LIMITS_LOWEST
867 // ------------------ End of deprecated macros for 1.51 ---------------------------
872 // Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
873 // These aid the transition to C++11 while still supporting C++03 compilers
875 #ifdef BOOST_NO_CXX11_NOEXCEPT
876 # define BOOST_NOEXCEPT
877 # define BOOST_NOEXCEPT_IF(Predicate)
878 # define BOOST_NOEXCEPT_EXPR(Expression) false
880 # define BOOST_NOEXCEPT noexcept
881 # define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
882 # define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
886 // constexpr workarounds
888 #if defined(BOOST_NO_CXX11_CONSTEXPR)
889 #define BOOST_CONSTEXPR
890 #define BOOST_CONSTEXPR_OR_CONST const
892 #define BOOST_CONSTEXPR constexpr
893 #define BOOST_CONSTEXPR_OR_CONST constexpr
896 #define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST
899 // Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined
901 #if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
902 # define BOOST_HAS_STATIC_ASSERT
906 // Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined
908 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
909 #define BOOST_HAS_RVALUE_REFS
913 // Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined
915 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)
916 #define BOOST_HAS_VARIADIC_TMPL