suffix.hpp 33 KB

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