suffix.hpp 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071
  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 macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
  851. // These aid the transition to C++11 while still supporting C++03 compilers
  852. //
  853. #ifdef BOOST_NO_CXX11_NOEXCEPT
  854. # define BOOST_NOEXCEPT
  855. # define BOOST_NOEXCEPT_OR_NOTHROW throw()
  856. # define BOOST_NOEXCEPT_IF(Predicate)
  857. # define BOOST_NOEXCEPT_EXPR(Expression) false
  858. #else
  859. # define BOOST_NOEXCEPT noexcept
  860. # define BOOST_NOEXCEPT_OR_NOTHROW noexcept
  861. # define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
  862. # define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
  863. #endif
  864. //
  865. // Helper macro BOOST_FALLTHROUGH
  866. // Fallback definition of BOOST_FALLTHROUGH macro used to mark intended
  867. // fall-through between case labels in a switch statement. We use a definition
  868. // that requires a semicolon after it to avoid at least one type of misuse even
  869. // on unsupported compilers.
  870. //
  871. #ifndef BOOST_FALLTHROUGH
  872. # define BOOST_FALLTHROUGH ((void)0)
  873. #endif
  874. //
  875. // constexpr workarounds
  876. //
  877. #if defined(BOOST_NO_CXX11_CONSTEXPR)
  878. #define BOOST_CONSTEXPR
  879. #define BOOST_CONSTEXPR_OR_CONST const
  880. #else
  881. #define BOOST_CONSTEXPR constexpr
  882. #define BOOST_CONSTEXPR_OR_CONST constexpr
  883. #endif
  884. #if defined(BOOST_NO_CXX14_CONSTEXPR)
  885. #define BOOST_CXX14_CONSTEXPR
  886. #else
  887. #define BOOST_CXX14_CONSTEXPR constexpr
  888. #endif
  889. //
  890. // Unused variable/typedef workarounds:
  891. //
  892. #ifndef BOOST_ATTRIBUTE_UNUSED
  893. # define BOOST_ATTRIBUTE_UNUSED
  894. #endif
  895. //
  896. // [[nodiscard]]:
  897. //
  898. #ifdef __has_cpp_attribute
  899. #if __has_cpp_attribute(nodiscard)
  900. # define BOOST_ATTRIBUTE_NODISCARD [[nodiscard]]
  901. #endif
  902. #if __has_cpp_attribute(no_unique_address) && !(defined(__GNUC__) && (__cplusplus < 201100))
  903. # define BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS [[no_unique_address]]
  904. #endif
  905. #endif
  906. #ifndef BOOST_ATTRIBUTE_NODISCARD
  907. # define BOOST_ATTRIBUTE_NODISCARD
  908. #endif
  909. #ifndef BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS
  910. # define BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS
  911. #endif
  912. #define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST
  913. //
  914. // Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined
  915. //
  916. #if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
  917. # define BOOST_HAS_STATIC_ASSERT
  918. #endif
  919. //
  920. // Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined
  921. //
  922. #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
  923. #define BOOST_HAS_RVALUE_REFS
  924. #endif
  925. //
  926. // Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined
  927. //
  928. #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)
  929. #define BOOST_HAS_VARIADIC_TMPL
  930. #endif
  931. //
  932. // Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when
  933. // BOOST_NO_CXX11_VARIADIC_TEMPLATES is set:
  934. //
  935. #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS)
  936. # define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
  937. #endif
  938. // This is a catch all case for obsolete compilers / std libs:
  939. #if !defined(__has_include)
  940. # define BOOST_NO_CXX17_HDR_OPTIONAL
  941. # define BOOST_NO_CXX17_HDR_STRING_VIEW
  942. # define BOOST_NO_CXX17_HDR_VARIANT
  943. #else
  944. #if !__has_include(<optional>)
  945. # define BOOST_NO_CXX17_HDR_OPTIONAL
  946. #endif
  947. #if !__has_include(<string_view>)
  948. # define BOOST_NO_CXX17_HDR_STRING_VIEW
  949. #endif
  950. #if !__has_include(<variant>)
  951. # define BOOST_NO_CXX17_HDR_VARIANT
  952. #endif
  953. #endif
  954. //
  955. // Finish off with checks for macros that are depricated / no longer supported,
  956. // if any of these are set then it's very likely that much of Boost will no
  957. // longer work. So stop with a #error for now, but give the user a chance
  958. // to continue at their own risk if they really want to:
  959. //
  960. #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED)
  961. # 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!!!"
  962. #endif
  963. #endif