| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 1 | // -*- C++ -*- | 
|  | 2 | //===--------------------------- __config ---------------------------------===// | 
|  | 3 | // | 
| Howard Hinnant | 5b08a8a | 2010-05-11 21:36:01 +0000 | [diff] [blame] | 4 | //                     The LLVM Compiler Infrastructure | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 5 | // | 
| Howard Hinnant | 412dbeb | 2010-11-16 22:09:02 +0000 | [diff] [blame] | 6 | // This file is dual licensed under the MIT and the University of Illinois Open | 
|  | 7 | // Source Licenses. See LICENSE.TXT for details. | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 8 | // | 
|  | 9 | //===----------------------------------------------------------------------===// | 
|  | 10 |  | 
|  | 11 | #ifndef _LIBCPP_CONFIG | 
|  | 12 | #define _LIBCPP_CONFIG | 
|  | 13 |  | 
|  | 14 | #pragma GCC system_header | 
|  | 15 |  | 
| Howard Hinnant | 5d7a6f3 | 2011-09-01 23:13:01 +0000 | [diff] [blame] | 16 | #define _LIBCPP_VERSION 1001 | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 17 |  | 
|  | 18 | #define _LIBCPP_ABI_VERSION 1 | 
|  | 19 |  | 
|  | 20 | #define _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_X##_LIBCPP_Y | 
|  | 21 | #define _LIBCPP_CONCAT(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) | 
|  | 22 |  | 
|  | 23 | #define _LIBCPP_NAMESPACE _LIBCPP_CONCAT(__,_LIBCPP_ABI_VERSION) | 
|  | 24 |  | 
|  | 25 | #ifdef __LITTLE_ENDIAN__ | 
|  | 26 | #if __LITTLE_ENDIAN__ | 
|  | 27 | #define _LIBCPP_LITTLE_ENDIAN 1 | 
|  | 28 | #define _LIBCPP_BIG_ENDIAN    0 | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 29 | #endif  // __LITTLE_ENDIAN__ | 
|  | 30 | #endif  // __LITTLE_ENDIAN__ | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 31 |  | 
|  | 32 | #ifdef __BIG_ENDIAN__ | 
|  | 33 | #if __BIG_ENDIAN__ | 
|  | 34 | #define _LIBCPP_LITTLE_ENDIAN 0 | 
|  | 35 | #define _LIBCPP_BIG_ENDIAN    1 | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 36 | #endif  // __BIG_ENDIAN__ | 
|  | 37 | #endif  // __BIG_ENDIAN__ | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 38 |  | 
| David Chisnall | 2a072dd | 2010-08-11 16:27:20 +0000 | [diff] [blame] | 39 | #ifdef __FreeBSD__ | 
|  | 40 | # include <sys/endian.h> | 
|  | 41 | #  if _BYTE_ORDER == _LITTLE_ENDIAN | 
|  | 42 | #   define _LIBCPP_LITTLE_ENDIAN 1 | 
|  | 43 | #   define _LIBCPP_BIG_ENDIAN    0 | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 44 | # else  // _BYTE_ORDER == _LITTLE_ENDIAN | 
| David Chisnall | 2a072dd | 2010-08-11 16:27:20 +0000 | [diff] [blame] | 45 | #   define _LIBCPP_LITTLE_ENDIAN 0 | 
|  | 46 | #   define _LIBCPP_BIG_ENDIAN    1 | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 47 | # endif  // _BYTE_ORDER == _LITTLE_ENDIAN | 
|  | 48 | #endif  // __FreeBSD__ | 
| David Chisnall | 2a072dd | 2010-08-11 16:27:20 +0000 | [diff] [blame] | 49 |  | 
| Howard Hinnant | 3e71464 | 2011-05-13 17:16:06 +0000 | [diff] [blame] | 50 | #ifdef _WIN32 | 
|  | 51 | #  define _LIBCPP_LITTLE_ENDIAN 1 | 
|  | 52 | #  define _LIBCPP_BIG_ENDIAN    0 | 
| Howard Hinnant | 3c78ca0 | 2011-09-22 19:10:18 +0000 | [diff] [blame^] | 53 | // Compiler intrinsics (GCC or MSVC) | 
|  | 54 | #  if (defined(_MSC_VER) && _MSC_VER >= 1400) || (__GNUC__ >= 4 && __GNUC_MINOR__ > 3) | 
|  | 55 | #    define _LIBCP_HAS_IS_BASE_OF | 
|  | 56 | #  endif | 
| Howard Hinnant | 3e71464 | 2011-05-13 17:16:06 +0000 | [diff] [blame] | 57 | #endif  // _WIN32 | 
|  | 58 |  | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 59 | #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) | 
| Howard Hinnant | 128ba71 | 2010-05-24 17:49:41 +0000 | [diff] [blame] | 60 | # include <endian.h> | 
|  | 61 | # if __BYTE_ORDER == __LITTLE_ENDIAN | 
|  | 62 | #  define _LIBCPP_LITTLE_ENDIAN 1 | 
|  | 63 | #  define _LIBCPP_BIG_ENDIAN    0 | 
|  | 64 | # elif __BYTE_ORDER == __BIG_ENDIAN | 
|  | 65 | #  define _LIBCPP_LITTLE_ENDIAN 0 | 
|  | 66 | #  define _LIBCPP_BIG_ENDIAN    1 | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 67 | # else  // __BYTE_ORDER == __BIG_ENDIAN | 
| Howard Hinnant | 128ba71 | 2010-05-24 17:49:41 +0000 | [diff] [blame] | 68 | #  error unable to determine endian | 
|  | 69 | # endif | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 70 | #endif  // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 71 |  | 
|  | 72 | #ifndef _LIBCPP_VISIBILITY_TAG | 
|  | 73 | #define _LIBCPP_VISIBILITY_TAG 1 | 
|  | 74 | #endif | 
|  | 75 |  | 
|  | 76 | #if _LIBCPP_VISIBILITY_TAG | 
|  | 77 | #define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden"))) | 
|  | 78 | #define _LIBCPP_VISIBLE __attribute__ ((__visibility__("default"))) | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 79 | #else  // _LIBCPP_VISIBILITY_TAG | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 80 | #define _LIBCPP_HIDDEN | 
|  | 81 | #define _LIBCPP_VISIBLE | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 82 | #endif  // _LIBCPP_VISIBILITY_TAG | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 83 |  | 
|  | 84 | #ifndef _LIBCPP_INLINE_VISIBILITY | 
|  | 85 | #define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__)) | 
|  | 86 | #endif | 
|  | 87 |  | 
|  | 88 | #ifndef _LIBCPP_EXCEPTION_ABI | 
|  | 89 | #define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default"))) | 
|  | 90 | #endif | 
|  | 91 |  | 
|  | 92 | #define _LIBCPP_CANTTHROW __attribute__ ((__nothrow__)) | 
|  | 93 |  | 
| Howard Hinnant | c950e77 | 2010-12-17 14:46:43 +0000 | [diff] [blame] | 94 | #define _LIBCPP_ALWAYS_INLINE  __attribute__ ((__visibility__("hidden"), __always_inline__)) | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 95 |  | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 96 | #if defined(__clang__) | 
|  | 97 |  | 
| Howard Hinnant | 411d1bc | 2011-05-26 19:07:54 +0000 | [diff] [blame] | 98 | #if !__has_feature(cxx_alias_templates) | 
| Howard Hinnant | 7609c9b | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 99 | #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES | 
| Howard Hinnant | 411d1bc | 2011-05-26 19:07:54 +0000 | [diff] [blame] | 100 | #endif | 
| Howard Hinnant | 01fd310 | 2010-09-07 20:31:18 +0000 | [diff] [blame] | 101 |  | 
|  | 102 | #ifndef __GXX_EXPERIMENTAL_CXX0X__ | 
| Howard Hinnant | f5241d7 | 2010-09-27 18:09:23 +0000 | [diff] [blame] | 103 | #ifdef __linux__ | 
|  | 104 | #define _LIBCPP_HAS_NO_UNICODE_CHARS | 
|  | 105 | #else | 
| Howard Hinnant | d8e7922 | 2010-09-16 23:27:26 +0000 | [diff] [blame] | 106 | typedef __char16_t char16_t; | 
|  | 107 | typedef __char32_t char32_t; | 
| Howard Hinnant | 01fd310 | 2010-09-07 20:31:18 +0000 | [diff] [blame] | 108 | #endif | 
| Howard Hinnant | f5241d7 | 2010-09-27 18:09:23 +0000 | [diff] [blame] | 109 | #endif | 
| Howard Hinnant | 7609c9b | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 110 |  | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 111 | #if !(__has_feature(cxx_exceptions)) | 
|  | 112 | #define _LIBCPP_NO_EXCEPTIONS | 
|  | 113 | #endif | 
|  | 114 |  | 
| Howard Hinnant | 54b409f | 2010-08-11 17:04:31 +0000 | [diff] [blame] | 115 | #if !(__has_feature(cxx_rtti)) | 
|  | 116 | #define _LIBCPP_NO_RTTI | 
|  | 117 | #endif | 
|  | 118 |  | 
| Howard Hinnant | 7609c9b | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 119 | #if !(__has_feature(cxx_decltype)) | 
|  | 120 | #define _LIBCPP_HAS_NO_DECLTYPE | 
|  | 121 | #endif | 
|  | 122 |  | 
| Howard Hinnant | 400b244 | 2011-05-26 17:07:32 +0000 | [diff] [blame] | 123 | #if __has_feature(cxx_attributes) | 
|  | 124 | #  define _ATTRIBUTE(x) [[x]] | 
|  | 125 | #else | 
|  | 126 | #  define _ATTRIBUTE(x) __attribute__ ((x)) | 
| Howard Hinnant | 7609c9b | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 127 | #endif | 
|  | 128 |  | 
| Howard Hinnant | 7609c9b | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 129 | #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS | 
| Howard Hinnant | 7387390 | 2010-09-29 18:13:54 +0000 | [diff] [blame] | 130 |  | 
|  | 131 | #if !(__has_feature(cxx_deleted_functions)) | 
| Howard Hinnant | 7609c9b | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 132 | #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS | 
|  | 133 | #endif  // !(__has_feature(cxx_deleted_functions)) | 
|  | 134 |  | 
|  | 135 | #if !(__has_feature(cxx_lambdas)) | 
|  | 136 | #define _LIBCPP_HAS_NO_LAMBDAS | 
|  | 137 | #endif | 
|  | 138 |  | 
|  | 139 | #if !(__has_feature(cxx_nullptr)) | 
|  | 140 | #define _LIBCPP_HAS_NO_NULLPTR | 
|  | 141 | #endif | 
|  | 142 |  | 
|  | 143 | #if !(__has_feature(cxx_rvalue_references)) | 
|  | 144 | #define _LIBCPP_HAS_NO_RVALUE_REFERENCES | 
|  | 145 | #endif | 
|  | 146 |  | 
|  | 147 | #if !(__has_feature(cxx_static_assert)) | 
|  | 148 | #define _LIBCPP_HAS_NO_STATIC_ASSERT | 
|  | 149 | #endif | 
|  | 150 |  | 
|  | 151 | #if !(__has_feature(cxx_auto_type)) | 
|  | 152 | #define _LIBCPP_HAS_NO_AUTO_TYPE | 
| Howard Hinnant | 89bdcd7 | 2011-07-29 21:35:53 +0000 | [diff] [blame] | 153 | #endif | 
|  | 154 |  | 
| Howard Hinnant | 2425d53 | 2011-07-31 17:10:44 +0000 | [diff] [blame] | 155 | #if !(__has_feature(cxx_access_control_sfinae)) || !__has_feature(cxx_trailing_return) | 
| Howard Hinnant | 08ad63b | 2011-05-11 20:19:40 +0000 | [diff] [blame] | 156 | #define _LIBCPP_HAS_NO_ADVANCED_SFINAE | 
| Howard Hinnant | 7609c9b | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 157 | #endif | 
|  | 158 |  | 
|  | 159 | #if !(__has_feature(cxx_variadic_templates)) | 
|  | 160 | #define _LIBCPP_HAS_NO_VARIADICS | 
|  | 161 | #endif | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 162 |  | 
| Howard Hinnant | c4931c4 | 2010-11-16 21:10:23 +0000 | [diff] [blame] | 163 | #if !(__has_feature(cxx_trailing_return)) | 
|  | 164 | #define _LIBCPP_HAS_NO_TRAILING_RETURN | 
|  | 165 | #endif | 
|  | 166 |  | 
| Howard Hinnant | 54976f2 | 2011-08-12 21:56:02 +0000 | [diff] [blame] | 167 | #if !(__has_feature(cxx_generalized_initializers)) | 
|  | 168 | #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS | 
|  | 169 | #endif | 
|  | 170 |  | 
| Howard Hinnant | 3c78ca0 | 2011-09-22 19:10:18 +0000 | [diff] [blame^] | 171 | #if __has_feature(is_base_of) | 
|  | 172 | #  define _LIBCP_HAS_IS_BASE_OF | 
|  | 173 | #endif | 
|  | 174 |  | 
| Douglas Gregor | 64ec101 | 2011-06-22 22:17:44 +0000 | [diff] [blame] | 175 | // Objective-C++ features (opt-in) | 
|  | 176 | #if __has_feature(objc_arc) | 
|  | 177 | #define _LIBCPP_HAS_OBJC_ARC | 
|  | 178 | #endif | 
|  | 179 |  | 
|  | 180 | #if __has_feature(objc_arc_weak) | 
|  | 181 | #define _LIBCPP_HAS_OBJC_ARC_WEAK | 
|  | 182 | #endif | 
|  | 183 |  | 
| Douglas Gregor | 71711a6 | 2011-01-26 15:39:56 +0000 | [diff] [blame] | 184 | // Inline namespaces are available in Clang regardless of C++ dialect. | 
| Howard Hinnant | 7f2aae9 | 2010-09-03 23:03:25 +0000 | [diff] [blame] | 185 | #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE { | 
|  | 186 | #define _LIBCPP_END_NAMESPACE_STD  } } | 
| Howard Hinnant | ce48a11 | 2011-06-30 21:18:19 +0000 | [diff] [blame] | 187 | #define _VSTD std::_LIBCPP_NAMESPACE | 
| Howard Hinnant | 7f2aae9 | 2010-09-03 23:03:25 +0000 | [diff] [blame] | 188 |  | 
|  | 189 | namespace std { | 
| Douglas Gregor | 71711a6 | 2011-01-26 15:39:56 +0000 | [diff] [blame] | 190 | inline namespace _LIBCPP_NAMESPACE { | 
|  | 191 | } | 
| Howard Hinnant | 7f2aae9 | 2010-09-03 23:03:25 +0000 | [diff] [blame] | 192 | } | 
| Howard Hinnant | 7f2aae9 | 2010-09-03 23:03:25 +0000 | [diff] [blame] | 193 |  | 
| Howard Hinnant | db3e997 | 2010-09-06 19:10:31 +0000 | [diff] [blame] | 194 | #if !(__has_feature(cxx_constexpr)) | 
|  | 195 | #define _LIBCPP_HAS_NO_CONSTEXPR | 
|  | 196 | #endif | 
|  | 197 |  | 
| Howard Hinnant | 08ad63b | 2011-05-11 20:19:40 +0000 | [diff] [blame] | 198 | #if (__has_feature(cxx_noexcept)) | 
|  | 199 | #  define _NOEXCEPT noexcept | 
|  | 200 | #  define _NOEXCEPT_(x) noexcept(x) | 
|  | 201 | #else | 
|  | 202 | #  define _NOEXCEPT throw() | 
|  | 203 | #  define _NOEXCEPT_(x) | 
|  | 204 | #endif | 
|  | 205 |  | 
| Alexis Hunt | 397d787 | 2011-07-18 18:37:21 +0000 | [diff] [blame] | 206 | #if __has_feature(underlying_type) | 
|  | 207 | #  define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T) | 
|  | 208 | #endif | 
|  | 209 |  | 
| Howard Hinnant | 7609c9b | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 210 | // end defined(__clang__) | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 211 |  | 
|  | 212 | #elif defined(__GNUC__) | 
|  | 213 |  | 
| Howard Hinnant | f5c9147 | 2011-05-31 13:13:49 +0000 | [diff] [blame] | 214 | #define _ATTRIBUTE(x) __attribute__((x)) | 
|  | 215 |  | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 216 | #if !__EXCEPTIONS | 
|  | 217 | #define _LIBCPP_NO_EXCEPTIONS | 
|  | 218 | #endif | 
|  | 219 |  | 
|  | 220 | #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES | 
| Howard Hinnant | db3e997 | 2010-09-06 19:10:31 +0000 | [diff] [blame] | 221 | #define _LIBCPP_HAS_NO_CONSTEXPR | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 222 |  | 
| Howard Hinnant | 08ad63b | 2011-05-11 20:19:40 +0000 | [diff] [blame] | 223 | #define _NOEXCEPT throw() | 
|  | 224 | #define _NOEXCEPT_(x) | 
|  | 225 |  | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 226 | #ifndef __GXX_EXPERIMENTAL_CXX0X__ | 
|  | 227 |  | 
|  | 228 | #define _LIBCPP_HAS_NO_ADVANCED_SFINAE | 
|  | 229 | #define _LIBCPP_HAS_NO_DECLTYPE | 
|  | 230 | #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS | 
|  | 231 | #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS | 
|  | 232 | #define _LIBCPP_HAS_NO_NULLPTR | 
|  | 233 | #define _LIBCPP_HAS_NO_STATIC_ASSERT | 
|  | 234 | #define _LIBCPP_HAS_NO_UNICODE_CHARS | 
|  | 235 | #define _LIBCPP_HAS_NO_VARIADICS | 
| Howard Hinnant | 7609c9b | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 236 | #define _LIBCPP_HAS_NO_RVALUE_REFERENCES | 
| Howard Hinnant | 9d06c8c | 2011-04-21 14:29:59 +0000 | [diff] [blame] | 237 | #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 238 |  | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 239 | #else  // __GXX_EXPERIMENTAL_CXX0X__ | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 240 |  | 
| Howard Hinnant | c4931c4 | 2010-11-16 21:10:23 +0000 | [diff] [blame] | 241 | #define _LIBCPP_HAS_NO_TRAILING_RETURN | 
| Howard Hinnant | 9d06c8c | 2011-04-21 14:29:59 +0000 | [diff] [blame] | 242 | #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS | 
| Howard Hinnant | c4931c4 | 2010-11-16 21:10:23 +0000 | [diff] [blame] | 243 |  | 
| Howard Hinnant | 7609c9b | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 244 | #if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3) | 
|  | 245 | #define _LIBCPP_HAS_NO_RVALUE_REFERENCES | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 246 | #endif | 
|  | 247 |  | 
|  | 248 | #if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3) | 
|  | 249 | #define _LIBCPP_HAS_NO_STATIC_ASSERT | 
|  | 250 | #endif | 
|  | 251 |  | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 252 | #if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 253 | #define _LIBCPP_HAS_NO_ADVANCED_SFINAE | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 254 | #define _LIBCPP_HAS_NO_DECLTYPE | 
|  | 255 | #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS | 
|  | 256 | #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS | 
|  | 257 | #define _LIBCPP_HAS_NO_UNICODE_CHARS | 
|  | 258 | #define _LIBCPP_HAS_NO_VARIADICS | 
| Howard Hinnant | 54976f2 | 2011-08-12 21:56:02 +0000 | [diff] [blame] | 259 | #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 260 | #endif  // !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 261 |  | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 262 | #if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) | 
|  | 263 | #define _LIBCPP_HAS_NO_NULLPTR | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 264 | #endif | 
|  | 265 |  | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 266 | #endif  // __GXX_EXPERIMENTAL_CXX0X__ | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 267 |  | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 268 | #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE { | 
|  | 269 | #define _LIBCPP_END_NAMESPACE_STD  } } | 
| Howard Hinnant | ce48a11 | 2011-06-30 21:18:19 +0000 | [diff] [blame] | 270 | #define _VSTD std::_LIBCPP_NAMESPACE | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 271 |  | 
|  | 272 | namespace std { | 
|  | 273 | namespace _LIBCPP_NAMESPACE { | 
|  | 274 | } | 
|  | 275 | using namespace _LIBCPP_NAMESPACE __attribute__((__strong__)); | 
|  | 276 | } | 
|  | 277 |  | 
| Howard Hinnant | 7f2aae9 | 2010-09-03 23:03:25 +0000 | [diff] [blame] | 278 | #endif  // defined(__GNUC__) | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 279 |  | 
|  | 280 | #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS | 
| Howard Hinnant | eb26925 | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 281 | typedef unsigned short char16_t; | 
|  | 282 | typedef unsigned int   char32_t; | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 283 | #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 284 |  | 
|  | 285 | #ifdef _LIBCPP_HAS_NO_STATIC_ASSERT | 
|  | 286 |  | 
|  | 287 | template <bool> struct __static_assert_test; | 
|  | 288 | template <> struct __static_assert_test<true> {}; | 
|  | 289 | template <unsigned> struct __static_assert_check {}; | 
|  | 290 | #define static_assert(__b, __m) \ | 
|  | 291 | typedef __static_assert_check<sizeof(__static_assert_test<(__b)>)> \ | 
|  | 292 | _LIBCPP_CONCAT(__t, __LINE__) | 
|  | 293 |  | 
| Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 294 | #endif  // _LIBCPP_HAS_NO_STATIC_ASSERT | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 295 |  | 
|  | 296 | #ifdef _LIBCPP_HAS_NO_DECLTYPE | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 297 | #define decltype(x) __typeof__(x) | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 298 | #endif | 
|  | 299 |  | 
| Howard Hinnant | db3e997 | 2010-09-06 19:10:31 +0000 | [diff] [blame] | 300 | #ifdef _LIBCPP_HAS_NO_CONSTEXPR | 
|  | 301 | #define constexpr const | 
|  | 302 | #endif | 
|  | 303 |  | 
| Howard Hinnant | 69c3cb8 | 2010-10-05 13:38:23 +0000 | [diff] [blame] | 304 | #ifndef __has_feature | 
| Howard Hinnant | d5a97fc | 2010-10-04 19:01:30 +0000 | [diff] [blame] | 305 | #define __has_feature(__x) 0 | 
|  | 306 | #endif | 
|  | 307 |  | 
| David Chisnall | 8972813 | 2011-09-21 08:39:44 +0000 | [diff] [blame] | 308 | #if __APPLE__ || __FreeBSD__ | 
| Alexis Hunt | 4084c9e | 2011-07-15 05:40:33 +0000 | [diff] [blame] | 309 | #define _LIBCPP_LOCALE__L_EXTENSIONS 1 | 
|  | 310 | #endif | 
|  | 311 |  | 
|  | 312 | #ifdef __APPLE__ | 
| Alexis Hunt | f023519 | 2011-07-09 01:09:31 +0000 | [diff] [blame] | 313 | #define _LIBCPP_STABLE_APPLE_ABI | 
|  | 314 | #endif | 
|  | 315 |  | 
| David Chisnall | 8972813 | 2011-09-21 08:39:44 +0000 | [diff] [blame] | 316 | #if __APPLE__ || __FreeBSD__ | 
| Alexis Hunt | 0081892 | 2011-07-09 03:40:04 +0000 | [diff] [blame] | 317 | #define _LIBCPP_WCTYPE_IS_MASK | 
|  | 318 | #endif | 
|  | 319 |  | 
| Howard Hinnant | f554add | 2011-09-14 18:33:51 +0000 | [diff] [blame] | 320 | #ifdef _LIBCPP_DEBUG2 | 
| Howard Hinnant | cec9af9 | 2011-09-16 17:29:17 +0000 | [diff] [blame] | 321 | #   if _LIBCPP_DEBUG2 == 0 | 
|  | 322 | #       define _LIBCPP_DEBUG_LEVEL 1 | 
|  | 323 | #   elif _LIBCPP_DEBUG2 == 1 | 
|  | 324 | #       define _LIBCPP_DEBUG_LEVEL 2 | 
|  | 325 | #   else | 
|  | 326 | #       error Supported values for _LIBCPP_DEBUG2 are 0 and 1 | 
|  | 327 | #   endif | 
|  | 328 | #endif | 
|  | 329 |  | 
|  | 330 | #ifdef _LIBCPP_DEBUG2 | 
| Howard Hinnant | f554add | 2011-09-14 18:33:51 +0000 | [diff] [blame] | 331 | #   include <__debug> | 
|  | 332 | #else | 
|  | 333 | #   define _LIBCPP_ASSERT(x, m) ((void)0) | 
|  | 334 | #endif | 
|  | 335 |  | 
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 336 | #endif  // _LIBCPP_CONFIG |