]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/boost/boost/config/suffix.hpp
Add subset of boost library headers needed for compilation on PowerPC
[eurobot/public.git] / src / boost / boost / config / suffix.hpp
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 // Normalize BOOST_NO_STATIC_ASSERT and (depricated) BOOST_HAS_STATIC_ASSERT:
108 //
109 #if !defined(BOOST_NO_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
110 #  define BOOST_HAS_STATIC_ASSERT
111 #endif
112
113 //
114 // if there is no __int64 then there is no specialisation
115 // for numeric_limits<__int64> either:
116 //
117 #if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
118 #  define BOOST_NO_MS_INT64_NUMERIC_LIMITS
119 #endif
120
121 //
122 // if member templates are supported then so is the
123 // VC6 subset of member templates:
124 //
125 #  if !defined(BOOST_NO_MEMBER_TEMPLATES) \
126        && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
127 #     define BOOST_MSVC6_MEMBER_TEMPLATES
128 #  endif
129
130 //
131 // Without partial specialization, can't test for partial specialisation bugs:
132 //
133 #  if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
134       && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
135 #     define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
136 #  endif
137
138 //
139 // Without partial specialization, we can't have array-type partial specialisations:
140 //
141 #  if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
142       && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
143 #     define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
144 #  endif
145
146 //
147 // Without partial specialization, std::iterator_traits can't work:
148 //
149 #  if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
150       && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
151 #     define BOOST_NO_STD_ITERATOR_TRAITS
152 #  endif
153
154 //
155 // Without partial specialization, partial 
156 // specialization with default args won't work either:
157 //
158 #  if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
159       && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
160 #     define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
161 #  endif
162
163 //
164 // Without member template support, we can't have template constructors
165 // in the standard library either:
166 //
167 #  if defined(BOOST_NO_MEMBER_TEMPLATES) \
168       && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
169       && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
170 #     define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
171 #  endif
172
173 //
174 // Without member template support, we can't have a conforming
175 // std::allocator template either:
176 //
177 #  if defined(BOOST_NO_MEMBER_TEMPLATES) \
178       && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
179       && !defined(BOOST_NO_STD_ALLOCATOR)
180 #     define BOOST_NO_STD_ALLOCATOR
181 #  endif
182
183 //
184 // without ADL support then using declarations will break ADL as well:
185 //
186 #if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
187 #  define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
188 #endif
189
190 //
191 // Without typeid support we have no dynamic RTTI either:
192 //
193 #if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
194 #  define BOOST_NO_RTTI
195 #endif
196
197 //
198 // If we have a standard allocator, then we have a partial one as well:
199 //
200 #if !defined(BOOST_NO_STD_ALLOCATOR)
201 #  define BOOST_HAS_PARTIAL_STD_ALLOCATOR
202 #endif
203
204 //
205 // We can't have a working std::use_facet if there is no std::locale:
206 //
207 #  if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
208 #     define BOOST_NO_STD_USE_FACET
209 #  endif
210
211 //
212 // We can't have a std::messages facet if there is no std::locale:
213 //
214 #  if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
215 #     define BOOST_NO_STD_MESSAGES
216 #  endif
217
218 //
219 // We can't have a working std::wstreambuf if there is no std::locale:
220 //
221 #  if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
222 #     define BOOST_NO_STD_WSTREAMBUF
223 #  endif
224
225 //
226 // We can't have a <cwctype> if there is no <cwchar>:
227 //
228 #  if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
229 #     define BOOST_NO_CWCTYPE
230 #  endif
231
232 //
233 // We can't have a swprintf if there is no <cwchar>:
234 //
235 #  if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
236 #     define BOOST_NO_SWPRINTF
237 #  endif
238
239 //
240 // If Win32 support is turned off, then we must turn off
241 // threading support also, unless there is some other
242 // thread API enabled:
243 //
244 #if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \
245    && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
246 #  define BOOST_DISABLE_THREADS
247 #endif
248
249 //
250 // Turn on threading support if the compiler thinks that it's in
251 // multithreaded mode.  We put this here because there are only a
252 // limited number of macros that identify this (if there's any missing
253 // from here then add to the appropriate compiler section):
254 //
255 #if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
256     || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \
257     && !defined(BOOST_HAS_THREADS)
258 #  define BOOST_HAS_THREADS
259 #endif
260
261 //
262 // Turn threading support off if BOOST_DISABLE_THREADS is defined:
263 //
264 #if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
265 #  undef BOOST_HAS_THREADS
266 #endif
267
268 //
269 // Turn threading support off if we don't recognise the threading API:
270 //
271 #if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\
272       && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\
273       && !defined(BOOST_HAS_MPTASKS)
274 #  undef BOOST_HAS_THREADS
275 #endif
276
277 //
278 // Turn threading detail macros off if we don't (want to) use threading
279 //
280 #ifndef BOOST_HAS_THREADS
281 #  undef BOOST_HAS_PTHREADS
282 #  undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
283 #  undef BOOST_HAS_PTHREAD_YIELD
284 #  undef BOOST_HAS_PTHREAD_DELAY_NP
285 #  undef BOOST_HAS_WINTHREADS
286 #  undef BOOST_HAS_BETHREADS
287 #  undef BOOST_HAS_MPTASKS
288 #endif
289
290 //
291 // If the compiler claims to be C99 conformant, then it had better
292 // have a <stdint.h>:
293 //
294 #  if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
295 #     define BOOST_HAS_STDINT_H
296 #     ifndef BOOST_HAS_LOG1P
297 #        define BOOST_HAS_LOG1P
298 #     endif
299 #     ifndef BOOST_HAS_EXPM1
300 #        define BOOST_HAS_EXPM1
301 #     endif
302 #  endif
303
304 //
305 // Define BOOST_NO_SLIST and BOOST_NO_HASH if required.
306 // Note that this is for backwards compatibility only.
307 //
308 #  if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST)
309 #     define BOOST_NO_SLIST
310 #  endif
311
312 #  if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH)
313 #     define BOOST_NO_HASH
314 #  endif
315
316 //
317 // Set BOOST_SLIST_HEADER if not set already:
318 //
319 #if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER)
320 #  define BOOST_SLIST_HEADER <slist>
321 #endif
322
323 //
324 // Set BOOST_HASH_SET_HEADER if not set already:
325 //
326 #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER)
327 #  define BOOST_HASH_SET_HEADER <hash_set>
328 #endif
329
330 //
331 // Set BOOST_HASH_MAP_HEADER if not set already:
332 //
333 #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER)
334 #  define BOOST_HASH_MAP_HEADER <hash_map>
335 #endif
336
337 //
338 // Set BOOST_NO_INITIALIZER_LISTS if there is no library support.
339 //
340
341 #if defined(BOOST_NO_0X_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
342 #  define BOOST_NO_INITIALIZER_LISTS
343 #endif
344 #if defined(BOOST_NO_INITIALIZER_LISTS) && !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
345 #  define BOOST_NO_0X_HDR_INITIALIZER_LIST
346 #endif
347
348 //
349 // Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined
350 //
351 #if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
352 #define BOOST_HAS_RVALUE_REFS
353 #endif
354
355 //
356 // Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_VARIADIC_TEMPLATES is not defined
357 //
358 #if !defined(BOOST_NO_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)
359 #define BOOST_HAS_VARIADIC_TMPL
360 #endif
361
362 //
363 // Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined
364 //
365 #if !defined(BOOST_NO_DECLTYPE_N3276) && defined(BOOST_NO_DECLTYPE)
366 #define BOOST_NO_DECLTYPE_N3276
367 #endif
368
369 //  BOOST_HAS_ABI_HEADERS
370 //  This macro gets set if we have headers that fix the ABI,
371 //  and prevent ODR violations when linking to external libraries:
372 #if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS)
373 #  define BOOST_HAS_ABI_HEADERS
374 #endif
375
376 #if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS)
377 #  undef BOOST_HAS_ABI_HEADERS
378 #endif
379
380 //  BOOST_NO_STDC_NAMESPACE workaround  --------------------------------------//
381 //  Because std::size_t usage is so common, even in boost headers which do not
382 //  otherwise use the C library, the <cstddef> workaround is included here so
383 //  that ugly workaround code need not appear in many other boost headers.
384 //  NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
385 //  must still be #included in the usual places so that <cstddef> inclusion
386 //  works as expected with standard conforming compilers.  The resulting
387 //  double inclusion of <cstddef> is harmless.
388
389 # if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
390 #   include <cstddef>
391     namespace std { using ::ptrdiff_t; using ::size_t; }
392 # endif
393
394 //  Workaround for the unfortunate min/max macros defined by some platform headers
395
396 #define BOOST_PREVENT_MACRO_SUBSTITUTION
397
398 #ifndef BOOST_USING_STD_MIN
399 #  define BOOST_USING_STD_MIN() using std::min
400 #endif
401
402 #ifndef BOOST_USING_STD_MAX
403 #  define BOOST_USING_STD_MAX() using std::max
404 #endif
405
406 //  BOOST_NO_STD_MIN_MAX workaround  -----------------------------------------//
407
408 #  if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus)
409
410 namespace std {
411   template <class _Tp>
412   inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
413     return __b < __a ? __b : __a;
414   }
415   template <class _Tp>
416   inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
417     return  __a < __b ? __b : __a;
418   }
419 }
420
421 #  endif
422
423 // BOOST_STATIC_CONSTANT workaround --------------------------------------- //
424 // On compilers which don't allow in-class initialization of static integral
425 // constant members, we must use enums as a workaround if we want the constants
426 // to be available at compile-time. This macro gives us a convenient way to
427 // declare such constants.
428
429 #  ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
430 #       define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
431 #  else
432 #     define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
433 #  endif
434
435 // BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//
436 // When the standard library does not have a conforming std::use_facet there
437 // are various workarounds available, but they differ from library to library.
438 // The same problem occurs with has_facet.
439 // These macros provide a consistent way to access a locale's facets.
440 // Usage:
441 //    replace
442 //       std::use_facet<Type>(loc);
443 //    with
444 //       BOOST_USE_FACET(Type, loc);
445 //    Note do not add a std:: prefix to the front of BOOST_USE_FACET!
446 //  Use for BOOST_HAS_FACET is analogous.
447
448 #if defined(BOOST_NO_STD_USE_FACET)
449 #  ifdef BOOST_HAS_TWO_ARG_USE_FACET
450 #     define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
451 #     define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))
452 #  elif defined(BOOST_HAS_MACRO_USE_FACET)
453 #     define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
454 #     define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
455 #  elif defined(BOOST_HAS_STLP_USE_FACET)
456 #     define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
457 #     define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
458 #  endif
459 #else
460 #  define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
461 #  define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
462 #endif
463
464 // BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
465 // Member templates are supported by some compilers even though they can't use
466 // the A::template member<U> syntax, as a workaround replace:
467 //
468 // typedef typename A::template rebind<U> binder;
469 //
470 // with:
471 //
472 // typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;
473
474 #ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
475 #  define BOOST_NESTED_TEMPLATE template
476 #else
477 #  define BOOST_NESTED_TEMPLATE
478 #endif
479
480 // BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//
481 // Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION
482 // is defined, in which case it evaluates to return x; Use when you have a return
483 // statement that can never be reached.
484
485 #ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
486 #  define BOOST_UNREACHABLE_RETURN(x) return x;
487 #else
488 #  define BOOST_UNREACHABLE_RETURN(x)
489 #endif
490
491 // BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
492 //
493 // Some compilers don't support the use of `typename' for dependent
494 // types in deduced contexts, e.g.
495 //
496 //     template <class T> void f(T, typename T::type);
497 //                                  ^^^^^^^^
498 // Replace these declarations with:
499 //
500 //     template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
501
502 #ifndef BOOST_NO_DEDUCED_TYPENAME
503 #  define BOOST_DEDUCED_TYPENAME typename
504 #else
505 #  define BOOST_DEDUCED_TYPENAME
506 #endif
507
508 #ifndef BOOST_NO_TYPENAME_WITH_CTOR
509 #  define BOOST_CTOR_TYPENAME typename
510 #else
511 #  define BOOST_CTOR_TYPENAME
512 #endif
513
514 // long long workaround ------------------------------------------//
515 // On gcc (and maybe other compilers?) long long is alway supported
516 // but it's use may generate either warnings (with -ansi), or errors
517 // (with -pedantic -ansi) unless it's use is prefixed by __extension__
518 //
519 #if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus)
520 namespace boost{
521 #  ifdef __GNUC__
522    __extension__ typedef long long long_long_type;
523    __extension__ typedef unsigned long long ulong_long_type;
524 #  else
525    typedef long long long_long_type;
526    typedef unsigned long long ulong_long_type;
527 #  endif
528 }
529 #endif
530
531 // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
532 //
533 // Some compilers have problems with function templates whose template
534 // parameters don't appear in the function parameter list (basically
535 // they just link one instantiation of the template in the final
536 // executable). These macros provide a uniform way to cope with the
537 // problem with no effects on the calling syntax.
538
539 // Example:
540 //
541 //  #include <iostream>
542 //  #include <ostream>
543 //  #include <typeinfo>
544 //
545 //  template <int n>
546 //  void f() { std::cout << n << ' '; }
547 //
548 //  template <typename T>
549 //  void g() { std::cout << typeid(T).name() << ' '; }
550 //
551 //  int main() {
552 //    f<1>();
553 //    f<2>();
554 //
555 //    g<int>();
556 //    g<double>();
557 //  }
558 //
559 // With VC++ 6.0 the output is:
560 //
561 //   2 2 double double
562 //
563 // To fix it, write
564 //
565 //   template <int n>
566 //   void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... }
567 //
568 //   template <typename T>
569 //   void g(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) { ... }
570 //
571
572
573 #if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) && defined(__cplusplus)
574
575 #  include "boost/type.hpp"
576 #  include "boost/non_type.hpp"
577
578 #  define BOOST_EXPLICIT_TEMPLATE_TYPE(t)              boost::type<t>* = 0
579 #  define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)         boost::type<t>*
580 #  define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)       boost::non_type<t, v>* = 0
581 #  define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  boost::non_type<t, v>*
582
583 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)        \
584              , BOOST_EXPLICIT_TEMPLATE_TYPE(t)
585 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)   \
586              , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
587 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \
588              , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
589 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)    \
590              , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
591
592 #else
593
594 // no workaround needed: expand to nothing
595
596 #  define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
597 #  define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
598 #  define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
599 #  define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
600
601 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
602 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
603 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
604 #  define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
605
606
607 #endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
608
609 // When BOOST_NO_STD_TYPEINFO is defined, we can just import
610 // the global definition into std namespace:
611 #if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)
612 #include <typeinfo>
613 namespace std{ using ::type_info; }
614 #endif
615
616 // ---------------------------------------------------------------------------//
617
618 //
619 // Helper macro BOOST_STRINGIZE:
620 // Converts the parameter X to a string after macro replacement
621 // on X has been performed.
622 //
623 #define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
624 #define BOOST_DO_STRINGIZE(X) #X
625
626 //
627 // Helper macro BOOST_JOIN:
628 // The following piece of macro magic joins the two
629 // arguments together, even when one of the arguments is
630 // itself a macro (see 16.3.1 in C++ standard).  The key
631 // is that macro expansion of macro arguments does not
632 // occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
633 //
634 #define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
635 #define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
636 #define BOOST_DO_JOIN2( X, Y ) X##Y
637
638 //
639 // Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
640 // These aid the transition to C++11 while still supporting C++03 compilers
641 //
642 #ifdef BOOST_NO_NOEXCEPT
643 #  define BOOST_NOEXCEPT
644 #  define BOOST_NOEXCEPT_IF(Predicate)
645 #  define BOOST_NOEXCEPT_EXPR(Expression) false
646 #else
647 #  define BOOST_NOEXCEPT noexcept
648 #  define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
649 #  define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
650 #endif
651
652 //
653 // Set some default values for compiler/library/platform names.
654 // These are for debugging config setup only:
655 //
656 #  ifndef BOOST_COMPILER
657 #     define BOOST_COMPILER "Unknown ISO C++ Compiler"
658 #  endif
659 #  ifndef BOOST_STDLIB
660 #     define BOOST_STDLIB "Unknown ISO standard library"
661 #  endif
662 #  ifndef BOOST_PLATFORM
663 #     if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
664          || defined(_POSIX_SOURCE)
665 #        define BOOST_PLATFORM "Generic Unix"
666 #     else
667 #        define BOOST_PLATFORM "Unknown"
668 #     endif
669 #  endif
670
671 //
672 // Set some default values GPU support
673 //
674 #  ifndef BOOST_GPU_ENABLED
675 #  define BOOST_GPU_ENABLED 
676 #  endif
677
678 //
679 // constexpr workarounds
680 // 
681 #if defined(BOOST_NO_CONSTEXPR)
682 #define BOOST_CONSTEXPR
683 #define BOOST_CONSTEXPR_OR_CONST const
684 #else
685 #define BOOST_CONSTEXPR constexpr
686 #define BOOST_CONSTEXPR_OR_CONST constexpr
687 #endif
688
689 #define BOOST_STATIC_CONSTEXPR  static BOOST_CONSTEXPR_OR_CONST
690
691 // BOOST_FORCEINLINE ---------------------------------------------//
692 // Macro to use in place of 'inline' to force a function to be inline
693 #if !defined(BOOST_FORCEINLINE)
694 #  if defined(_MSC_VER)
695 #    define BOOST_FORCEINLINE __forceinline
696 #  elif defined(__GNUC__) && __GNUC__ > 3
697 #    define BOOST_FORCEINLINE inline __attribute__ ((always_inline))
698 #  else
699 #    define BOOST_FORCEINLINE inline
700 #  endif
701 #endif
702
703 #endif
704