suffix.hpp 39 KB

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