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