suffix.hpp 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090
  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. #ifndef BOOST_UNREACHABLE_RETURN
  389. # ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
  390. # define BOOST_UNREACHABLE_RETURN(x) return x;
  391. # else
  392. # define BOOST_UNREACHABLE_RETURN(x)
  393. # endif
  394. #endif
  395. // BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
  396. //
  397. // Some compilers don't support the use of `typename' for dependent
  398. // types in deduced contexts, e.g.
  399. //
  400. // template <class T> void f(T, typename T::type);
  401. // ^^^^^^^^
  402. // Replace these declarations with:
  403. //
  404. // template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
  405. #ifndef BOOST_NO_DEDUCED_TYPENAME
  406. # define BOOST_DEDUCED_TYPENAME typename
  407. #else
  408. # define BOOST_DEDUCED_TYPENAME
  409. #endif
  410. #ifndef BOOST_NO_TYPENAME_WITH_CTOR
  411. # define BOOST_CTOR_TYPENAME typename
  412. #else
  413. # define BOOST_CTOR_TYPENAME
  414. #endif
  415. // long long workaround ------------------------------------------//
  416. // On gcc (and maybe other compilers?) long long is alway supported
  417. // but it's use may generate either warnings (with -ansi), or errors
  418. // (with -pedantic -ansi) unless it's use is prefixed by __extension__
  419. //
  420. #if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus)
  421. namespace boost{
  422. # ifdef __GNUC__
  423. __extension__ typedef long long long_long_type;
  424. __extension__ typedef unsigned long long ulong_long_type;
  425. # else
  426. typedef long long long_long_type;
  427. typedef unsigned long long ulong_long_type;
  428. # endif
  429. }
  430. #endif
  431. // same again for __int128:
  432. #if defined(BOOST_HAS_INT128) && defined(__cplusplus)
  433. namespace boost{
  434. # ifdef __GNUC__
  435. __extension__ typedef __int128 int128_type;
  436. __extension__ typedef unsigned __int128 uint128_type;
  437. # else
  438. typedef __int128 int128_type;
  439. typedef unsigned __int128 uint128_type;
  440. # endif
  441. }
  442. #endif
  443. // same again for __float128:
  444. #if defined(BOOST_HAS_FLOAT128) && defined(__cplusplus)
  445. namespace boost {
  446. # ifdef __GNUC__
  447. __extension__ typedef __float128 float128_type;
  448. # else
  449. typedef __float128 float128_type;
  450. # endif
  451. }
  452. #endif
  453. // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
  454. // These macros are obsolete. Port away and remove.
  455. # define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
  456. # define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
  457. # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
  458. # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
  459. # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
  460. # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
  461. # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
  462. # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
  463. // When BOOST_NO_STD_TYPEINFO is defined, we can just import
  464. // the global definition into std namespace:
  465. #if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)
  466. #include <typeinfo>
  467. namespace std{ using ::type_info; }
  468. #endif
  469. // ---------------------------------------------------------------------------//
  470. // Helper macro BOOST_STRINGIZE:
  471. // Helper macro BOOST_JOIN:
  472. #include <boost/config/helper_macros.hpp>
  473. //
  474. // Set some default values for compiler/library/platform names.
  475. // These are for debugging config setup only:
  476. //
  477. # ifndef BOOST_COMPILER
  478. # define BOOST_COMPILER "Unknown ISO C++ Compiler"
  479. # endif
  480. # ifndef BOOST_STDLIB
  481. # define BOOST_STDLIB "Unknown ISO standard library"
  482. # endif
  483. # ifndef BOOST_PLATFORM
  484. # if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
  485. || defined(_POSIX_SOURCE)
  486. # define BOOST_PLATFORM "Generic Unix"
  487. # else
  488. # define BOOST_PLATFORM "Unknown"
  489. # endif
  490. # endif
  491. //
  492. // Set some default values GPU support
  493. //
  494. # ifndef BOOST_GPU_ENABLED
  495. # define BOOST_GPU_ENABLED
  496. # endif
  497. // BOOST_RESTRICT ---------------------------------------------//
  498. // Macro to use in place of 'restrict' keyword variants
  499. #if !defined(BOOST_RESTRICT)
  500. # if defined(_MSC_VER)
  501. # define BOOST_RESTRICT __restrict
  502. # if !defined(BOOST_NO_RESTRICT_REFERENCES) && (_MSC_FULL_VER < 190023026)
  503. # define BOOST_NO_RESTRICT_REFERENCES
  504. # endif
  505. # elif defined(__GNUC__) && __GNUC__ > 3
  506. // Clang also defines __GNUC__ (as 4)
  507. # define BOOST_RESTRICT __restrict__
  508. # else
  509. # define BOOST_RESTRICT
  510. # if !defined(BOOST_NO_RESTRICT_REFERENCES)
  511. # define BOOST_NO_RESTRICT_REFERENCES
  512. # endif
  513. # endif
  514. #endif
  515. // BOOST_MAY_ALIAS -----------------------------------------------//
  516. // The macro expands to an attribute to mark a type that is allowed to alias other types.
  517. // The macro is defined in the compiler-specific headers.
  518. #if !defined(BOOST_MAY_ALIAS)
  519. # define BOOST_NO_MAY_ALIAS
  520. # define BOOST_MAY_ALIAS
  521. #endif
  522. // BOOST_FORCEINLINE ---------------------------------------------//
  523. // Macro to use in place of 'inline' to force a function to be inline
  524. #if !defined(BOOST_FORCEINLINE)
  525. # if defined(_MSC_VER)
  526. # define BOOST_FORCEINLINE __forceinline
  527. # elif defined(__GNUC__) && __GNUC__ > 3
  528. // Clang also defines __GNUC__ (as 4)
  529. # define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__))
  530. # else
  531. # define BOOST_FORCEINLINE inline
  532. # endif
  533. #endif
  534. // BOOST_NOINLINE ---------------------------------------------//
  535. // Macro to use in place of 'inline' to prevent a function to be inlined
  536. #if !defined(BOOST_NOINLINE)
  537. # if defined(_MSC_VER)
  538. # define BOOST_NOINLINE __declspec(noinline)
  539. # elif defined(__GNUC__) && __GNUC__ > 3
  540. // Clang also defines __GNUC__ (as 4)
  541. # if defined(__CUDACC__)
  542. // nvcc doesn't always parse __noinline__,
  543. // see: https://svn.boost.org/trac/boost/ticket/9392
  544. # define BOOST_NOINLINE __attribute__ ((noinline))
  545. # else
  546. # define BOOST_NOINLINE __attribute__ ((__noinline__))
  547. # endif
  548. # else
  549. # define BOOST_NOINLINE
  550. # endif
  551. #endif
  552. // BOOST_NORETURN ---------------------------------------------//
  553. // Macro to use before a function declaration/definition to designate
  554. // the function as not returning normally (i.e. with a return statement
  555. // or by leaving the function scope, if the function return type is void).
  556. #if !defined(BOOST_NORETURN)
  557. # if defined(_MSC_VER)
  558. # define BOOST_NORETURN __declspec(noreturn)
  559. # elif defined(__GNUC__)
  560. # define BOOST_NORETURN __attribute__ ((__noreturn__))
  561. # elif defined(__has_attribute) && defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x5130)
  562. # if __has_attribute(noreturn)
  563. # define BOOST_NORETURN [[noreturn]]
  564. # endif
  565. # elif defined(__has_cpp_attribute)
  566. # if __has_cpp_attribute(noreturn)
  567. # define BOOST_NORETURN [[noreturn]]
  568. # endif
  569. # endif
  570. #endif
  571. #if !defined(BOOST_NORETURN)
  572. # define BOOST_NO_NORETURN
  573. # define BOOST_NORETURN
  574. #endif
  575. // Branch prediction hints
  576. // These macros are intended to wrap conditional expressions that yield true or false
  577. //
  578. // if (BOOST_LIKELY(var == 10))
  579. // {
  580. // // the most probable code here
  581. // }
  582. //
  583. #if !defined(BOOST_LIKELY)
  584. # define BOOST_LIKELY(x) x
  585. #endif
  586. #if !defined(BOOST_UNLIKELY)
  587. # define BOOST_UNLIKELY(x) x
  588. #endif
  589. // Type and data alignment specification
  590. //
  591. #if !defined(BOOST_ALIGNMENT)
  592. # if !defined(BOOST_NO_CXX11_ALIGNAS)
  593. # define BOOST_ALIGNMENT(x) alignas(x)
  594. # elif defined(_MSC_VER)
  595. # define BOOST_ALIGNMENT(x) __declspec(align(x))
  596. # elif defined(__GNUC__)
  597. # define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x)))
  598. # else
  599. # define BOOST_NO_ALIGNMENT
  600. # define BOOST_ALIGNMENT(x)
  601. # endif
  602. #endif
  603. // Lack of non-public defaulted functions is implied by the lack of any defaulted functions
  604. #if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
  605. # define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
  606. #endif
  607. // Lack of defaulted moves is implied by the lack of either rvalue references or any defaulted functions
  608. #if !defined(BOOST_NO_CXX11_DEFAULTED_MOVES) && (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES))
  609. # define BOOST_NO_CXX11_DEFAULTED_MOVES
  610. #endif
  611. // Defaulted and deleted function declaration helpers
  612. // These macros are intended to be inside a class definition.
  613. // BOOST_DEFAULTED_FUNCTION accepts the function declaration and its
  614. // body, which will be used if the compiler doesn't support defaulted functions.
  615. // BOOST_DELETED_FUNCTION only accepts the function declaration. It
  616. // will expand to a private function declaration, if the compiler doesn't support
  617. // deleted functions. Because of this it is recommended to use BOOST_DELETED_FUNCTION
  618. // in the end of the class definition.
  619. //
  620. // class my_class
  621. // {
  622. // public:
  623. // // Default-constructible
  624. // BOOST_DEFAULTED_FUNCTION(my_class(), {})
  625. // // Copying prohibited
  626. // BOOST_DELETED_FUNCTION(my_class(my_class const&))
  627. // BOOST_DELETED_FUNCTION(my_class& operator= (my_class const&))
  628. // };
  629. //
  630. #if !(defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS))
  631. # define BOOST_DEFAULTED_FUNCTION(fun, body) fun = default;
  632. #else
  633. # define BOOST_DEFAULTED_FUNCTION(fun, body) fun body
  634. #endif
  635. #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
  636. # define BOOST_DELETED_FUNCTION(fun) fun = delete;
  637. #else
  638. # define BOOST_DELETED_FUNCTION(fun) private: fun;
  639. #endif
  640. //
  641. // Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined
  642. //
  643. #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
  644. #define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE
  645. #endif
  646. // -------------------- Deprecated macros for 1.50 ---------------------------
  647. // These will go away in a future release
  648. // Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP
  649. // instead of BOOST_NO_STD_UNORDERED
  650. #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET)
  651. # ifndef BOOST_NO_CXX11_STD_UNORDERED
  652. # define BOOST_NO_CXX11_STD_UNORDERED
  653. # endif
  654. #endif
  655. // Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS
  656. #if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
  657. # define BOOST_NO_INITIALIZER_LISTS
  658. #endif
  659. // Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY
  660. #if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY)
  661. # define BOOST_NO_0X_HDR_ARRAY
  662. #endif
  663. // Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO
  664. #if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO)
  665. # define BOOST_NO_0X_HDR_CHRONO
  666. #endif
  667. // Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT
  668. #if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT)
  669. # define BOOST_NO_0X_HDR_CODECVT
  670. #endif
  671. // Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE
  672. #if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE)
  673. # define BOOST_NO_0X_HDR_CONDITION_VARIABLE
  674. #endif
  675. // Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST
  676. #if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST)
  677. # define BOOST_NO_0X_HDR_FORWARD_LIST
  678. #endif
  679. // Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE
  680. #if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE)
  681. # define BOOST_NO_0X_HDR_FUTURE
  682. #endif
  683. // Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST
  684. // instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS
  685. #ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
  686. # ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST
  687. # define BOOST_NO_0X_HDR_INITIALIZER_LIST
  688. # endif
  689. # ifndef BOOST_NO_INITIALIZER_LISTS
  690. # define BOOST_NO_INITIALIZER_LISTS
  691. # endif
  692. #endif
  693. // Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX
  694. #if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX)
  695. # define BOOST_NO_0X_HDR_MUTEX
  696. #endif
  697. // Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM
  698. #if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM)
  699. # define BOOST_NO_0X_HDR_RANDOM
  700. #endif
  701. // Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO
  702. #if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO)
  703. # define BOOST_NO_0X_HDR_RATIO
  704. #endif
  705. // Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX
  706. #if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX)
  707. # define BOOST_NO_0X_HDR_REGEX
  708. #endif
  709. // Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR
  710. #if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR)
  711. # define BOOST_NO_0X_HDR_SYSTEM_ERROR
  712. #endif
  713. // Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD
  714. #if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD)
  715. # define BOOST_NO_0X_HDR_THREAD
  716. #endif
  717. // Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE
  718. #if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE)
  719. # define BOOST_NO_0X_HDR_TUPLE
  720. #endif
  721. // Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS
  722. #if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS)
  723. # define BOOST_NO_0X_HDR_TYPE_TRAITS
  724. #endif
  725. // Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX
  726. #if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX)
  727. # define BOOST_NO_0X_HDR_TYPEINDEX
  728. #endif
  729. // Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP
  730. #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP)
  731. # define BOOST_NO_0X_HDR_UNORDERED_MAP
  732. #endif
  733. // Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET
  734. #if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET)
  735. # define BOOST_NO_0X_HDR_UNORDERED_SET
  736. #endif
  737. // ------------------ End of deprecated macros for 1.50 ---------------------------
  738. // -------------------- Deprecated macros for 1.51 ---------------------------
  739. // These will go away in a future release
  740. // Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS
  741. #if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS)
  742. # define BOOST_NO_AUTO_DECLARATIONS
  743. #endif
  744. // Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS
  745. #if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS)
  746. # define BOOST_NO_AUTO_MULTIDECLARATIONS
  747. #endif
  748. // Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T
  749. #if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T)
  750. # define BOOST_NO_CHAR16_T
  751. #endif
  752. // Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T
  753. #if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T)
  754. # define BOOST_NO_CHAR32_T
  755. #endif
  756. // Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES
  757. #if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES)
  758. # define BOOST_NO_TEMPLATE_ALIASES
  759. #endif
  760. // Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR
  761. #if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR)
  762. # define BOOST_NO_CONSTEXPR
  763. #endif
  764. // Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276
  765. #if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276)
  766. # define BOOST_NO_DECLTYPE_N3276
  767. #endif
  768. // Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE
  769. #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE)
  770. # define BOOST_NO_DECLTYPE
  771. #endif
  772. // Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS
  773. #if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS)
  774. # define BOOST_NO_DEFAULTED_FUNCTIONS
  775. #endif
  776. // Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS
  777. #if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS)
  778. # define BOOST_NO_DELETED_FUNCTIONS
  779. #endif
  780. // Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
  781. #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
  782. # define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
  783. #endif
  784. // Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE
  785. #if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE)
  786. # define BOOST_NO_EXTERN_TEMPLATE
  787. #endif
  788. // Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
  789. #if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
  790. # define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
  791. #endif
  792. // Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS
  793. #if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS)
  794. # define BOOST_NO_LAMBDAS
  795. #endif
  796. // Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
  797. #if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS)
  798. # define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
  799. #endif
  800. // Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT
  801. #if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT)
  802. # define BOOST_NO_NOEXCEPT
  803. #endif
  804. // Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR
  805. #if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR)
  806. # define BOOST_NO_NULLPTR
  807. #endif
  808. // Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS
  809. #if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS)
  810. # define BOOST_NO_RAW_LITERALS
  811. #endif
  812. // Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES
  813. #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES)
  814. # define BOOST_NO_RVALUE_REFERENCES
  815. #endif
  816. // Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS
  817. #if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS)
  818. # define BOOST_NO_SCOPED_ENUMS
  819. #endif
  820. // Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT
  821. #if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT)
  822. # define BOOST_NO_STATIC_ASSERT
  823. #endif
  824. // Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED
  825. #if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED)
  826. # define BOOST_NO_STD_UNORDERED
  827. #endif
  828. // Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS
  829. #if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS)
  830. # define BOOST_NO_UNICODE_LITERALS
  831. #endif
  832. // Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
  833. #if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX)
  834. # define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
  835. #endif
  836. // Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES
  837. #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
  838. # define BOOST_NO_VARIADIC_TEMPLATES
  839. #endif
  840. // Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS
  841. #if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS)
  842. # define BOOST_NO_VARIADIC_MACROS
  843. #endif
  844. // Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST
  845. #if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST)
  846. # define BOOST_NO_NUMERIC_LIMITS_LOWEST
  847. #endif
  848. // ------------------ End of deprecated macros for 1.51 ---------------------------
  849. //
  850. // Helper macro for marking types and methods final
  851. //
  852. #if !defined(BOOST_NO_CXX11_FINAL)
  853. # define BOOST_FINAL final
  854. #else
  855. # define BOOST_FINAL
  856. #endif
  857. //
  858. // Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
  859. // These aid the transition to C++11 while still supporting C++03 compilers
  860. //
  861. #ifdef BOOST_NO_CXX11_NOEXCEPT
  862. # define BOOST_NOEXCEPT
  863. # define BOOST_NOEXCEPT_OR_NOTHROW throw()
  864. # define BOOST_NOEXCEPT_IF(Predicate)
  865. # define BOOST_NOEXCEPT_EXPR(Expression) false
  866. #else
  867. # define BOOST_NOEXCEPT noexcept
  868. # define BOOST_NOEXCEPT_OR_NOTHROW noexcept
  869. # define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
  870. # define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
  871. #endif
  872. //
  873. // Helper macro BOOST_FALLTHROUGH
  874. // Fallback definition of BOOST_FALLTHROUGH macro used to mark intended
  875. // fall-through between case labels in a switch statement. We use a definition
  876. // that requires a semicolon after it to avoid at least one type of misuse even
  877. // on unsupported compilers.
  878. //
  879. #ifndef BOOST_FALLTHROUGH
  880. # define BOOST_FALLTHROUGH ((void)0)
  881. #endif
  882. //
  883. // constexpr workarounds
  884. //
  885. #if defined(BOOST_NO_CXX11_CONSTEXPR)
  886. #define BOOST_CONSTEXPR
  887. #define BOOST_CONSTEXPR_OR_CONST const
  888. #else
  889. #define BOOST_CONSTEXPR constexpr
  890. #define BOOST_CONSTEXPR_OR_CONST constexpr
  891. #endif
  892. #if defined(BOOST_NO_CXX14_CONSTEXPR)
  893. #define BOOST_CXX14_CONSTEXPR
  894. #else
  895. #define BOOST_CXX14_CONSTEXPR constexpr
  896. #endif
  897. //
  898. // C++17 inline variables
  899. //
  900. #if !defined(BOOST_NO_CXX17_INLINE_VARIABLES)
  901. #define BOOST_INLINE_VARIABLE inline
  902. #else
  903. #define BOOST_INLINE_VARIABLE
  904. #endif
  905. //
  906. // Unused variable/typedef workarounds:
  907. //
  908. #ifndef BOOST_ATTRIBUTE_UNUSED
  909. # define BOOST_ATTRIBUTE_UNUSED
  910. #endif
  911. //
  912. // [[nodiscard]]:
  913. //
  914. #ifdef __has_cpp_attribute
  915. // clang-6 accepts [[nodiscard]] with -std=c++14, but warns about it -pedantic
  916. #if __has_cpp_attribute(nodiscard) && !(defined(__clang__) && (__cplusplus < 201703L))
  917. # define BOOST_ATTRIBUTE_NODISCARD [[nodiscard]]
  918. #endif
  919. #if __has_cpp_attribute(no_unique_address) && !(defined(__GNUC__) && (__cplusplus < 201100))
  920. # define BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS [[no_unique_address]]
  921. #endif
  922. #endif
  923. #ifndef BOOST_ATTRIBUTE_NODISCARD
  924. # define BOOST_ATTRIBUTE_NODISCARD
  925. #endif
  926. #ifndef BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS
  927. # define BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS
  928. #endif
  929. #define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST
  930. //
  931. // Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined
  932. //
  933. #if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
  934. # define BOOST_HAS_STATIC_ASSERT
  935. #endif
  936. //
  937. // Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined
  938. //
  939. #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
  940. #define BOOST_HAS_RVALUE_REFS
  941. #endif
  942. //
  943. // Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined
  944. //
  945. #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)
  946. #define BOOST_HAS_VARIADIC_TMPL
  947. #endif
  948. //
  949. // Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when
  950. // BOOST_NO_CXX11_VARIADIC_TEMPLATES is set:
  951. //
  952. #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS)
  953. # define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
  954. #endif
  955. // This is a catch all case for obsolete compilers / std libs:
  956. #if !defined(_YVALS) && !defined(_CPPLIB_VER) // msvc std lib already configured
  957. #if (!defined(__has_include) || (__cplusplus < 201700))
  958. # define BOOST_NO_CXX17_HDR_OPTIONAL
  959. # define BOOST_NO_CXX17_HDR_STRING_VIEW
  960. # define BOOST_NO_CXX17_HDR_VARIANT
  961. #else
  962. #if !__has_include(<optional>)
  963. # define BOOST_NO_CXX17_HDR_OPTIONAL
  964. #endif
  965. #if !__has_include(<string_view>)
  966. # define BOOST_NO_CXX17_HDR_STRING_VIEW
  967. #endif
  968. #if !__has_include(<variant>)
  969. # define BOOST_NO_CXX17_HDR_VARIANT
  970. #endif
  971. #endif
  972. #endif
  973. //
  974. // Finish off with checks for macros that are depricated / no longer supported,
  975. // if any of these are set then it's very likely that much of Boost will no
  976. // longer work. So stop with a #error for now, but give the user a chance
  977. // to continue at their own risk if they really want to:
  978. //
  979. #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED)
  980. # 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!!!"
  981. #endif
  982. #endif