annotate DEPENDENCIES/generic/include/boost/config/suffix.hpp @ 133:4acb5d8d80b6 tip

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