File indexing completed on 2025-12-16 09:43:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_DETAIL_CONFIG_HPP
0012 #define BOOST_ASIO_DETAIL_CONFIG_HPP
0013
0014 #if defined(BOOST_ASIO_STANDALONE)
0015 # define BOOST_ASIO_DISABLE_BOOST_ALIGN 1
0016 # define BOOST_ASIO_DISABLE_BOOST_ARRAY 1
0017 # define BOOST_ASIO_DISABLE_BOOST_ASSERT 1
0018 # define BOOST_ASIO_DISABLE_BOOST_BIND 1
0019 # define BOOST_ASIO_DISABLE_BOOST_CHRONO 1
0020 # define BOOST_ASIO_DISABLE_BOOST_DATE_TIME 1
0021 # define BOOST_ASIO_DISABLE_BOOST_LIMITS 1
0022 # define BOOST_ASIO_DISABLE_BOOST_REGEX 1
0023 # define BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT 1
0024 # define BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION 1
0025 # define BOOST_ASIO_DISABLE_BOOST_WORKAROUND 1
0026 #else
0027
0028 # include <boost/config.hpp>
0029 # include <boost/version.hpp>
0030 # define BOOST_ASIO_HAS_BOOST_CONFIG 1
0031 #endif
0032
0033
0034
0035
0036 #if !defined(BOOST_ASIO_HEADER_ONLY)
0037 # if !defined(BOOST_ASIO_SEPARATE_COMPILATION)
0038 # if !defined(BOOST_ASIO_DYN_LINK)
0039 # define BOOST_ASIO_HEADER_ONLY 1
0040 # endif
0041 # endif
0042 #endif
0043
0044 #if defined(BOOST_ASIO_HEADER_ONLY)
0045 # define BOOST_ASIO_DECL inline
0046 #else
0047 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__)
0048
0049
0050 # if defined(BOOST_ASIO_DYN_LINK)
0051
0052 # if defined(BOOST_ASIO_SOURCE)
0053 # define BOOST_ASIO_DECL __declspec(dllexport)
0054 # else
0055 # define BOOST_ASIO_DECL __declspec(dllimport)
0056 # endif
0057 # endif
0058 # endif
0059 #endif
0060
0061
0062 #if !defined(BOOST_ASIO_DECL)
0063 # define BOOST_ASIO_DECL
0064 #endif
0065
0066
0067 #define BOOST_ASIO_UNSPECIFIED(e) e
0068
0069
0070 #if !defined(BOOST_ASIO_MSVC)
0071 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
0072 # define BOOST_ASIO_MSVC BOOST_MSVC
0073 # elif defined(_MSC_VER) && (defined(__INTELLISENSE__) \
0074 || (!defined(__MWERKS__) && !defined(__EDG_VERSION__)))
0075 # define BOOST_ASIO_MSVC _MSC_VER
0076 # endif
0077 #endif
0078
0079
0080 #if defined(__clang__)
0081 # if (__cplusplus >= 201103)
0082 # if __has_include(<__config>)
0083 # include <__config>
0084 # if defined(_LIBCPP_VERSION)
0085 # define BOOST_ASIO_HAS_CLANG_LIBCXX 1
0086 # endif
0087 # endif
0088 # endif
0089 #endif
0090
0091
0092 #if defined(__ANDROID__)
0093 # include <android/api-level.h>
0094 #endif
0095
0096
0097 #if !defined(BOOST_ASIO_DISABLE_CXX11_MACROS)
0098 # define BOOST_ASIO_HAS_MOVE 1
0099 # define BOOST_ASIO_MOVE_ARG(type) type&&
0100 # define BOOST_ASIO_MOVE_ARG2(type1, type2) type1, type2&&
0101 # define BOOST_ASIO_NONDEDUCED_MOVE_ARG(type) type&
0102 # define BOOST_ASIO_MOVE_CAST(type) static_cast<type&&>
0103 # define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast<type1, type2&&>
0104 # define BOOST_ASIO_MOVE_OR_LVALUE(type) static_cast<type&&>
0105 # define BOOST_ASIO_MOVE_OR_LVALUE_ARG(type) type&&
0106 # define BOOST_ASIO_MOVE_OR_LVALUE_TYPE(type) type
0107 # define BOOST_ASIO_DELETED = delete
0108 # define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
0109 # define BOOST_ASIO_HAS_CONSTEXPR 1
0110 # define BOOST_ASIO_STATIC_CONSTEXPR(type, assignment) \
0111 static constexpr type assignment
0112 # define BOOST_ASIO_HAS_NOEXCEPT 1
0113 # define BOOST_ASIO_NOEXCEPT noexcept(true)
0114 # define BOOST_ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
0115 # define BOOST_ASIO_NOEXCEPT_IF(c) noexcept(c)
0116 # define BOOST_ASIO_HAS_DECLTYPE 1
0117 # define BOOST_ASIO_AUTO_RETURN_TYPE_PREFIX(t) auto
0118 # define BOOST_ASIO_AUTO_RETURN_TYPE_PREFIX2(t0, t1) auto
0119 # define BOOST_ASIO_AUTO_RETURN_TYPE_PREFIX3(t0, t1, t2) auto
0120 # define BOOST_ASIO_AUTO_RETURN_TYPE_SUFFIX(expr) -> decltype expr
0121 # define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1
0122 # define BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS 1
0123 # define BOOST_ASIO_HAS_ENUM_CLASS 1
0124 # define BOOST_ASIO_HAS_REF_QUALIFIED_FUNCTIONS 1
0125 # define BOOST_ASIO_LVALUE_REF_QUAL &
0126 # define BOOST_ASIO_RVALUE_REF_QUAL &&
0127 # define BOOST_ASIO_HAS_USER_DEFINED_LITERALS 1
0128 # define BOOST_ASIO_HAS_ALIGNOF 1
0129 # define BOOST_ASIO_ALIGNOF(T) alignof(T)
0130 # define BOOST_ASIO_HAS_STD_ALIGN 1
0131 # define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1
0132 # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
0133 # define BOOST_ASIO_HAS_STD_ARRAY 1
0134 # define BOOST_ASIO_HAS_STD_SHARED_PTR 1
0135 # define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1
0136 # define BOOST_ASIO_HAS_STD_ATOMIC 1
0137 # define BOOST_ASIO_HAS_STD_CHRONO 1
0138 # define BOOST_ASIO_HAS_STD_ADDRESSOF 1
0139 # define BOOST_ASIO_HAS_STD_FUNCTION 1
0140 # define BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER 1
0141 # define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1
0142 # define BOOST_ASIO_HAS_NULLPTR 1
0143 # define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1
0144 # define BOOST_ASIO_HAS_CSTDINT 1
0145 # define BOOST_ASIO_HAS_STD_THREAD 1
0146 # define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
0147 # define BOOST_ASIO_HAS_STD_CALL_ONCE 1
0148 # define BOOST_ASIO_HAS_STD_FUTURE 1
0149 # define BOOST_ASIO_HAS_STD_TUPLE 1
0150 # define BOOST_ASIO_HAS_STD_IOSTREAM_MOVE 1
0151 # define BOOST_ASIO_HAS_STD_EXCEPTION_PTR 1
0152 # define BOOST_ASIO_HAS_STD_NESTED_EXCEPTION 1
0153 # define BOOST_ASIO_HAS_STD_HASH 1
0154 #endif
0155
0156
0157 #if !defined(BOOST_ASIO_STATIC_CONSTEXPR_DEFAULT_INIT)
0158 # if defined(__GNUC__)
0159 # if (__GNUC__ >= 8)
0160 # define BOOST_ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
0161 static constexpr const type name{}
0162 # else
0163 # define BOOST_ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
0164 static const type name
0165 # endif
0166 # elif defined(BOOST_ASIO_MSVC)
0167 # define BOOST_ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
0168 static const type name
0169 # else
0170 # define BOOST_ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
0171 static constexpr const type name{}
0172 # endif
0173 #endif
0174
0175
0176 #if !defined(BOOST_ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
0177 # if !defined(BOOST_ASIO_DISABLE_NOEXCEPT_FUNCTION_TYPE)
0178 # if defined(__clang__)
0179 # if (__cplusplus >= 202002)
0180 # define BOOST_ASIO_HAS_NOEXCEPT_FUNCTION_TYPE 1
0181 # endif
0182 # elif defined(__GNUC__)
0183 # if (__cplusplus >= 202002)
0184 # define BOOST_ASIO_HAS_NOEXCEPT_FUNCTION_TYPE 1
0185 # endif
0186 # elif defined(BOOST_ASIO_MSVC)
0187 # if (_MSC_VER >= 1900 && _MSVC_LANG >= 202002)
0188 # define BOOST_ASIO_HAS_NOEXCEPT_FUNCTION_TYPE 1
0189 # endif
0190 # endif
0191 # endif
0192 #endif
0193
0194
0195 #if !defined(BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION)
0196 # if !defined(BOOST_ASIO_DISABLE_RETURN_TYPE_DEDUCTION)
0197 # if defined(__clang__)
0198 # if __has_feature(__cxx_return_type_deduction__)
0199 # define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1
0200 # endif
0201 # elif (__cplusplus >= 201402)
0202 # define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1
0203 # elif defined(__cpp_return_type_deduction)
0204 # if (__cpp_return_type_deduction >= 201304)
0205 # define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1
0206 # endif
0207 # elif defined(BOOST_ASIO_MSVC)
0208 # if (_MSC_VER >= 1900 && _MSVC_LANG >= 201402)
0209 # define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1
0210 # endif
0211 # endif
0212 # endif
0213 #endif
0214
0215
0216 #if !defined(BOOST_ASIO_HAS_CONCEPTS)
0217 # if !defined(BOOST_ASIO_DISABLE_CONCEPTS)
0218 # if defined(__cpp_concepts)
0219 # define BOOST_ASIO_HAS_CONCEPTS 1
0220 # if (__cpp_concepts >= 201707)
0221 # define BOOST_ASIO_CONCEPT concept
0222 # else
0223 # define BOOST_ASIO_CONCEPT concept bool
0224 # endif
0225 # endif
0226 # endif
0227 #endif
0228
0229
0230 #if !defined(BOOST_ASIO_HAS_STD_CONCEPTS)
0231 # if !defined(BOOST_ASIO_DISABLE_STD_CONCEPTS)
0232 # if defined(BOOST_ASIO_HAS_CONCEPTS)
0233 # if (__cpp_lib_concepts >= 202002L)
0234 # define BOOST_ASIO_HAS_STD_CONCEPTS 1
0235 # endif
0236 # endif
0237 # endif
0238 #endif
0239
0240
0241 #if !defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
0242 # if !defined(BOOST_ASIO_DISABLE_VARIABLE_TEMPLATES)
0243 # if defined(__clang__)
0244 # if (__cplusplus >= 201402)
0245 # if __has_feature(__cxx_variable_templates__)
0246 # define BOOST_ASIO_HAS_VARIABLE_TEMPLATES 1
0247 # endif
0248 # endif
0249 # elif defined(__GNUC__) && !defined(__INTEL_COMPILER)
0250 # if (__GNUC__ >= 6)
0251 # if (__cplusplus >= 201402)
0252 # define BOOST_ASIO_HAS_VARIABLE_TEMPLATES 1
0253 # endif
0254 # endif
0255 # endif
0256 # if defined(BOOST_ASIO_MSVC)
0257 # if (_MSC_VER >= 1901)
0258 # define BOOST_ASIO_HAS_VARIABLE_TEMPLATES 1
0259 # endif
0260 # endif
0261 # endif
0262 #endif
0263
0264
0265 #if !defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
0266 # if !defined(BOOST_ASIO_DISABLE_SFINAE_VARIABLE_TEMPLATES)
0267 # if defined(__clang__)
0268 # if (__cplusplus >= 201703)
0269 # if __has_feature(__cxx_variable_templates__)
0270 # define BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES 1
0271 # endif
0272 # endif
0273 # elif defined(__GNUC__)
0274 # if ((__GNUC__ == 8) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 8)
0275 # if (__cplusplus >= 201402)
0276 # define BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES 1
0277 # endif
0278 # endif
0279 # endif
0280 # if defined(BOOST_ASIO_MSVC)
0281 # if (_MSC_VER >= 1901)
0282 # define BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES 1
0283 # endif
0284 # endif
0285 # endif
0286 #endif
0287
0288
0289 #if !defined(BOOST_ASIO_HAS_CONSTANT_EXPRESSION_SFINAE)
0290 # if !defined(BOOST_ASIO_DISABLE_CONSTANT_EXPRESSION_SFINAE)
0291 # if defined(__clang__)
0292 # if (__cplusplus >= 201402)
0293 # define BOOST_ASIO_HAS_CONSTANT_EXPRESSION_SFINAE 1
0294 # endif
0295 # elif defined(__GNUC__) && !defined(__INTEL_COMPILER)
0296 # if (__GNUC__ >= 7)
0297 # if (__cplusplus >= 201402)
0298 # define BOOST_ASIO_HAS_CONSTANT_EXPRESSION_SFINAE 1
0299 # endif
0300 # endif
0301 # endif
0302 # if defined(BOOST_ASIO_MSVC)
0303 # if (_MSC_VER >= 1901)
0304 # define BOOST_ASIO_HAS_CONSTANT_EXPRESSION_SFINAE 1
0305 # endif
0306 # endif
0307 # endif
0308 #endif
0309
0310
0311 #if !defined(BOOST_ASIO_HAS_WORKING_EXPRESSION_SFINAE)
0312 # if !defined(BOOST_ASIO_DISABLE_WORKING_EXPRESSION_SFINAE)
0313 # if !defined(BOOST_ASIO_MSVC) && !defined(__INTEL_COMPILER)
0314 # if (__cplusplus >= 201103)
0315 # define BOOST_ASIO_HAS_WORKING_EXPRESSION_SFINAE 1
0316 # endif
0317 # elif defined(BOOST_ASIO_MSVC) && (_MSC_VER >= 1929)
0318 # if (_MSVC_LANG >= 202000)
0319 # define BOOST_ASIO_HAS_WORKING_EXPRESSION_SFINAE 1
0320 # endif
0321 # endif
0322 # endif
0323 #endif
0324
0325
0326 #if !defined(BOOST_ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
0327 # if !defined(BOOST_ASIO_DISABLE_VARIADIC_LAMBDA_CAPTURES)
0328 # if defined(__GNUC__)
0329 # if (__GNUC__ >= 6)
0330 # define BOOST_ASIO_HAS_VARIADIC_LAMBDA_CAPTURES 1
0331 # endif
0332 # elif defined(BOOST_ASIO_MSVC)
0333 # if (_MSVC_LANG >= 201103)
0334 # define BOOST_ASIO_HAS_VARIADIC_LAMBDA_CAPTURES 1
0335 # endif
0336 # else
0337 # if (__cplusplus >= 201103)
0338 # define BOOST_ASIO_HAS_VARIADIC_LAMBDA_CAPTURES 1
0339 # endif
0340 # endif
0341 # endif
0342 #endif
0343
0344
0345 #if !defined(BOOST_ASIO_HAS_INLINE_VARIABLES)
0346 # if !defined(BOOST_ASIO_DISABLE_INLINE_VARIABLES)
0347 # if (__cplusplus >= 201703) && (__cpp_inline_variables >= 201606)
0348 # define BOOST_ASIO_HAS_INLINE_VARIABLES 1
0349 # define BOOST_ASIO_INLINE_VARIABLE inline
0350 # endif
0351 # endif
0352 #endif
0353 #if !defined(BOOST_ASIO_INLINE_VARIABLE)
0354 # define BOOST_ASIO_INLINE_VARIABLE
0355 #endif
0356
0357
0358 #if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
0359 # define BOOST_ASIO_DEFAULT_ALIGN __STDCPP_DEFAULT_NEW_ALIGNMENT__
0360 #elif defined(__GNUC__)
0361 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
0362 # define BOOST_ASIO_DEFAULT_ALIGN alignof(std::max_align_t)
0363 # else
0364 # define BOOST_ASIO_DEFAULT_ALIGN alignof(max_align_t)
0365 # endif
0366 #else
0367 # define BOOST_ASIO_DEFAULT_ALIGN alignof(std::max_align_t)
0368 #endif
0369
0370
0371 #if !defined(BOOST_ASIO_HAS_STD_ALIGNED_ALLOC)
0372 # if !defined(BOOST_ASIO_DISABLE_STD_ALIGNED_ALLOC)
0373 # if (__cplusplus >= 201703)
0374 # if defined(__clang__)
0375 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
0376 # if (_LIBCPP_STD_VER > 14) && defined(_LIBCPP_HAS_ALIGNED_ALLOC) \
0377 && !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__)
0378 # if defined(__ANDROID__) && (__ANDROID_API__ >= 28)
0379 # define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
0380 # elif defined(__APPLE__)
0381 # if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
0382 # if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
0383 # define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
0384 # endif
0385 # elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
0386 # if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
0387 # define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
0388 # endif
0389 # elif defined(__TV_OS_VERSION_MIN_REQUIRED)
0390 # if (__TV_OS_VERSION_MIN_REQUIRED >= 130000)
0391 # define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
0392 # endif
0393 # elif defined(__WATCH_OS_VERSION_MIN_REQUIRED)
0394 # if (__WATCH_OS_VERSION_MIN_REQUIRED >= 60000)
0395 # define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
0396 # endif
0397 # endif
0398 # else
0399 # define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
0400 # endif
0401 # endif
0402
0403 # elif defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
0404 # define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
0405 # endif
0406 # elif defined(__GNUC__)
0407 # if ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 7)
0408 # if defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
0409 # define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
0410 # endif
0411 # endif
0412 # endif
0413 # endif
0414 # endif
0415 #endif
0416
0417
0418 #if !defined(BOOST_ASIO_HAS_BOOST_CHRONO)
0419 # if !defined(BOOST_ASIO_DISABLE_BOOST_CHRONO)
0420 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 104700)
0421 # define BOOST_ASIO_HAS_BOOST_CHRONO 1
0422 # endif
0423 # endif
0424 #endif
0425
0426
0427 #if !defined(BOOST_ASIO_HAS_CHRONO)
0428 # if defined(BOOST_ASIO_HAS_STD_CHRONO) \
0429 || defined(BOOST_ASIO_HAS_BOOST_CHRONO)
0430 # define BOOST_ASIO_HAS_CHRONO 1
0431 # endif
0432
0433 #endif
0434
0435
0436 #if !defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
0437 # if !defined(BOOST_ASIO_DISABLE_BOOST_DATE_TIME)
0438 # define BOOST_ASIO_HAS_BOOST_DATE_TIME 1
0439 # endif
0440 #endif
0441
0442
0443 #if !defined(BOOST_ASIO_HAS_BOOST_CONTEXT_FIBER)
0444 # if !defined(BOOST_ASIO_DISABLE_BOOST_CONTEXT_FIBER)
0445 # if defined(__clang__)
0446 # if (__cplusplus >= 201103)
0447 # define BOOST_ASIO_HAS_BOOST_CONTEXT_FIBER 1
0448 # endif
0449 # elif defined(__GNUC__)
0450 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
0451 # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
0452 # define BOOST_ASIO_HAS_BOOST_CONTEXT_FIBER 1
0453 # endif
0454 # endif
0455 # endif
0456 # if defined(BOOST_ASIO_MSVC)
0457 # if (_MSVC_LANG >= 201103)
0458 # define BOOST_ASIO_HAS_BOOST_CONTEXT_FIBER 1
0459 # endif
0460 # endif
0461 # endif
0462 #endif
0463
0464
0465 #if !defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
0466 # if !defined(BOOST_ASIO_DISABLE_STD_STRING_VIEW)
0467 # if defined(__clang__)
0468 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
0469 # if (__cplusplus >= 201402)
0470 # if __has_include(<string_view>)
0471 # define BOOST_ASIO_HAS_STD_STRING_VIEW 1
0472 # endif
0473 # endif
0474 # else
0475 # if (__cplusplus >= 201703)
0476 # if __has_include(<string_view>)
0477 # define BOOST_ASIO_HAS_STD_STRING_VIEW 1
0478 # endif
0479 # endif
0480 # endif
0481 # elif defined(__GNUC__)
0482 # if (__GNUC__ >= 7)
0483 # if (__cplusplus >= 201703)
0484 # define BOOST_ASIO_HAS_STD_STRING_VIEW 1
0485 # endif
0486 # endif
0487 # elif defined(BOOST_ASIO_MSVC)
0488 # if (_MSC_VER >= 1910 && _MSVC_LANG >= 201703)
0489 # define BOOST_ASIO_HAS_STD_STRING_VIEW 1
0490 # endif
0491 # endif
0492 # endif
0493 #endif
0494
0495
0496 #if !defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
0497 # if !defined(BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW)
0498 # if defined(__clang__)
0499 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
0500 # if (_LIBCPP_VERSION < 7000)
0501 # if (__cplusplus >= 201402)
0502 # if __has_include(<experimental/string_view>)
0503 # define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
0504 # endif
0505 # endif
0506 # endif
0507 # else
0508 # if (__cplusplus >= 201402)
0509 # if __has_include(<experimental/string_view>)
0510 # define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
0511 # endif
0512 # endif
0513 # endif
0514 # elif defined(__GNUC__)
0515 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
0516 # if (__cplusplus >= 201402)
0517 # define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
0518 # endif
0519 # endif
0520 # endif
0521 # endif
0522 #endif
0523
0524
0525 #if !defined(BOOST_ASIO_HAS_STRING_VIEW)
0526 # if !defined(BOOST_ASIO_DISABLE_STRING_VIEW)
0527 # if defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
0528 # define BOOST_ASIO_HAS_STRING_VIEW 1
0529 # elif defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
0530 # define BOOST_ASIO_HAS_STRING_VIEW 1
0531 # endif
0532 # endif
0533 #endif
0534
0535
0536 #if !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
0537 # if !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT)
0538 # if defined(BOOST_ASIO_MSVC)
0539 # if (_MSC_VER >= 1911 && _MSVC_LANG >= 201703)
0540 # define BOOST_ASIO_HAS_STD_INVOKE_RESULT 1
0541 # endif
0542 # else
0543 # if (__cplusplus >= 201703) && (__cpp_lib_is_invocable >= 201703)
0544 # define BOOST_ASIO_HAS_STD_INVOKE_RESULT 1
0545 # endif
0546 # endif
0547 # endif
0548 #endif
0549
0550
0551 #if !defined(BOOST_ASIO_HAS_STD_ANY)
0552 # if !defined(BOOST_ASIO_DISABLE_STD_ANY)
0553 # if defined(__clang__)
0554 # if (__cplusplus >= 201703)
0555 # if __has_include(<any>)
0556 # define BOOST_ASIO_HAS_STD_ANY 1
0557 # endif
0558 # endif
0559 # elif defined(__GNUC__)
0560 # if (__GNUC__ >= 7)
0561 # if (__cplusplus >= 201703)
0562 # define BOOST_ASIO_HAS_STD_ANY 1
0563 # endif
0564 # endif
0565 # endif
0566 # if defined(BOOST_ASIO_MSVC)
0567 # if (_MSC_VER >= 1910) && (_MSVC_LANG >= 201703)
0568 # define BOOST_ASIO_HAS_STD_ANY 1
0569 # endif
0570 # endif
0571 # endif
0572 #endif
0573
0574
0575 #if !defined(BOOST_ASIO_HAS_STD_VARIANT)
0576 # if !defined(BOOST_ASIO_DISABLE_STD_VARIANT)
0577 # if defined(__clang__)
0578 # if (__cplusplus >= 201703)
0579 # if __has_include(<variant>)
0580 # define BOOST_ASIO_HAS_STD_VARIANT 1
0581 # endif
0582 # endif
0583 # elif defined(__GNUC__)
0584 # if (__GNUC__ >= 7)
0585 # if (__cplusplus >= 201703)
0586 # define BOOST_ASIO_HAS_STD_VARIANT 1
0587 # endif
0588 # endif
0589 # endif
0590 # if defined(BOOST_ASIO_MSVC)
0591 # if (_MSC_VER >= 1910) && (_MSVC_LANG >= 201703)
0592 # define BOOST_ASIO_HAS_STD_VARIANT 1
0593 # endif
0594 # endif
0595 # endif
0596 #endif
0597
0598
0599 #if !defined(BOOST_ASIO_HAS_STD_SOURCE_LOCATION)
0600 # if !defined(BOOST_ASIO_DISABLE_STD_SOURCE_LOCATION)
0601
0602 # endif
0603 #endif
0604
0605
0606 #if !defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
0607 # if !defined(BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_SOURCE_LOCATION)
0608 # if defined(__GNUC__)
0609 # if (__cplusplus >= 201709)
0610 # if __has_include(<experimental/source_location>)
0611 # define BOOST_ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION 1
0612 # endif
0613 # endif
0614 # endif
0615 # endif
0616 #endif
0617
0618
0619 #if !defined(BOOST_ASIO_HAS_SOURCE_LOCATION)
0620 # if !defined(BOOST_ASIO_DISABLE_SOURCE_LOCATION)
0621 # if defined(BOOST_ASIO_HAS_STD_SOURCE_LOCATION)
0622 # define BOOST_ASIO_HAS_SOURCE_LOCATION 1
0623 # elif defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
0624 # define BOOST_ASIO_HAS_SOURCE_LOCATION 1
0625 # endif
0626 # endif
0627 #endif
0628
0629
0630 #if !defined(BOOST_ASIO_HAS_BOOST_SOURCE_LOCATION)
0631 # if !defined(BOOST_ASIO_DISABLE_BOOST_SOURCE_LOCATION)
0632 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 107900)
0633 # define BOOST_ASIO_HAS_BOOST_SOURCE_LOCATION 1
0634 # endif
0635 # endif
0636 #endif
0637
0638
0639 #if defined(BOOST_ASIO_HAS_BOOST_SOURCE_LOCATION)
0640 # define BOOST_ASIO_SOURCE_LOCATION_PARAM \
0641 , const boost::source_location& loc
0642 # define BOOST_ASIO_SOURCE_LOCATION_DEFAULTED_PARAM \
0643 , const boost::source_location& loc = BOOST_CURRENT_LOCATION
0644 # define BOOST_ASIO_SOURCE_LOCATION_ARG , loc
0645 #else
0646 # define BOOST_ASIO_SOURCE_LOCATION_PARAM
0647 # define BOOST_ASIO_SOURCE_LOCATION_DEFAULTED_PARAM
0648 # define BOOST_ASIO_SOURCE_LOCATION_ARG
0649 #endif
0650
0651
0652 #if !defined(BOOST_ASIO_HAS_STD_INDEX_SEQUENCE)
0653 # if !defined(BOOST_ASIO_DISABLE_STD_INDEX_SEQUENCE)
0654 # if defined(__clang__)
0655 # if (__cplusplus >= 201402)
0656 # define BOOST_ASIO_HAS_STD_INDEX_SEQUENCE 1
0657 # endif
0658 # elif defined(__GNUC__)
0659 # if (__GNUC__ >= 7)
0660 # if (__cplusplus >= 201402)
0661 # define BOOST_ASIO_HAS_STD_INDEX_SEQUENCE 1
0662 # endif
0663 # endif
0664 # endif
0665 # if defined(BOOST_ASIO_MSVC)
0666 # if (_MSC_VER >= 1910) && (_MSVC_LANG >= 201402)
0667 # define BOOST_ASIO_HAS_STD_INDEX_SEQUENCE 1
0668 # endif
0669 # endif
0670 # endif
0671 #endif
0672
0673
0674 #if !defined(BOOST_ASIO_WINDOWS_APP)
0675 # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603)
0676 # include <winapifamily.h>
0677 # if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \
0678 || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_TV_TITLE)) \
0679 && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
0680 # define BOOST_ASIO_WINDOWS_APP 1
0681 # endif
0682
0683 # endif
0684 #endif
0685
0686
0687 #if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
0688 # if !defined(BOOST_ASIO_WINDOWS_APP)
0689 # if defined(__cplusplus_winrt)
0690 # include <winapifamily.h>
0691 # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \
0692 && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
0693 # define BOOST_ASIO_WINDOWS_RUNTIME 1
0694 # endif
0695
0696 # endif
0697 # endif
0698 #endif
0699
0700
0701 #if !defined(BOOST_ASIO_WINDOWS)
0702 # if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
0703 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_WINDOWS)
0704 # define BOOST_ASIO_WINDOWS 1
0705 # elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
0706 # define BOOST_ASIO_WINDOWS 1
0707 # elif defined(BOOST_ASIO_WINDOWS_APP)
0708 # define BOOST_ASIO_WINDOWS 1
0709 # endif
0710 # endif
0711 #endif
0712
0713
0714 #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
0715 # if !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS)
0716 # if defined(_MSC_VER) || (defined(__BORLANDC__) && !defined(__clang__))
0717 # pragma message( \
0718 "Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:\n"\
0719 "- add -D_WIN32_WINNT=0x0601 to the compiler command line; or\n"\
0720 "- add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.\n"\
0721 "Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).")
0722 # else
0723 # warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately.
0724 # warning For example, add -D_WIN32_WINNT=0x0601 to the compiler command line.
0725 # warning Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).
0726 # endif
0727 # define _WIN32_WINNT 0x0601
0728 # endif
0729 # if defined(_MSC_VER)
0730 # if defined(_WIN32) && !defined(WIN32)
0731 # if !defined(_WINSOCK2API_)
0732 # define WIN32
0733 # else
0734 # error Please define the macro WIN32 in your compiler options
0735 # endif
0736 # endif
0737 # endif
0738 # if defined(__BORLANDC__)
0739 # if defined(__WIN32__) && !defined(WIN32)
0740 # if !defined(_WINSOCK2API_)
0741 # define WIN32
0742 # else
0743 # error Please define the macro WIN32 in your compiler options
0744 # endif
0745 # endif
0746 # endif
0747 # if defined(__CYGWIN__)
0748 # if !defined(__USE_W32_SOCKETS)
0749 # error You must add -D__USE_W32_SOCKETS to your compiler options.
0750 # endif
0751 # endif
0752 #endif
0753
0754
0755 #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
0756 # if !defined(BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN)
0757 # if !defined(WIN32_LEAN_AND_MEAN)
0758 # define WIN32_LEAN_AND_MEAN
0759 # endif
0760 # endif
0761 #endif
0762
0763
0764 #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
0765 # if !defined(BOOST_ASIO_NO_NOMINMAX)
0766 # if !defined(NOMINMAX)
0767 # define NOMINMAX 1
0768 # endif
0769 # endif
0770 #endif
0771
0772
0773 #if !defined(BOOST_ASIO_HAS_IOCP)
0774 # if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
0775 # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
0776 # if !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP)
0777 # if !defined(BOOST_ASIO_DISABLE_IOCP)
0778 # define BOOST_ASIO_HAS_IOCP 1
0779 # endif
0780 # endif
0781 # endif
0782 # endif
0783 #endif
0784
0785
0786
0787
0788 #if !defined(BOOST_ASIO_HAS_UNISTD_H)
0789 # if !defined(BOOST_ASIO_HAS_BOOST_CONFIG)
0790 # if defined(unix) \
0791 || defined(__unix) \
0792 || defined(_XOPEN_SOURCE) \
0793 || defined(_POSIX_SOURCE) \
0794 || (defined(__MACH__) && defined(__APPLE__)) \
0795 || defined(__FreeBSD__) \
0796 || defined(__NetBSD__) \
0797 || defined(__OpenBSD__) \
0798 || defined(__linux__) \
0799 || defined(__HAIKU__)
0800 # define BOOST_ASIO_HAS_UNISTD_H 1
0801 # endif
0802 # endif
0803 #endif
0804 #if defined(BOOST_ASIO_HAS_UNISTD_H)
0805 # include <unistd.h>
0806 #endif
0807
0808
0809 #if defined(__linux__)
0810 # include <linux/version.h>
0811 # if !defined(BOOST_ASIO_HAS_EPOLL)
0812 # if !defined(BOOST_ASIO_DISABLE_EPOLL)
0813 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,45)
0814 # define BOOST_ASIO_HAS_EPOLL 1
0815 # endif
0816 # endif
0817 # endif
0818 # if !defined(BOOST_ASIO_HAS_EVENTFD)
0819 # if !defined(BOOST_ASIO_DISABLE_EVENTFD)
0820 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
0821 # define BOOST_ASIO_HAS_EVENTFD 1
0822 # endif
0823 # endif
0824 # endif
0825 # if !defined(BOOST_ASIO_HAS_TIMERFD)
0826 # if defined(BOOST_ASIO_HAS_EPOLL)
0827 # if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
0828 # define BOOST_ASIO_HAS_TIMERFD 1
0829 # endif
0830 # endif
0831 # endif
0832 # if defined(BOOST_ASIO_HAS_IO_URING)
0833 # if LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
0834 # error Linux kernel 5.10 or later is required to support io_uring
0835 # endif
0836 # endif
0837 #endif
0838
0839
0840 #if !defined(BOOST_ASIO_HAS_IO_URING_AS_DEFAULT)
0841 # if !defined(BOOST_ASIO_HAS_EPOLL) && defined(BOOST_ASIO_HAS_IO_URING)
0842 # define BOOST_ASIO_HAS_IO_URING_AS_DEFAULT 1
0843 # endif
0844 #endif
0845
0846
0847 #if (defined(__MACH__) && defined(__APPLE__)) \
0848 || defined(__FreeBSD__) \
0849 || defined(__NetBSD__) \
0850 || defined(__OpenBSD__)
0851 # if !defined(BOOST_ASIO_HAS_KQUEUE)
0852 # if !defined(BOOST_ASIO_DISABLE_KQUEUE)
0853 # define BOOST_ASIO_HAS_KQUEUE 1
0854 # endif
0855 # endif
0856 #endif
0857
0858
0859
0860
0861
0862 #if defined(__sun)
0863 # if !defined(BOOST_ASIO_HAS_DEV_POLL)
0864 # if !defined(BOOST_ASIO_DISABLE_DEV_POLL)
0865 # define BOOST_ASIO_HAS_DEV_POLL 1
0866 # endif
0867 # endif
0868 #endif
0869
0870
0871 #if !defined(BOOST_ASIO_HAS_SERIAL_PORT)
0872 # if defined(BOOST_ASIO_HAS_IOCP) \
0873 || !defined(BOOST_ASIO_WINDOWS) \
0874 && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
0875 && !defined(__CYGWIN__)
0876 # if !defined(__SYMBIAN32__)
0877 # if !defined(BOOST_ASIO_DISABLE_SERIAL_PORT)
0878 # define BOOST_ASIO_HAS_SERIAL_PORT 1
0879 # endif
0880 # endif
0881 # endif
0882
0883
0884
0885 #endif
0886
0887
0888 #if !defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
0889 # if !defined(BOOST_ASIO_DISABLE_WINDOWS_STREAM_HANDLE)
0890 # if defined(BOOST_ASIO_HAS_IOCP)
0891 # define BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE 1
0892 # endif
0893 # endif
0894 #endif
0895
0896
0897 #if !defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
0898 # if !defined(BOOST_ASIO_DISABLE_WINDOWS_RANDOM_ACCESS_HANDLE)
0899 # if defined(BOOST_ASIO_HAS_IOCP)
0900 # define BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE 1
0901 # endif
0902 # endif
0903 #endif
0904
0905
0906 #if !defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
0907 # if !defined(BOOST_ASIO_DISABLE_WINDOWS_OBJECT_HANDLE)
0908 # if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
0909 # if !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP)
0910 # define BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE 1
0911 # endif
0912 # endif
0913 # endif
0914 #endif
0915
0916
0917 #if !defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
0918 # if !defined(BOOST_ASIO_DISABLE_WINDOWS_OVERLAPPED_PTR)
0919 # if defined(BOOST_ASIO_HAS_IOCP)
0920 # define BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR 1
0921 # endif
0922 # endif
0923 #endif
0924
0925
0926 #if !defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
0927 # if !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR)
0928 # if !defined(BOOST_ASIO_WINDOWS) \
0929 && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
0930 && !defined(__CYGWIN__)
0931 # define BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR 1
0932 # endif
0933
0934
0935 # endif
0936 #endif
0937
0938
0939 #if !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
0940 # if !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS)
0941 # if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
0942 # define BOOST_ASIO_HAS_LOCAL_SOCKETS 1
0943 # endif
0944 # endif
0945 #endif
0946
0947
0948 #if !defined(BOOST_ASIO_HAS_FILE)
0949 # if !defined(BOOST_ASIO_DISABLE_FILE)
0950 # if defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
0951 # define BOOST_ASIO_HAS_FILE 1
0952 # elif defined(BOOST_ASIO_HAS_IO_URING)
0953 # define BOOST_ASIO_HAS_FILE 1
0954 # endif
0955 # endif
0956 #endif
0957
0958
0959 #if !defined(BOOST_ASIO_HAS_PIPE)
0960 # if defined(BOOST_ASIO_HAS_IOCP) \
0961 || !defined(BOOST_ASIO_WINDOWS) \
0962 && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
0963 && !defined(__CYGWIN__)
0964 # if !defined(__SYMBIAN32__)
0965 # if !defined(BOOST_ASIO_DISABLE_PIPE)
0966 # define BOOST_ASIO_HAS_PIPE 1
0967 # endif
0968 # endif
0969 # endif
0970
0971
0972
0973 #endif
0974
0975
0976 #if !defined(BOOST_ASIO_HAS_SIGACTION)
0977 # if !defined(BOOST_ASIO_DISABLE_SIGACTION)
0978 # if !defined(BOOST_ASIO_WINDOWS) \
0979 && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
0980 && !defined(__CYGWIN__)
0981 # define BOOST_ASIO_HAS_SIGACTION 1
0982 # endif
0983
0984
0985 # endif
0986 #endif
0987
0988
0989 #if !defined(BOOST_ASIO_HAS_SIGNAL)
0990 # if !defined(BOOST_ASIO_DISABLE_SIGNAL)
0991 # if !defined(UNDER_CE)
0992 # define BOOST_ASIO_HAS_SIGNAL 1
0993 # endif
0994 # endif
0995 #endif
0996
0997
0998 #if !defined(BOOST_ASIO_HAS_GETADDRINFO)
0999 # if !defined(BOOST_ASIO_DISABLE_GETADDRINFO)
1000 # if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
1001 # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
1002 # define BOOST_ASIO_HAS_GETADDRINFO 1
1003 # elif defined(UNDER_CE)
1004 # define BOOST_ASIO_HAS_GETADDRINFO 1
1005 # endif
1006 # elif defined(__MACH__) && defined(__APPLE__)
1007 # if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
1008 # if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
1009 # define BOOST_ASIO_HAS_GETADDRINFO 1
1010 # endif
1011 # else
1012 # define BOOST_ASIO_HAS_GETADDRINFO 1
1013 # endif
1014 # else
1015 # define BOOST_ASIO_HAS_GETADDRINFO 1
1016 # endif
1017 # endif
1018 #endif
1019
1020
1021 #if !defined(BOOST_ASIO_NO_IOSTREAM)
1022 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_IOSTREAM)
1023 # define BOOST_ASIO_NO_IOSTREAM 1
1024 # endif
1025 #endif
1026
1027
1028 #if !defined(BOOST_ASIO_NO_EXCEPTIONS)
1029 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_EXCEPTIONS)
1030 # define BOOST_ASIO_NO_EXCEPTIONS 1
1031 # endif
1032 #endif
1033
1034
1035 #if !defined(BOOST_ASIO_NO_TYPEID)
1036 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_TYPEID)
1037 # define BOOST_ASIO_NO_TYPEID 1
1038 # endif
1039 #endif
1040
1041
1042 #if !defined(BOOST_ASIO_HAS_THREADS)
1043 # if !defined(BOOST_ASIO_DISABLE_THREADS)
1044 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS)
1045 # define BOOST_ASIO_HAS_THREADS 1
1046 # elif defined(__GNUC__) && !defined(__MINGW32__) \
1047 && !defined(linux) && !defined(__linux) && !defined(__linux__)
1048 # define BOOST_ASIO_HAS_THREADS 1
1049 # elif defined(_MT) || defined(__MT__)
1050 # define BOOST_ASIO_HAS_THREADS 1
1051 # elif defined(_REENTRANT)
1052 # define BOOST_ASIO_HAS_THREADS 1
1053 # elif defined(__APPLE__)
1054 # define BOOST_ASIO_HAS_THREADS 1
1055 # elif defined(__HAIKU__)
1056 # define BOOST_ASIO_HAS_THREADS 1
1057 # elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0)
1058 # define BOOST_ASIO_HAS_THREADS 1
1059 # elif defined(_PTHREADS)
1060 # define BOOST_ASIO_HAS_THREADS 1
1061 # endif
1062 # endif
1063 #endif
1064
1065
1066 #if !defined(BOOST_ASIO_HAS_PTHREADS)
1067 # if defined(BOOST_ASIO_HAS_THREADS)
1068 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS)
1069 # define BOOST_ASIO_HAS_PTHREADS 1
1070 # elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0)
1071 # define BOOST_ASIO_HAS_PTHREADS 1
1072 # elif defined(__HAIKU__)
1073 # define BOOST_ASIO_HAS_PTHREADS 1
1074 # endif
1075 # endif
1076 #endif
1077
1078
1079 #define BOOST_ASIO_PREVENT_MACRO_SUBSTITUTION
1080
1081
1082 #if !defined(BOOST_ASIO_STATIC_CONSTANT)
1083 # if !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT)
1084 # define BOOST_ASIO_STATIC_CONSTANT(type, assignment) \
1085 BOOST_STATIC_CONSTANT(type, assignment)
1086 # else
1087 # define BOOST_ASIO_STATIC_CONSTANT(type, assignment) \
1088 static const type assignment
1089 # endif
1090 #endif
1091
1092
1093 #if !defined(BOOST_ASIO_HAS_BOOST_ALIGN)
1094 # if !defined(BOOST_ASIO_DISABLE_BOOST_ALIGN)
1095 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105600)
1096 # define BOOST_ASIO_HAS_BOOST_ALIGN 1
1097 # endif
1098 # endif
1099 #endif
1100
1101
1102 #if !defined(BOOST_ASIO_HAS_BOOST_ARRAY)
1103 # if !defined(BOOST_ASIO_DISABLE_BOOST_ARRAY)
1104 # define BOOST_ASIO_HAS_BOOST_ARRAY 1
1105 # endif
1106 #endif
1107
1108
1109 #if !defined(BOOST_ASIO_HAS_BOOST_ASSERT)
1110 # if !defined(BOOST_ASIO_DISABLE_BOOST_ASSERT)
1111 # define BOOST_ASIO_HAS_BOOST_ASSERT 1
1112 # endif
1113 #endif
1114
1115
1116 #if !defined(BOOST_ASIO_HAS_BOOST_LIMITS)
1117 # if !defined(BOOST_ASIO_DISABLE_BOOST_LIMITS)
1118 # define BOOST_ASIO_HAS_BOOST_LIMITS 1
1119 # endif
1120 #endif
1121
1122
1123 #if !defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
1124 # if !defined(BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION)
1125 # define BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION 1
1126 # endif
1127 #endif
1128
1129
1130 #if !defined(BOOST_ASIO_HAS_BOOST_REGEX)
1131 # if !defined(BOOST_ASIO_DISABLE_BOOST_REGEX)
1132 # define BOOST_ASIO_HAS_BOOST_REGEX 1
1133 # endif
1134 #endif
1135
1136
1137 #if !defined(BOOST_ASIO_HAS_BOOST_BIND)
1138 # if !defined(BOOST_ASIO_DISABLE_BOOST_BIND)
1139 # define BOOST_ASIO_HAS_BOOST_BIND 1
1140 # endif
1141 #endif
1142
1143
1144 #if !defined(BOOST_ASIO_HAS_BOOST_WORKAROUND)
1145 # if !defined(BOOST_ASIO_DISABLE_BOOST_WORKAROUND)
1146 # define BOOST_ASIO_HAS_BOOST_WORKAROUND 1
1147 # endif
1148 #endif
1149
1150
1151 #if !defined(BOOST_ASIO_HAS_SECURE_RTL)
1152 # if !defined(BOOST_ASIO_DISABLE_SECURE_RTL)
1153 # if defined(BOOST_ASIO_MSVC) \
1154 && (BOOST_ASIO_MSVC >= 1400) \
1155 && !defined(UNDER_CE)
1156 # define BOOST_ASIO_HAS_SECURE_RTL 1
1157 # endif
1158
1159
1160 # endif
1161 #endif
1162
1163
1164 #if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
1165 # if !defined(BOOST_ASIO_DISABLE_HANDLER_HOOKS)
1166 # if defined(__GNUC__)
1167 # if (__GNUC__ >= 3)
1168 # define BOOST_ASIO_HAS_HANDLER_HOOKS 1
1169 # endif
1170 # elif !defined(__BORLANDC__) || defined(__clang__)
1171 # define BOOST_ASIO_HAS_HANDLER_HOOKS 1
1172 # endif
1173 # endif
1174 #endif
1175
1176
1177 #if !defined(BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
1178 # if defined(__linux__)
1179 # if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
1180 # if ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)
1181 # if !defined(__INTEL_COMPILER) && !defined(__ICL) \
1182 && !(defined(__clang__) && defined(__ANDROID__))
1183 # define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
1184 # define BOOST_ASIO_THREAD_KEYWORD __thread
1185 # elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1100)
1186 # define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
1187 # endif
1188
1189 # endif
1190 # endif
1191 # endif
1192 # if defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_WINDOWS_RUNTIME)
1193 # if (_MSC_VER >= 1700)
1194 # define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
1195 # define BOOST_ASIO_THREAD_KEYWORD __declspec(thread)
1196 # endif
1197 # endif
1198 # if defined(__APPLE__)
1199 # if defined(__clang__)
1200 # if defined(__apple_build_version__)
1201 # define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
1202 # define BOOST_ASIO_THREAD_KEYWORD __thread
1203 # endif
1204 # endif
1205 # endif
1206 # if !defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
1207 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG)
1208 # if !defined(BOOST_NO_CXX11_THREAD_LOCAL)
1209 # define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
1210 # define BOOST_ASIO_THREAD_KEYWORD thread_local
1211 # endif
1212 # endif
1213 # endif
1214 #endif
1215 #if !defined(BOOST_ASIO_THREAD_KEYWORD)
1216 # define BOOST_ASIO_THREAD_KEYWORD __thread
1217 #endif
1218
1219
1220 #if !defined(BOOST_ASIO_DISABLE_SSIZE_T)
1221 # if defined(__linux__) \
1222 || (defined(__MACH__) && defined(__APPLE__))
1223 # define BOOST_ASIO_HAS_SSIZE_T 1
1224 # endif
1225
1226 #endif
1227
1228
1229 #if defined(BOOST_ASIO_NO_DEPRECATED)
1230 # define BOOST_ASIO_SYNC_OP_VOID void
1231 # define BOOST_ASIO_SYNC_OP_VOID_RETURN(e) return
1232 #else
1233 # define BOOST_ASIO_SYNC_OP_VOID boost::system::error_code
1234 # define BOOST_ASIO_SYNC_OP_VOID_RETURN(e) return e
1235 #endif
1236
1237
1238 #if defined(__clang__)
1239 # if defined(__apple_build_version__)
1240 # if (__clang_major__ >= 7)
1241 # define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
1242 # endif
1243 # elif ((__clang_major__ == 3) && (__clang_minor__ >= 6)) \
1244 || (__clang_major__ > 3)
1245 # define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
1246 # endif
1247
1248 #elif defined(__GNUC__)
1249 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
1250 # define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
1251 # endif
1252 #endif
1253 #if !defined(BOOST_ASIO_UNUSED_TYPEDEF)
1254 # define BOOST_ASIO_UNUSED_TYPEDEF
1255 #endif
1256
1257
1258 #if defined(__GNUC__)
1259 # if (__GNUC__ >= 4)
1260 # define BOOST_ASIO_UNUSED_VARIABLE __attribute__((__unused__))
1261 # endif
1262 #endif
1263 #if !defined(BOOST_ASIO_UNUSED_VARIABLE)
1264 # define BOOST_ASIO_UNUSED_VARIABLE
1265 #endif
1266
1267
1268 #if defined(BOOST_ASIO_MSVC)
1269 # define BOOST_ASIO_ASSUME(expr) __assume(expr)
1270 #elif defined(__clang__)
1271 # if __has_builtin(__builtin_assume)
1272 # define BOOST_ASIO_ASSUME(expr) __builtin_assume(expr)
1273 # endif
1274 #elif defined(__GNUC__)
1275 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
1276 # define BOOST_ASIO_ASSUME(expr) if (expr) {} else { __builtin_unreachable(); }
1277 # endif
1278 #endif
1279 #if !defined(BOOST_ASIO_ASSUME)
1280 # define BOOST_ASIO_ASSUME(expr) (void)0
1281 #endif
1282
1283
1284 #if !defined(BOOST_ASIO_HAS_CO_AWAIT)
1285 # if !defined(BOOST_ASIO_DISABLE_CO_AWAIT)
1286 # if (__cplusplus >= 202002) \
1287 && (__cpp_impl_coroutine >= 201902) && (__cpp_lib_coroutine >= 201902)
1288 # define BOOST_ASIO_HAS_CO_AWAIT 1
1289 # elif defined(BOOST_ASIO_MSVC)
1290 # if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) && !defined(__clang__)
1291 # define BOOST_ASIO_HAS_CO_AWAIT 1
1292 # elif (_MSC_FULL_VER >= 190023506)
1293 # if defined(_RESUMABLE_FUNCTIONS_SUPPORTED)
1294 # define BOOST_ASIO_HAS_CO_AWAIT 1
1295 # endif
1296 # endif
1297 # elif defined(__clang__)
1298 # if (__clang_major__ >= 14)
1299 # if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)
1300 # if __has_include(<coroutine>)
1301 # define BOOST_ASIO_HAS_CO_AWAIT 1
1302 # endif
1303 # elif (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)
1304 # if __has_include(<experimental/coroutine>)
1305 # define BOOST_ASIO_HAS_CO_AWAIT 1
1306 # endif
1307 # endif
1308 # else
1309 # if (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)
1310 # if __has_include(<experimental/coroutine>)
1311 # define BOOST_ASIO_HAS_CO_AWAIT 1
1312 # endif
1313 # endif
1314 # endif
1315 # elif defined(__GNUC__)
1316 # if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902)
1317 # if __has_include(<coroutine>)
1318 # define BOOST_ASIO_HAS_CO_AWAIT 1
1319 # endif
1320 # endif
1321 # endif
1322 # endif
1323 #endif
1324
1325
1326 #if !defined(BOOST_ASIO_HAS_STD_COROUTINE)
1327 # if !defined(BOOST_ASIO_DISABLE_STD_COROUTINE)
1328 # if defined(BOOST_ASIO_MSVC)
1329 # if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705)
1330 # define BOOST_ASIO_HAS_STD_COROUTINE 1
1331 # endif
1332 # elif defined(__clang__)
1333 # if (__clang_major__ >= 14)
1334 # if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)
1335 # if __has_include(<coroutine>)
1336 # define BOOST_ASIO_HAS_STD_COROUTINE 1
1337 # endif
1338 # endif
1339 # endif
1340 # elif defined(__GNUC__)
1341 # if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902)
1342 # if __has_include(<coroutine>)
1343 # define BOOST_ASIO_HAS_STD_COROUTINE 1
1344 # endif
1345 # endif
1346 # endif
1347 # endif
1348 #endif
1349
1350
1351 #if !defined(BOOST_ASIO_NODISCARD)
1352 # if defined(__has_cpp_attribute)
1353 # if __has_cpp_attribute(nodiscard)
1354 # if (__cplusplus >= 201703)
1355 # define BOOST_ASIO_NODISCARD [[nodiscard]]
1356 # endif
1357 # endif
1358 # endif
1359 #endif
1360 #if !defined(BOOST_ASIO_NODISCARD)
1361 # define BOOST_ASIO_NODISCARD
1362 #endif
1363
1364
1365 #if !defined(BOOST_ASIO_HAS_MSG_NOSIGNAL)
1366 # if defined(__linux__)
1367 # define BOOST_ASIO_HAS_MSG_NOSIGNAL 1
1368 # elif defined(_POSIX_VERSION)
1369 # if (_POSIX_VERSION >= 200809L)
1370 # define BOOST_ASIO_HAS_MSG_NOSIGNAL 1
1371 # endif
1372 # endif
1373 #endif
1374
1375
1376 #if !defined(BOOST_ASIO_HAS_STD_TO_ADDRESS)
1377 # if !defined(BOOST_ASIO_DISABLE_STD_TO_ADDRESS)
1378 # if defined(__clang__)
1379 # if (__cplusplus >= 202002)
1380 # define BOOST_ASIO_HAS_STD_TO_ADDRESS 1
1381 # endif
1382 # elif defined(__GNUC__)
1383 # if (__GNUC__ >= 8)
1384 # if (__cplusplus >= 202002)
1385 # define BOOST_ASIO_HAS_STD_TO_ADDRESS 1
1386 # endif
1387 # endif
1388 # endif
1389 # if defined(BOOST_ASIO_MSVC)
1390 # if (_MSC_VER >= 1922) && (_MSVC_LANG >= 202002)
1391 # define BOOST_ASIO_HAS_STD_TO_ADDRESS 1
1392 # endif
1393 # endif
1394 # endif
1395 #endif
1396
1397
1398 #if !defined(BOOST_ASIO_HAS_SNPRINTF)
1399 # if !defined(BOOST_ASIO_DISABLE_SNPRINTF)
1400 # if defined(__APPLE__)
1401 # define BOOST_ASIO_HAS_SNPRINTF 1
1402 # endif
1403 # endif
1404 #endif
1405
1406 #endif