Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 1 | // (C) Copyright John Maddock 2001 - 2003. |
| 2 | // (C) Copyright Jens Maurer 2001. |
| 3 | // (C) Copyright David Abrahams 2003. |
| 4 | // (C) Copyright Boris Gubenko 2007. |
| 5 | // Use, modification and distribution are subject to the |
| 6 | // Boost Software License, Version 1.0. (See accompanying file |
| 7 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 8 | |
| 9 | // See http://www.boost.org for most recent version. |
| 10 | |
| 11 | // Rogue Wave std lib: |
| 12 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 13 | #define NDNBOOST_RW_STDLIB 1 |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 14 | |
| 15 | #if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame] | 16 | # include <ndnboost/config/no_tr1/utility.hpp> |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 17 | # if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) |
| 18 | # error This is not the Rogue Wave standard library |
| 19 | # endif |
| 20 | #endif |
| 21 | // |
| 22 | // figure out a consistent version number: |
| 23 | // |
| 24 | #ifndef _RWSTD_VER |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 25 | # define NDNBOOST_RWSTD_VER 0x010000 |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 26 | #elif _RWSTD_VER < 0x010000 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 27 | # define NDNBOOST_RWSTD_VER (_RWSTD_VER << 8) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 28 | #else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 29 | # define NDNBOOST_RWSTD_VER _RWSTD_VER |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 30 | #endif |
| 31 | |
| 32 | #ifndef _RWSTD_VER |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 33 | # define NDNBOOST_STDLIB "Rogue Wave standard library version (Unknown version)" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 34 | #elif _RWSTD_VER < 0x04010200 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 35 | # define NDNBOOST_STDLIB "Rogue Wave standard library version " NDNBOOST_STRINGIZE(_RWSTD_VER) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 36 | #else |
| 37 | # ifdef _RWSTD_VER_STR |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 38 | # define NDNBOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 39 | # else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 40 | # define NDNBOOST_STDLIB "Apache STDCXX standard library version " NDNBOOST_STRINGIZE(_RWSTD_VER) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 41 | # endif |
| 42 | #endif |
| 43 | |
| 44 | // |
| 45 | // Prior to version 2.2.0 the primary template for std::numeric_limits |
| 46 | // does not have compile time constants, even though specializations of that |
| 47 | // template do: |
| 48 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 49 | #if NDNBOOST_RWSTD_VER < 0x020200 |
| 50 | # define NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 51 | #endif |
| 52 | |
| 53 | // Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the |
| 54 | // library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817): |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 55 | #if NDNBOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550)) |
| 56 | # define NDNBOOST_NO_LONG_LONG_NUMERIC_LIMITS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 57 | # endif |
| 58 | |
| 59 | // |
| 60 | // Borland version of numeric_limits lacks __int64 specialisation: |
| 61 | // |
| 62 | #ifdef __BORLANDC__ |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 63 | # define NDNBOOST_NO_MS_INT64_NUMERIC_LIMITS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 64 | #endif |
| 65 | |
| 66 | // |
| 67 | // No std::iterator if it can't figure out default template args: |
| 68 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 69 | #if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (NDNBOOST_RWSTD_VER < 0x020000) |
| 70 | # define NDNBOOST_NO_STD_ITERATOR |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 71 | #endif |
| 72 | |
| 73 | // |
| 74 | // No iterator traits without partial specialization: |
| 75 | // |
| 76 | #if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 77 | # define NDNBOOST_NO_STD_ITERATOR_TRAITS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 78 | #endif |
| 79 | |
| 80 | // |
| 81 | // Prior to version 2.0, std::auto_ptr was buggy, and there were no |
| 82 | // new-style iostreams, and no conformant std::allocator: |
| 83 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 84 | #if (NDNBOOST_RWSTD_VER < 0x020000) |
| 85 | # define NDNBOOST_NO_AUTO_PTR |
| 86 | # define NDNBOOST_NO_STRINGSTREAM |
| 87 | # define NDNBOOST_NO_STD_ALLOCATOR |
| 88 | # define NDNBOOST_NO_STD_LOCALE |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 89 | #endif |
| 90 | |
| 91 | // |
| 92 | // No template iterator constructors without member template support: |
| 93 | // |
| 94 | #if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 95 | # define NDNBOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 96 | #endif |
| 97 | |
| 98 | // |
| 99 | // RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use |
| 100 | // (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR |
| 101 | // on HP aCC systems even though the allocator is in fact broken): |
| 102 | // |
| 103 | #if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 104 | # define NDNBOOST_NO_STD_ALLOCATOR |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 105 | #endif |
| 106 | |
| 107 | // |
| 108 | // If we have a std::locale, we still may not have std::use_facet: |
| 109 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 110 | #if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(NDNBOOST_NO_STD_LOCALE) |
| 111 | # define NDNBOOST_NO_STD_USE_FACET |
| 112 | # define NDNBOOST_HAS_TWO_ARG_USE_FACET |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 113 | #endif |
| 114 | |
| 115 | // |
| 116 | // There's no std::distance prior to version 2, or without |
| 117 | // partial specialization support: |
| 118 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 119 | #if (NDNBOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) |
| 120 | #define NDNBOOST_NO_STD_DISTANCE |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 121 | #endif |
| 122 | |
| 123 | // |
| 124 | // Some versions of the rogue wave library don't have assignable |
| 125 | // OutputIterators: |
| 126 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 127 | #if NDNBOOST_RWSTD_VER < 0x020100 |
| 128 | # define NDNBOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 129 | #endif |
| 130 | |
| 131 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 132 | // Disable NDNBOOST_HAS_LONG_LONG when the library has no support for it. |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 133 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 134 | #if !defined(_RWSTD_LONG_LONG) && defined(NDNBOOST_HAS_LONG_LONG) |
| 135 | # undef NDNBOOST_HAS_LONG_LONG |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 136 | #endif |
| 137 | |
| 138 | // |
| 139 | // check that on HP-UX, the proper RW library is used |
| 140 | // |
| 141 | #if defined(__HP_aCC) && !defined(_HP_NAMESPACE_STD) |
| 142 | # error "Boost requires Standard RW library. Please compile and link with -AA" |
| 143 | #endif |
| 144 | |
| 145 | // |
| 146 | // Define macros specific to RW V2.2 on HP-UX |
| 147 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 148 | #if defined(__HP_aCC) && (NDNBOOST_RWSTD_VER == 0x02020100) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 149 | # ifndef __HP_TC1_MAKE_PAIR |
| 150 | # define __HP_TC1_MAKE_PAIR |
| 151 | # endif |
| 152 | # ifndef _HP_INSTANTIATE_STD2_VL |
| 153 | # define _HP_INSTANTIATE_STD2_VL |
| 154 | # endif |
| 155 | #endif |
| 156 | |
| 157 | #if _RWSTD_VER < 0x05000000 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 158 | # define NDNBOOST_NO_CXX11_HDR_ARRAY |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 159 | #endif |
| 160 | // type_traits header is incomplete: |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 161 | # define NDNBOOST_NO_CXX11_HDR_TYPE_TRAITS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 162 | // |
| 163 | // C++0x headers not yet implemented |
| 164 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 165 | # define NDNBOOST_NO_CXX11_HDR_CHRONO |
| 166 | # define NDNBOOST_NO_CXX11_HDR_CODECVT |
| 167 | # define NDNBOOST_NO_CXX11_HDR_CONDITION_VARIABLE |
| 168 | # define NDNBOOST_NO_CXX11_HDR_FORWARD_LIST |
| 169 | # define NDNBOOST_NO_CXX11_HDR_FUTURE |
| 170 | # define NDNBOOST_NO_CXX11_HDR_INITIALIZER_LIST |
| 171 | # define NDNBOOST_NO_CXX11_HDR_MUTEX |
| 172 | # define NDNBOOST_NO_CXX11_HDR_RANDOM |
| 173 | # define NDNBOOST_NO_CXX11_HDR_RATIO |
| 174 | # define NDNBOOST_NO_CXX11_HDR_REGEX |
| 175 | # define NDNBOOST_NO_CXX11_HDR_SYSTEM_ERROR |
| 176 | # define NDNBOOST_NO_CXX11_HDR_THREAD |
| 177 | # define NDNBOOST_NO_CXX11_HDR_TUPLE |
| 178 | # define NDNBOOST_NO_CXX11_HDR_TYPEINDEX |
| 179 | # define NDNBOOST_NO_CXX11_HDR_UNORDERED_MAP |
| 180 | # define NDNBOOST_NO_CXX11_HDR_UNORDERED_SET |
| 181 | # define NDNBOOST_NO_CXX11_NUMERIC_LIMITS |
| 182 | # define NDNBOOST_NO_CXX11_ALLOCATOR |
| 183 | # define NDNBOOST_NO_CXX11_ATOMIC_SMART_PTR |
| 184 | # define NDNBOOST_NO_CXX11_SMART_PTR |
| 185 | # define NDNBOOST_NO_CXX11_HDR_FUNCTIONAL |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 186 | |