os/ossrv/ossrv_pub/boost_apis/boost/config/suffix.hpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
//  Boost config.hpp configuration header file  ------------------------------//
sl@0
     2
sl@0
     3
//  (C) Copyright John Maddock 2001 - 2003.
sl@0
     4
//  (C) Copyright Darin Adler 2001.
sl@0
     5
//  (C) Copyright Peter Dimov 2001.
sl@0
     6
//  (C) Copyright Bill Kempf 2002.
sl@0
     7
//  (C) Copyright Jens Maurer 2002.
sl@0
     8
//  (C) Copyright David Abrahams 2002 - 2003.
sl@0
     9
//  (C) Copyright Gennaro Prota 2003.
sl@0
    10
//  (C) Copyright Eric Friedman 2003.
sl@0
    11
//  Use, modification and distribution are subject to the
sl@0
    12
//  Boost Software License, Version 1.0. (See accompanying file
sl@0
    13
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
sl@0
    14
sl@0
    15
//  See http://www.boost.org for most recent version.
sl@0
    16
sl@0
    17
//  Boost config.hpp policy and rationale documentation has been moved to
sl@0
    18
//  http://www.boost.org/libs/config
sl@0
    19
//
sl@0
    20
//  This file is intended to be stable, and relatively unchanging.
sl@0
    21
//  It should contain boilerplate code only - no compiler specific
sl@0
    22
//  code unless it is unavoidable - no changes unless unavoidable.
sl@0
    23
sl@0
    24
#ifndef BOOST_CONFIG_SUFFIX_HPP
sl@0
    25
#define BOOST_CONFIG_SUFFIX_HPP
sl@0
    26
sl@0
    27
//
sl@0
    28
// look for long long by looking for the appropriate macros in <limits.h>.
sl@0
    29
// Note that we use limits.h rather than climits for maximal portability,
sl@0
    30
// remember that since these just declare a bunch of macros, there should be
sl@0
    31
// no namespace issues from this.
sl@0
    32
//
sl@0
    33
#if !defined(BOOST_HAS_LONG_LONG)                                               \
sl@0
    34
   && !defined(BOOST_MSVC) && !defined(__BORLANDC__)
sl@0
    35
# include <limits.h>
sl@0
    36
# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
sl@0
    37
#   define BOOST_HAS_LONG_LONG
sl@0
    38
# endif
sl@0
    39
#endif
sl@0
    40
sl@0
    41
// GCC 3.x will clean up all of those nasty macro definitions that
sl@0
    42
// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine
sl@0
    43
// it under GCC 3.x.
sl@0
    44
#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS)
sl@0
    45
#  undef BOOST_NO_CTYPE_FUNCTIONS
sl@0
    46
#endif
sl@0
    47
sl@0
    48
sl@0
    49
//
sl@0
    50
// Assume any extensions are in namespace std:: unless stated otherwise:
sl@0
    51
//
sl@0
    52
#  ifndef BOOST_STD_EXTENSION_NAMESPACE
sl@0
    53
#    define BOOST_STD_EXTENSION_NAMESPACE std
sl@0
    54
#  endif
sl@0
    55
sl@0
    56
//
sl@0
    57
// If cv-qualified specializations are not allowed, then neither are cv-void ones:
sl@0
    58
//
sl@0
    59
#  if defined(BOOST_NO_CV_SPECIALIZATIONS) \
sl@0
    60
      && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
sl@0
    61
#     define BOOST_NO_CV_VOID_SPECIALIZATIONS
sl@0
    62
#  endif
sl@0
    63
sl@0
    64
//
sl@0
    65
// If there is no numeric_limits template, then it can't have any compile time
sl@0
    66
// constants either!
sl@0
    67
//
sl@0
    68
#  if defined(BOOST_NO_LIMITS) \
sl@0
    69
      && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
sl@0
    70
#     define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
sl@0
    71
#     define BOOST_NO_MS_INT64_NUMERIC_LIMITS
sl@0
    72
#     define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
sl@0
    73
#  endif
sl@0
    74
sl@0
    75
//
sl@0
    76
// if there is no long long then there is no specialisation
sl@0
    77
// for numeric_limits<long long> either:
sl@0
    78
//
sl@0
    79
#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)
sl@0
    80
#  define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
sl@0
    81
#endif
sl@0
    82
sl@0
    83
//
sl@0
    84
// if there is no __int64 then there is no specialisation
sl@0
    85
// for numeric_limits<__int64> either:
sl@0
    86
//
sl@0
    87
#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
sl@0
    88
#  define BOOST_NO_MS_INT64_NUMERIC_LIMITS
sl@0
    89
#endif
sl@0
    90
sl@0
    91
//
sl@0
    92
// if member templates are supported then so is the
sl@0
    93
// VC6 subset of member templates:
sl@0
    94
//
sl@0
    95
#  if !defined(BOOST_NO_MEMBER_TEMPLATES) \
sl@0
    96
       && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
sl@0
    97
#     define BOOST_MSVC6_MEMBER_TEMPLATES
sl@0
    98
#  endif
sl@0
    99
sl@0
   100
//
sl@0
   101
// Without partial specialization, can't test for partial specialisation bugs:
sl@0
   102
//
sl@0
   103
#  if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
sl@0
   104
      && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
sl@0
   105
#     define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
sl@0
   106
#  endif
sl@0
   107
sl@0
   108
//
sl@0
   109
// Without partial specialization, we can't have array-type partial specialisations:
sl@0
   110
//
sl@0
   111
#  if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
sl@0
   112
      && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
sl@0
   113
#     define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
sl@0
   114
#  endif
sl@0
   115
sl@0
   116
//
sl@0
   117
// Without partial specialization, std::iterator_traits can't work:
sl@0
   118
//
sl@0
   119
#  if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
sl@0
   120
      && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
sl@0
   121
#     define BOOST_NO_STD_ITERATOR_TRAITS
sl@0
   122
#  endif
sl@0
   123
sl@0
   124
//
sl@0
   125
// Without member template support, we can't have template constructors
sl@0
   126
// in the standard library either:
sl@0
   127
//
sl@0
   128
#  if defined(BOOST_NO_MEMBER_TEMPLATES) \
sl@0
   129
      && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
sl@0
   130
      && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
sl@0
   131
#     define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
sl@0
   132
#  endif
sl@0
   133
sl@0
   134
//
sl@0
   135
// Without member template support, we can't have a conforming
sl@0
   136
// std::allocator template either:
sl@0
   137
//
sl@0
   138
#  if defined(BOOST_NO_MEMBER_TEMPLATES) \
sl@0
   139
      && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
sl@0
   140
      && !defined(BOOST_NO_STD_ALLOCATOR)
sl@0
   141
#     define BOOST_NO_STD_ALLOCATOR
sl@0
   142
#  endif
sl@0
   143
sl@0
   144
//
sl@0
   145
// without ADL support then using declarations will break ADL as well:
sl@0
   146
//
sl@0
   147
#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
sl@0
   148
#  define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
sl@0
   149
#endif
sl@0
   150
sl@0
   151
//
sl@0
   152
// If we have a standard allocator, then we have a partial one as well:
sl@0
   153
//
sl@0
   154
#if !defined(BOOST_NO_STD_ALLOCATOR)
sl@0
   155
#  define BOOST_HAS_PARTIAL_STD_ALLOCATOR
sl@0
   156
#endif
sl@0
   157
sl@0
   158
//
sl@0
   159
// We can't have a working std::use_facet if there is no std::locale:
sl@0
   160
//
sl@0
   161
#  if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
sl@0
   162
#     define BOOST_NO_STD_USE_FACET
sl@0
   163
#  endif
sl@0
   164
sl@0
   165
//
sl@0
   166
// We can't have a std::messages facet if there is no std::locale:
sl@0
   167
//
sl@0
   168
#  if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
sl@0
   169
#     define BOOST_NO_STD_MESSAGES
sl@0
   170
#  endif
sl@0
   171
sl@0
   172
//
sl@0
   173
// We can't have a working std::wstreambuf if there is no std::locale:
sl@0
   174
//
sl@0
   175
#  if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
sl@0
   176
#     define BOOST_NO_STD_WSTREAMBUF
sl@0
   177
#  endif
sl@0
   178
sl@0
   179
//
sl@0
   180
// We can't have a <cwctype> if there is no <cwchar>:
sl@0
   181
//
sl@0
   182
#  if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
sl@0
   183
#     define BOOST_NO_CWCTYPE
sl@0
   184
#  endif
sl@0
   185
sl@0
   186
//
sl@0
   187
// We can't have a swprintf if there is no <cwchar>:
sl@0
   188
//
sl@0
   189
#  if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
sl@0
   190
#     define BOOST_NO_SWPRINTF
sl@0
   191
#  endif
sl@0
   192
sl@0
   193
//
sl@0
   194
// If Win32 support is turned off, then we must turn off
sl@0
   195
// threading support also, unless there is some other
sl@0
   196
// thread API enabled:
sl@0
   197
//
sl@0
   198
#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \
sl@0
   199
   && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
sl@0
   200
#  define BOOST_DISABLE_THREADS
sl@0
   201
#endif
sl@0
   202
sl@0
   203
//
sl@0
   204
// Turn on threading support if the compiler thinks that it's in
sl@0
   205
// multithreaded mode.  We put this here because there are only a
sl@0
   206
// limited number of macros that identify this (if there's any missing
sl@0
   207
// from here then add to the appropriate compiler section):
sl@0
   208
//
sl@0
   209
#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
sl@0
   210
    || defined(_PTHREADS)) && !defined(BOOST_HAS_THREADS)
sl@0
   211
#  define BOOST_HAS_THREADS
sl@0
   212
#endif
sl@0
   213
sl@0
   214
//
sl@0
   215
// Turn threading support off if BOOST_DISABLE_THREADS is defined:
sl@0
   216
//
sl@0
   217
#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
sl@0
   218
#  undef BOOST_HAS_THREADS
sl@0
   219
#endif
sl@0
   220
sl@0
   221
//
sl@0
   222
// Turn threading support off if we don't recognise the threading API:
sl@0
   223
//
sl@0
   224
#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\
sl@0
   225
      && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\
sl@0
   226
      && !defined(BOOST_HAS_MPTASKS)
sl@0
   227
#  undef BOOST_HAS_THREADS
sl@0
   228
#endif
sl@0
   229
sl@0
   230
//
sl@0
   231
// Turn threading detail macros off if we don't (want to) use threading
sl@0
   232
//
sl@0
   233
#ifndef BOOST_HAS_THREADS
sl@0
   234
#  undef BOOST_HAS_PTHREADS
sl@0
   235
#  undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
sl@0
   236
#  undef BOOST_HAS_WINTHREADS
sl@0
   237
#  undef BOOST_HAS_BETHREADS
sl@0
   238
#  undef BOOST_HAS_MPTASKS
sl@0
   239
#endif
sl@0
   240
sl@0
   241
//
sl@0
   242
// If the compiler claims to be C99 conformant, then it had better
sl@0
   243
// have a <stdint.h>:
sl@0
   244
//
sl@0
   245
#  if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
sl@0
   246
#     define BOOST_HAS_STDINT_H
sl@0
   247
#     ifndef BOOST_HAS_LOG1P
sl@0
   248
#        define BOOST_HAS_LOG1P
sl@0
   249
#     endif
sl@0
   250
#     ifndef BOOST_HAS_EXPM1
sl@0
   251
#        define BOOST_HAS_EXPM1
sl@0
   252
#     endif
sl@0
   253
#  endif
sl@0
   254
sl@0
   255
//
sl@0
   256
// Define BOOST_NO_SLIST and BOOST_NO_HASH if required.
sl@0
   257
// Note that this is for backwards compatibility only.
sl@0
   258
//
sl@0
   259
#  ifndef BOOST_HAS_SLIST
sl@0
   260
#     define BOOST_NO_SLIST
sl@0
   261
#  endif
sl@0
   262
sl@0
   263
#  ifndef BOOST_HAS_HASH
sl@0
   264
#     define BOOST_NO_HASH
sl@0
   265
#  endif
sl@0
   266
sl@0
   267
//
sl@0
   268
// Set BOOST_SLIST_HEADER if not set already:
sl@0
   269
//
sl@0
   270
#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER)
sl@0
   271
#  define BOOST_SLIST_HEADER <slist>
sl@0
   272
#endif
sl@0
   273
sl@0
   274
//
sl@0
   275
// Set BOOST_HASH_SET_HEADER if not set already:
sl@0
   276
//
sl@0
   277
#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER)
sl@0
   278
#  define BOOST_HASH_SET_HEADER <hash_set>
sl@0
   279
#endif
sl@0
   280
sl@0
   281
//
sl@0
   282
// Set BOOST_HASH_MAP_HEADER if not set already:
sl@0
   283
//
sl@0
   284
#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER)
sl@0
   285
#  define BOOST_HASH_MAP_HEADER <hash_map>
sl@0
   286
#endif
sl@0
   287
sl@0
   288
//  BOOST_HAS_ABI_HEADERS
sl@0
   289
//  This macro gets set if we have headers that fix the ABI,
sl@0
   290
//  and prevent ODR violations when linking to external libraries:
sl@0
   291
#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS)
sl@0
   292
#  define BOOST_HAS_ABI_HEADERS
sl@0
   293
#endif
sl@0
   294
sl@0
   295
#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS)
sl@0
   296
#  undef BOOST_HAS_ABI_HEADERS
sl@0
   297
#endif
sl@0
   298
sl@0
   299
//  BOOST_NO_STDC_NAMESPACE workaround  --------------------------------------//
sl@0
   300
//  Because std::size_t usage is so common, even in boost headers which do not
sl@0
   301
//  otherwise use the C library, the <cstddef> workaround is included here so
sl@0
   302
//  that ugly workaround code need not appear in many other boost headers.
sl@0
   303
//  NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
sl@0
   304
//  must still be #included in the usual places so that <cstddef> inclusion
sl@0
   305
//  works as expected with standard conforming compilers.  The resulting
sl@0
   306
//  double inclusion of <cstddef> is harmless.
sl@0
   307
sl@0
   308
# ifdef BOOST_NO_STDC_NAMESPACE
sl@0
   309
#   include <cstddef>
sl@0
   310
    namespace std { using ::ptrdiff_t; using ::size_t; }
sl@0
   311
# endif
sl@0
   312
sl@0
   313
//  Workaround for the unfortunate min/max macros defined by some platform headers
sl@0
   314
sl@0
   315
#define BOOST_PREVENT_MACRO_SUBSTITUTION
sl@0
   316
sl@0
   317
#ifndef BOOST_USING_STD_MIN
sl@0
   318
#  define BOOST_USING_STD_MIN() using std::min
sl@0
   319
#endif
sl@0
   320
sl@0
   321
#ifndef BOOST_USING_STD_MAX
sl@0
   322
#  define BOOST_USING_STD_MAX() using std::max
sl@0
   323
#endif
sl@0
   324
sl@0
   325
//  BOOST_NO_STD_MIN_MAX workaround  -----------------------------------------//
sl@0
   326
sl@0
   327
#  ifdef BOOST_NO_STD_MIN_MAX
sl@0
   328
sl@0
   329
namespace std {
sl@0
   330
  template <class _Tp>
sl@0
   331
  inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
sl@0
   332
    return __b < __a ? __b : __a;
sl@0
   333
  }
sl@0
   334
  template <class _Tp>
sl@0
   335
  inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
sl@0
   336
    return  __a < __b ? __b : __a;
sl@0
   337
  }
sl@0
   338
}
sl@0
   339
sl@0
   340
#  endif
sl@0
   341
sl@0
   342
// BOOST_STATIC_CONSTANT workaround --------------------------------------- //
sl@0
   343
// On compilers which don't allow in-class initialization of static integral
sl@0
   344
// constant members, we must use enums as a workaround if we want the constants
sl@0
   345
// to be available at compile-time. This macro gives us a convenient way to
sl@0
   346
// declare such constants.
sl@0
   347
sl@0
   348
#  ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
sl@0
   349
#       define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
sl@0
   350
#  else
sl@0
   351
#     define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
sl@0
   352
#  endif
sl@0
   353
sl@0
   354
// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//
sl@0
   355
// When the standard library does not have a conforming std::use_facet there
sl@0
   356
// are various workarounds available, but they differ from library to library.
sl@0
   357
// The same problem occurs with has_facet.
sl@0
   358
// These macros provide a consistent way to access a locale's facets.
sl@0
   359
// Usage:
sl@0
   360
//    replace
sl@0
   361
//       std::use_facet<Type>(loc);
sl@0
   362
//    with
sl@0
   363
//       BOOST_USE_FACET(Type, loc);
sl@0
   364
//    Note do not add a std:: prefix to the front of BOOST_USE_FACET!
sl@0
   365
//  Use for BOOST_HAS_FACET is analagous.
sl@0
   366
sl@0
   367
#if defined(BOOST_NO_STD_USE_FACET)
sl@0
   368
#  ifdef BOOST_HAS_TWO_ARG_USE_FACET
sl@0
   369
#     define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
sl@0
   370
#     define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))
sl@0
   371
#  elif defined(BOOST_HAS_MACRO_USE_FACET)
sl@0
   372
#     define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
sl@0
   373
#     define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
sl@0
   374
#  elif defined(BOOST_HAS_STLP_USE_FACET)
sl@0
   375
#     define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
sl@0
   376
#     define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
sl@0
   377
#  endif
sl@0
   378
#else
sl@0
   379
#  define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
sl@0
   380
#  define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
sl@0
   381
#endif
sl@0
   382
sl@0
   383
// BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
sl@0
   384
// Member templates are supported by some compilers even though they can't use
sl@0
   385
// the A::template member<U> syntax, as a workaround replace:
sl@0
   386
//
sl@0
   387
// typedef typename A::template rebind<U> binder;
sl@0
   388
//
sl@0
   389
// with:
sl@0
   390
//
sl@0
   391
// typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;
sl@0
   392
sl@0
   393
#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
sl@0
   394
#  define BOOST_NESTED_TEMPLATE template
sl@0
   395
#else
sl@0
   396
#  define BOOST_NESTED_TEMPLATE
sl@0
   397
#endif
sl@0
   398
sl@0
   399
// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//
sl@0
   400
// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION
sl@0
   401
// is defined, in which case it evaluates to return x; Use when you have a return
sl@0
   402
// statement that can never be reached.
sl@0
   403
sl@0
   404
#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
sl@0
   405
#  define BOOST_UNREACHABLE_RETURN(x) return x;
sl@0
   406
#else
sl@0
   407
#  define BOOST_UNREACHABLE_RETURN(x)
sl@0
   408
#endif
sl@0
   409
sl@0
   410
// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
sl@0
   411
//
sl@0
   412
// Some compilers don't support the use of `typename' for dependent
sl@0
   413
// types in deduced contexts, e.g.
sl@0
   414
//
sl@0
   415
//     template <class T> void f(T, typename T::type);
sl@0
   416
//                                  ^^^^^^^^
sl@0
   417
// Replace these declarations with:
sl@0
   418
//
sl@0
   419
//     template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
sl@0
   420
sl@0
   421
#ifndef BOOST_NO_DEDUCED_TYPENAME
sl@0
   422
#  define BOOST_DEDUCED_TYPENAME typename
sl@0
   423
#else
sl@0
   424
#  define BOOST_DEDUCED_TYPENAME
sl@0
   425
#endif
sl@0
   426
sl@0
   427
// long long workaround ------------------------------------------//
sl@0
   428
// On gcc (and maybe other compilers?) long long is alway supported
sl@0
   429
// but it's use may generate either warnings (with -ansi), or errors
sl@0
   430
// (with -pedantic -ansi) unless it's use is prefixed by __extension__
sl@0
   431
//
sl@0
   432
#if defined(BOOST_HAS_LONG_LONG)
sl@0
   433
namespace boost{
sl@0
   434
#  ifdef __GNUC__
sl@0
   435
   __extension__ typedef long long long_long_type;
sl@0
   436
   __extension__ typedef unsigned long long ulong_long_type;
sl@0
   437
#  else
sl@0
   438
   typedef long long long_long_type;
sl@0
   439
   typedef unsigned long long ulong_long_type;
sl@0
   440
#  endif
sl@0
   441
}
sl@0
   442
#endif
sl@0
   443
sl@0
   444
// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
sl@0
   445
//
sl@0
   446
// Some compilers have problems with function templates whose
sl@0
   447
// template parameters don't appear in the function parameter
sl@0
   448
// list (basically they just link one instantiation of the
sl@0
   449
// template in the final executable). These macros provide a
sl@0
   450
// uniform way to cope with the problem with no effects on the
sl@0
   451
// calling syntax.
sl@0
   452
sl@0
   453
// Example:
sl@0
   454
//
sl@0
   455
//  #include <iostream>
sl@0
   456
//  #include <ostream>
sl@0
   457
//  #include <typeinfo>
sl@0
   458
//
sl@0
   459
//  template <int n>
sl@0
   460
//  void f() { std::cout << n << ' '; }
sl@0
   461
//
sl@0
   462
//  template <typename T>
sl@0
   463
//  void g() { std::cout << typeid(T).name() << ' '; }
sl@0
   464
//
sl@0
   465
//  int main() {
sl@0
   466
//    f<1>();
sl@0
   467
//    f<2>();
sl@0
   468
//
sl@0
   469
//    g<int>();
sl@0
   470
//    g<double>();
sl@0
   471
//  }
sl@0
   472
//
sl@0
   473
// With VC++ 6.0 the output is:
sl@0
   474
//
sl@0
   475
//   2 2 double double
sl@0
   476
//
sl@0
   477
// To fix it, write
sl@0
   478
//
sl@0
   479
//   template <int n>
sl@0
   480
//   void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... }
sl@0
   481
//
sl@0
   482
//   template <typename T>
sl@0
   483
//   void g(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) { ... }
sl@0
   484
//
sl@0
   485
sl@0
   486
sl@0
   487
#if defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
sl@0
   488
sl@0
   489
#  include "boost/type.hpp"
sl@0
   490
#  include "boost/non_type.hpp"
sl@0
   491
sl@0
   492
#  define BOOST_EXPLICIT_TEMPLATE_TYPE(t)         boost::type<t>* = 0
sl@0
   493
#  define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)    boost::type<t>*
sl@0
   494
#  define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)  boost::non_type<t, v>* = 0
sl@0
   495
#  define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  boost::non_type<t, v>*
sl@0
   496
sl@0
   497
#  define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)         \
sl@0
   498
             , BOOST_EXPLICIT_TEMPLATE_TYPE(t)
sl@0
   499
#  define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)    \
sl@0
   500
             , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
sl@0
   501
#  define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)  \
sl@0
   502
             , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
sl@0
   503
#  define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  \
sl@0
   504
             , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
sl@0
   505
sl@0
   506
#else
sl@0
   507
sl@0
   508
// no workaround needed: expand to nothing
sl@0
   509
sl@0
   510
#  define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
sl@0
   511
#  define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
sl@0
   512
#  define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
sl@0
   513
#  define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
sl@0
   514
sl@0
   515
#  define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
sl@0
   516
#  define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
sl@0
   517
#  define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
sl@0
   518
#  define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
sl@0
   519
sl@0
   520
sl@0
   521
#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
sl@0
   522
sl@0
   523
sl@0
   524
// ---------------------------------------------------------------------------//
sl@0
   525
sl@0
   526
//
sl@0
   527
// Helper macro BOOST_STRINGIZE:
sl@0
   528
// Converts the parameter X to a string after macro replacement
sl@0
   529
// on X has been performed.
sl@0
   530
//
sl@0
   531
#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
sl@0
   532
#define BOOST_DO_STRINGIZE(X) #X
sl@0
   533
sl@0
   534
//
sl@0
   535
// Helper macro BOOST_JOIN:
sl@0
   536
// The following piece of macro magic joins the two
sl@0
   537
// arguments together, even when one of the arguments is
sl@0
   538
// itself a macro (see 16.3.1 in C++ standard).  The key
sl@0
   539
// is that macro expansion of macro arguments does not
sl@0
   540
// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
sl@0
   541
//
sl@0
   542
#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
sl@0
   543
#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
sl@0
   544
#define BOOST_DO_JOIN2( X, Y ) X##Y
sl@0
   545
sl@0
   546
//
sl@0
   547
// Set some default values for compiler/library/platform names.
sl@0
   548
// These are for debugging config setup only:
sl@0
   549
//
sl@0
   550
#  ifndef BOOST_COMPILER
sl@0
   551
#     define BOOST_COMPILER "Unknown ISO C++ Compiler"
sl@0
   552
#  endif
sl@0
   553
#  ifndef BOOST_STDLIB
sl@0
   554
#     define BOOST_STDLIB "Unknown ISO standard library"
sl@0
   555
#  endif
sl@0
   556
#  ifndef BOOST_PLATFORM
sl@0
   557
#     if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
sl@0
   558
         || defined(_POSIX_SOURCE)
sl@0
   559
#        define BOOST_PLATFORM "Generic Unix"
sl@0
   560
#     else
sl@0
   561
#        define BOOST_PLATFORM "Unknown"
sl@0
   562
#     endif
sl@0
   563
#  endif
sl@0
   564
sl@0
   565
#endif
sl@0
   566
sl@0
   567
sl@0
   568
sl@0
   569