• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //  Boost config.hpp configuration header file  ------------------------------//
2 
3 //  Copyright (c) 2001-2003 John Maddock
4 //  Copyright (c) 2001 Darin Adler
5 //  Copyright (c) 2001 Peter Dimov
6 //  Copyright (c) 2002 Bill Kempf
7 //  Copyright (c) 2002 Jens Maurer
8 //  Copyright (c) 2002-2003 David Abrahams
9 //  Copyright (c) 2003 Gennaro Prota
10 //  Copyright (c) 2003 Eric Friedman
11 //  Copyright (c) 2010 Eric Jourdanneau, Joel Falcou
12 // Distributed under the Boost Software License, Version 1.0. (See
13 // accompanying file LICENSE_1_0.txt or copy at
14 // http://www.boost.org/LICENSE_1_0.txt)
15 
16 //  See http://www.boost.org/ for most recent version.
17 
18 //  Boost config.hpp policy and rationale documentation has been moved to
19 //  http://www.boost.org/libs/config/
20 //
21 //  This file is intended to be stable, and relatively unchanging.
22 //  It should contain boilerplate code only - no compiler specific
23 //  code unless it is unavoidable - no changes unless unavoidable.
24 
25 #ifndef BOOST_CONFIG_SUFFIX_HPP
26 #define BOOST_CONFIG_SUFFIX_HPP
27 
28 #if defined(__GNUC__) && (__GNUC__ >= 4)
29 //
30 // Some GCC-4.x versions issue warnings even when __extension__ is used,
31 // so use this as a workaround:
32 //
33 #pragma GCC system_header
34 #endif
35 
36 //
37 // ensure that visibility macros are always defined, thus symplifying use
38 //
39 #ifndef BOOST_SYMBOL_EXPORT
40 # define BOOST_SYMBOL_EXPORT
41 #endif
42 #ifndef BOOST_SYMBOL_IMPORT
43 # define BOOST_SYMBOL_IMPORT
44 #endif
45 #ifndef BOOST_SYMBOL_VISIBLE
46 # define BOOST_SYMBOL_VISIBLE
47 #endif
48 
49 //
50 // look for long long by looking for the appropriate macros in <limits.h>.
51 // Note that we use limits.h rather than climits for maximal portability,
52 // remember that since these just declare a bunch of macros, there should be
53 // no namespace issues from this.
54 //
55 #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG)                                              \
56    && !defined(BOOST_MSVC) && !defined(__BORLANDC__)
57 # include <limits.h>
58 # if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
59 #   define BOOST_HAS_LONG_LONG
60 # else
61 #   define BOOST_NO_LONG_LONG
62 # endif
63 #endif
64 
65 // GCC 3.x will clean up all of those nasty macro definitions that
66 // BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine
67 // it under GCC 3.x.
68 #if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS)
69 #  undef BOOST_NO_CTYPE_FUNCTIONS
70 #endif
71 
72 //
73 // Assume any extensions are in namespace std:: unless stated otherwise:
74 //
75 #  ifndef BOOST_STD_EXTENSION_NAMESPACE
76 #    define BOOST_STD_EXTENSION_NAMESPACE std
77 #  endif
78 
79 //
80 // If cv-qualified specializations are not allowed, then neither are cv-void ones:
81 //
82 #  if defined(BOOST_NO_CV_SPECIALIZATIONS) \
83       && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
84 #     define BOOST_NO_CV_VOID_SPECIALIZATIONS
85 #  endif
86 
87 //
88 // If there is no numeric_limits template, then it can't have any compile time
89 // constants either!
90 //
91 #  if defined(BOOST_NO_LIMITS) \
92       && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
93 #     define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
94 #     define BOOST_NO_MS_INT64_NUMERIC_LIMITS
95 #     define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
96 #  endif
97 
98 //
99 // if there is no long long then there is no specialisation
100 // for numeric_limits<long long> either:
101 //
102 #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)
103 #  define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
104 #endif
105 
106 //
107 // if there is no __int64 then there is no specialisation
108 // for numeric_limits<__int64> either:
109 //
110 #if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
111 #  define BOOST_NO_MS_INT64_NUMERIC_LIMITS
112 #endif
113 
114 //
115 // if member templates are supported then so is the
116 // VC6 subset of member templates:
117 //
118 #  if !defined(BOOST_NO_MEMBER_TEMPLATES) \
119        && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
120 #     define BOOST_MSVC6_MEMBER_TEMPLATES
121 #  endif
122 
123 //
124 // Without partial specialization, can't test for partial specialisation bugs:
125 //
126 #  if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
127       && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
128 #     define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
129 #  endif
130 
131 //
132 // Without partial specialization, we can't have array-type partial specialisations:
133 //
134 #  if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
135       && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
136 #     define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
137 #  endif
138 
139 //
140 // Without partial specialization, std::iterator_traits can't work:
141 //
142 #  if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
143       && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
144 #     define BOOST_NO_STD_ITERATOR_TRAITS
145 #  endif
146 
147 //
148 // Without partial specialization, partial
149 // specialization with default args won't work either:
150 //
151 #  if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
152       && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
153 #     define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
154 #  endif
155 
156 //
157 // Without member template support, we can't have template constructors
158 // in the standard library either:
159 //
160 #  if defined(BOOST_NO_MEMBER_TEMPLATES) \
161       && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
162       && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
163 #     define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
164 #  endif
165 
166 //
167 // Without member template support, we can't have a conforming
168 // std::allocator template either:
169 //
170 #  if defined(BOOST_NO_MEMBER_TEMPLATES) \
171       && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
172       && !defined(BOOST_NO_STD_ALLOCATOR)
173 #     define BOOST_NO_STD_ALLOCATOR
174 #  endif
175 
176 //
177 // without ADL support then using declarations will break ADL as well:
178 //
179 #if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
180 #  define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
181 #endif
182 
183 //
184 // Without typeid support we have no dynamic RTTI either:
185 //
186 #if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
187 #  define BOOST_NO_RTTI
188 #endif
189 
190 //
191 // If we have a standard allocator, then we have a partial one as well:
192 //
193 #if !defined(BOOST_NO_STD_ALLOCATOR)
194 #  define BOOST_HAS_PARTIAL_STD_ALLOCATOR
195 #endif
196 
197 //
198 // We can't have a working std::use_facet if there is no std::locale:
199 //
200 #  if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
201 #     define BOOST_NO_STD_USE_FACET
202 #  endif
203 
204 //
205 // We can't have a std::messages facet if there is no std::locale:
206 //
207 #  if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
208 #     define BOOST_NO_STD_MESSAGES
209 #  endif
210 
211 //
212 // We can't have a working std::wstreambuf if there is no std::locale:
213 //
214 #  if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
215 #     define BOOST_NO_STD_WSTREAMBUF
216 #  endif
217 
218 //
219 // We can't have a <cwctype> if there is no <cwchar>:
220 //
221 #  if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
222 #     define BOOST_NO_CWCTYPE
223 #  endif
224 
225 //
226 // We can't have a swprintf if there is no <cwchar>:
227 //
228 #  if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
229 #     define BOOST_NO_SWPRINTF
230 #  endif
231 
232 //
233 // If Win32 support is turned off, then we must turn off
234 // threading support also, unless there is some other
235 // thread API enabled:
236 //
237 #if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \
238    && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
239 #  define BOOST_DISABLE_THREADS
240 #endif
241 
242 //
243 // Turn on threading support if the compiler thinks that it's in
244 // multithreaded mode.  We put this here because there are only a
245 // limited number of macros that identify this (if there's any missing
246 // from here then add to the appropriate compiler section):
247 //
248 #if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
249     || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \
250     && !defined(BOOST_HAS_THREADS)
251 #  define BOOST_HAS_THREADS
252 #endif
253 
254 //
255 // Turn threading support off if BOOST_DISABLE_THREADS is defined:
256 //
257 #if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
258 #  undef BOOST_HAS_THREADS
259 #endif
260 
261 //
262 // Turn threading support off if we don't recognise the threading API:
263 //
264 #if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\
265       && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\
266       && !defined(BOOST_HAS_MPTASKS)
267 #  undef BOOST_HAS_THREADS
268 #endif
269 
270 //
271 // Turn threading detail macros off if we don't (want to) use threading
272 //
273 #ifndef BOOST_HAS_THREADS
274 #  undef BOOST_HAS_PTHREADS
275 #  undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
276 #  undef BOOST_HAS_PTHREAD_YIELD
277 #  undef BOOST_HAS_PTHREAD_DELAY_NP
278 #  undef BOOST_HAS_WINTHREADS
279 #  undef BOOST_HAS_BETHREADS
280 #  undef BOOST_HAS_MPTASKS
281 #endif
282 
283 //
284 // If the compiler claims to be C99 conformant, then it had better
285 // have a <stdint.h>:
286 //
287 #  if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
288 #     define BOOST_HAS_STDINT_H
289 #     ifndef BOOST_HAS_LOG1P
290 #        define BOOST_HAS_LOG1P
291 #     endif
292 #     ifndef BOOST_HAS_EXPM1
293 #        define BOOST_HAS_EXPM1
294 #     endif
295 #  endif
296 
297 //
298 // Define BOOST_NO_SLIST and BOOST_NO_HASH if required.
299 // Note that this is for backwards compatibility only.
300 //
301 #  if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST)
302 #     define BOOST_NO_SLIST
303 #  endif
304 
305 #  if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH)
306 #     define BOOST_NO_HASH
307 #  endif
308 
309 //
310 // Set BOOST_SLIST_HEADER if not set already:
311 //
312 #if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER)
313 #  define BOOST_SLIST_HEADER <slist>
314 #endif
315 
316 //
317 // Set BOOST_HASH_SET_HEADER if not set already:
318 //
319 #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER)
320 #  define BOOST_HASH_SET_HEADER <hash_set>
321 #endif
322 
323 //
324 // Set BOOST_HASH_MAP_HEADER if not set already:
325 //
326 #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER)
327 #  define BOOST_HASH_MAP_HEADER <hash_map>
328 #endif
329 
330 //  BOOST_HAS_ABI_HEADERS
331 //  This macro gets set if we have headers that fix the ABI,
332 //  and prevent ODR violations when linking to external libraries:
333 #if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS)
334 #  define BOOST_HAS_ABI_HEADERS
335 #endif
336 
337 #if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS)
338 #  undef BOOST_HAS_ABI_HEADERS
339 #endif
340 
341 //  BOOST_NO_STDC_NAMESPACE workaround  --------------------------------------//
342 //  Because std::size_t usage is so common, even in boost headers which do not
343 //  otherwise use the C library, the <cstddef> workaround is included here so
344 //  that ugly workaround code need not appear in many other boost headers.
345 //  NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
346 //  must still be #included in the usual places so that <cstddef> inclusion
347 //  works as expected with standard conforming compilers.  The resulting
348 //  double inclusion of <cstddef> is harmless.
349 
350 # if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
351 #   include <cstddef>
352     namespace std { using ::ptrdiff_t; using ::size_t; }
353 # endif
354 
355 //  Workaround for the unfortunate min/max macros defined by some platform headers
356 
357 #define BOOST_PREVENT_MACRO_SUBSTITUTION
358 
359 #ifndef BOOST_USING_STD_MIN
360 #  define BOOST_USING_STD_MIN() using std::min
361 #endif
362 
363 #ifndef BOOST_USING_STD_MAX
364 #  define BOOST_USING_STD_MAX() using std::max
365 #endif
366 
367 //  BOOST_NO_STD_MIN_MAX workaround  -----------------------------------------//
368 
369 #  if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus)
370 
371 namespace std {
372   template <class _Tp>
BOOST_PREVENT_MACRO_SUBSTITUTION(const _Tp & __a,const _Tp & __b)373   inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
374     return __b < __a ? __b : __a;
375   }
376   template <class _Tp>
BOOST_PREVENT_MACRO_SUBSTITUTION(const _Tp & __a,const _Tp & __b)377   inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
378     return  __a < __b ? __b : __a;
379   }
380 }
381 
382 #  endif
383 
384 // BOOST_STATIC_CONSTANT workaround --------------------------------------- //
385 // On compilers which don't allow in-class initialization of static integral
386 // constant members, we must use enums as a workaround if we want the constants
387 // to be available at compile-time. This macro gives us a convenient way to
388 // declare such constants.
389 
390 #  ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
391 #       define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
392 #  else
393 #     define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
394 #  endif
395 
396 // BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//
397 // When the standard library does not have a conforming std::use_facet there
398 // are various workarounds available, but they differ from library to library.
399 // The same problem occurs with has_facet.
400 // These macros provide a consistent way to access a locale's facets.
401 // Usage:
402 //    replace
403 //       std::use_facet<Type>(loc);
404 //    with
405 //       BOOST_USE_FACET(Type, loc);
406 //    Note do not add a std:: prefix to the front of BOOST_USE_FACET!
407 //  Use for BOOST_HAS_FACET is analogous.
408 
409 #if defined(BOOST_NO_STD_USE_FACET)
410 #  ifdef BOOST_HAS_TWO_ARG_USE_FACET
411 #     define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
412 #     define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))
413 #  elif defined(BOOST_HAS_MACRO_USE_FACET)
414 #     define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
415 #     define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
416 #  elif defined(BOOST_HAS_STLP_USE_FACET)
417 #     define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
418 #     define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
419 #  endif
420 #else
421 #  define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
422 #  define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
423 #endif
424 
425 // BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
426 // Member templates are supported by some compilers even though they can't use
427 // the A::template member<U> syntax, as a workaround replace:
428 //
429 // typedef typename A::template rebind<U> binder;
430 //
431 // with:
432 //
433 // typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;
434 
435 #ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
436 #  define BOOST_NESTED_TEMPLATE template
437 #else
438 #  define BOOST_NESTED_TEMPLATE
439 #endif
440 
441 // BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//
442 // Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION
443 // is defined, in which case it evaluates to return x; Use when you have a return
444 // statement that can never be reached.
445 
446 #ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
447 #  define BOOST_UNREACHABLE_RETURN(x) return x;
448 #else
449 #  define BOOST_UNREACHABLE_RETURN(x)
450 #endif
451 
452 // BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
453 //
454 // Some compilers don't support the use of `typename' for dependent
455 // types in deduced contexts, e.g.
456 //
457 //     template <class T> void f(T, typename T::type);
458 //                                  ^^^^^^^^
459 // Replace these declarations with:
460 //
461 //     template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
462 
463 #ifndef BOOST_NO_DEDUCED_TYPENAME
464 #  define BOOST_DEDUCED_TYPENAME typename
465 #else
466 #  define BOOST_DEDUCED_TYPENAME
467 #endif
468 
469 #ifndef BOOST_NO_TYPENAME_WITH_CTOR
470 #  define BOOST_CTOR_TYPENAME typename
471 #else
472 #  define BOOST_CTOR_TYPENAME
473 #endif
474 
475 // long long workaround ------------------------------------------//
476 // On gcc (and maybe other compilers?) long long is alway supported
477 // but it's use may generate either warnings (with -ansi), or errors
478 // (with -pedantic -ansi) unless it's use is prefixed by __extension__
479 //
480 #if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus)
481 namespace boost{
482 #  ifdef __GNUC__
483    __extension__ typedef long long long_long_type;
484    __extension__ typedef unsigned long long ulong_long_type;
485 #  else
486    typedef long long long_long_type;
487    typedef unsigned long long ulong_long_type;
488 #  endif
489 }
490 #endif
491 
492 // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
493 //
494 // Some compilers have problems with function templates whose template
495 // parameters don't appear in the function parameter list (basically
496 // they just link one instantiation of the template in the final
497 // executable). These macros provide a uniform way to cope with the
498 // problem with no effects on the calling syntax.
499 
500 // Example:
501 //
502 //  #include <iostream>
503 //  #include <ostream>
504 //  #include <typeinfo>
505 //
506 //  template <int n>
507 //  void f() { std::cout << n << ' '; }
508 //
509 //  template <typename T>
510 //  void g() { std::cout << typeid(T).name() << ' '; }
511 //
512 //  int main() {
513 //    f<1>();
514 //    f<2>();
515 //
516 //    g<int>();
517 //    g<double>();
518 //  }
519 //
520 // With VC++ 6.0 the output is:
521 //
522 //   2 2 double double
523 //
524 // To fix it, write
525 //
526 //   template <int n>
527 //   void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... }
528 //
529 //   template <typename T>
530 //   void g(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) { ... }
531 //
532 
533 
534 #if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) && defined(__cplusplus)
535 
536 #  include "boost/type.hpp"
537 #  include "boost/non_type.hpp"
538 
539 #  define BOOST_EXPLICIT_TEMPLATE_TYPE(t)              boost::type<t>* = 0
540 #  define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)         boost::type<t>*
541 #  define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)       boost::non_type<t, v>* = 0
542 #  define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  boost::non_type<t, v>*
543 
544 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)        \
545              , BOOST_EXPLICIT_TEMPLATE_TYPE(t)
546 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)   \
547              , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
548 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \
549              , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
550 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)    \
551              , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
552 
553 #else
554 
555 // no workaround needed: expand to nothing
556 
557 #  define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
558 #  define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
559 #  define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
560 #  define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
561 
562 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
563 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
564 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
565 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
566 
567 
568 #endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
569 
570 // When BOOST_NO_STD_TYPEINFO is defined, we can just import
571 // the global definition into std namespace:
572 #if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)
573 #include <typeinfo>
574 namespace std{ using ::type_info; }
575 #endif
576 
577 // ---------------------------------------------------------------------------//
578 
579 //
580 // Helper macro BOOST_STRINGIZE:
581 // Converts the parameter X to a string after macro replacement
582 // on X has been performed.
583 //
584 #define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
585 #define BOOST_DO_STRINGIZE(X) #X
586 
587 //
588 // Helper macro BOOST_JOIN:
589 // The following piece of macro magic joins the two
590 // arguments together, even when one of the arguments is
591 // itself a macro (see 16.3.1 in C++ standard).  The key
592 // is that macro expansion of macro arguments does not
593 // occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
594 //
595 #define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
596 #define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
597 #define BOOST_DO_JOIN2( X, Y ) X##Y
598 
599 //
600 // Set some default values for compiler/library/platform names.
601 // These are for debugging config setup only:
602 //
603 #  ifndef BOOST_COMPILER
604 #     define BOOST_COMPILER "Unknown ISO C++ Compiler"
605 #  endif
606 #  ifndef BOOST_STDLIB
607 #     define BOOST_STDLIB "Unknown ISO standard library"
608 #  endif
609 #  ifndef BOOST_PLATFORM
610 #     if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
611          || defined(_POSIX_SOURCE)
612 #        define BOOST_PLATFORM "Generic Unix"
613 #     else
614 #        define BOOST_PLATFORM "Unknown"
615 #     endif
616 #  endif
617 
618 //
619 // Set some default values GPU support
620 //
621 #  ifndef BOOST_GPU_ENABLED
622 #  define BOOST_GPU_ENABLED
623 #  endif
624 
625 // BOOST_FORCEINLINE ---------------------------------------------//
626 // Macro to use in place of 'inline' to force a function to be inline
627 #if !defined(BOOST_FORCEINLINE)
628 #  if defined(_MSC_VER)
629 #    define BOOST_FORCEINLINE __forceinline
630 #  elif defined(__GNUC__) && __GNUC__ > 3
631 #    define BOOST_FORCEINLINE inline __attribute__ ((always_inline))
632 #  else
633 #    define BOOST_FORCEINLINE inline
634 #  endif
635 #endif
636 
637 //
638 // Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined
639 //
640 #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
641 #define	BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE
642 #endif
643 
644 //  -------------------- Deprecated macros for 1.50 ---------------------------
645 //  These will go away in a future release
646 
647 //  Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP
648 //           instead of BOOST_NO_STD_UNORDERED
649 #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET)
650 # ifndef BOOST_NO_STD_UNORDERED
651 #  define BOOST_NO_STD_UNORDERED
652 # endif
653 #endif
654 
655 //  Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS
656 #if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
657 #  define BOOST_NO_INITIALIZER_LISTS
658 #endif
659 
660 //  Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY
661 #if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_BOOST_NO_0X_HDR_ARRAY)
662 #  define BOOST_NO_0X_HDR_ARRAY
663 #endif
664 //  Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO
665 #if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO)
666 #  define BOOST_NO_0X_HDR_CHRONO
667 #endif
668 //  Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT
669 #if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT)
670 #  define BOOST_NO_0X_HDR_CODECVT
671 #endif
672 //  Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE
673 #if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE)
674 #  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
675 #endif
676 //  Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST
677 #if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST)
678 #  define BOOST_NO_0X_HDR_FORWARD_LIST
679 #endif
680 //  Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE
681 #if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE)
682 #  define BOOST_NO_0X_HDR_FUTURE
683 #endif
684 
685 //  Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST
686 //  instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS
687 #ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
688 # ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST
689 #  define BOOST_NO_0X_HDR_INITIALIZER_LIST
690 # endif
691 # ifndef BOOST_NO_INITIALIZER_LISTS
692 #  define BOOST_NO_INITIALIZER_LISTS
693 # endif
694 #endif
695 
696 //  Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX
697 #if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX)
698 #  define BOOST_NO_0X_HDR_MUTEX
699 #endif
700 //  Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM
701 #if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM)
702 #  define BOOST_NO_0X_HDR_RANDOM
703 #endif
704 //  Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO
705 #if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO)
706 #  define BOOST_NO_0X_HDR_RATIO
707 #endif
708 //  Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX
709 #if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX)
710 #  define BOOST_NO_0X_HDR_REGEX
711 #endif
712 //  Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR
713 #if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR)
714 #  define BOOST_NO_0X_HDR_SYSTEM_ERROR
715 #endif
716 //  Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD
717 #if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD)
718 #  define BOOST_NO_0X_HDR_THREAD
719 #endif
720 //  Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE
721 #if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE)
722 #  define BOOST_NO_0X_HDR_TUPLE
723 #endif
724 //  Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS
725 #if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS)
726 #  define BOOST_NO_0X_HDR_TYPE_TRAITS
727 #endif
728 //  Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX
729 #if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX)
730 #  define BOOST_NO_0X_HDR_TYPEINDEX
731 #endif
732 //  Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP
733 #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP)
734 #  define BOOST_NO_0X_HDR_UNORDERED_MAP
735 #endif
736 //  Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET
737 #if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET)
738 #  define BOOST_NO_0X_HDR_UNORDERED_SET
739 #endif
740 
741 //  ------------------ End of deprecated macros for 1.50 ---------------------------
742 
743 //  -------------------- Deprecated macros for 1.51 ---------------------------
744 //  These will go away in a future release
745 
746 //  Use     BOOST_NO_CXX11_AUTO_DECLARATIONS instead of   BOOST_NO_AUTO_DECLARATIONS
747 #if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS)
748 #  define BOOST_NO_AUTO_DECLARATIONS
749 #endif
750 //  Use     BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of   BOOST_NO_AUTO_MULTIDECLARATIONS
751 #if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS)
752 #  define BOOST_NO_AUTO_MULTIDECLARATIONS
753 #endif
754 //  Use     BOOST_NO_CXX11_CHAR16_T instead of   BOOST_NO_CHAR16_T
755 #if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T)
756 #  define BOOST_NO_CHAR16_T
757 #endif
758 //  Use     BOOST_NO_CXX11_CHAR32_T instead of   BOOST_NO_CHAR32_T
759 #if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T)
760 #  define BOOST_NO_CHAR32_T
761 #endif
762 //  Use     BOOST_NO_CXX11_TEMPLATE_ALIASES instead of   BOOST_NO_TEMPLATE_ALIASES
763 #if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES)
764 #  define BOOST_NO_TEMPLATE_ALIASES
765 #endif
766 //  Use     BOOST_NO_CXX11_CONSTEXPR instead of   BOOST_NO_CONSTEXPR
767 #if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR)
768 #  define BOOST_NO_CONSTEXPR
769 #endif
770 //  Use     BOOST_NO_CXX11_DECLTYPE_N3276 instead of   BOOST_NO_DECLTYPE_N3276
771 #if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276)
772 #  define BOOST_NO_DECLTYPE_N3276
773 #endif
774 //  Use     BOOST_NO_CXX11_DECLTYPE instead of   BOOST_NO_DECLTYPE
775 #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE)
776 #  define BOOST_NO_DECLTYPE
777 #endif
778 //  Use     BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of   BOOST_NO_DEFAULTED_FUNCTIONS
779 #if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS)
780 #  define BOOST_NO_DEFAULTED_FUNCTIONS
781 #endif
782 //  Use     BOOST_NO_CXX11_DELETED_FUNCTIONS instead of   BOOST_NO_DELETED_FUNCTIONS
783 #if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS)
784 #  define BOOST_NO_DELETED_FUNCTIONS
785 #endif
786 //  Use     BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of   BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
787 #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
788 #  define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
789 #endif
790 //  Use     BOOST_NO_CXX11_EXTERN_TEMPLATE instead of   BOOST_NO_EXTERN_TEMPLATE
791 #if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE)
792 #  define BOOST_NO_EXTERN_TEMPLATE
793 #endif
794 //  Use     BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of   BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
795 #if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
796 #  define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
797 #endif
798 //  Use     BOOST_NO_CXX11_LAMBDAS instead of   BOOST_NO_LAMBDAS
799 #if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS)
800 #  define BOOST_NO_LAMBDAS
801 #endif
802 //  Use     BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of   BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
803 #if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS)
804 #  define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
805 #endif
806 //  Use     BOOST_NO_CXX11_NOEXCEPT instead of   BOOST_NO_NOEXCEPT
807 #if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT)
808 #  define BOOST_NO_NOEXCEPT
809 #endif
810 //  Use     BOOST_NO_CXX11_NULLPTR instead of   BOOST_NO_NULLPTR
811 #if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR)
812 #  define BOOST_NO_NULLPTR
813 #endif
814 //  Use     BOOST_NO_CXX11_RAW_LITERALS instead of   BOOST_NO_RAW_LITERALS
815 #if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS)
816 #  define BOOST_NO_RAW_LITERALS
817 #endif
818 //  Use     BOOST_NO_CXX11_RVALUE_REFERENCES instead of   BOOST_NO_RVALUE_REFERENCES
819 #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES)
820 #  define BOOST_NO_RVALUE_REFERENCES
821 #endif
822 //  Use     BOOST_NO_CXX11_SCOPED_ENUMS instead of   BOOST_NO_SCOPED_ENUMS
823 #if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS)
824 #  define BOOST_NO_SCOPED_ENUMS
825 #endif
826 //  Use     BOOST_NO_CXX11_STATIC_ASSERT instead of   BOOST_NO_STATIC_ASSERT
827 #if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT)
828 #  define BOOST_NO_STATIC_ASSERT
829 #endif
830 //  Use     BOOST_NO_CXX11_STD_UNORDERD instead of   BOOST_NO_STD_UNORDERD
831 #if defined(BOOST_NO_CXX11_STD_UNORDERD) && !defined(BOOST_NO_STD_UNORDERD)
832 #  define BOOST_NO_STD_UNORDERD
833 #endif
834 //  Use     BOOST_NO_CXX11_UNICODE_LITERALS instead of   BOOST_NO_UNICODE_LITERALS
835 #if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS)
836 #  define BOOST_NO_UNICODE_LITERALS
837 #endif
838 //  Use     BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of   BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
839 #if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX)
840 #  define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
841 #endif
842 //  Use     BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of   BOOST_NO_VARIADIC_TEMPLATES
843 #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
844 #  define BOOST_NO_VARIADIC_TEMPLATES
845 #endif
846 //  Use     BOOST_NO_CXX11_VARIADIC_MACROS instead of   BOOST_NO_VARIADIC_MACROS
847 #if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS)
848 #  define BOOST_NO_VARIADIC_MACROS
849 #endif
850 //  Use     BOOST_NO_CXX11_NUMERIC_LIMITS instead of   BOOST_NO_NUMERIC_LIMITS_LOWEST
851 #if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST)
852 #  define BOOST_NO_NUMERIC_LIMITS_LOWEST
853 #endif
854 //  ------------------ End of deprecated macros for 1.51 ---------------------------
855 
856 
857 
858 //
859 // Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
860 // These aid the transition to C++11 while still supporting C++03 compilers
861 //
862 #ifdef BOOST_NO_NOEXCEPT
863 #  define BOOST_NOEXCEPT
864 #  define BOOST_NOEXCEPT_IF(Predicate)
865 #  define BOOST_NOEXCEPT_EXPR(Expression) false
866 #else
867 #  define BOOST_NOEXCEPT noexcept
868 #  define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
869 #  define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
870 #endif
871 
872 //
873 // Normalize BOOST_NO_STATIC_ASSERT and (depricated) BOOST_HAS_STATIC_ASSERT:
874 //
875 #if !defined(BOOST_NO_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
876 #  define BOOST_HAS_STATIC_ASSERT
877 #endif
878 
879 //
880 // constexpr workarounds
881 //
882 #if defined(BOOST_NO_CONSTEXPR)
883 #define BOOST_CONSTEXPR
884 #define BOOST_CONSTEXPR_OR_CONST const
885 #else
886 #define BOOST_CONSTEXPR constexpr
887 #define BOOST_CONSTEXPR_OR_CONST constexpr
888 #endif
889 
890 #define BOOST_STATIC_CONSTEXPR  static BOOST_CONSTEXPR_OR_CONST
891 
892 //
893 // Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined
894 //
895 #if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
896 #define BOOST_HAS_RVALUE_REFS
897 #endif
898 
899 //
900 // Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_VARIADIC_TEMPLATES is not defined
901 //
902 #if !defined(BOOST_NO_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)
903 #define BOOST_HAS_VARIADIC_TMPL
904 #endif
905 
906 
907 #endif
908