Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:43:04

0001 //
0002 // detail/config.hpp
0003 // ~~~~~~~~~~~~~~~~~
0004 //
0005 // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com)
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
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 // defined(BOOST_ASIO_STANDALONE)
0027 // Boost.Config library is available.
0028 # include <boost/config.hpp>
0029 # include <boost/version.hpp>
0030 # define BOOST_ASIO_HAS_BOOST_CONFIG 1
0031 #endif // defined(BOOST_ASIO_STANDALONE)
0032 
0033 // Default to a header-only implementation. The user must specifically request
0034 // separate compilation by defining either BOOST_ASIO_SEPARATE_COMPILATION or
0035 // BOOST_ASIO_DYN_LINK (as a DLL/shared library implies separate compilation).
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 // !defined(BOOST_ASIO_DYN_LINK)
0041 # endif // !defined(BOOST_ASIO_SEPARATE_COMPILATION)
0042 #endif // !defined(BOOST_ASIO_HEADER_ONLY)
0043 
0044 #if defined(BOOST_ASIO_HEADER_ONLY)
0045 # define BOOST_ASIO_DECL inline
0046 #else // defined(BOOST_ASIO_HEADER_ONLY)
0047 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__)
0048 // We need to import/export our code only if the user has specifically asked
0049 // for it by defining BOOST_ASIO_DYN_LINK.
0050 #  if defined(BOOST_ASIO_DYN_LINK)
0051 // Export if this is our own source, otherwise import.
0052 #   if defined(BOOST_ASIO_SOURCE)
0053 #    define BOOST_ASIO_DECL __declspec(dllexport)
0054 #   else // defined(BOOST_ASIO_SOURCE)
0055 #    define BOOST_ASIO_DECL __declspec(dllimport)
0056 #   endif // defined(BOOST_ASIO_SOURCE)
0057 #  endif // defined(BOOST_ASIO_DYN_LINK)
0058 # endif // defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__)
0059 #endif // defined(BOOST_ASIO_HEADER_ONLY)
0060 
0061 // If BOOST_ASIO_DECL isn't defined yet define it now.
0062 #if !defined(BOOST_ASIO_DECL)
0063 # define BOOST_ASIO_DECL
0064 #endif // !defined(BOOST_ASIO_DECL)
0065 
0066 // Helper macro for documentation.
0067 #define BOOST_ASIO_UNSPECIFIED(e) e
0068 
0069 // Microsoft Visual C++ detection.
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 // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
0077 #endif // !defined(BOOST_ASIO_MSVC)
0078 
0079 // Clang / libc++ detection.
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 // defined(_LIBCPP_VERSION)
0087 #  endif // __has_include(<__config>)
0088 # endif // (__cplusplus >= 201103)
0089 #endif // defined(__clang__)
0090 
0091 // Android platform detection.
0092 #if defined(__ANDROID__)
0093 # include <android/api-level.h>
0094 #endif // defined(__ANDROID__)
0095 
0096 // Always enabled. Retained for backwards compatibility in user code.
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 // !defined(BOOST_ASIO_DISABLE_CXX11_MACROS)
0155 
0156 // Support for static constexpr with default initialisation.
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 // (__GNUC__ >= 8)
0163 #   define BOOST_ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
0164      static const type name
0165 #  endif // (__GNUC__ >= 8)
0166 # elif defined(BOOST_ASIO_MSVC)
0167 #  define BOOST_ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
0168     static const type name
0169 # else // defined(BOOST_ASIO_MSVC)
0170 #  define BOOST_ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
0171     static constexpr const type name{}
0172 # endif // defined(BOOST_ASIO_MSVC)
0173 #endif // !defined(BOOST_ASIO_STATIC_CONSTEXPR_DEFAULT_INIT)
0174 
0175 // Support noexcept on function types on compilers known to allow it.
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 // (__cplusplus >= 202002)
0182 #  elif defined(__GNUC__)
0183 #   if (__cplusplus >= 202002)
0184 #    define BOOST_ASIO_HAS_NOEXCEPT_FUNCTION_TYPE 1
0185 #   endif // (__cplusplus >= 202002)
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 // (_MSC_VER >= 1900 && _MSVC_LANG >= 202002)
0190 #  endif // defined(BOOST_ASIO_MSVC)
0191 # endif // !defined(BOOST_ASIO_DISABLE_NOEXCEPT_FUNCTION_TYPE)
0192 #endif // !defined(BOOST_ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
0193 
0194 // Support return type deduction on compilers known to allow it.
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 // __has_feature(__cxx_return_type_deduction__)
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 // (__cpp_return_type_deduction >= 201304)
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 // (_MSC_VER >= 1900 && _MSVC_LANG >= 201402)
0211 #  endif // defined(BOOST_ASIO_MSVC)
0212 # endif // !defined(BOOST_ASIO_DISABLE_RETURN_TYPE_DEDUCTION)
0213 #endif // !defined(BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION)
0214 
0215 // Support concepts on compilers known to allow them.
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 // (__cpp_concepts >= 201707)
0223 #    define BOOST_ASIO_CONCEPT concept bool
0224 #   endif // (__cpp_concepts >= 201707)
0225 #  endif // defined(__cpp_concepts)
0226 # endif // !defined(BOOST_ASIO_DISABLE_CONCEPTS)
0227 #endif // !defined(BOOST_ASIO_HAS_CONCEPTS)
0228 
0229 // Support concepts on compilers known to allow them.
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 // (__cpp_concepts >= 202002L)
0236 #  endif // defined(BOOST_ASIO_HAS_CONCEPTS)
0237 # endif // !defined(BOOST_ASIO_DISABLE_STD_CONCEPTS)
0238 #endif // !defined(BOOST_ASIO_HAS_STD_CONCEPTS)
0239 
0240 // Support template variables on compilers known to allow it.
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 // __has_feature(__cxx_variable_templates__)
0248 #   endif // (__cplusplus >= 201402)
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 // (__cplusplus >= 201402)
0254 #   endif // (__GNUC__ >= 6)
0255 #  endif // defined(__GNUC__) && !defined(__INTEL_COMPILER)
0256 #  if defined(BOOST_ASIO_MSVC)
0257 #   if (_MSC_VER >= 1901)
0258 #    define BOOST_ASIO_HAS_VARIABLE_TEMPLATES 1
0259 #   endif // (_MSC_VER >= 1901)
0260 #  endif // defined(BOOST_ASIO_MSVC)
0261 # endif // !defined(BOOST_ASIO_DISABLE_VARIABLE_TEMPLATES)
0262 #endif // !defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
0263 
0264 // Support SFINAEd template variables on compilers known to allow it.
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 // __has_feature(__cxx_variable_templates__)
0272 #   endif // (__cplusplus >= 201703)
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 // (__cplusplus >= 201402)
0278 #   endif // ((__GNUC__ == 8) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 8)
0279 #  endif // defined(__GNUC__)
0280 #  if defined(BOOST_ASIO_MSVC)
0281 #   if (_MSC_VER >= 1901)
0282 #    define BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES 1
0283 #   endif // (_MSC_VER >= 1901)
0284 #  endif // defined(BOOST_ASIO_MSVC)
0285 # endif // !defined(BOOST_ASIO_DISABLE_SFINAE_VARIABLE_TEMPLATES)
0286 #endif // !defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
0287 
0288 // Support SFINAE use of constant expressions on compilers known to allow it.
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 // (__cplusplus >= 201402)
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 // (__cplusplus >= 201402)
0300 #   endif // (__GNUC__ >= 7)
0301 #  endif // defined(__GNUC__) && !defined(__INTEL_COMPILER)
0302 #  if defined(BOOST_ASIO_MSVC)
0303 #   if (_MSC_VER >= 1901)
0304 #    define BOOST_ASIO_HAS_CONSTANT_EXPRESSION_SFINAE 1
0305 #   endif // (_MSC_VER >= 1901)
0306 #  endif // defined(BOOST_ASIO_MSVC)
0307 # endif // !defined(BOOST_ASIO_DISABLE_CONSTANT_EXPRESSION_SFINAE)
0308 #endif // !defined(BOOST_ASIO_HAS_CONSTANT_EXPRESSION_SFINAE)
0309 
0310 // Enable workarounds for lack of working expression SFINAE.
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 // (__cplusplus >= 201103)
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 // (_MSVC_LANG >= 202000)
0321 #  endif // defined(BOOST_ASIO_MSVC) && (_MSC_VER >= 1929)
0322 # endif // !defined(BOOST_ASIO_DISABLE_WORKING_EXPRESSION_SFINAE)
0323 #endif // !defined(BOOST_ASIO_HAS_WORKING_EXPRESSION_SFINAE)
0324 
0325 // Support for capturing parameter packs in lambdas.
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 // (__GNUC__ >= 6)
0332 #  elif defined(BOOST_ASIO_MSVC)
0333 #   if (_MSVC_LANG >= 201103)
0334 #    define BOOST_ASIO_HAS_VARIADIC_LAMBDA_CAPTURES 1
0335 #   endif // (_MSC_LANG >= 201103)
0336 #  else // defined(BOOST_ASIO_MSVC)
0337 #   if (__cplusplus >= 201103)
0338 #    define BOOST_ASIO_HAS_VARIADIC_LAMBDA_CAPTURES 1
0339 #   endif // (__cplusplus >= 201103)
0340 #  endif // defined(BOOST_ASIO_MSVC)
0341 # endif // !defined(BOOST_ASIO_DISABLE_VARIADIC_LAMBDA_CAPTURES)
0342 #endif // !defined(BOOST_ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
0343 
0344 // Support for inline variables.
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 // (__cplusplus >= 201703) && (__cpp_inline_variables >= 201606)
0351 # endif // !defined(BOOST_ASIO_DISABLE_INLINE_VARIABLES)
0352 #endif // !defined(BOOST_ASIO_HAS_INLINE_VARIABLES)
0353 #if !defined(BOOST_ASIO_INLINE_VARIABLE)
0354 # define BOOST_ASIO_INLINE_VARIABLE
0355 #endif // !defined(BOOST_ASIO_INLINE_VARIABLE)
0356 
0357 // Default alignment.
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 // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
0364 #  define BOOST_ASIO_DEFAULT_ALIGN alignof(max_align_t)
0365 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
0366 #else // defined(__GNUC__)
0367 # define BOOST_ASIO_DEFAULT_ALIGN alignof(std::max_align_t)
0368 #endif // defined(__GNUC__)
0369 
0370 // Standard library support for aligned allocation.
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 // (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
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 // (__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
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 // (__TV_OS_VERSION_MIN_REQUIRED >= 130000)
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 // (__WATCH_OS_VERSION_MIN_REQUIRED >= 60000)
0397 #       endif // defined(__WATCH_OS_X_VERSION_MIN_REQUIRED)
0398 #      else // defined(__APPLE__)
0399 #       define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
0400 #      endif // defined(__APPLE__)
0401 #     endif // (_LIBCPP_STD_VER > 14) && defined(_LIBCPP_HAS_ALIGNED_ALLOC)
0402             //   && !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__)
0403 #    elif defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
0404 #     define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
0405 #    endif // defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
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 // defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
0411 #    endif // ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 7)
0412 #   endif // defined(__GNUC__)
0413 #  endif // (__cplusplus >= 201703)
0414 # endif // !defined(BOOST_ASIO_DISABLE_STD_ALIGNED_ALLOC)
0415 #endif // !defined(BOOST_ASIO_HAS_STD_ALIGNED_ALLOC)
0416 
0417 // Boost support for chrono.
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 // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 104700)
0423 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_CHRONO)
0424 #endif // !defined(BOOST_ASIO_HAS_BOOST_CHRONO)
0425 
0426 // Some form of chrono library is available.
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 // defined(BOOST_ASIO_HAS_STD_CHRONO)
0432         // || defined(BOOST_ASIO_HAS_BOOST_CHRONO)
0433 #endif // !defined(BOOST_ASIO_HAS_CHRONO)
0434 
0435 // Boost support for the DateTime library.
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 // !defined(BOOST_ASIO_DISABLE_BOOST_DATE_TIME)
0440 #endif // !defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
0441 
0442 // Boost support for the Context library's fibers.
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 // (__cplusplus >= 201103)
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 // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
0454 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
0455 #  endif // defined(__GNUC__)
0456 #  if defined(BOOST_ASIO_MSVC)
0457 #   if (_MSVC_LANG >= 201103)
0458 #    define BOOST_ASIO_HAS_BOOST_CONTEXT_FIBER 1
0459 #   endif // (_MSC_LANG >= 201103)
0460 #  endif // defined(BOOST_ASIO_MSVC)
0461 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_CONTEXT_FIBER)
0462 #endif // !defined(BOOST_ASIO_HAS_BOOST_CONTEXT_FIBER)
0463 
0464 // Standard library support for std::string_view.
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 // __has_include(<string_view>)
0473 #    endif // (__cplusplus >= 201402)
0474 #   else // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
0475 #    if (__cplusplus >= 201703)
0476 #     if __has_include(<string_view>)
0477 #      define BOOST_ASIO_HAS_STD_STRING_VIEW 1
0478 #     endif // __has_include(<string_view>)
0479 #    endif // (__cplusplus >= 201703)
0480 #   endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
0481 #  elif defined(__GNUC__)
0482 #   if (__GNUC__ >= 7)
0483 #    if (__cplusplus >= 201703)
0484 #     define BOOST_ASIO_HAS_STD_STRING_VIEW 1
0485 #    endif // (__cplusplus >= 201703)
0486 #   endif // (__GNUC__ >= 7)
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 // (_MSC_VER >= 1910 && _MSVC_LANG >= 201703)
0491 #  endif // defined(BOOST_ASIO_MSVC)
0492 # endif // !defined(BOOST_ASIO_DISABLE_STD_STRING_VIEW)
0493 #endif // !defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
0494 
0495 // Standard library support for std::experimental::string_view.
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 // __has_include(<experimental/string_view>)
0505 #     endif // (__cplusplus >= 201402)
0506 #    endif // (_LIBCPP_VERSION < 7000)
0507 #   else // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
0508 #    if (__cplusplus >= 201402)
0509 #     if __has_include(<experimental/string_view>)
0510 #      define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
0511 #     endif // __has_include(<experimental/string_view>)
0512 #    endif // (__cplusplus >= 201402)
0513 #   endif // // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
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 // (__cplusplus >= 201402)
0519 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
0520 #  endif // defined(__GNUC__)
0521 # endif // !defined(BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW)
0522 #endif // !defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
0523 
0524 // Standard library has a string_view that we can use.
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 // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
0532 # endif // !defined(BOOST_ASIO_DISABLE_STRING_VIEW)
0533 #endif // !defined(BOOST_ASIO_HAS_STRING_VIEW)
0534 
0535 // Standard library has invoke_result (which supersedes result_of).
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 // (_MSC_VER >= 1911 && _MSVC_LANG >= 201703)
0542 #  else // defined(BOOST_ASIO_MSVC)
0543 #   if (__cplusplus >= 201703) && (__cpp_lib_is_invocable >= 201703)
0544 #    define BOOST_ASIO_HAS_STD_INVOKE_RESULT 1
0545 #   endif // (__cplusplus >= 201703) && (__cpp_lib_is_invocable >= 201703)
0546 #  endif // defined(BOOST_ASIO_MSVC)
0547 # endif // !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT)
0548 #endif // !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
0549 
0550 // Standard library support for std::any.
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 // __has_include(<any>)
0558 #   endif // (__cplusplus >= 201703)
0559 #  elif defined(__GNUC__)
0560 #   if (__GNUC__ >= 7)
0561 #    if (__cplusplus >= 201703)
0562 #     define BOOST_ASIO_HAS_STD_ANY 1
0563 #    endif // (__cplusplus >= 201703)
0564 #   endif // (__GNUC__ >= 7)
0565 #  endif // defined(__GNUC__)
0566 #  if defined(BOOST_ASIO_MSVC)
0567 #   if (_MSC_VER >= 1910) && (_MSVC_LANG >= 201703)
0568 #    define BOOST_ASIO_HAS_STD_ANY 1
0569 #   endif // (_MSC_VER >= 1910) && (_MSVC_LANG >= 201703)
0570 #  endif // defined(BOOST_ASIO_MSVC)
0571 # endif // !defined(BOOST_ASIO_DISABLE_STD_ANY)
0572 #endif // !defined(BOOST_ASIO_HAS_STD_ANY)
0573 
0574 // Standard library support for std::variant.
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 // __has_include(<variant>)
0582 #   endif // (__cplusplus >= 201703)
0583 #  elif defined(__GNUC__)
0584 #   if (__GNUC__ >= 7)
0585 #    if (__cplusplus >= 201703)
0586 #     define BOOST_ASIO_HAS_STD_VARIANT 1
0587 #    endif // (__cplusplus >= 201703)
0588 #   endif // (__GNUC__ >= 7)
0589 #  endif // defined(__GNUC__)
0590 #  if defined(BOOST_ASIO_MSVC)
0591 #   if (_MSC_VER >= 1910) && (_MSVC_LANG >= 201703)
0592 #    define BOOST_ASIO_HAS_STD_VARIANT 1
0593 #   endif // (_MSC_VER >= 1910) && (_MSVC_LANG >= 201703)
0594 #  endif // defined(BOOST_ASIO_MSVC)
0595 # endif // !defined(BOOST_ASIO_DISABLE_STD_VARIANT)
0596 #endif // !defined(BOOST_ASIO_HAS_STD_VARIANT)
0597 
0598 // Standard library support for std::source_location.
0599 #if !defined(BOOST_ASIO_HAS_STD_SOURCE_LOCATION)
0600 # if !defined(BOOST_ASIO_DISABLE_STD_SOURCE_LOCATION)
0601 // ...
0602 # endif // !defined(BOOST_ASIO_DISABLE_STD_SOURCE_LOCATION)
0603 #endif // !defined(BOOST_ASIO_HAS_STD_SOURCE_LOCATION)
0604 
0605 // Standard library support for std::experimental::source_location.
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 // __has_include(<experimental/source_location>)
0613 #   endif // (__cplusplus >= 201709)
0614 #  endif // defined(__GNUC__)
0615 # endif // !defined(BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_SOURCE_LOCATION)
0616 #endif // !defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
0617 
0618 // Standard library has a source_location that we can use.
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 // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
0626 # endif // !defined(BOOST_ASIO_DISABLE_SOURCE_LOCATION)
0627 #endif // !defined(BOOST_ASIO_HAS_SOURCE_LOCATION)
0628 
0629 // Boost support for source_location and system errors.
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 // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 107900)
0635 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_SOURCE_LOCATION)
0636 #endif // !defined(BOOST_ASIO_HAS_BOOST_SOURCE_LOCATION)
0637 
0638 // Helper macros for working with Boost source locations.
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 // if defined(BOOST_ASIO_HAS_BOOST_SOURCE_LOCATION)
0646 # define BOOST_ASIO_SOURCE_LOCATION_PARAM
0647 # define BOOST_ASIO_SOURCE_LOCATION_DEFAULTED_PARAM
0648 # define BOOST_ASIO_SOURCE_LOCATION_ARG
0649 #endif // if defined(BOOST_ASIO_HAS_BOOST_SOURCE_LOCATION)
0650 
0651 // Standard library support for std::index_sequence.
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 // (__cplusplus >= 201402)
0658 #  elif defined(__GNUC__)
0659 #   if (__GNUC__ >= 7)
0660 #    if (__cplusplus >= 201402)
0661 #     define BOOST_ASIO_HAS_STD_INDEX_SEQUENCE 1
0662 #    endif // (__cplusplus >= 201402)
0663 #   endif // (__GNUC__ >= 7)
0664 #  endif // defined(__GNUC__)
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 // (_MSC_VER >= 1910) && (_MSVC_LANG >= 201402)
0669 #  endif // defined(BOOST_ASIO_MSVC)
0670 # endif // !defined(BOOST_ASIO_DISABLE_STD_INDEX_SEQUENCE)
0671 #endif // !defined(BOOST_ASIO_HAS_STD_INDEX_SEQUENCE)
0672 
0673 // Windows App target. Windows but with a limited API.
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 // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
0682          // && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
0683 # endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603)
0684 #endif // !defined(BOOST_ASIO_WINDOWS_APP)
0685 
0686 // Legacy WinRT target. Windows App is preferred.
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 // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
0695           // && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
0696 #  endif // defined(__cplusplus_winrt)
0697 # endif // !defined(BOOST_ASIO_WINDOWS_APP)
0698 #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
0699 
0700 // Windows target. Excludes WinRT but includes Windows App targets.
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 // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_WINDOWS)
0710 # endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
0711 #endif // !defined(BOOST_ASIO_WINDOWS)
0712 
0713 // Windows: target OS version.
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 // defined(_MSC_VER) || (defined(__BORLANDC__) && !defined(__clang__))
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 // defined(_MSC_VER) || (defined(__BORLANDC__) && !defined(__clang__))
0727 #  define _WIN32_WINNT 0x0601
0728 # endif // !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS)
0729 # if defined(_MSC_VER)
0730 #  if defined(_WIN32) && !defined(WIN32)
0731 #   if !defined(_WINSOCK2API_)
0732 #    define WIN32 // Needed for correct types in winsock2.h
0733 #   else // !defined(_WINSOCK2API_)
0734 #    error Please define the macro WIN32 in your compiler options
0735 #   endif // !defined(_WINSOCK2API_)
0736 #  endif // defined(_WIN32) && !defined(WIN32)
0737 # endif // defined(_MSC_VER)
0738 # if defined(__BORLANDC__)
0739 #  if defined(__WIN32__) && !defined(WIN32)
0740 #   if !defined(_WINSOCK2API_)
0741 #    define WIN32 // Needed for correct types in winsock2.h
0742 #   else // !defined(_WINSOCK2API_)
0743 #    error Please define the macro WIN32 in your compiler options
0744 #   endif // !defined(_WINSOCK2API_)
0745 #  endif // defined(__WIN32__) && !defined(WIN32)
0746 # endif // defined(__BORLANDC__)
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 // !defined(__USE_W32_SOCKETS)
0751 # endif // defined(__CYGWIN__)
0752 #endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
0753 
0754 // Windows: minimise header inclusion.
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 // !defined(WIN32_LEAN_AND_MEAN)
0760 # endif // !defined(BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN)
0761 #endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
0762 
0763 // Windows: suppress definition of "min" and "max" macros.
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 // !defined(NOMINMAX)
0769 # endif // !defined(BOOST_ASIO_NO_NOMINMAX)
0770 #endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
0771 
0772 // Windows: IO Completion Ports.
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 // !defined(BOOST_ASIO_DISABLE_IOCP)
0780 #   endif // !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP)
0781 #  endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
0782 # endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
0783 #endif // !defined(BOOST_ASIO_HAS_IOCP)
0784 
0785 // On POSIX (and POSIX-like) platforms we need to include unistd.h in order to
0786 // get access to the various platform feature macros, e.g. to be able to test
0787 // for threads support.
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 // !defined(BOOST_ASIO_HAS_BOOST_CONFIG)
0803 #endif // !defined(BOOST_ASIO_HAS_UNISTD_H)
0804 #if defined(BOOST_ASIO_HAS_UNISTD_H)
0805 # include <unistd.h>
0806 #endif // defined(BOOST_ASIO_HAS_UNISTD_H)
0807 
0808 // Linux: epoll, eventfd, timerfd and io_uring.
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 // LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,45)
0816 #  endif // !defined(BOOST_ASIO_DISABLE_EPOLL)
0817 # endif // !defined(BOOST_ASIO_HAS_EPOLL)
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 // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
0823 #  endif // !defined(BOOST_ASIO_DISABLE_EVENTFD)
0824 # endif // !defined(BOOST_ASIO_HAS_EVENTFD)
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 // (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
0830 #  endif // defined(BOOST_ASIO_HAS_EPOLL)
0831 # endif // !defined(BOOST_ASIO_HAS_TIMERFD)
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 // LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
0836 # endif // defined(BOOST_ASIO_HAS_IO_URING)
0837 #endif // defined(__linux__)
0838 
0839 // Linux: io_uring is used instead of epoll.
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 // !defined(BOOST_ASIO_HAS_EPOLL) && defined(BOOST_ASIO_HAS_IO_URING)
0844 #endif // !defined(BOOST_ASIO_HAS_IO_URING_AS_DEFAULT)
0845 
0846 // Mac OS X, FreeBSD, NetBSD, OpenBSD: kqueue.
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 // !defined(BOOST_ASIO_DISABLE_KQUEUE)
0855 # endif // !defined(BOOST_ASIO_HAS_KQUEUE)
0856 #endif // (defined(__MACH__) && defined(__APPLE__))
0857        //   || defined(__FreeBSD__)
0858        //   || defined(__NetBSD__)
0859        //   || defined(__OpenBSD__)
0860 
0861 // Solaris: /dev/poll.
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 // !defined(BOOST_ASIO_DISABLE_DEV_POLL)
0867 # endif // !defined(BOOST_ASIO_HAS_DEV_POLL)
0868 #endif // defined(__sun)
0869 
0870 // Serial ports.
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 // !defined(BOOST_ASIO_DISABLE_SERIAL_PORT)
0880 #  endif // !defined(__SYMBIAN32__)
0881 # endif // defined(BOOST_ASIO_HAS_IOCP)
0882         //   || !defined(BOOST_ASIO_WINDOWS)
0883         //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
0884         //   && !defined(__CYGWIN__)
0885 #endif // !defined(BOOST_ASIO_HAS_SERIAL_PORT)
0886 
0887 // Windows: stream handles.
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 // defined(BOOST_ASIO_HAS_IOCP)
0893 # endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_STREAM_HANDLE)
0894 #endif // !defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
0895 
0896 // Windows: random access handles.
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 // defined(BOOST_ASIO_HAS_IOCP)
0902 # endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_RANDOM_ACCESS_HANDLE)
0903 #endif // !defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
0904 
0905 // Windows: object handles.
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 // !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP)
0912 #  endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
0913 # endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_OBJECT_HANDLE)
0914 #endif // !defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
0915 
0916 // Windows: OVERLAPPED wrapper.
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 // defined(BOOST_ASIO_HAS_IOCP)
0922 # endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_OVERLAPPED_PTR)
0923 #endif // !defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
0924 
0925 // POSIX: stream-oriented file descriptors.
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 // !defined(BOOST_ASIO_WINDOWS)
0933          //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
0934          //   && !defined(__CYGWIN__)
0935 # endif // !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR)
0936 #endif // !defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
0937 
0938 // UNIX domain sockets.
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 // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
0944 # endif // !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS)
0945 #endif // !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
0946 
0947 // Files.
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 // defined(BOOST_ASIO_HAS_IO_URING)
0955 # endif // !defined(BOOST_ASIO_DISABLE_FILE)
0956 #endif // !defined(BOOST_ASIO_HAS_FILE)
0957 
0958 // Pipes.
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 // !defined(BOOST_ASIO_DISABLE_PIPE)
0968 #  endif // !defined(__SYMBIAN32__)
0969 # endif // defined(BOOST_ASIO_HAS_IOCP)
0970         //   || !defined(BOOST_ASIO_WINDOWS)
0971         //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
0972         //   && !defined(__CYGWIN__)
0973 #endif // !defined(BOOST_ASIO_HAS_PIPE)
0974 
0975 // Can use sigaction() instead of signal().
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 // !defined(BOOST_ASIO_WINDOWS)
0983          //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
0984          //   && !defined(__CYGWIN__)
0985 # endif // !defined(BOOST_ASIO_DISABLE_SIGACTION)
0986 #endif // !defined(BOOST_ASIO_HAS_SIGACTION)
0987 
0988 // Can use signal().
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 // !defined(UNDER_CE)
0994 # endif // !defined(BOOST_ASIO_DISABLE_SIGNAL)
0995 #endif // !defined(BOOST_ASIO_HAS_SIGNAL)
0996 
0997 // Can use getaddrinfo() and getnameinfo().
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 // defined(UNDER_CE)
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 // (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
1011 #   else // defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
1012 #    define BOOST_ASIO_HAS_GETADDRINFO 1
1013 #   endif // defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
1014 #  else // defined(__MACH__) && defined(__APPLE__)
1015 #   define BOOST_ASIO_HAS_GETADDRINFO 1
1016 #  endif // defined(__MACH__) && defined(__APPLE__)
1017 # endif // !defined(BOOST_ASIO_DISABLE_GETADDRINFO)
1018 #endif // !defined(BOOST_ASIO_HAS_GETADDRINFO)
1019 
1020 // Whether standard iostreams are disabled.
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 // !defined(BOOST_NO_IOSTREAM)
1025 #endif // !defined(BOOST_ASIO_NO_IOSTREAM)
1026 
1027 // Whether exception handling is disabled.
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 // !defined(BOOST_NO_EXCEPTIONS)
1032 #endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
1033 
1034 // Whether the typeid operator is supported.
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 // !defined(BOOST_NO_TYPEID)
1039 #endif // !defined(BOOST_ASIO_NO_TYPEID)
1040 
1041 // Threads.
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 // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS)
1062 # endif // !defined(BOOST_ASIO_DISABLE_THREADS)
1063 #endif // !defined(BOOST_ASIO_HAS_THREADS)
1064 
1065 // POSIX threads.
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 // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS)
1075 # endif // defined(BOOST_ASIO_HAS_THREADS)
1076 #endif // !defined(BOOST_ASIO_HAS_PTHREADS)
1077 
1078 // Helper to prevent macro expansion.
1079 #define BOOST_ASIO_PREVENT_MACRO_SUBSTITUTION
1080 
1081 // Helper to define in-class constants.
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 // !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT)
1087 #  define BOOST_ASIO_STATIC_CONSTANT(type, assignment) \
1088     static const type assignment
1089 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT)
1090 #endif // !defined(BOOST_ASIO_STATIC_CONSTANT)
1091 
1092 // Boost align library.
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 // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105600)
1098 # endif // !defined(BOOST_ASIO_DISABLE_BOOST_ALIGN)
1099 #endif // !defined(BOOST_ASIO_HAS_BOOST_ALIGN)
1100 
1101 // Boost array library.
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 // !defined(BOOST_ASIO_DISABLE_BOOST_ARRAY)
1106 #endif // !defined(BOOST_ASIO_HAS_BOOST_ARRAY)
1107 
1108 // Boost assert macro.
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 // !defined(BOOST_ASIO_DISABLE_BOOST_ASSERT)
1113 #endif // !defined(BOOST_ASIO_HAS_BOOST_ASSERT)
1114 
1115 // Boost limits header.
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 // !defined(BOOST_ASIO_DISABLE_BOOST_LIMITS)
1120 #endif // !defined(BOOST_ASIO_HAS_BOOST_LIMITS)
1121 
1122 // Boost throw_exception function.
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 // !defined(BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION)
1127 #endif // !defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
1128 
1129 // Boost regex library.
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 // !defined(BOOST_ASIO_DISABLE_BOOST_REGEX)
1134 #endif // !defined(BOOST_ASIO_HAS_BOOST_REGEX)
1135 
1136 // Boost bind function.
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 // !defined(BOOST_ASIO_DISABLE_BOOST_BIND)
1141 #endif // !defined(BOOST_ASIO_HAS_BOOST_BIND)
1142 
1143 // Boost's BOOST_WORKAROUND macro.
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 // !defined(BOOST_ASIO_DISABLE_BOOST_WORKAROUND)
1148 #endif // !defined(BOOST_ASIO_HAS_BOOST_WORKAROUND)
1149 
1150 // Microsoft Visual C++'s secure C runtime library.
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 // defined(BOOST_ASIO_MSVC)
1158          // && (BOOST_ASIO_MSVC >= 1400)
1159          // && !defined(UNDER_CE)
1160 # endif // !defined(BOOST_ASIO_DISABLE_SECURE_RTL)
1161 #endif // !defined(BOOST_ASIO_HAS_SECURE_RTL)
1162 
1163 // Handler hooking. Disabled for ancient Borland C++ and gcc compilers.
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 // (__GNUC__ >= 3)
1170 #  elif !defined(__BORLANDC__) || defined(__clang__)
1171 #   define BOOST_ASIO_HAS_HANDLER_HOOKS 1
1172 #  endif // !defined(__BORLANDC__) || defined(__clang__)
1173 # endif // !defined(BOOST_ASIO_DISABLE_HANDLER_HOOKS)
1174 #endif // !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
1175 
1176 // Support for the __thread keyword extension, or equivalent.
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 // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1100)
1188            // && !(defined(__clang__) && defined(__ANDROID__))
1189 #   endif // ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)
1190 #  endif // defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
1191 # endif // defined(__linux__)
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 // (_MSC_VER >= 1700)
1197 # endif // defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_WINDOWS_RUNTIME)
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 // defined(__apple_build_version__)
1204 #  endif // defined(__clang__)
1205 # endif // defined(__APPLE__)
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 // !defined(BOOST_NO_CXX11_THREAD_LOCAL)
1212 #  endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG)
1213 # endif // !defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
1214 #endif // !defined(BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
1215 #if !defined(BOOST_ASIO_THREAD_KEYWORD)
1216 # define BOOST_ASIO_THREAD_KEYWORD __thread
1217 #endif // !defined(BOOST_ASIO_THREAD_KEYWORD)
1218 
1219 // Support for POSIX ssize_t typedef.
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 // defined(__linux__)
1225         //   || (defined(__MACH__) && defined(__APPLE__))
1226 #endif // !defined(BOOST_ASIO_DISABLE_SSIZE_T)
1227 
1228 // Helper macros to manage transition away from error_code return values.
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 // defined(BOOST_ASIO_NO_DEPRECATED)
1233 # define BOOST_ASIO_SYNC_OP_VOID boost::system::error_code
1234 # define BOOST_ASIO_SYNC_OP_VOID_RETURN(e) return e
1235 #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1236 
1237 // Newer gcc, clang need special treatment to suppress unused typedef warnings.
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 // (__clang_major__ >= 7)
1243 # elif ((__clang_major__ == 3) && (__clang_minor__ >= 6)) \
1244     || (__clang_major__ > 3)
1245 #  define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
1246 # endif // ((__clang_major__ == 3) && (__clang_minor__ >= 6))
1247         //   || (__clang_major__ > 3)
1248 #elif defined(__GNUC__)
1249 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
1250 #  define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
1251 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
1252 #endif // defined(__GNUC__)
1253 #if !defined(BOOST_ASIO_UNUSED_TYPEDEF)
1254 # define BOOST_ASIO_UNUSED_TYPEDEF
1255 #endif // !defined(BOOST_ASIO_UNUSED_TYPEDEF)
1256 
1257 // Some versions of gcc generate spurious warnings about unused variables.
1258 #if defined(__GNUC__)
1259 # if (__GNUC__ >= 4)
1260 #  define BOOST_ASIO_UNUSED_VARIABLE __attribute__((__unused__))
1261 # endif // (__GNUC__ >= 4)
1262 #endif // defined(__GNUC__)
1263 #if !defined(BOOST_ASIO_UNUSED_VARIABLE)
1264 # define BOOST_ASIO_UNUSED_VARIABLE
1265 #endif // !defined(BOOST_ASIO_UNUSED_VARIABLE)
1266 
1267 // Helper macro to tell the optimiser what may be assumed to be true.
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 // __has_builtin(__builtin_assume)
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 // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
1278 #endif // defined(__GNUC__)
1279 #if !defined(BOOST_ASIO_ASSUME)
1280 # define BOOST_ASIO_ASSUME(expr) (void)0
1281 #endif // !defined(BOOST_ASIO_ASSUME)
1282 
1283 // Support the co_await keyword on compilers known to allow it.
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 // defined(_RESUMABLE_FUNCTIONS_SUPPORTED)
1296 #   endif // (_MSC_FULL_VER >= 190023506)
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 // __has_include(<coroutine>)
1303 #    elif (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)
1304 #     if __has_include(<experimental/coroutine>)
1305 #      define BOOST_ASIO_HAS_CO_AWAIT 1
1306 #     endif // __has_include(<experimental/coroutine>)
1307 #    endif // (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)
1308 #   else // (__clang_major__ >= 14)
1309 #    if (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)
1310 #     if __has_include(<experimental/coroutine>)
1311 #      define BOOST_ASIO_HAS_CO_AWAIT 1
1312 #     endif // __has_include(<experimental/coroutine>)
1313 #    endif // (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)
1314 #   endif // (__clang_major__ >= 14)
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 // __has_include(<coroutine>)
1320 #   endif // (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902)
1321 #  endif // defined(__GNUC__)
1322 # endif // !defined(BOOST_ASIO_DISABLE_CO_AWAIT)
1323 #endif // !defined(BOOST_ASIO_HAS_CO_AWAIT)
1324 
1325 // Standard library support for coroutines.
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 // (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705)
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 // __has_include(<coroutine>)
1338 #    endif // (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)
1339 #   endif // (__clang_major__ >= 14)
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 // __has_include(<coroutine>)
1345 #   endif // (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902)
1346 #  endif // defined(__GNUC__)
1347 # endif // !defined(BOOST_ASIO_DISABLE_STD_COROUTINE)
1348 #endif // !defined(BOOST_ASIO_HAS_STD_COROUTINE)
1349 
1350 // Compiler support for the the [[nodiscard]] attribute.
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 // (__cplusplus >= 201703)
1357 #  endif // __has_cpp_attribute(nodiscard)
1358 # endif // defined(__has_cpp_attribute)
1359 #endif // !defined(BOOST_ASIO_NODISCARD)
1360 #if !defined(BOOST_ASIO_NODISCARD)
1361 # define BOOST_ASIO_NODISCARD
1362 #endif // !defined(BOOST_ASIO_NODISCARD)
1363 
1364 // Kernel support for MSG_NOSIGNAL.
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 // _POSIX_VERSION >= 200809L
1372 # endif // defined(_POSIX_VERSION)
1373 #endif // !defined(BOOST_ASIO_HAS_MSG_NOSIGNAL)
1374 
1375 // Standard library support for std::to_address.
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 // (__cplusplus >= 202002)
1382 #  elif defined(__GNUC__)
1383 #   if (__GNUC__ >= 8)
1384 #    if (__cplusplus >= 202002)
1385 #     define BOOST_ASIO_HAS_STD_TO_ADDRESS 1
1386 #    endif // (__cplusplus >= 202002)
1387 #   endif // (__GNUC__ >= 8)
1388 #  endif // defined(__GNUC__)
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 // (_MSC_VER >= 1922) && (_MSVC_LANG >= 202002)
1393 #  endif // defined(BOOST_ASIO_MSVC)
1394 # endif // !defined(BOOST_ASIO_DISABLE_STD_TO_ADDRESS)
1395 #endif // !defined(BOOST_ASIO_HAS_STD_TO_ADDRESS)
1396 
1397 // Standard library support for snprintf.
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 // defined(__APPLE__)
1403 # endif // !defined(BOOST_ASIO_DISABLE_SNPRINTF)
1404 #endif // !defined(BOOST_ASIO_HAS_SNPRINTF)
1405 
1406 #endif // BOOST_ASIO_DETAIL_CONFIG_HPP