1 // 2 // detail/config.hpp 3 // ~~~~~~~~~~~~~~~~~ 4 // 5 // Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 // 7 // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 // 10 11 #ifndef BOOST_ASIO_DETAIL_CONFIG_HPP 12 #define BOOST_ASIO_DETAIL_CONFIG_HPP 13 14 #if defined(BOOST_ASIO_STANDALONE) 15 # define BOOST_ASIO_DISABLE_BOOST_ARRAY 1 16 # define BOOST_ASIO_DISABLE_BOOST_ASSERT 1 17 # define BOOST_ASIO_DISABLE_BOOST_BIND 1 18 # define BOOST_ASIO_DISABLE_BOOST_CHRONO 1 19 # define BOOST_ASIO_DISABLE_BOOST_DATE_TIME 1 20 # define BOOST_ASIO_DISABLE_BOOST_LIMITS 1 21 # define BOOST_ASIO_DISABLE_BOOST_REGEX 1 22 # define BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT 1 23 # define BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION 1 24 # define BOOST_ASIO_DISABLE_BOOST_WORKAROUND 1 25 #else // defined(BOOST_ASIO_STANDALONE) 26 # include <boost/config.hpp> 27 # include <boost/version.hpp> 28 # define BOOST_ASIO_HAS_BOOST_CONFIG 1 29 #endif // defined(BOOST_ASIO_STANDALONE) 30 31 // Default to a header-only implementation. The user must specifically request 32 // separate compilation by defining either BOOST_ASIO_SEPARATE_COMPILATION or 33 // BOOST_ASIO_DYN_LINK (as a DLL/shared library implies separate compilation). 34 #if !defined(BOOST_ASIO_HEADER_ONLY) 35 # if !defined(BOOST_ASIO_SEPARATE_COMPILATION) 36 # if !defined(BOOST_ASIO_DYN_LINK) 37 # define BOOST_ASIO_HEADER_ONLY 1 38 # endif // !defined(BOOST_ASIO_DYN_LINK) 39 # endif // !defined(BOOST_ASIO_SEPARATE_COMPILATION) 40 #endif // !defined(BOOST_ASIO_HEADER_ONLY) 41 42 #if defined(BOOST_ASIO_HEADER_ONLY) 43 # define BOOST_ASIO_DECL inline 44 #else // defined(BOOST_ASIO_HEADER_ONLY) 45 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__) 46 // We need to import/export our code only if the user has specifically asked 47 // for it by defining BOOST_ASIO_DYN_LINK. 48 # if defined(BOOST_ASIO_DYN_LINK) 49 // Export if this is our own source, otherwise import. 50 # if defined(BOOST_ASIO_SOURCE) 51 # define BOOST_ASIO_DECL __declspec(dllexport) 52 # else // defined(BOOST_ASIO_SOURCE) 53 # define BOOST_ASIO_DECL __declspec(dllimport) 54 # endif // defined(BOOST_ASIO_SOURCE) 55 # endif // defined(BOOST_ASIO_DYN_LINK) 56 # endif // defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__) 57 #endif // defined(BOOST_ASIO_HEADER_ONLY) 58 59 // If BOOST_ASIO_DECL isn't defined yet define it now. 60 #if !defined(BOOST_ASIO_DECL) 61 # define BOOST_ASIO_DECL 62 #endif // !defined(BOOST_ASIO_DECL) 63 64 // Microsoft Visual C++ detection. 65 #if !defined(BOOST_ASIO_MSVC) 66 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC) 67 # define BOOST_ASIO_MSVC BOOST_MSVC 68 # elif defined(_MSC_VER) && (defined(__INTELLISENSE__) \ 69 || (!defined(__MWERKS__) && !defined(__EDG_VERSION__))) 70 # define BOOST_ASIO_MSVC _MSC_VER 71 # endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC) 72 #endif // !defined(BOOST_ASIO_MSVC) 73 74 // Clang / libc++ detection. 75 #if defined(__clang__) 76 # if (__cplusplus >= 201103) 77 # if __has_include(<__config>) 78 # include <__config> 79 # if defined(_LIBCPP_VERSION) 80 # define BOOST_ASIO_HAS_CLANG_LIBCXX 1 81 # endif // defined(_LIBCPP_VERSION) 82 # endif // __has_include(<__config>) 83 # endif // (__cplusplus >= 201103) 84 #endif // defined(__clang__) 85 86 // Android platform detection. 87 #if defined(__ANDROID__) 88 # include <android/api-level.h> 89 #endif // defined(__ANDROID__) 90 91 // Support move construction and assignment on compilers known to allow it. 92 #if !defined(BOOST_ASIO_HAS_MOVE) 93 # if !defined(BOOST_ASIO_DISABLE_MOVE) 94 # if defined(__clang__) 95 # if __has_feature(__cxx_rvalue_references__) 96 # define BOOST_ASIO_HAS_MOVE 1 97 # endif // __has_feature(__cxx_rvalue_references__) 98 # endif // defined(__clang__) 99 # if defined(__GNUC__) 100 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) 101 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 102 # define BOOST_ASIO_HAS_MOVE 1 103 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 104 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) 105 # endif // defined(__GNUC__) 106 # if defined(BOOST_ASIO_MSVC) 107 # if (_MSC_VER >= 1700) 108 # define BOOST_ASIO_HAS_MOVE 1 109 # endif // (_MSC_VER >= 1700) 110 # endif // defined(BOOST_ASIO_MSVC) 111 # if defined(__INTEL_CXX11_MODE__) 112 # if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) 113 # define BOOST_ASIO_HAS_MOVE 1 114 # endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) 115 # if defined(__ICL) && (__ICL >= 1500) 116 # define BOOST_ASIO_HAS_MOVE 1 117 # endif // defined(__ICL) && (__ICL >= 1500) 118 # endif // defined(__INTEL_CXX11_MODE__) 119 # endif // !defined(BOOST_ASIO_DISABLE_MOVE) 120 #endif // !defined(BOOST_ASIO_HAS_MOVE) 121 122 // If BOOST_ASIO_MOVE_CAST isn't defined, and move support is available, define 123 // * BOOST_ASIO_MOVE_ARG, 124 // * BOOST_ASIO_NONDEDUCED_MOVE_ARG, and 125 // * BOOST_ASIO_MOVE_CAST 126 // to take advantage of rvalue references and perfect forwarding. 127 #if defined(BOOST_ASIO_HAS_MOVE) && !defined(BOOST_ASIO_MOVE_CAST) 128 # define BOOST_ASIO_MOVE_ARG(type) type&& 129 # define BOOST_ASIO_MOVE_ARG2(type1, type2) type1, type2&& 130 # define BOOST_ASIO_NONDEDUCED_MOVE_ARG(type) type& 131 # define BOOST_ASIO_MOVE_CAST(type) static_cast<type&&> 132 # define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast<type1, type2&&> 133 #endif // defined(BOOST_ASIO_HAS_MOVE) && !defined(BOOST_ASIO_MOVE_CAST) 134 135 // If BOOST_ASIO_MOVE_CAST still isn't defined, default to a C++03-compatible 136 // implementation. Note that older g++ and MSVC versions don't like it when you 137 // pass a non-member function through a const reference, so for most compilers 138 // we'll play it safe and stick with the old approach of passing the handler by 139 // value. 140 #if !defined(BOOST_ASIO_MOVE_CAST) 141 # if defined(__GNUC__) 142 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4) 143 # define BOOST_ASIO_MOVE_ARG(type) const type& 144 # else // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4) 145 # define BOOST_ASIO_MOVE_ARG(type) type 146 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4) 147 # elif defined(BOOST_ASIO_MSVC) 148 # if (_MSC_VER >= 1400) 149 # define BOOST_ASIO_MOVE_ARG(type) const type& 150 # else // (_MSC_VER >= 1400) 151 # define BOOST_ASIO_MOVE_ARG(type) type 152 # endif // (_MSC_VER >= 1400) 153 # else 154 # define BOOST_ASIO_MOVE_ARG(type) type 155 # endif 156 # define BOOST_ASIO_NONDEDUCED_MOVE_ARG(type) const type& 157 # define BOOST_ASIO_MOVE_CAST(type) static_cast<const type&> 158 # define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast<const type1, type2&> 159 #endif // !defined(BOOST_ASIO_MOVE_CAST) 160 161 // Support variadic templates on compilers known to allow it. 162 #if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) 163 # if !defined(BOOST_ASIO_DISABLE_VARIADIC_TEMPLATES) 164 # if defined(__clang__) 165 # if __has_feature(__cxx_variadic_templates__) 166 # define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1 167 # endif // __has_feature(__cxx_variadic_templates__) 168 # endif // defined(__clang__) 169 # if defined(__GNUC__) 170 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) 171 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 172 # define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1 173 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 174 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) 175 # endif // defined(__GNUC__) 176 # if defined(BOOST_ASIO_MSVC) 177 # if (_MSC_VER >= 1900) 178 # define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1 179 # endif // (_MSC_VER >= 1900) 180 # endif // defined(BOOST_ASIO_MSVC) 181 # endif // !defined(BOOST_ASIO_DISABLE_VARIADIC_TEMPLATES) 182 #endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) 183 184 // Support deleted functions on compilers known to allow it. 185 #if !defined(BOOST_ASIO_DELETED) 186 # if defined(__GNUC__) 187 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 188 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 189 # define BOOST_ASIO_DELETED = delete 190 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 191 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 192 # endif // defined(__GNUC__) 193 # if defined(__clang__) 194 # if __has_feature(__cxx_deleted_functions__) 195 # define BOOST_ASIO_DELETED = delete 196 # endif // __has_feature(__cxx_deleted_functions__) 197 # endif // defined(__clang__) 198 # if defined(BOOST_ASIO_MSVC) 199 # if (_MSC_VER >= 1900) 200 # define BOOST_ASIO_DELETED = delete 201 # endif // (_MSC_VER >= 1900) 202 # endif // defined(BOOST_ASIO_MSVC) 203 # if !defined(BOOST_ASIO_DELETED) 204 # define BOOST_ASIO_DELETED 205 # endif // !defined(BOOST_ASIO_DELETED) 206 #endif // !defined(BOOST_ASIO_DELETED) 207 208 // Support constexpr on compilers known to allow it. 209 #if !defined(BOOST_ASIO_HAS_CONSTEXPR) 210 # if !defined(BOOST_ASIO_DISABLE_CONSTEXPR) 211 # if defined(__clang__) 212 # if __has_feature(__cxx_constexpr__) 213 # define BOOST_ASIO_HAS_CONSTEXPR 1 214 # endif // __has_feature(__cxx_constexr__) 215 # endif // defined(__clang__) 216 # if defined(__GNUC__) 217 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 218 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 219 # define BOOST_ASIO_HAS_CONSTEXPR 1 220 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 221 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 222 # endif // defined(__GNUC__) 223 # if defined(BOOST_ASIO_MSVC) 224 # if (_MSC_VER >= 1900) 225 # define BOOST_ASIO_HAS_CONSTEXPR 1 226 # endif // (_MSC_VER >= 1900) 227 # endif // defined(BOOST_ASIO_MSVC) 228 # endif // !defined(BOOST_ASIO_DISABLE_CONSTEXPR) 229 #endif // !defined(BOOST_ASIO_HAS_CONSTEXPR) 230 #if !defined(BOOST_ASIO_CONSTEXPR) 231 # if defined(BOOST_ASIO_HAS_CONSTEXPR) 232 # define BOOST_ASIO_CONSTEXPR constexpr 233 # else // defined(BOOST_ASIO_HAS_CONSTEXPR) 234 # define BOOST_ASIO_CONSTEXPR 235 # endif // defined(BOOST_ASIO_HAS_CONSTEXPR) 236 #endif // !defined(BOOST_ASIO_CONSTEXPR) 237 238 // Support noexcept on compilers known to allow it. 239 #if !defined(BOOST_ASIO_NOEXCEPT) 240 # if !defined(BOOST_ASIO_DISABLE_NOEXCEPT) 241 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105300) 242 # define BOOST_ASIO_NOEXCEPT BOOST_NOEXCEPT 243 # define BOOST_ASIO_NOEXCEPT_OR_NOTHROW BOOST_NOEXCEPT_OR_NOTHROW 244 # elif defined(__clang__) 245 # if __has_feature(__cxx_noexcept__) 246 # define BOOST_ASIO_NOEXCEPT noexcept(true) 247 # define BOOST_ASIO_NOEXCEPT_OR_NOTHROW noexcept(true) 248 # endif // __has_feature(__cxx_noexcept__) 249 # elif defined(__GNUC__) 250 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 251 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 252 # define BOOST_ASIO_NOEXCEPT noexcept(true) 253 # define BOOST_ASIO_NOEXCEPT_OR_NOTHROW noexcept(true) 254 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 255 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 256 # elif defined(BOOST_ASIO_MSVC) 257 # if (_MSC_VER >= 1900) 258 # define BOOST_ASIO_NOEXCEPT noexcept(true) 259 # define BOOST_ASIO_NOEXCEPT_OR_NOTHROW noexcept(true) 260 # endif // (_MSC_VER >= 1900) 261 # endif // defined(BOOST_ASIO_MSVC) 262 # endif // !defined(BOOST_ASIO_DISABLE_NOEXCEPT) 263 # if !defined(BOOST_ASIO_NOEXCEPT) 264 # define BOOST_ASIO_NOEXCEPT 265 # endif // !defined(BOOST_ASIO_NOEXCEPT) 266 # if !defined(BOOST_ASIO_NOEXCEPT_OR_NOTHROW) 267 # define BOOST_ASIO_NOEXCEPT_OR_NOTHROW throw() 268 # endif // !defined(BOOST_ASIO_NOEXCEPT_OR_NOTHROW) 269 #endif // !defined(BOOST_ASIO_NOEXCEPT) 270 271 // Support automatic type deduction on compilers known to support it. 272 #if !defined(BOOST_ASIO_HAS_DECLTYPE) 273 # if !defined(BOOST_ASIO_DISABLE_DECLTYPE) 274 # if defined(__clang__) 275 # if __has_feature(__cxx_decltype__) 276 # define BOOST_ASIO_HAS_DECLTYPE 1 277 # endif // __has_feature(__cxx_decltype__) 278 # endif // defined(__clang__) 279 # if defined(__GNUC__) 280 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 281 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 282 # define BOOST_ASIO_HAS_DECLTYPE 1 283 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 284 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 285 # endif // defined(__GNUC__) 286 # if defined(BOOST_ASIO_MSVC) 287 # if (_MSC_VER >= 1800) 288 # define BOOST_ASIO_HAS_DECLTYPE 1 289 # endif // (_MSC_VER >= 1800) 290 # endif // defined(BOOST_ASIO_MSVC) 291 # endif // !defined(BOOST_ASIO_DISABLE_DECLTYPE) 292 #endif // !defined(BOOST_ASIO_HAS_DECLTYPE) 293 294 // Support alias templates on compilers known to allow it. 295 #if !defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) 296 # if !defined(BOOST_ASIO_DISABLE_ALIAS_TEMPLATES) 297 # if defined(__clang__) 298 # if __has_feature(__cxx_alias_templates__) 299 # define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1 300 # endif // __has_feature(__cxx_alias_templates__) 301 # endif // defined(__clang__) 302 # if defined(__GNUC__) 303 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 304 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 305 # define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1 306 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 307 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 308 # endif // defined(__GNUC__) 309 # if defined(BOOST_ASIO_MSVC) 310 # if (_MSC_VER >= 1900) 311 # define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1 312 # endif // (_MSC_VER >= 1900) 313 # endif // defined(BOOST_ASIO_MSVC) 314 # endif // !defined(BOOST_ASIO_DISABLE_ALIAS_TEMPLATES) 315 #endif // !defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) 316 317 // Support return type deduction on compilers known to allow it. 318 #if !defined(BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION) 319 # if !defined(BOOST_ASIO_DISABLE_RETURN_TYPE_DEDUCTION) 320 # if defined(__clang__) 321 # if __has_feature(__cxx_return_type_deduction__) 322 # define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1 323 # endif // __has_feature(__cxx_alias_templates__) 324 # elif (__cplusplus >= 201402) 325 # define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1 326 # elif defined(__cpp_return_type_deduction) 327 # if (__cpp_return_type_deduction >= 201304) 328 # define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1 329 # endif // (__cpp_return_type_deduction >= 201304) 330 # endif // defined(__cpp_return_type_deduction) 331 # endif // !defined(BOOST_ASIO_DISABLE_RETURN_TYPE_DEDUCTION) 332 #endif // !defined(BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION) 333 334 // Support default function template arguments on compilers known to allow it. 335 #if !defined(BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) 336 # if !defined(BOOST_ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) 337 # if (__cplusplus >= 201103) 338 # define BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS 1 339 # endif // (__cplusplus >= 201103) 340 # endif // !defined(BOOST_ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) 341 #endif // !defined(BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) 342 343 // Support concepts on compilers known to allow them. 344 #if !defined(BOOST_ASIO_HAS_CONCEPTS) 345 # if !defined(BOOST_ASIO_DISABLE_CONCEPTS) 346 # if defined(__cpp_concepts) 347 # define BOOST_ASIO_HAS_CONCEPTS 1 348 # if (__cpp_concepts >= 201707) 349 # define BOOST_ASIO_CONCEPT concept 350 # else // (__cpp_concepts >= 201707) 351 # define BOOST_ASIO_CONCEPT concept bool 352 # endif // (__cpp_concepts >= 201707) 353 # endif // defined(__cpp_concepts) 354 # endif // !defined(BOOST_ASIO_DISABLE_CONCEPTS) 355 #endif // !defined(BOOST_ASIO_HAS_CONCEPTS) 356 357 // Standard library support for system errors. 358 # if !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR) 359 # if defined(__clang__) 360 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 361 # define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 362 # elif (__cplusplus >= 201103) 363 # if __has_include(<system_error>) 364 # define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 365 # endif // __has_include(<system_error>) 366 # endif // (__cplusplus >= 201103) 367 # endif // defined(__clang__) 368 # if defined(__GNUC__) 369 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 370 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 371 # define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 372 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 373 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 374 # endif // defined(__GNUC__) 375 # if defined(BOOST_ASIO_MSVC) 376 # if (_MSC_VER >= 1700) 377 # define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 378 # endif // (_MSC_VER >= 1700) 379 # endif // defined(BOOST_ASIO_MSVC) 380 # endif // !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR) 381 382 // Compliant C++11 compilers put noexcept specifiers on error_category members. 383 #if !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) 384 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105300) 385 # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT BOOST_NOEXCEPT 386 # elif defined(__clang__) 387 # if __has_feature(__cxx_noexcept__) 388 # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true) 389 # endif // __has_feature(__cxx_noexcept__) 390 # elif defined(__GNUC__) 391 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 392 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 393 # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true) 394 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 395 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 396 # elif defined(BOOST_ASIO_MSVC) 397 # if (_MSC_VER >= 1900) 398 # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true) 399 # endif // (_MSC_VER >= 1900) 400 # endif // defined(BOOST_ASIO_MSVC) 401 # if !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) 402 # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT 403 # endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) 404 #endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) 405 406 // Standard library support for arrays. 407 #if !defined(BOOST_ASIO_HAS_STD_ARRAY) 408 # if !defined(BOOST_ASIO_DISABLE_STD_ARRAY) 409 # if defined(__clang__) 410 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 411 # define BOOST_ASIO_HAS_STD_ARRAY 1 412 # elif (__cplusplus >= 201103) 413 # if __has_include(<array>) 414 # define BOOST_ASIO_HAS_STD_ARRAY 1 415 # endif // __has_include(<array>) 416 # endif // (__cplusplus >= 201103) 417 # endif // defined(__clang__) 418 # if defined(__GNUC__) 419 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) 420 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 421 # define BOOST_ASIO_HAS_STD_ARRAY 1 422 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 423 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) 424 # endif // defined(__GNUC__) 425 # if defined(BOOST_ASIO_MSVC) 426 # if (_MSC_VER >= 1600) 427 # define BOOST_ASIO_HAS_STD_ARRAY 1 428 # endif // (_MSC_VER >= 1600) 429 # endif // defined(BOOST_ASIO_MSVC) 430 # endif // !defined(BOOST_ASIO_DISABLE_STD_ARRAY) 431 #endif // !defined(BOOST_ASIO_HAS_STD_ARRAY) 432 433 // Standard library support for shared_ptr and weak_ptr. 434 #if !defined(BOOST_ASIO_HAS_STD_SHARED_PTR) 435 # if !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR) 436 # if defined(__clang__) 437 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 438 # define BOOST_ASIO_HAS_STD_SHARED_PTR 1 439 # elif (__cplusplus >= 201103) 440 # define BOOST_ASIO_HAS_STD_SHARED_PTR 1 441 # endif // (__cplusplus >= 201103) 442 # endif // defined(__clang__) 443 # if defined(__GNUC__) 444 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) 445 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 446 # define BOOST_ASIO_HAS_STD_SHARED_PTR 1 447 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 448 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) 449 # endif // defined(__GNUC__) 450 # if defined(BOOST_ASIO_MSVC) 451 # if (_MSC_VER >= 1600) 452 # define BOOST_ASIO_HAS_STD_SHARED_PTR 1 453 # endif // (_MSC_VER >= 1600) 454 # endif // defined(BOOST_ASIO_MSVC) 455 # endif // !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR) 456 #endif // !defined(BOOST_ASIO_HAS_STD_SHARED_PTR) 457 458 // Standard library support for allocator_arg_t. 459 #if !defined(BOOST_ASIO_HAS_STD_ALLOCATOR_ARG) 460 # if !defined(BOOST_ASIO_DISABLE_STD_ALLOCATOR_ARG) 461 # if defined(__clang__) 462 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 463 # define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1 464 # elif (__cplusplus >= 201103) 465 # define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1 466 # endif // (__cplusplus >= 201103) 467 # endif // defined(__clang__) 468 # if defined(__GNUC__) 469 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 470 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 471 # define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1 472 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 473 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 474 # endif // defined(__GNUC__) 475 # if defined(BOOST_ASIO_MSVC) 476 # if (_MSC_VER >= 1600) 477 # define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1 478 # endif // (_MSC_VER >= 1600) 479 # endif // defined(BOOST_ASIO_MSVC) 480 # endif // !defined(BOOST_ASIO_DISABLE_STD_ALLOCATOR_ARG) 481 #endif // !defined(BOOST_ASIO_HAS_STD_ALLOCATOR_ARG) 482 483 // Standard library support for atomic operations. 484 #if !defined(BOOST_ASIO_HAS_STD_ATOMIC) 485 # if !defined(BOOST_ASIO_DISABLE_STD_ATOMIC) 486 # if defined(__clang__) 487 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 488 # define BOOST_ASIO_HAS_STD_ATOMIC 1 489 # elif (__cplusplus >= 201103) 490 # if __has_include(<atomic>) 491 # define BOOST_ASIO_HAS_STD_ATOMIC 1 492 # endif // __has_include(<atomic>) 493 # elif defined(__apple_build_version__) && defined(_LIBCPP_VERSION) 494 # if (__clang_major__ >= 10) 495 # if __has_include(<atomic>) 496 # define BOOST_ASIO_HAS_STD_ATOMIC 1 497 # endif // __has_include(<atomic>) 498 # endif // (__clang_major__ >= 10) 499 # endif /// defined(__apple_build_version__) && defined(_LIBCPP_VERSION) 500 # endif // defined(__clang__) 501 # if defined(__GNUC__) 502 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 503 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 504 # define BOOST_ASIO_HAS_STD_ATOMIC 1 505 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 506 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 507 # endif // defined(__GNUC__) 508 # if defined(BOOST_ASIO_MSVC) 509 # if (_MSC_VER >= 1700) 510 # define BOOST_ASIO_HAS_STD_ATOMIC 1 511 # endif // (_MSC_VER >= 1700) 512 # endif // defined(BOOST_ASIO_MSVC) 513 # endif // !defined(BOOST_ASIO_DISABLE_STD_ATOMIC) 514 #endif // !defined(BOOST_ASIO_HAS_STD_ATOMIC) 515 516 // Standard library support for chrono. Some standard libraries (such as the 517 // libstdc++ shipped with gcc 4.6) provide monotonic_clock as per early C++0x 518 // drafts, rather than the eventually standardised name of steady_clock. 519 #if !defined(BOOST_ASIO_HAS_STD_CHRONO) 520 # if !defined(BOOST_ASIO_DISABLE_STD_CHRONO) 521 # if defined(__clang__) 522 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 523 # define BOOST_ASIO_HAS_STD_CHRONO 1 524 # elif (__cplusplus >= 201103) 525 # if __has_include(<chrono>) 526 # define BOOST_ASIO_HAS_STD_CHRONO 1 527 # endif // __has_include(<chrono>) 528 # endif // (__cplusplus >= 201103) 529 # endif // defined(__clang__) 530 # if defined(__GNUC__) 531 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 532 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 533 # define BOOST_ASIO_HAS_STD_CHRONO 1 534 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6)) 535 # define BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK 1 536 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6)) 537 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 538 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 539 # endif // defined(__GNUC__) 540 # if defined(BOOST_ASIO_MSVC) 541 # if (_MSC_VER >= 1700) 542 # define BOOST_ASIO_HAS_STD_CHRONO 1 543 # endif // (_MSC_VER >= 1700) 544 # endif // defined(BOOST_ASIO_MSVC) 545 # endif // !defined(BOOST_ASIO_DISABLE_STD_CHRONO) 546 #endif // !defined(BOOST_ASIO_HAS_STD_CHRONO) 547 548 // Boost support for chrono. 549 #if !defined(BOOST_ASIO_HAS_BOOST_CHRONO) 550 # if !defined(BOOST_ASIO_DISABLE_BOOST_CHRONO) 551 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 104700) 552 # define BOOST_ASIO_HAS_BOOST_CHRONO 1 553 # endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 104700) 554 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_CHRONO) 555 #endif // !defined(BOOST_ASIO_HAS_BOOST_CHRONO) 556 557 // Some form of chrono library is available. 558 #if !defined(BOOST_ASIO_HAS_CHRONO) 559 # if defined(BOOST_ASIO_HAS_STD_CHRONO) \ 560 || defined(BOOST_ASIO_HAS_BOOST_CHRONO) 561 # define BOOST_ASIO_HAS_CHRONO 1 562 # endif // defined(BOOST_ASIO_HAS_STD_CHRONO) 563 // || defined(BOOST_ASIO_HAS_BOOST_CHRONO) 564 #endif // !defined(BOOST_ASIO_HAS_CHRONO) 565 566 // Boost support for the DateTime library. 567 #if !defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) 568 # if !defined(BOOST_ASIO_DISABLE_BOOST_DATE_TIME) 569 # define BOOST_ASIO_HAS_BOOST_DATE_TIME 1 570 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_DATE_TIME) 571 #endif // !defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) 572 573 // Standard library support for addressof. 574 #if !defined(BOOST_ASIO_HAS_STD_ADDRESSOF) 575 # if !defined(BOOST_ASIO_DISABLE_STD_ADDRESSOF) 576 # if defined(__clang__) 577 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 578 # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 579 # elif (__cplusplus >= 201103) 580 # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 581 # endif // (__cplusplus >= 201103) 582 # endif // defined(__clang__) 583 # if defined(__GNUC__) 584 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 585 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 586 # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 587 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 588 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 589 # endif // defined(__GNUC__) 590 # if defined(BOOST_ASIO_MSVC) 591 # if (_MSC_VER >= 1700) 592 # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 593 # endif // (_MSC_VER >= 1700) 594 # endif // defined(BOOST_ASIO_MSVC) 595 # endif // !defined(BOOST_ASIO_DISABLE_STD_ADDRESSOF) 596 #endif // !defined(BOOST_ASIO_HAS_STD_ADDRESSOF) 597 598 // Standard library support for the function class. 599 #if !defined(BOOST_ASIO_HAS_STD_FUNCTION) 600 # if !defined(BOOST_ASIO_DISABLE_STD_FUNCTION) 601 # if defined(__clang__) 602 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 603 # define BOOST_ASIO_HAS_STD_FUNCTION 1 604 # elif (__cplusplus >= 201103) 605 # define BOOST_ASIO_HAS_STD_FUNCTION 1 606 # endif // (__cplusplus >= 201103) 607 # endif // defined(__clang__) 608 # if defined(__GNUC__) 609 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) 610 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 611 # define BOOST_ASIO_HAS_STD_FUNCTION 1 612 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 613 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) 614 # endif // defined(__GNUC__) 615 # if defined(BOOST_ASIO_MSVC) 616 # if (_MSC_VER >= 1700) 617 # define BOOST_ASIO_HAS_STD_FUNCTION 1 618 # endif // (_MSC_VER >= 1700) 619 # endif // defined(BOOST_ASIO_MSVC) 620 # endif // !defined(BOOST_ASIO_DISABLE_STD_FUNCTION) 621 #endif // !defined(BOOST_ASIO_HAS_STD_FUNCTION) 622 623 // Standard library support for type traits. 624 #if !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) 625 # if !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS) 626 # if defined(__clang__) 627 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 628 # define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 629 # elif (__cplusplus >= 201103) 630 # if __has_include(<type_traits>) 631 # define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 632 # endif // __has_include(<type_traits>) 633 # endif // (__cplusplus >= 201103) 634 # endif // defined(__clang__) 635 # if defined(__GNUC__) 636 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) 637 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 638 # define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 639 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 640 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) 641 # endif // defined(__GNUC__) 642 # if defined(BOOST_ASIO_MSVC) 643 # if (_MSC_VER >= 1700) 644 # define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 645 # endif // (_MSC_VER >= 1700) 646 # endif // defined(BOOST_ASIO_MSVC) 647 # endif // !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS) 648 #endif // !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) 649 650 // Standard library support for the nullptr_t type. 651 #if !defined(BOOST_ASIO_HAS_NULLPTR) 652 # if !defined(BOOST_ASIO_DISABLE_NULLPTR) 653 # if defined(__clang__) 654 # if __has_feature(__cxx_nullptr__) 655 # define BOOST_ASIO_HAS_NULLPTR 1 656 # endif // __has_feature(__cxx_rvalue_references__) 657 # elif defined(__GNUC__) 658 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 659 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 660 # define BOOST_ASIO_HAS_NULLPTR 1 661 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 662 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 663 # endif // defined(__GNUC__) 664 # if defined(BOOST_ASIO_MSVC) 665 # if (_MSC_VER >= 1700) 666 # define BOOST_ASIO_HAS_NULLPTR 1 667 # endif // (_MSC_VER >= 1700) 668 # endif // defined(BOOST_ASIO_MSVC) 669 # endif // !defined(BOOST_ASIO_DISABLE_NULLPTR) 670 #endif // !defined(BOOST_ASIO_HAS_NULLPTR) 671 672 // Standard library support for the C++11 allocator additions. 673 #if !defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS) 674 # if !defined(BOOST_ASIO_DISABLE_CXX11_ALLOCATORS) 675 # if defined(__clang__) 676 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 677 # define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1 678 # elif (__cplusplus >= 201103) 679 # define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1 680 # endif // (__cplusplus >= 201103) 681 # elif defined(__GNUC__) 682 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 683 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 684 # define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1 685 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 686 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 687 # endif // defined(__GNUC__) 688 # if defined(BOOST_ASIO_MSVC) 689 # if (_MSC_VER >= 1800) 690 # define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1 691 # endif // (_MSC_VER >= 1800) 692 # endif // defined(BOOST_ASIO_MSVC) 693 # endif // !defined(BOOST_ASIO_DISABLE_CXX11_ALLOCATORS) 694 #endif // !defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS) 695 696 // Standard library support for the cstdint header. 697 #if !defined(BOOST_ASIO_HAS_CSTDINT) 698 # if !defined(BOOST_ASIO_DISABLE_CSTDINT) 699 # if defined(__clang__) 700 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 701 # define BOOST_ASIO_HAS_CSTDINT 1 702 # elif (__cplusplus >= 201103) 703 # define BOOST_ASIO_HAS_CSTDINT 1 704 # endif // (__cplusplus >= 201103) 705 # endif // defined(__clang__) 706 # if defined(__GNUC__) 707 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) 708 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 709 # define BOOST_ASIO_HAS_CSTDINT 1 710 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 711 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) 712 # endif // defined(__GNUC__) 713 # if defined(BOOST_ASIO_MSVC) 714 # if (_MSC_VER >= 1700) 715 # define BOOST_ASIO_HAS_CSTDINT 1 716 # endif // (_MSC_VER >= 1700) 717 # endif // defined(BOOST_ASIO_MSVC) 718 # endif // !defined(BOOST_ASIO_DISABLE_CSTDINT) 719 #endif // !defined(BOOST_ASIO_HAS_CSTDINT) 720 721 // Standard library support for the thread class. 722 #if !defined(BOOST_ASIO_HAS_STD_THREAD) 723 # if !defined(BOOST_ASIO_DISABLE_STD_THREAD) 724 # if defined(__clang__) 725 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 726 # define BOOST_ASIO_HAS_STD_THREAD 1 727 # elif (__cplusplus >= 201103) 728 # if __has_include(<thread>) 729 # define BOOST_ASIO_HAS_STD_THREAD 1 730 # endif // __has_include(<thread>) 731 # endif // (__cplusplus >= 201103) 732 # endif // defined(__clang__) 733 # if defined(__GNUC__) 734 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 735 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 736 # define BOOST_ASIO_HAS_STD_THREAD 1 737 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 738 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 739 # endif // defined(__GNUC__) 740 # if defined(BOOST_ASIO_MSVC) 741 # if (_MSC_VER >= 1700) 742 # define BOOST_ASIO_HAS_STD_THREAD 1 743 # endif // (_MSC_VER >= 1700) 744 # endif // defined(BOOST_ASIO_MSVC) 745 # endif // !defined(BOOST_ASIO_DISABLE_STD_THREAD) 746 #endif // !defined(BOOST_ASIO_HAS_STD_THREAD) 747 748 // Standard library support for the mutex and condition variable classes. 749 #if !defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR) 750 # if !defined(BOOST_ASIO_DISABLE_STD_MUTEX_AND_CONDVAR) 751 # if defined(__clang__) 752 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 753 # define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 754 # elif (__cplusplus >= 201103) 755 # if __has_include(<mutex>) 756 # define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 757 # endif // __has_include(<mutex>) 758 # endif // (__cplusplus >= 201103) 759 # endif // defined(__clang__) 760 # if defined(__GNUC__) 761 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 762 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 763 # define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 764 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 765 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 766 # endif // defined(__GNUC__) 767 # if defined(BOOST_ASIO_MSVC) 768 # if (_MSC_VER >= 1700) 769 # define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 770 # endif // (_MSC_VER >= 1700) 771 # endif // defined(BOOST_ASIO_MSVC) 772 # endif // !defined(BOOST_ASIO_DISABLE_STD_MUTEX_AND_CONDVAR) 773 #endif // !defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR) 774 775 // Standard library support for the call_once function. 776 #if !defined(BOOST_ASIO_HAS_STD_CALL_ONCE) 777 # if !defined(BOOST_ASIO_DISABLE_STD_CALL_ONCE) 778 # if defined(__clang__) 779 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 780 # define BOOST_ASIO_HAS_STD_CALL_ONCE 1 781 # elif (__cplusplus >= 201103) 782 # if __has_include(<mutex>) 783 # define BOOST_ASIO_HAS_STD_CALL_ONCE 1 784 # endif // __has_include(<mutex>) 785 # endif // (__cplusplus >= 201103) 786 # endif // defined(__clang__) 787 # if defined(__GNUC__) 788 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 789 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 790 # define BOOST_ASIO_HAS_STD_CALL_ONCE 1 791 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 792 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 793 # endif // defined(__GNUC__) 794 # if defined(BOOST_ASIO_MSVC) 795 # if (_MSC_VER >= 1700) 796 # define BOOST_ASIO_HAS_STD_CALL_ONCE 1 797 # endif // (_MSC_VER >= 1700) 798 # endif // defined(BOOST_ASIO_MSVC) 799 # endif // !defined(BOOST_ASIO_DISABLE_STD_CALL_ONCE) 800 #endif // !defined(BOOST_ASIO_HAS_STD_CALL_ONCE) 801 802 // Standard library support for futures. 803 #if !defined(BOOST_ASIO_HAS_STD_FUTURE) 804 # if !defined(BOOST_ASIO_DISABLE_STD_FUTURE) 805 # if defined(__clang__) 806 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 807 # define BOOST_ASIO_HAS_STD_FUTURE 1 808 # elif (__cplusplus >= 201103) 809 # if __has_include(<future>) 810 # define BOOST_ASIO_HAS_STD_FUTURE 1 811 # endif // __has_include(<mutex>) 812 # endif // (__cplusplus >= 201103) 813 # endif // defined(__clang__) 814 # if defined(__GNUC__) 815 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 816 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 817 # define BOOST_ASIO_HAS_STD_FUTURE 1 818 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 819 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) 820 # endif // defined(__GNUC__) 821 # if defined(BOOST_ASIO_MSVC) 822 # if (_MSC_VER >= 1700) 823 # define BOOST_ASIO_HAS_STD_FUTURE 1 824 # endif // (_MSC_VER >= 1700) 825 # endif // defined(BOOST_ASIO_MSVC) 826 # endif // !defined(BOOST_ASIO_DISABLE_STD_FUTURE) 827 #endif // !defined(BOOST_ASIO_HAS_STD_FUTURE) 828 829 // Standard library support for std::string_view. 830 #if !defined(BOOST_ASIO_HAS_STD_STRING_VIEW) 831 # if !defined(BOOST_ASIO_DISABLE_STD_STRING_VIEW) 832 # if defined(__clang__) 833 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 834 # if (__cplusplus >= 201402) 835 # if __has_include(<string_view>) 836 # define BOOST_ASIO_HAS_STD_STRING_VIEW 1 837 # endif // __has_include(<string_view>) 838 # endif // (__cplusplus >= 201402) 839 # else // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 840 # if (__cplusplus >= 201703) 841 # if __has_include(<string_view>) 842 # define BOOST_ASIO_HAS_STD_STRING_VIEW 1 843 # endif // __has_include(<string_view>) 844 # endif // (__cplusplus >= 201703) 845 # endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 846 # elif defined(__GNUC__) 847 # if (__GNUC__ >= 7) 848 # if (__cplusplus >= 201703) 849 # define BOOST_ASIO_HAS_STD_STRING_VIEW 1 850 # endif // (__cplusplus >= 201703) 851 # endif // (__GNUC__ >= 7) 852 # elif defined(BOOST_ASIO_MSVC) 853 # if (_MSC_VER >= 1910 && _MSVC_LANG >= 201703) 854 # define BOOST_ASIO_HAS_STD_STRING_VIEW 1 855 # endif // (_MSC_VER >= 1910 && _MSVC_LANG >= 201703) 856 # endif // defined(BOOST_ASIO_MSVC) 857 # endif // !defined(BOOST_ASIO_DISABLE_STD_STRING_VIEW) 858 #endif // !defined(BOOST_ASIO_HAS_STD_STRING_VIEW) 859 860 // Standard library support for std::experimental::string_view. 861 #if !defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 862 # if !defined(BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW) 863 # if defined(__clang__) 864 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 865 # if (_LIBCPP_VERSION < 7000) 866 # if (__cplusplus >= 201402) 867 # if __has_include(<experimental/string_view>) 868 # define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1 869 # endif // __has_include(<experimental/string_view>) 870 # endif // (__cplusplus >= 201402) 871 # endif // (_LIBCPP_VERSION < 7000) 872 # else // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 873 # if (__cplusplus >= 201402) 874 # if __has_include(<experimental/string_view>) 875 # define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1 876 # endif // __has_include(<experimental/string_view>) 877 # endif // (__cplusplus >= 201402) 878 # endif // // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) 879 # endif // defined(__clang__) 880 # if defined(__GNUC__) 881 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4) 882 # if (__cplusplus >= 201402) 883 # define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1 884 # endif // (__cplusplus >= 201402) 885 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4) 886 # endif // defined(__GNUC__) 887 # endif // !defined(BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW) 888 #endif // !defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 889 890 // Standard library has a string_view that we can use. 891 #if !defined(BOOST_ASIO_HAS_STRING_VIEW) 892 # if !defined(BOOST_ASIO_DISABLE_STRING_VIEW) 893 # if defined(BOOST_ASIO_HAS_STD_STRING_VIEW) 894 # define BOOST_ASIO_HAS_STRING_VIEW 1 895 # elif defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 896 # define BOOST_ASIO_HAS_STRING_VIEW 1 897 # endif // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 898 # endif // !defined(BOOST_ASIO_DISABLE_STRING_VIEW) 899 #endif // !defined(BOOST_ASIO_HAS_STRING_VIEW) 900 901 // Standard library support for iostream move construction and assignment. 902 #if !defined(BOOST_ASIO_HAS_STD_IOSTREAM_MOVE) 903 # if !defined(BOOST_ASIO_DISABLE_STD_IOSTREAM_MOVE) 904 # if defined(__GNUC__) 905 # if (__GNUC__ > 4) 906 # if defined(__GXX_EXPERIMENTAL_CXX0X__) 907 # define BOOST_ASIO_HAS_STD_IOSTREAM_MOVE 1 908 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) 909 # endif // (__GNUC__ > 4) 910 # endif // defined(__GNUC__) 911 # if defined(BOOST_ASIO_MSVC) 912 # if (_MSC_VER >= 1700) 913 # define BOOST_ASIO_HAS_STD_IOSTREAM_MOVE 1 914 # endif // (_MSC_VER >= 1700) 915 # endif // defined(BOOST_ASIO_MSVC) 916 # endif // !defined(BOOST_ASIO_DISABLE_STD_IOSTREAM_MOVE) 917 #endif // !defined(BOOST_ASIO_HAS_STD_IOSTREAM_MOVE) 918 919 // Standard library has invoke_result (which supersedes result_of). 920 #if !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT) 921 # if !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT) 922 # if defined(BOOST_ASIO_MSVC) 923 # if (_MSC_VER >= 1911 && _MSVC_LANG >= 201703) 924 # define BOOST_ASIO_HAS_STD_INVOKE_RESULT 1 925 # endif // (_MSC_VER >= 1911 && _MSVC_LANG >= 201703) 926 # endif // defined(BOOST_ASIO_MSVC) 927 # endif // !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT) 928 #endif // !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT) 929 930 // Windows App target. Windows but with a limited API. 931 #if !defined(BOOST_ASIO_WINDOWS_APP) 932 # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603) 933 # include <winapifamily.h> 934 # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \ 935 && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) 936 # define BOOST_ASIO_WINDOWS_APP 1 937 # endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) 938 // && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) 939 # endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603) 940 #endif // !defined(BOOST_ASIO_WINDOWS_APP) 941 942 // Legacy WinRT target. Windows App is preferred. 943 #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) 944 # if !defined(BOOST_ASIO_WINDOWS_APP) 945 # if defined(__cplusplus_winrt) 946 # include <winapifamily.h> 947 # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \ 948 && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) 949 # define BOOST_ASIO_WINDOWS_RUNTIME 1 950 # endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) 951 // && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) 952 # endif // defined(__cplusplus_winrt) 953 # endif // !defined(BOOST_ASIO_WINDOWS_APP) 954 #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) 955 956 // Windows target. Excludes WinRT but includes Windows App targets. 957 #if !defined(BOOST_ASIO_WINDOWS) 958 # if !defined(BOOST_ASIO_WINDOWS_RUNTIME) 959 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_WINDOWS) 960 # define BOOST_ASIO_WINDOWS 1 961 # elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) 962 # define BOOST_ASIO_WINDOWS 1 963 # elif defined(BOOST_ASIO_WINDOWS_APP) 964 # define BOOST_ASIO_WINDOWS 1 965 # endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_WINDOWS) 966 # endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) 967 #endif // !defined(BOOST_ASIO_WINDOWS) 968 969 // Windows: target OS version. 970 #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) 971 # if !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS) 972 # if defined(_MSC_VER) || defined(__BORLANDC__) 973 # pragma message( \ 974 "Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:\n"\ 975 "- add -D_WIN32_WINNT=0x0601 to the compiler command line; or\n"\ 976 "- add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.\n"\ 977 "Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).") 978 # else // defined(_MSC_VER) || defined(__BORLANDC__) 979 # warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. 980 # warning For example, add -D_WIN32_WINNT=0x0601 to the compiler command line. 981 # warning Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target). 982 # endif // defined(_MSC_VER) || defined(__BORLANDC__) 983 # define _WIN32_WINNT 0x0601 984 # endif // !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS) 985 # if defined(_MSC_VER) 986 # if defined(_WIN32) && !defined(WIN32) 987 # if !defined(_WINSOCK2API_) 988 # define WIN32 // Needed for correct types in winsock2.h 989 # else // !defined(_WINSOCK2API_) 990 # error Please define the macro WIN32 in your compiler options 991 # endif // !defined(_WINSOCK2API_) 992 # endif // defined(_WIN32) && !defined(WIN32) 993 # endif // defined(_MSC_VER) 994 # if defined(__BORLANDC__) 995 # if defined(__WIN32__) && !defined(WIN32) 996 # if !defined(_WINSOCK2API_) 997 # define WIN32 // Needed for correct types in winsock2.h 998 # else // !defined(_WINSOCK2API_) 999 # error Please define the macro WIN32 in your compiler options 1000 # endif // !defined(_WINSOCK2API_) 1001 # endif // defined(__WIN32__) && !defined(WIN32) 1002 # endif // defined(__BORLANDC__) 1003 # if defined(__CYGWIN__) 1004 # if !defined(__USE_W32_SOCKETS) 1005 # error You must add -D__USE_W32_SOCKETS to your compiler options. 1006 # endif // !defined(__USE_W32_SOCKETS) 1007 # endif // defined(__CYGWIN__) 1008 #endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) 1009 1010 // Windows: minimise header inclusion. 1011 #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) 1012 # if !defined(BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN) 1013 # if !defined(WIN32_LEAN_AND_MEAN) 1014 # define WIN32_LEAN_AND_MEAN 1015 # endif // !defined(WIN32_LEAN_AND_MEAN) 1016 # endif // !defined(BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN) 1017 #endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) 1018 1019 // Windows: suppress definition of "min" and "max" macros. 1020 #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) 1021 # if !defined(BOOST_ASIO_NO_NOMINMAX) 1022 # if !defined(NOMINMAX) 1023 # define NOMINMAX 1 1024 # endif // !defined(NOMINMAX) 1025 # endif // !defined(BOOST_ASIO_NO_NOMINMAX) 1026 #endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) 1027 1028 // Windows: IO Completion Ports. 1029 #if !defined(BOOST_ASIO_HAS_IOCP) 1030 # if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) 1031 # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400) 1032 # if !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP) 1033 # if !defined(BOOST_ASIO_DISABLE_IOCP) 1034 # define BOOST_ASIO_HAS_IOCP 1 1035 # endif // !defined(BOOST_ASIO_DISABLE_IOCP) 1036 # endif // !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP) 1037 # endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400) 1038 # endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) 1039 #endif // !defined(BOOST_ASIO_HAS_IOCP) 1040 1041 // On POSIX (and POSIX-like) platforms we need to include unistd.h in order to 1042 // get access to the various platform feature macros, e.g. to be able to test 1043 // for threads support. 1044 #if !defined(BOOST_ASIO_HAS_UNISTD_H) 1045 # if !defined(BOOST_ASIO_HAS_BOOST_CONFIG) 1046 # if defined(unix) \ 1047 || defined(__unix) \ 1048 || defined(_XOPEN_SOURCE) \ 1049 || defined(_POSIX_SOURCE) \ 1050 || (defined(__MACH__) && defined(__APPLE__)) \ 1051 || defined(__FreeBSD__) \ 1052 || defined(__NetBSD__) \ 1053 || defined(__OpenBSD__) \ 1054 || defined(__linux__) \ 1055 || defined(__HAIKU__) 1056 # define BOOST_ASIO_HAS_UNISTD_H 1 1057 # endif 1058 # endif // !defined(BOOST_ASIO_HAS_BOOST_CONFIG) 1059 #endif // !defined(BOOST_ASIO_HAS_UNISTD_H) 1060 #if defined(BOOST_ASIO_HAS_UNISTD_H) 1061 # include <unistd.h> 1062 #endif // defined(BOOST_ASIO_HAS_UNISTD_H) 1063 1064 // Linux: epoll, eventfd and timerfd. 1065 #if defined(__linux__) 1066 # include <linux/version.h> 1067 # if !defined(BOOST_ASIO_HAS_EPOLL) 1068 # if !defined(BOOST_ASIO_DISABLE_EPOLL) 1069 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,45) 1070 # define BOOST_ASIO_HAS_EPOLL 1 1071 # endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,45) 1072 # endif // !defined(BOOST_ASIO_DISABLE_EPOLL) 1073 # endif // !defined(BOOST_ASIO_HAS_EPOLL) 1074 # if !defined(BOOST_ASIO_HAS_EVENTFD) 1075 # if !defined(BOOST_ASIO_DISABLE_EVENTFD) 1076 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) 1077 # define BOOST_ASIO_HAS_EVENTFD 1 1078 # endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) 1079 # endif // !defined(BOOST_ASIO_DISABLE_EVENTFD) 1080 # endif // !defined(BOOST_ASIO_HAS_EVENTFD) 1081 # if !defined(BOOST_ASIO_HAS_TIMERFD) 1082 # if defined(BOOST_ASIO_HAS_EPOLL) 1083 # if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) 1084 # define BOOST_ASIO_HAS_TIMERFD 1 1085 # endif // (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) 1086 # endif // defined(BOOST_ASIO_HAS_EPOLL) 1087 # endif // !defined(BOOST_ASIO_HAS_TIMERFD) 1088 #endif // defined(__linux__) 1089 1090 // Mac OS X, FreeBSD, NetBSD, OpenBSD: kqueue. 1091 #if (defined(__MACH__) && defined(__APPLE__)) \ 1092 || defined(__FreeBSD__) \ 1093 || defined(__NetBSD__) \ 1094 || defined(__OpenBSD__) 1095 # if !defined(BOOST_ASIO_HAS_KQUEUE) 1096 # if !defined(BOOST_ASIO_DISABLE_KQUEUE) 1097 # define BOOST_ASIO_HAS_KQUEUE 1 1098 # endif // !defined(BOOST_ASIO_DISABLE_KQUEUE) 1099 # endif // !defined(BOOST_ASIO_HAS_KQUEUE) 1100 #endif // (defined(__MACH__) && defined(__APPLE__)) 1101 // || defined(__FreeBSD__) 1102 // || defined(__NetBSD__) 1103 // || defined(__OpenBSD__) 1104 1105 // Solaris: /dev/poll. 1106 #if defined(__sun) 1107 # if !defined(BOOST_ASIO_HAS_DEV_POLL) 1108 # if !defined(BOOST_ASIO_DISABLE_DEV_POLL) 1109 # define BOOST_ASIO_HAS_DEV_POLL 1 1110 # endif // !defined(BOOST_ASIO_DISABLE_DEV_POLL) 1111 # endif // !defined(BOOST_ASIO_HAS_DEV_POLL) 1112 #endif // defined(__sun) 1113 1114 // Serial ports. 1115 #if !defined(BOOST_ASIO_HAS_SERIAL_PORT) 1116 # if defined(BOOST_ASIO_HAS_IOCP) \ 1117 || !defined(BOOST_ASIO_WINDOWS) \ 1118 && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \ 1119 && !defined(__CYGWIN__) 1120 # if !defined(__SYMBIAN32__) 1121 # if !defined(BOOST_ASIO_DISABLE_SERIAL_PORT) 1122 # define BOOST_ASIO_HAS_SERIAL_PORT 1 1123 # endif // !defined(BOOST_ASIO_DISABLE_SERIAL_PORT) 1124 # endif // !defined(__SYMBIAN32__) 1125 # endif // defined(BOOST_ASIO_HAS_IOCP) 1126 // || !defined(BOOST_ASIO_WINDOWS) 1127 // && !defined(BOOST_ASIO_WINDOWS_RUNTIME) 1128 // && !defined(__CYGWIN__) 1129 #endif // !defined(BOOST_ASIO_HAS_SERIAL_PORT) 1130 1131 // Windows: stream handles. 1132 #if !defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE) 1133 # if !defined(BOOST_ASIO_DISABLE_WINDOWS_STREAM_HANDLE) 1134 # if defined(BOOST_ASIO_HAS_IOCP) 1135 # define BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE 1 1136 # endif // defined(BOOST_ASIO_HAS_IOCP) 1137 # endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_STREAM_HANDLE) 1138 #endif // !defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE) 1139 1140 // Windows: random access handles. 1141 #if !defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) 1142 # if !defined(BOOST_ASIO_DISABLE_WINDOWS_RANDOM_ACCESS_HANDLE) 1143 # if defined(BOOST_ASIO_HAS_IOCP) 1144 # define BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE 1 1145 # endif // defined(BOOST_ASIO_HAS_IOCP) 1146 # endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_RANDOM_ACCESS_HANDLE) 1147 #endif // !defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) 1148 1149 // Windows: object handles. 1150 #if !defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE) 1151 # if !defined(BOOST_ASIO_DISABLE_WINDOWS_OBJECT_HANDLE) 1152 # if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) 1153 # if !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP) 1154 # define BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE 1 1155 # endif // !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP) 1156 # endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) 1157 # endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_OBJECT_HANDLE) 1158 #endif // !defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE) 1159 1160 // Windows: OVERLAPPED wrapper. 1161 #if !defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR) 1162 # if !defined(BOOST_ASIO_DISABLE_WINDOWS_OVERLAPPED_PTR) 1163 # if defined(BOOST_ASIO_HAS_IOCP) 1164 # define BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR 1 1165 # endif // defined(BOOST_ASIO_HAS_IOCP) 1166 # endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_OVERLAPPED_PTR) 1167 #endif // !defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR) 1168 1169 // POSIX: stream-oriented file descriptors. 1170 #if !defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR) 1171 # if !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR) 1172 # if !defined(BOOST_ASIO_WINDOWS) \ 1173 && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \ 1174 && !defined(__CYGWIN__) 1175 # define BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR 1 1176 # endif // !defined(BOOST_ASIO_WINDOWS) 1177 // && !defined(BOOST_ASIO_WINDOWS_RUNTIME) 1178 // && !defined(__CYGWIN__) 1179 # endif // !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR) 1180 #endif // !defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR) 1181 1182 // UNIX domain sockets. 1183 #if !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS) 1184 # if !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS) 1185 # if !defined(BOOST_ASIO_WINDOWS) \ 1186 && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \ 1187 && !defined(__CYGWIN__) 1188 # define BOOST_ASIO_HAS_LOCAL_SOCKETS 1 1189 # endif // !defined(BOOST_ASIO_WINDOWS) 1190 // && !defined(BOOST_ASIO_WINDOWS_RUNTIME) 1191 // && !defined(__CYGWIN__) 1192 # endif // !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS) 1193 #endif // !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS) 1194 1195 // Can use sigaction() instead of signal(). 1196 #if !defined(BOOST_ASIO_HAS_SIGACTION) 1197 # if !defined(BOOST_ASIO_DISABLE_SIGACTION) 1198 # if !defined(BOOST_ASIO_WINDOWS) \ 1199 && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \ 1200 && !defined(__CYGWIN__) 1201 # define BOOST_ASIO_HAS_SIGACTION 1 1202 # endif // !defined(BOOST_ASIO_WINDOWS) 1203 // && !defined(BOOST_ASIO_WINDOWS_RUNTIME) 1204 // && !defined(__CYGWIN__) 1205 # endif // !defined(BOOST_ASIO_DISABLE_SIGACTION) 1206 #endif // !defined(BOOST_ASIO_HAS_SIGACTION) 1207 1208 // Can use signal(). 1209 #if !defined(BOOST_ASIO_HAS_SIGNAL) 1210 # if !defined(BOOST_ASIO_DISABLE_SIGNAL) 1211 # if !defined(UNDER_CE) 1212 # define BOOST_ASIO_HAS_SIGNAL 1 1213 # endif // !defined(UNDER_CE) 1214 # endif // !defined(BOOST_ASIO_DISABLE_SIGNAL) 1215 #endif // !defined(BOOST_ASIO_HAS_SIGNAL) 1216 1217 // Can use getaddrinfo() and getnameinfo(). 1218 #if !defined(BOOST_ASIO_HAS_GETADDRINFO) 1219 # if !defined(BOOST_ASIO_DISABLE_GETADDRINFO) 1220 # if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) 1221 # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501) 1222 # define BOOST_ASIO_HAS_GETADDRINFO 1 1223 # elif defined(UNDER_CE) 1224 # define BOOST_ASIO_HAS_GETADDRINFO 1 1225 # endif // defined(UNDER_CE) 1226 # elif defined(__MACH__) && defined(__APPLE__) 1227 # if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) 1228 # if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050) 1229 # define BOOST_ASIO_HAS_GETADDRINFO 1 1230 # endif // (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050) 1231 # else // defined(__MAC_OS_X_VERSION_MIN_REQUIRED) 1232 # define BOOST_ASIO_HAS_GETADDRINFO 1 1233 # endif // defined(__MAC_OS_X_VERSION_MIN_REQUIRED) 1234 # else // defined(__MACH__) && defined(__APPLE__) 1235 # define BOOST_ASIO_HAS_GETADDRINFO 1 1236 # endif // defined(__MACH__) && defined(__APPLE__) 1237 # endif // !defined(BOOST_ASIO_DISABLE_GETADDRINFO) 1238 #endif // !defined(BOOST_ASIO_HAS_GETADDRINFO) 1239 1240 // Whether standard iostreams are disabled. 1241 #if !defined(BOOST_ASIO_NO_IOSTREAM) 1242 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_IOSTREAM) 1243 # define BOOST_ASIO_NO_IOSTREAM 1 1244 # endif // !defined(BOOST_NO_IOSTREAM) 1245 #endif // !defined(BOOST_ASIO_NO_IOSTREAM) 1246 1247 // Whether exception handling is disabled. 1248 #if !defined(BOOST_ASIO_NO_EXCEPTIONS) 1249 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_EXCEPTIONS) 1250 # define BOOST_ASIO_NO_EXCEPTIONS 1 1251 # endif // !defined(BOOST_NO_EXCEPTIONS) 1252 #endif // !defined(BOOST_ASIO_NO_EXCEPTIONS) 1253 1254 // Whether the typeid operator is supported. 1255 #if !defined(BOOST_ASIO_NO_TYPEID) 1256 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_TYPEID) 1257 # define BOOST_ASIO_NO_TYPEID 1 1258 # endif // !defined(BOOST_NO_TYPEID) 1259 #endif // !defined(BOOST_ASIO_NO_TYPEID) 1260 1261 // Threads. 1262 #if !defined(BOOST_ASIO_HAS_THREADS) 1263 # if !defined(BOOST_ASIO_DISABLE_THREADS) 1264 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS) 1265 # define BOOST_ASIO_HAS_THREADS 1 1266 # elif defined(__GNUC__) && !defined(__MINGW32__) \ 1267 && !defined(linux) && !defined(__linux) && !defined(__linux__) 1268 # define BOOST_ASIO_HAS_THREADS 1 1269 # elif defined(_MT) || defined(__MT__) 1270 # define BOOST_ASIO_HAS_THREADS 1 1271 # elif defined(_REENTRANT) 1272 # define BOOST_ASIO_HAS_THREADS 1 1273 # elif defined(__APPLE__) 1274 # define BOOST_ASIO_HAS_THREADS 1 1275 # elif defined(__HAIKU__) 1276 # define BOOST_ASIO_HAS_THREADS 1 1277 # elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0) 1278 # define BOOST_ASIO_HAS_THREADS 1 1279 # elif defined(_PTHREADS) 1280 # define BOOST_ASIO_HAS_THREADS 1 1281 # endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS) 1282 # endif // !defined(BOOST_ASIO_DISABLE_THREADS) 1283 #endif // !defined(BOOST_ASIO_HAS_THREADS) 1284 1285 // POSIX threads. 1286 #if !defined(BOOST_ASIO_HAS_PTHREADS) 1287 # if defined(BOOST_ASIO_HAS_THREADS) 1288 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS) 1289 # define BOOST_ASIO_HAS_PTHREADS 1 1290 # elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0) 1291 # define BOOST_ASIO_HAS_PTHREADS 1 1292 # elif defined(__HAIKU__) 1293 # define BOOST_ASIO_HAS_PTHREADS 1 1294 # endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS) 1295 # endif // defined(BOOST_ASIO_HAS_THREADS) 1296 #endif // !defined(BOOST_ASIO_HAS_PTHREADS) 1297 1298 // Helper to prevent macro expansion. 1299 #define BOOST_ASIO_PREVENT_MACRO_SUBSTITUTION 1300 1301 // Helper to define in-class constants. 1302 #if !defined(BOOST_ASIO_STATIC_CONSTANT) 1303 # if !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT) 1304 # define BOOST_ASIO_STATIC_CONSTANT(type, assignment) \ 1305 BOOST_STATIC_CONSTANT(type, assignment) 1306 # else // !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT) 1307 # define BOOST_ASIO_STATIC_CONSTANT(type, assignment) \ 1308 static const type assignment 1309 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT) 1310 #endif // !defined(BOOST_ASIO_STATIC_CONSTANT) 1311 1312 // Boost array library. 1313 #if !defined(BOOST_ASIO_HAS_BOOST_ARRAY) 1314 # if !defined(BOOST_ASIO_DISABLE_BOOST_ARRAY) 1315 # define BOOST_ASIO_HAS_BOOST_ARRAY 1 1316 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_ARRAY) 1317 #endif // !defined(BOOST_ASIO_HAS_BOOST_ARRAY) 1318 1319 // Boost assert macro. 1320 #if !defined(BOOST_ASIO_HAS_BOOST_ASSERT) 1321 # if !defined(BOOST_ASIO_DISABLE_BOOST_ASSERT) 1322 # define BOOST_ASIO_HAS_BOOST_ASSERT 1 1323 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_ASSERT) 1324 #endif // !defined(BOOST_ASIO_HAS_BOOST_ASSERT) 1325 1326 // Boost limits header. 1327 #if !defined(BOOST_ASIO_HAS_BOOST_LIMITS) 1328 # if !defined(BOOST_ASIO_DISABLE_BOOST_LIMITS) 1329 # define BOOST_ASIO_HAS_BOOST_LIMITS 1 1330 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_LIMITS) 1331 #endif // !defined(BOOST_ASIO_HAS_BOOST_LIMITS) 1332 1333 // Boost throw_exception function. 1334 #if !defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION) 1335 # if !defined(BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION) 1336 # define BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION 1 1337 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION) 1338 #endif // !defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION) 1339 1340 // Boost regex library. 1341 #if !defined(BOOST_ASIO_HAS_BOOST_REGEX) 1342 # if !defined(BOOST_ASIO_DISABLE_BOOST_REGEX) 1343 # define BOOST_ASIO_HAS_BOOST_REGEX 1 1344 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_REGEX) 1345 #endif // !defined(BOOST_ASIO_HAS_BOOST_REGEX) 1346 1347 // Boost bind function. 1348 #if !defined(BOOST_ASIO_HAS_BOOST_BIND) 1349 # if !defined(BOOST_ASIO_DISABLE_BOOST_BIND) 1350 # define BOOST_ASIO_HAS_BOOST_BIND 1 1351 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_BIND) 1352 #endif // !defined(BOOST_ASIO_HAS_BOOST_BIND) 1353 1354 // Boost's BOOST_WORKAROUND macro. 1355 #if !defined(BOOST_ASIO_HAS_BOOST_WORKAROUND) 1356 # if !defined(BOOST_ASIO_DISABLE_BOOST_WORKAROUND) 1357 # define BOOST_ASIO_HAS_BOOST_WORKAROUND 1 1358 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_WORKAROUND) 1359 #endif // !defined(BOOST_ASIO_HAS_BOOST_WORKAROUND) 1360 1361 // Microsoft Visual C++'s secure C runtime library. 1362 #if !defined(BOOST_ASIO_HAS_SECURE_RTL) 1363 # if !defined(BOOST_ASIO_DISABLE_SECURE_RTL) 1364 # if defined(BOOST_ASIO_MSVC) \ 1365 && (BOOST_ASIO_MSVC >= 1400) \ 1366 && !defined(UNDER_CE) 1367 # define BOOST_ASIO_HAS_SECURE_RTL 1 1368 # endif // defined(BOOST_ASIO_MSVC) 1369 // && (BOOST_ASIO_MSVC >= 1400) 1370 // && !defined(UNDER_CE) 1371 # endif // !defined(BOOST_ASIO_DISABLE_SECURE_RTL) 1372 #endif // !defined(BOOST_ASIO_HAS_SECURE_RTL) 1373 1374 // Handler hooking. Disabled for ancient Borland C++ and gcc compilers. 1375 #if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS) 1376 # if !defined(BOOST_ASIO_DISABLE_HANDLER_HOOKS) 1377 # if defined(__GNUC__) 1378 # if (__GNUC__ >= 3) 1379 # define BOOST_ASIO_HAS_HANDLER_HOOKS 1 1380 # endif // (__GNUC__ >= 3) 1381 # elif !defined(__BORLANDC__) 1382 # define BOOST_ASIO_HAS_HANDLER_HOOKS 1 1383 # endif // !defined(__BORLANDC__) 1384 # endif // !defined(BOOST_ASIO_DISABLE_HANDLER_HOOKS) 1385 #endif // !defined(BOOST_ASIO_HAS_HANDLER_HOOKS) 1386 1387 // Support for the __thread keyword extension. 1388 #if !defined(BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION) 1389 # if defined(__linux__) 1390 # if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) 1391 # if ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3) 1392 # if !defined(__INTEL_COMPILER) && !defined(__ICL) \ 1393 && !(defined(__clang__) && defined(__ANDROID__)) 1394 # define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1 1395 # define BOOST_ASIO_THREAD_KEYWORD __thread 1396 # elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1100) 1397 # define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1 1398 # endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1100) 1399 // && !(defined(__clang__) && defined(__ANDROID__)) 1400 # endif // ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3) 1401 # endif // defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) 1402 # endif // defined(__linux__) 1403 # if defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_WINDOWS_RUNTIME) 1404 # if (_MSC_VER >= 1700) 1405 # define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1 1406 # define BOOST_ASIO_THREAD_KEYWORD __declspec(thread) 1407 # endif // (_MSC_VER >= 1700) 1408 # endif // defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_WINDOWS_RUNTIME) 1409 #endif // !defined(BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION) 1410 #if !defined(BOOST_ASIO_THREAD_KEYWORD) 1411 # define BOOST_ASIO_THREAD_KEYWORD __thread 1412 #endif // !defined(BOOST_ASIO_THREAD_KEYWORD) 1413 1414 // Support for POSIX ssize_t typedef. 1415 #if !defined(BOOST_ASIO_DISABLE_SSIZE_T) 1416 # if defined(__linux__) \ 1417 || (defined(__MACH__) && defined(__APPLE__)) 1418 # define BOOST_ASIO_HAS_SSIZE_T 1 1419 # endif // defined(__linux__) 1420 // || (defined(__MACH__) && defined(__APPLE__)) 1421 #endif // !defined(BOOST_ASIO_DISABLE_SSIZE_T) 1422 1423 // Helper macros to manage transition away from error_code return values. 1424 #if defined(BOOST_ASIO_NO_DEPRECATED) 1425 # define BOOST_ASIO_SYNC_OP_VOID void 1426 # define BOOST_ASIO_SYNC_OP_VOID_RETURN(e) return 1427 #else // defined(BOOST_ASIO_NO_DEPRECATED) 1428 # define BOOST_ASIO_SYNC_OP_VOID boost::system::error_code 1429 # define BOOST_ASIO_SYNC_OP_VOID_RETURN(e) return e 1430 #endif // defined(BOOST_ASIO_NO_DEPRECATED) 1431 1432 // Newer gcc, clang need special treatment to suppress unused typedef warnings. 1433 #if defined(__clang__) 1434 # if defined(__apple_build_version__) 1435 # if (__clang_major__ >= 7) 1436 # define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__)) 1437 # endif // (__clang_major__ >= 7) 1438 # elif ((__clang_major__ == 3) && (__clang_minor__ >= 6)) \ 1439 || (__clang_major__ > 3) 1440 # define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__)) 1441 # endif // ((__clang_major__ == 3) && (__clang_minor__ >= 6)) 1442 // || (__clang_major__ > 3) 1443 #elif defined(__GNUC__) 1444 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) 1445 # define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__)) 1446 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) 1447 #endif // defined(__GNUC__) 1448 #if !defined(BOOST_ASIO_UNUSED_TYPEDEF) 1449 # define BOOST_ASIO_UNUSED_TYPEDEF 1450 #endif // !defined(BOOST_ASIO_UNUSED_TYPEDEF) 1451 1452 // Some versions of gcc generate spurious warnings about unused variables. 1453 #if defined(__GNUC__) 1454 # if (__GNUC__ >= 4) 1455 # define BOOST_ASIO_UNUSED_VARIABLE __attribute__((__unused__)) 1456 # endif // (__GNUC__ >= 4) 1457 #endif // defined(__GNUC__) 1458 #if !defined(BOOST_ASIO_UNUSED_VARIABLE) 1459 # define BOOST_ASIO_UNUSED_VARIABLE 1460 #endif // !defined(BOOST_ASIO_UNUSED_VARIABLE) 1461 1462 // Support co_await on compilers known to allow it. 1463 #if !defined(BOOST_ASIO_HAS_CO_AWAIT) 1464 # if !defined(BOOST_ASIO_DISABLE_CO_AWAIT) 1465 # if defined(BOOST_ASIO_MSVC) 1466 # if (_MSC_FULL_VER >= 190023506) 1467 # if defined(_RESUMABLE_FUNCTIONS_SUPPORTED) 1468 # define BOOST_ASIO_HAS_CO_AWAIT 1 1469 # endif // defined(_RESUMABLE_FUNCTIONS_SUPPORTED) 1470 # endif // (_MSC_FULL_VER >= 190023506) 1471 # endif // defined(BOOST_ASIO_MSVC) 1472 # endif // !defined(BOOST_ASIO_DISABLE_CO_AWAIT) 1473 # if defined(__clang__) 1474 # if (__cplusplus >= 201703) && (__cpp_coroutines >= 201703) 1475 # if __has_include(<experimental/coroutine>) 1476 # define BOOST_ASIO_HAS_CO_AWAIT 1 1477 # endif // __has_include(<experimental/coroutine>) 1478 # endif // (__cplusplus >= 201703) && (__cpp_coroutines >= 201703) 1479 # endif // defined(__clang__) 1480 #endif // !defined(BOOST_ASIO_HAS_CO_AWAIT) 1481 1482 #endif // BOOST_ASIO_DETAIL_CONFIG_HPP 1483