suffix.hpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. // Boost config.hpp configuration header file ------------------------------//
  2. // Copyright (c) 2001-2003 John Maddock
  3. // Copyright (c) 2001 Darin Adler
  4. // Copyright (c) 2001 Peter Dimov
  5. // Copyright (c) 2002 Bill Kempf
  6. // Copyright (c) 2002 Jens Maurer
  7. // Copyright (c) 2002-2003 David Abrahams
  8. // Copyright (c) 2003 Gennaro Prota
  9. // Copyright (c) 2003 Eric Friedman
  10. //
  11. // Distributed under the Boost Software License, Version 1.0. (See
  12. // accompanying file LICENSE_1_0.txt or copy at
  13. // http://www.boost.org/LICENSE_1_0.txt)
  14. // See http://www.boost.org/ for most recent version.
  15. // Boost config.hpp policy and rationale documentation has been moved to
  16. // http://www.boost.org/libs/config/
  17. //
  18. // This file is intended to be stable, and relatively unchanging.
  19. // It should contain boilerplate code only - no compiler specific
  20. // code unless it is unavoidable - no changes unless unavoidable.
  21. #ifndef BOOST_CONFIG_SUFFIX_HPP
  22. #define BOOST_CONFIG_SUFFIX_HPP
  23. //
  24. // look for long long by looking for the appropriate macros in <limits.h>.
  25. // Note that we use limits.h rather than climits for maximal portability,
  26. // remember that since these just declare a bunch of macros, there should be
  27. // no namespace issues from this.
  28. //
  29. #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \
  30. && !defined(BOOST_MSVC) && !defined(__BORLANDC__)
  31. # include <limits.h>
  32. # if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
  33. # define BOOST_HAS_LONG_LONG
  34. # else
  35. # define BOOST_NO_LONG_LONG
  36. # endif
  37. #endif
  38. // GCC 3.x will clean up all of those nasty macro definitions that
  39. // BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine
  40. // it under GCC 3.x.
  41. #if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS)
  42. # undef BOOST_NO_CTYPE_FUNCTIONS
  43. #endif
  44. //
  45. // Assume any extensions are in namespace std:: unless stated otherwise:
  46. //
  47. # ifndef BOOST_STD_EXTENSION_NAMESPACE
  48. # define BOOST_STD_EXTENSION_NAMESPACE std
  49. # endif
  50. //
  51. // If cv-qualified specializations are not allowed, then neither are cv-void ones:
  52. //
  53. # if defined(BOOST_NO_CV_SPECIALIZATIONS) \
  54. && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
  55. # define BOOST_NO_CV_VOID_SPECIALIZATIONS
  56. # endif
  57. //
  58. // If there is no numeric_limits template, then it can't have any compile time
  59. // constants either!
  60. //
  61. # if defined(BOOST_NO_LIMITS) \
  62. && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
  63. # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
  64. # define BOOST_NO_MS_INT64_NUMERIC_LIMITS
  65. # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
  66. # endif
  67. //
  68. // if there is no long long then there is no specialisation
  69. // for numeric_limits<long long> either:
  70. //
  71. #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)
  72. # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
  73. #endif
  74. //
  75. // if there is no __int64 then there is no specialisation
  76. // for numeric_limits<__int64> either:
  77. //
  78. #if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
  79. # define BOOST_NO_MS_INT64_NUMERIC_LIMITS
  80. #endif
  81. //
  82. // if member templates are supported then so is the
  83. // VC6 subset of member templates:
  84. //
  85. # if !defined(BOOST_NO_MEMBER_TEMPLATES) \
  86. && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
  87. # define BOOST_MSVC6_MEMBER_TEMPLATES
  88. # endif
  89. //
  90. // Without partial specialization, can't test for partial specialisation bugs:
  91. //
  92. # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
  93. && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
  94. # define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
  95. # endif
  96. //
  97. // Without partial specialization, we can't have array-type partial specialisations:
  98. //
  99. # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
  100. && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
  101. # define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
  102. # endif
  103. //
  104. // Without partial specialization, std::iterator_traits can't work:
  105. //
  106. # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
  107. && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
  108. # define BOOST_NO_STD_ITERATOR_TRAITS
  109. # endif
  110. //
  111. // Without partial specialization, partial
  112. // specialization with default args won't work either:
  113. //
  114. # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
  115. && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
  116. # define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
  117. # endif
  118. //
  119. // Without member template support, we can't have template constructors
  120. // in the standard library either:
  121. //
  122. # if defined(BOOST_NO_MEMBER_TEMPLATES) \
  123. && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
  124. && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
  125. # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
  126. # endif
  127. //
  128. // Without member template support, we can't have a conforming
  129. // std::allocator template either:
  130. //
  131. # if defined(BOOST_NO_MEMBER_TEMPLATES) \
  132. && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
  133. && !defined(BOOST_NO_STD_ALLOCATOR)
  134. # define BOOST_NO_STD_ALLOCATOR
  135. # endif
  136. //
  137. // without ADL support then using declarations will break ADL as well:
  138. //
  139. #if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
  140. # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
  141. #endif
  142. //
  143. // Without typeid support we have no dynamic RTTI either:
  144. //
  145. #if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
  146. # define BOOST_NO_RTTI
  147. #endif
  148. //
  149. // If we have a standard allocator, then we have a partial one as well:
  150. //
  151. #if !defined(BOOST_NO_STD_ALLOCATOR)
  152. # define BOOST_HAS_PARTIAL_STD_ALLOCATOR
  153. #endif
  154. //
  155. // We can't have a working std::use_facet if there is no std::locale:
  156. //
  157. # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
  158. # define BOOST_NO_STD_USE_FACET
  159. # endif
  160. //
  161. // We can't have a std::messages facet if there is no std::locale:
  162. //
  163. # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
  164. # define BOOST_NO_STD_MESSAGES
  165. # endif
  166. //
  167. // We can't have a working std::wstreambuf if there is no std::locale:
  168. //
  169. # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
  170. # define BOOST_NO_STD_WSTREAMBUF
  171. # endif
  172. //
  173. // We can't have a <cwctype> if there is no <cwchar>:
  174. //
  175. # if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
  176. # define BOOST_NO_CWCTYPE
  177. # endif
  178. //
  179. // We can't have a swprintf if there is no <cwchar>:
  180. //
  181. # if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
  182. # define BOOST_NO_SWPRINTF
  183. # endif
  184. //
  185. // If Win32 support is turned off, then we must turn off
  186. // threading support also, unless there is some other
  187. // thread API enabled:
  188. //
  189. #if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \
  190. && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
  191. # define BOOST_DISABLE_THREADS
  192. #endif
  193. //
  194. // Turn on threading support if the compiler thinks that it's in
  195. // multithreaded mode. We put this here because there are only a
  196. // limited number of macros that identify this (if there's any missing
  197. // from here then add to the appropriate compiler section):
  198. //
  199. #if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
  200. || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \
  201. && !defined(BOOST_HAS_THREADS)
  202. # define BOOST_HAS_THREADS
  203. #endif
  204. //
  205. // Turn threading support off if BOOST_DISABLE_THREADS is defined:
  206. //
  207. #if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
  208. # undef BOOST_HAS_THREADS
  209. #endif
  210. //
  211. // Turn threading support off if we don't recognise the threading API:
  212. //
  213. #if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\
  214. && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\
  215. && !defined(BOOST_HAS_MPTASKS)
  216. # undef BOOST_HAS_THREADS
  217. #endif
  218. //
  219. // Turn threading detail macros off if we don't (want to) use threading
  220. //
  221. #ifndef BOOST_HAS_THREADS
  222. # undef BOOST_HAS_PTHREADS
  223. # undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
  224. # undef BOOST_HAS_PTHREAD_YIELD
  225. # undef BOOST_HAS_PTHREAD_DELAY_NP
  226. # undef BOOST_HAS_WINTHREADS
  227. # undef BOOST_HAS_BETHREADS
  228. # undef BOOST_HAS_MPTASKS
  229. #endif
  230. //
  231. // If the compiler claims to be C99 conformant, then it had better
  232. // have a <stdint.h>:
  233. //
  234. # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
  235. # define BOOST_HAS_STDINT_H
  236. # ifndef BOOST_HAS_LOG1P
  237. # define BOOST_HAS_LOG1P
  238. # endif
  239. # ifndef BOOST_HAS_EXPM1
  240. # define BOOST_HAS_EXPM1
  241. # endif
  242. # endif
  243. //
  244. // Define BOOST_NO_SLIST and BOOST_NO_HASH if required.
  245. // Note that this is for backwards compatibility only.
  246. //
  247. # if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST)
  248. # define BOOST_NO_SLIST
  249. # endif
  250. # if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH)
  251. # define BOOST_NO_HASH
  252. # endif
  253. //
  254. // Set BOOST_SLIST_HEADER if not set already:
  255. //
  256. #if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER)
  257. # define BOOST_SLIST_HEADER <slist>
  258. #endif
  259. //
  260. // Set BOOST_HASH_SET_HEADER if not set already:
  261. //
  262. #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER)
  263. # define BOOST_HASH_SET_HEADER <hash_set>
  264. #endif
  265. //
  266. // Set BOOST_HASH_MAP_HEADER if not set already:
  267. //
  268. #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER)
  269. # define BOOST_HASH_MAP_HEADER <hash_map>
  270. #endif
  271. //
  272. // Set BOOST_NO_INITIALIZER_LISTS if there is no library support.
  273. //
  274. #if defined(BOOST_NO_0X_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
  275. # define BOOST_NO_INITIALIZER_LISTS
  276. #endif
  277. // BOOST_HAS_ABI_HEADERS
  278. // This macro gets set if we have headers that fix the ABI,
  279. // and prevent ODR violations when linking to external libraries:
  280. #if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS)
  281. # define BOOST_HAS_ABI_HEADERS
  282. #endif
  283. #if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS)
  284. # undef BOOST_HAS_ABI_HEADERS
  285. #endif
  286. // BOOST_NO_STDC_NAMESPACE workaround --------------------------------------//
  287. // Because std::size_t usage is so common, even in boost headers which do not
  288. // otherwise use the C library, the <cstddef> workaround is included here so
  289. // that ugly workaround code need not appear in many other boost headers.
  290. // NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
  291. // must still be #included in the usual places so that <cstddef> inclusion
  292. // works as expected with standard conforming compilers. The resulting
  293. // double inclusion of <cstddef> is harmless.
  294. # ifdef BOOST_NO_STDC_NAMESPACE
  295. # include <cstddef>
  296. namespace std { using ::ptrdiff_t; using ::size_t; }
  297. # endif
  298. // Workaround for the unfortunate min/max macros defined by some platform headers
  299. #define BOOST_PREVENT_MACRO_SUBSTITUTION
  300. #ifndef BOOST_USING_STD_MIN
  301. # define BOOST_USING_STD_MIN() using std::min
  302. #endif
  303. #ifndef BOOST_USING_STD_MAX
  304. # define BOOST_USING_STD_MAX() using std::max
  305. #endif
  306. // BOOST_NO_STD_MIN_MAX workaround -----------------------------------------//
  307. # ifdef BOOST_NO_STD_MIN_MAX
  308. namespace std {
  309. template <class _Tp>
  310. inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
  311. return __b < __a ? __b : __a;
  312. }
  313. template <class _Tp>
  314. inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
  315. return __a < __b ? __b : __a;
  316. }
  317. }
  318. # endif
  319. // BOOST_STATIC_CONSTANT workaround --------------------------------------- //
  320. // On compilers which don't allow in-class initialization of static integral
  321. // constant members, we must use enums as a workaround if we want the constants
  322. // to be available at compile-time. This macro gives us a convenient way to
  323. // declare such constants.
  324. # ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
  325. # define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
  326. # else
  327. # define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
  328. # endif
  329. // BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//
  330. // When the standard library does not have a conforming std::use_facet there
  331. // are various workarounds available, but they differ from library to library.
  332. // The same problem occurs with has_facet.
  333. // These macros provide a consistent way to access a locale's facets.
  334. // Usage:
  335. // replace
  336. // std::use_facet<Type>(loc);
  337. // with
  338. // BOOST_USE_FACET(Type, loc);
  339. // Note do not add a std:: prefix to the front of BOOST_USE_FACET!
  340. // Use for BOOST_HAS_FACET is analogous.
  341. #if defined(BOOST_NO_STD_USE_FACET)
  342. # ifdef BOOST_HAS_TWO_ARG_USE_FACET
  343. # define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
  344. # define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))
  345. # elif defined(BOOST_HAS_MACRO_USE_FACET)
  346. # define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
  347. # define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
  348. # elif defined(BOOST_HAS_STLP_USE_FACET)
  349. # define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
  350. # define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
  351. # endif
  352. #else
  353. # define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
  354. # define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
  355. #endif
  356. // BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
  357. // Member templates are supported by some compilers even though they can't use
  358. // the A::template member<U> syntax, as a workaround replace:
  359. //
  360. // typedef typename A::template rebind<U> binder;
  361. //
  362. // with:
  363. //
  364. // typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;
  365. #ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
  366. # define BOOST_NESTED_TEMPLATE template
  367. #else
  368. # define BOOST_NESTED_TEMPLATE
  369. #endif
  370. // BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//
  371. // Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION
  372. // is defined, in which case it evaluates to return x; Use when you have a return
  373. // statement that can never be reached.
  374. #ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
  375. # define BOOST_UNREACHABLE_RETURN(x) return x;
  376. #else
  377. # define BOOST_UNREACHABLE_RETURN(x)
  378. #endif
  379. // BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
  380. //
  381. // Some compilers don't support the use of `typename' for dependent
  382. // types in deduced contexts, e.g.
  383. //
  384. // template <class T> void f(T, typename T::type);
  385. // ^^^^^^^^
  386. // Replace these declarations with:
  387. //
  388. // template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
  389. #ifndef BOOST_NO_DEDUCED_TYPENAME
  390. # define BOOST_DEDUCED_TYPENAME typename
  391. #else
  392. # define BOOST_DEDUCED_TYPENAME
  393. #endif
  394. #ifndef BOOST_NO_TYPENAME_WITH_CTOR
  395. # define BOOST_CTOR_TYPENAME typename
  396. #else
  397. # define BOOST_CTOR_TYPENAME
  398. #endif
  399. // long long workaround ------------------------------------------//
  400. // On gcc (and maybe other compilers?) long long is alway supported
  401. // but it's use may generate either warnings (with -ansi), or errors
  402. // (with -pedantic -ansi) unless it's use is prefixed by __extension__
  403. //
  404. #if defined(BOOST_HAS_LONG_LONG)
  405. namespace boost{
  406. # ifdef __GNUC__
  407. __extension__ typedef long long long_long_type;
  408. __extension__ typedef unsigned long long ulong_long_type;
  409. # else
  410. typedef long long long_long_type;
  411. typedef unsigned long long ulong_long_type;
  412. # endif
  413. }
  414. #endif
  415. // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
  416. //
  417. // Some compilers have problems with function templates whose template
  418. // parameters don't appear in the function parameter list (basically
  419. // they just link one instantiation of the template in the final
  420. // executable). These macros provide a uniform way to cope with the
  421. // problem with no effects on the calling syntax.
  422. // Example:
  423. //
  424. // #include <iostream>
  425. // #include <ostream>
  426. // #include <typeinfo>
  427. //
  428. // template <int n>
  429. // void f() { std::cout << n << ' '; }
  430. //
  431. // template <typename T>
  432. // void g() { std::cout << typeid(T).name() << ' '; }
  433. //
  434. // int main() {
  435. // f<1>();
  436. // f<2>();
  437. //
  438. // g<int>();
  439. // g<double>();
  440. // }
  441. //
  442. // With VC++ 6.0 the output is:
  443. //
  444. // 2 2 double double
  445. //
  446. // To fix it, write
  447. //
  448. // template <int n>
  449. // void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... }
  450. //
  451. // template <typename T>
  452. // void g(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) { ... }
  453. //
  454. #if defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
  455. # include "boost/type.hpp"
  456. # include "boost/non_type.hpp"
  457. # define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type<t>* = 0
  458. # define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*
  459. # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v>* = 0
  460. # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type<t, v>*
  461. # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \
  462. , BOOST_EXPLICIT_TEMPLATE_TYPE(t)
  463. # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \
  464. , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
  465. # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \
  466. , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
  467. # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \
  468. , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
  469. #else
  470. // no workaround needed: expand to nothing
  471. # define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
  472. # define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
  473. # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
  474. # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
  475. # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
  476. # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
  477. # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
  478. # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
  479. #endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
  480. // ---------------------------------------------------------------------------//
  481. //
  482. // Helper macro BOOST_STRINGIZE:
  483. // Converts the parameter X to a string after macro replacement
  484. // on X has been performed.
  485. //
  486. #define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
  487. #define BOOST_DO_STRINGIZE(X) #X
  488. //
  489. // Helper macro BOOST_JOIN:
  490. // The following piece of macro magic joins the two
  491. // arguments together, even when one of the arguments is
  492. // itself a macro (see 16.3.1 in C++ standard). The key
  493. // is that macro expansion of macro arguments does not
  494. // occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
  495. //
  496. #define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
  497. #define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
  498. #define BOOST_DO_JOIN2( X, Y ) X##Y
  499. //
  500. // Set some default values for compiler/library/platform names.
  501. // These are for debugging config setup only:
  502. //
  503. # ifndef BOOST_COMPILER
  504. # define BOOST_COMPILER "Unknown ISO C++ Compiler"
  505. # endif
  506. # ifndef BOOST_STDLIB
  507. # define BOOST_STDLIB "Unknown ISO standard library"
  508. # endif
  509. # ifndef BOOST_PLATFORM
  510. # if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
  511. || defined(_POSIX_SOURCE)
  512. # define BOOST_PLATFORM "Generic Unix"
  513. # else
  514. # define BOOST_PLATFORM "Unknown"
  515. # endif
  516. # endif
  517. #endif