Merge commit '14db637' from origin/upstream/master

Change-Id: Icd396e16b58fe3c43e69184daace8e4b700ac57a
diff --git a/BUILD.gn b/BUILD.gn
index 61a1e89..e416913 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -92,6 +92,9 @@
     "asio/include/asio/detail/chrono.hpp",
     "asio/include/asio/detail/chrono_time_traits.hpp",
     "asio/include/asio/detail/completion_handler.hpp",
+    "asio/include/asio/detail/concurrency_hint.hpp",
+    "asio/include/asio/detail/conditionally_enabled_event.hpp",
+    "asio/include/asio/detail/conditionally_enabled_mutex.hpp",
     "asio/include/asio/detail/config.hpp",
     "asio/include/asio/detail/consuming_buffers.hpp",
     "asio/include/asio/detail/cstddef.hpp",
@@ -132,6 +135,7 @@
     "asio/include/asio/detail/impl/handler_tracking.ipp",
     "asio/include/asio/detail/impl/kqueue_reactor.hpp",
     "asio/include/asio/detail/impl/kqueue_reactor.ipp",
+    "asio/include/asio/detail/impl/null_event.ipp",
     "asio/include/asio/detail/impl/pipe_select_interrupter.ipp",
     "asio/include/asio/detail/impl/posix_event.ipp",
     "asio/include/asio/detail/impl/posix_mutex.ipp",
@@ -173,6 +177,7 @@
     "asio/include/asio/detail/impl/winsock_init.ipp",
     "asio/include/asio/detail/io_control.hpp",
     "asio/include/asio/detail/is_buffer_sequence.hpp",
+    "asio/include/asio/detail/is_executor.hpp",
     "asio/include/asio/detail/keyword_tss_ptr.hpp",
     "asio/include/asio/detail/kqueue_reactor.hpp",
     "asio/include/asio/detail/limits.hpp",
@@ -227,6 +232,7 @@
     "asio/include/asio/detail/regex_fwd.hpp",
     "asio/include/asio/detail/resolve_endpoint_op.hpp",
     "asio/include/asio/detail/resolve_op.hpp",
+    "asio/include/asio/detail/resolve_query_op.hpp",
     "asio/include/asio/detail/resolver_service.hpp",
     "asio/include/asio/detail/resolver_service_base.hpp",
     "asio/include/asio/detail/scheduler.hpp",
@@ -256,6 +262,7 @@
     "asio/include/asio/detail/std_thread.hpp",
     "asio/include/asio/detail/strand_executor_service.hpp",
     "asio/include/asio/detail/strand_service.hpp",
+    "asio/include/asio/detail/string_view.hpp",
     "asio/include/asio/detail/thread.hpp",
     "asio/include/asio/detail/thread_context.hpp",
     "asio/include/asio/detail/thread_group.hpp",
@@ -418,11 +425,12 @@
     "asio/include/asio/local/detail/endpoint.hpp",
     "asio/include/asio/local/detail/impl/endpoint.ipp",
     "asio/include/asio/local/stream_protocol.hpp",
-    "asio/include/asio/package.hpp",
+    "asio/include/asio/packaged_task.hpp",
     "asio/include/asio/placeholders.hpp",
     "asio/include/asio/posix/basic_descriptor.hpp",
     "asio/include/asio/posix/basic_stream_descriptor.hpp",
     "asio/include/asio/posix/descriptor_base.hpp",
+    "asio/include/asio/posix/descriptor.hpp",
     "asio/include/asio/posix/stream_descriptor.hpp",
     "asio/include/asio/posix/stream_descriptor_service.hpp",
     "asio/include/asio/post.hpp",
@@ -481,9 +489,9 @@
     "asio/include/asio/ts/executor.hpp",
     "asio/include/asio/ts/internet.hpp",
     "asio/include/asio/ts/io_context.hpp",
-    "asio/include/asio/ts/networking.hpp",
+    "asio/include/asio/ts/netfwd.hpp",
+    "asio/include/asio/ts/net.hpp",
     "asio/include/asio/ts/socket.hpp",
-    "asio/include/asio/ts/thread_pool.hpp",
     "asio/include/asio/ts/timer.hpp",
     "asio/include/asio/unyield.hpp",
     "asio/include/asio/use_future.hpp",
@@ -497,6 +505,7 @@
     "asio/include/asio/windows/basic_stream_handle.hpp",
     "asio/include/asio/windows/object_handle.hpp",
     "asio/include/asio/windows/object_handle_service.hpp",
+    "asio/include/asio/windows/overlapped_handle.hpp",
     "asio/include/asio/windows/overlapped_ptr.hpp",
     "asio/include/asio/windows/random_access_handle.hpp",
     "asio/include/asio/windows/random_access_handle_service.hpp",
@@ -512,10 +521,16 @@
 
 executable("asio_unittests") {
   sources = [
+    "asio/src/tests/unit/archetypes/async_ops.hpp",
     "asio/src/tests/unit/archetypes/async_result.hpp",
+    "asio/src/tests/unit/archetypes/deprecated_async_ops.hpp",
+    "asio/src/tests/unit/archetypes/deprecated_async_result.hpp",
     "asio/src/tests/unit/archetypes/gettable_socket_option.hpp",
     "asio/src/tests/unit/archetypes/io_control_command.hpp",
     "asio/src/tests/unit/archetypes/settable_socket_option.hpp",
+    "asio/src/tests/unit/associated_allocator.cpp",
+    "asio/src/tests/unit/associated_executor.cpp",
+    "asio/src/tests/unit/async_result.cpp",
     "asio/src/tests/unit/basic_datagram_socket.cpp",
     "asio/src/tests/unit/basic_deadline_timer.cpp",
     "asio/src/tests/unit/basic_raw_socket.cpp",
@@ -526,6 +541,7 @@
     "asio/src/tests/unit/basic_stream_socket.cpp",
     "asio/src/tests/unit/basic_streambuf.cpp",
     "asio/src/tests/unit/basic_waitable_timer.cpp",
+    "asio/src/tests/unit/bind_executor.cpp",
     "asio/src/tests/unit/buffer.cpp",
     "asio/src/tests/unit/buffered_read_stream.cpp",
     "asio/src/tests/unit/buffered_stream.cpp",
@@ -537,7 +553,12 @@
     "asio/src/tests/unit/datagram_socket_service.cpp",
     "asio/src/tests/unit/deadline_timer.cpp",
     "asio/src/tests/unit/deadline_timer_service.cpp",
+    "asio/src/tests/unit/defer.cpp",
+    "asio/src/tests/unit/dispatch.cpp",
     "asio/src/tests/unit/error.cpp",
+    "asio/src/tests/unit/execution_context.cpp",
+    "asio/src/tests/unit/executor.cpp",
+    "asio/src/tests/unit/executor_work_guard.cpp",
     "asio/src/tests/unit/generic/basic_endpoint.cpp",
     "asio/src/tests/unit/generic/datagram_protocol.cpp",
     "asio/src/tests/unit/generic/raw_protocol.cpp",
@@ -575,12 +596,15 @@
     "asio/src/tests/unit/local/datagram_protocol.cpp",
     "asio/src/tests/unit/local/stream_protocol.cpp",
     "asio/src/tests/unit/main.cpp",
+    "asio/src/tests/unit/packaged_task.cpp",
     "asio/src/tests/unit/placeholders.cpp",
     # "asio/src/tests/unit/posix/basic_descriptor.cpp",
     # "asio/src/tests/unit/posix/basic_stream_descriptor.cpp",
     "asio/src/tests/unit/posix/descriptor_base.cpp",
+    "asio/src/tests/unit/posix/descriptor.cpp",
     # "asio/src/tests/unit/posix/stream_descriptor.cpp",
     # "asio/src/tests/unit/posix/stream_descriptor_service.cpp",
+    "asio/src/tests/unit/post.cpp",
     "asio/src/tests/unit/raw_socket_service.cpp",
     "asio/src/tests/unit/read.cpp",
     "asio/src/tests/unit/read_at.cpp",
@@ -606,6 +630,8 @@
     "asio/src/tests/unit/thread.cpp",
     "asio/src/tests/unit/time_traits.cpp",
     "asio/src/tests/unit/unit_test.hpp",
+    "asio/src/tests/unit/use_future.cpp",
+    "asio/src/tests/unit/uses_executor.cpp",
     "asio/src/tests/unit/wait_traits.cpp",
     "asio/src/tests/unit/waitable_timer_service.cpp",
     # "asio/src/tests/unit/windows/basic_handle.cpp",
@@ -614,6 +640,7 @@
     # "asio/src/tests/unit/windows/basic_stream_handle.cpp",
     # "asio/src/tests/unit/windows/object_handle.cpp",
     # "asio/src/tests/unit/windows/object_handle_service.cpp",
+    # "asio/src/tests/unit/windows/overlapped_handle.cpp",
     # "asio/src/tests/unit/windows/overlapped_ptr.cpp",
     # "asio/src/tests/unit/windows/random_access_handle.cpp",
     # "asio/src/tests/unit/windows/random_access_handle_service.cpp",
diff --git a/asio/COPYING b/asio/COPYING
index 2411d10..5a0dd10 100644
--- a/asio/COPYING
+++ b/asio/COPYING
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
 Distributed under the Boost Software License, Version 1.0. (See accompanying
 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/Makefile.am b/asio/include/Makefile.am
index 2009c6b..26362bc 100644
--- a/asio/include/Makefile.am
+++ b/asio/include/Makefile.am
@@ -44,8 +44,12 @@
 	asio/detail/buffer_resize_guard.hpp \
 	asio/detail/buffer_sequence_adapter.hpp \
 	asio/detail/call_stack.hpp \
+	asio/detail/chrono.hpp \
 	asio/detail/chrono_time_traits.hpp \
 	asio/detail/completion_handler.hpp \
+	asio/detail/concurrency_hint.hpp \
+	asio/detail/conditionally_enabled_event.hpp \
+	asio/detail/conditionally_enabled_mutex.hpp \
 	asio/detail/config.hpp \
 	asio/detail/consuming_buffers.hpp \
 	asio/detail/cstddef.hpp \
@@ -86,6 +90,7 @@
 	asio/detail/impl/handler_tracking.ipp \
 	asio/detail/impl/kqueue_reactor.hpp \
 	asio/detail/impl/kqueue_reactor.ipp \
+	asio/detail/impl/null_event.ipp \
 	asio/detail/impl/pipe_select_interrupter.ipp \
 	asio/detail/impl/posix_event.ipp \
 	asio/detail/impl/posix_mutex.ipp \
@@ -127,6 +132,7 @@
 	asio/detail/impl/win_tss_ptr.ipp \
 	asio/detail/io_control.hpp \
 	asio/detail/is_buffer_sequence.hpp \
+	asio/detail/is_executor.hpp \
 	asio/detail/keyword_tss_ptr.hpp \
 	asio/detail/kqueue_reactor.hpp \
 	asio/detail/limits.hpp \
@@ -181,6 +187,7 @@
 	asio/detail/regex_fwd.hpp \
 	asio/detail/resolve_endpoint_op.hpp \
 	asio/detail/resolve_op.hpp \
+	asio/detail/resolve_query_op.hpp \
 	asio/detail/resolver_service_base.hpp \
 	asio/detail/resolver_service.hpp \
 	asio/detail/scheduler.hpp \
@@ -210,6 +217,7 @@
 	asio/detail/std_thread.hpp \
 	asio/detail/strand_executor_service.hpp \
 	asio/detail/strand_service.hpp \
+	asio/detail/string_view.hpp \
 	asio/detail/thread_context.hpp \
 	asio/detail/thread_group.hpp \
 	asio/detail/thread.hpp \
@@ -337,6 +345,7 @@
 	asio/ip/basic_resolver.hpp \
 	asio/ip/basic_resolver_iterator.hpp \
 	asio/ip/basic_resolver_query.hpp \
+	asio/ip/basic_resolver_results.hpp \
 	asio/ip/detail/endpoint.hpp \
 	asio/ip/detail/impl/endpoint.ipp \
 	asio/ip/detail/socket_option.hpp \
@@ -373,10 +382,11 @@
 	asio/local/detail/endpoint.hpp \
 	asio/local/detail/impl/endpoint.ipp \
 	asio/local/stream_protocol.hpp \
-	asio/package.hpp \
+	asio/packaged_task.hpp \
 	asio/placeholders.hpp \
 	asio/posix/basic_descriptor.hpp \
 	asio/posix/basic_stream_descriptor.hpp \
+	asio/posix/descriptor.hpp \
 	asio/posix/descriptor_base.hpp \
 	asio/posix/stream_descriptor.hpp \
 	asio/posix/stream_descriptor_service.hpp \
@@ -436,9 +446,9 @@
 	asio/ts/executor.hpp \
 	asio/ts/internet.hpp \
 	asio/ts/io_context.hpp \
-	asio/ts/networking.hpp \
+	asio/ts/netfwd.hpp \
+	asio/ts/net.hpp \
 	asio/ts/socket.hpp \
-	asio/ts/thread_pool.hpp \
 	asio/ts/timer.hpp \
 	asio/unyield.hpp \
 	asio/use_future.hpp \
@@ -452,6 +462,7 @@
 	asio/windows/basic_stream_handle.hpp \
 	asio/windows/object_handle.hpp \
 	asio/windows/object_handle_service.hpp \
+	asio/windows/overlapped_handle.hpp \
 	asio/windows/overlapped_ptr.hpp \
 	asio/windows/random_access_handle.hpp \
 	asio/windows/random_access_handle_service.hpp \
diff --git a/asio/include/asio.hpp b/asio/include/asio.hpp
index 8dcf273..1e42e03 100644
--- a/asio/include/asio.hpp
+++ b/asio/include/asio.hpp
@@ -2,7 +2,7 @@
 // asio.hpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -96,9 +96,11 @@
 #include "asio/local/connect_pair.hpp"
 #include "asio/local/datagram_protocol.hpp"
 #include "asio/local/stream_protocol.hpp"
+#include "asio/packaged_task.hpp"
 #include "asio/placeholders.hpp"
 #include "asio/posix/basic_descriptor.hpp"
 #include "asio/posix/basic_stream_descriptor.hpp"
+#include "asio/posix/descriptor.hpp"
 #include "asio/posix/descriptor_base.hpp"
 #include "asio/posix/stream_descriptor.hpp"
 #include "asio/posix/stream_descriptor_service.hpp"
@@ -123,6 +125,7 @@
 #include "asio/thread.hpp"
 #include "asio/thread_pool.hpp"
 #include "asio/time_traits.hpp"
+#include "asio/use_future.hpp"
 #include "asio/uses_executor.hpp"
 #include "asio/version.hpp"
 #include "asio/wait_traits.hpp"
@@ -133,6 +136,7 @@
 #include "asio/windows/basic_stream_handle.hpp"
 #include "asio/windows/object_handle.hpp"
 #include "asio/windows/object_handle_service.hpp"
+#include "asio/windows/overlapped_handle.hpp"
 #include "asio/windows/overlapped_ptr.hpp"
 #include "asio/windows/random_access_handle.hpp"
 #include "asio/windows/random_access_handle_service.hpp"
diff --git a/asio/include/asio/associated_allocator.hpp b/asio/include/asio/associated_allocator.hpp
index 4b78ba4..3834b86 100644
--- a/asio/include/asio/associated_allocator.hpp
+++ b/asio/include/asio/associated_allocator.hpp
@@ -2,7 +2,7 @@
 // associated_allocator.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/associated_executor.hpp b/asio/include/asio/associated_executor.hpp
index 9389d55..74603c5 100644
--- a/asio/include/asio/associated_executor.hpp
+++ b/asio/include/asio/associated_executor.hpp
@@ -2,7 +2,7 @@
 // associated_executor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/async_result.hpp b/asio/include/asio/async_result.hpp
index 12ccd1e..cd866bb 100644
--- a/asio/include/asio/async_result.hpp
+++ b/asio/include/asio/async_result.hpp
@@ -2,7 +2,7 @@
 // async_result.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -25,10 +25,93 @@
 
 /// An interface for customising the behaviour of an initiating function.
 /**
+ * The async_result traits class is used for determining:
+ *
+ * @li the concrete completion handler type to be called at the end of the
+ * asynchronous operation;
+ *
+ * @li the initiating function return type; and
+ *
+ * @li how the return value of the initiating function is obtained.
+ *
+ * The trait allows the handler and return types to be determined at the point
+ * where the specific completion handler signature is known.
+ *
+ * This template may be specialised for user-defined completion token types.
+ * The primary template assumes that the CompletionToken is the completion
+ * handler.
+ */
+#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+template <typename CompletionToken, typename Signature>
+#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+template <typename CompletionToken, typename Signature = void>
+#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+class async_result
+{
+public:
+#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+  /// The concrete completion handler type for the specific signature.
+  typedef CompletionToken completion_handler_type;
+
+  /// The return type of the initiating function.
+  typedef void return_type;
+#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+  // For backward compatibility, determine the concrete completion handler type
+  // by using the legacy handler_type trait.
+  typedef typename handler_type<CompletionToken, Signature>::type
+    completion_handler_type;
+
+  // For backward compatibility, determine the initiating function return type
+  // using the legacy single-parameter version of async_result.
+  typedef typename async_result<completion_handler_type>::type return_type;
+#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+
+  /// Construct an async result from a given handler.
+  /**
+   * When using a specalised async_result, the constructor has an opportunity
+   * to initialise some state associated with the completion handler, which is
+   * then returned from the initiating function.
+   */
+  explicit async_result(completion_handler_type& h)
+#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+    // No data members to initialise.
+#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+    : legacy_result_(h)
+#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+  {
+    (void)h;
+  }
+
+  /// Obtain the value to be returned from the initiating function.
+  return_type get()
+  {
+#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+    // Nothing to do.
+#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+    return legacy_result_.get();
+#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+  }
+
+private:
+  async_result(const async_result&) ASIO_DELETED;
+  async_result& operator=(const async_result&) ASIO_DELETED;
+
+#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+  // No data members.
+#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+  async_result<completion_handler_type> legacy_result_;
+#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+};
+
+#if !defined(ASIO_NO_DEPRECATED)
+
+/// (Deprecated: Use two-parameter version of async_result.) An interface for
+/// customising the behaviour of an initiating function.
+/**
  * This template may be specialised for user-defined handler types.
  */
 template <typename Handler>
-class async_result
+class async_result<Handler>
 {
 public:
   /// The return type of the initiating function.
@@ -50,33 +133,42 @@
   }
 };
 
-/// Helper template to deduce the real type of a handler, capture a local copy
-/// of the handler, and then create an async_result for the handler.
-template <typename Handler, typename Signature>
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+/// Helper template to deduce the handler type from a CompletionToken, capture
+/// a local copy of the handler, and then create an async_result for the
+/// handler.
+template <typename CompletionToken, typename Signature>
 struct async_completion
 {
   /// The real handler type to be used for the asynchronous operation.
-  typedef typename asio::handler_type<
-    Handler, Signature>::type handler_type;
+  typedef typename asio::async_result<
+    typename decay<CompletionToken>::type,
+      Signature>::completion_handler_type completion_handler_type;
 
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
   /// Constructor.
   /**
-   * The constructor creates the concrete handler and makes the link between
-   * the handler and the asynchronous result.
+   * The constructor creates the concrete completion handler and makes the link
+   * between the handler and the asynchronous result.
    */
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-  explicit async_completion(
-      Handler& orig_handler)
-    : handler(static_cast<typename conditional<
-        is_same<Handler, handler_type>::value,
-        handler_type&, Handler&&>::type>(orig_handler)),
-      result(handler)
+  explicit async_completion(CompletionToken& token)
+    : completion_handler(static_cast<typename conditional<
+        is_same<CompletionToken, completion_handler_type>::value,
+        completion_handler_type&, CompletionToken&&>::type>(token)),
+      result(completion_handler)
   {
   }
 #else // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-  explicit async_completion(const Handler& orig_handler)
-    : handler(orig_handler),
-      result(handler)
+  explicit async_completion(typename decay<CompletionToken>::type& token)
+    : completion_handler(token),
+      result(completion_handler)
+  {
+  }
+
+  explicit async_completion(const typename decay<CompletionToken>::type& token)
+    : completion_handler(token),
+      result(completion_handler)
   {
   }
 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
@@ -84,25 +176,22 @@
   /// A copy of, or reference to, a real handler object.
 #if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
   typename conditional<
-    is_same<Handler, handler_type>::value,
-    handler_type&, handler_type>::type handler;
+    is_same<CompletionToken, completion_handler_type>::value,
+    completion_handler_type&, completion_handler_type>::type completion_handler;
 #else // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-  typename asio::handler_type<Handler, Signature>::type handler;
+  completion_handler_type completion_handler;
 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
 
   /// The result of the asynchronous operation's initiating function.
-  async_result<typename asio::handler_type<
-    Handler, Signature>::type> result;
+  async_result<typename decay<CompletionToken>::type, Signature> result;
 };
 
 namespace detail {
 
-template <typename Handler, typename Signature>
-struct async_result_type_helper
+template <typename CompletionToken, typename Signature>
+struct async_result_helper
+  : async_result<typename decay<CompletionToken>::type, Signature>
 {
-  typedef typename async_result<
-      typename handler_type<Handler, Signature>::type
-    >::type type;
 };
 
 } // namespace detail
@@ -111,15 +200,22 @@
 #include "asio/detail/pop_options.hpp"
 
 #if defined(GENERATING_DOCUMENTATION)
-# define ASIO_INITFN_RESULT_TYPE(h, sig) \
+# define ASIO_INITFN_RESULT_TYPE(ct, sig) \
   void_or_deduced
 #elif defined(_MSC_VER) && (_MSC_VER < 1500)
-# define ASIO_INITFN_RESULT_TYPE(h, sig) \
-  typename ::asio::detail::async_result_type_helper<h, sig>::type
+# define ASIO_INITFN_RESULT_TYPE(ct, sig) \
+  typename ::asio::detail::async_result_helper< \
+    ct, sig>::return_type
+#define ASIO_HANDLER_TYPE(ct, sig) \
+  typename ::asio::detail::async_result_helper< \
+    ct, sig>::completion_handler_type
 #else
-# define ASIO_INITFN_RESULT_TYPE(h, sig) \
+# define ASIO_INITFN_RESULT_TYPE(ct, sig) \
   typename ::asio::async_result< \
-    typename ::asio::handler_type<h, sig>::type>::type
+    typename ::asio::decay<ct>::type, sig>::return_type
+#define ASIO_HANDLER_TYPE(ct, sig) \
+  typename ::asio::async_result< \
+    typename ::asio::decay<ct>::type, sig>::completion_handler_type
 #endif
 
 #endif // ASIO_ASYNC_RESULT_HPP
diff --git a/asio/include/asio/basic_datagram_socket.hpp b/asio/include/asio/basic_datagram_socket.hpp
index d9748ee..a451013 100644
--- a/asio/include/asio/basic_datagram_socket.hpp
+++ b/asio/include/asio/basic_datagram_socket.hpp
@@ -2,7 +2,7 @@
 // basic_datagram_socket.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,12 +18,15 @@
 #include "asio/detail/config.hpp"
 #include <cstddef>
 #include "asio/basic_socket.hpp"
-#include "asio/datagram_socket_service.hpp"
 #include "asio/detail/handler_type_requirements.hpp"
 #include "asio/detail/throw_error.hpp"
 #include "asio/detail/type_traits.hpp"
 #include "asio/error.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/datagram_socket_service.hpp"
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
@@ -37,14 +40,19 @@
  * @e Distinct @e objects: Safe.@n
  * @e Shared @e objects: Unsafe.
  */
-template <typename Protocol,
-    typename DatagramSocketService = datagram_socket_service<Protocol> >
+template <typename Protocol
+    ASIO_SVC_TPARAM_DEF1(= datagram_socket_service<Protocol>)>
 class basic_datagram_socket
-  : public basic_socket<Protocol, DatagramSocketService>
+  : public basic_socket<Protocol ASIO_SVC_TARG>
 {
 public:
   /// The native representation of a socket.
-  typedef typename DatagramSocketService::native_handle_type native_handle_type;
+#if defined(GENERATING_DOCUMENTATION)
+  typedef implementation_defined native_handle_type;
+#else
+  typedef typename basic_socket<
+    Protocol ASIO_SVC_TARG>::native_handle_type native_handle_type;
+#endif
 
   /// The protocol type.
   typedef Protocol protocol_type;
@@ -62,7 +70,7 @@
    * socket.
    */
   explicit basic_datagram_socket(asio::io_context& io_context)
-    : basic_socket<Protocol, DatagramSocketService>(io_context)
+    : basic_socket<Protocol ASIO_SVC_TARG>(io_context)
   {
   }
 
@@ -80,7 +88,7 @@
    */
   basic_datagram_socket(asio::io_context& io_context,
       const protocol_type& protocol)
-    : basic_socket<Protocol, DatagramSocketService>(io_context, protocol)
+    : basic_socket<Protocol ASIO_SVC_TARG>(io_context, protocol)
   {
   }
 
@@ -102,7 +110,7 @@
    */
   basic_datagram_socket(asio::io_context& io_context,
       const endpoint_type& endpoint)
-    : basic_socket<Protocol, DatagramSocketService>(io_context, endpoint)
+    : basic_socket<Protocol ASIO_SVC_TARG>(io_context, endpoint)
   {
   }
 
@@ -123,7 +131,7 @@
    */
   basic_datagram_socket(asio::io_context& io_context,
       const protocol_type& protocol, const native_handle_type& native_socket)
-    : basic_socket<Protocol, DatagramSocketService>(
+    : basic_socket<Protocol ASIO_SVC_TARG>(
         io_context, protocol, native_socket)
   {
   }
@@ -140,8 +148,7 @@
    * constructed using the @c basic_datagram_socket(io_context&) constructor.
    */
   basic_datagram_socket(basic_datagram_socket&& other)
-    : basic_socket<Protocol, DatagramSocketService>(
-        ASIO_MOVE_CAST(basic_datagram_socket)(other))
+    : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
   {
   }
 
@@ -158,8 +165,7 @@
    */
   basic_datagram_socket& operator=(basic_datagram_socket&& other)
   {
-    basic_socket<Protocol, DatagramSocketService>::operator=(
-        ASIO_MOVE_CAST(basic_datagram_socket)(other));
+    basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
     return *this;
   }
 
@@ -174,13 +180,11 @@
    * @note Following the move, the moved-from object is in the same state as if
    * constructed using the @c basic_datagram_socket(io_context&) constructor.
    */
-  template <typename Protocol1, typename DatagramSocketService1>
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
   basic_datagram_socket(
-      basic_datagram_socket<Protocol1, DatagramSocketService1>&& other,
+      basic_datagram_socket<Protocol1 ASIO_SVC_TARG1>&& other,
       typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
-    : basic_socket<Protocol, DatagramSocketService>(
-        ASIO_MOVE_CAST2(basic_datagram_socket<
-          Protocol1, DatagramSocketService1>)(other))
+    : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
   {
   }
 
@@ -196,18 +200,25 @@
    * @note Following the move, the moved-from object is in the same state as if
    * constructed using the @c basic_datagram_socket(io_context&) constructor.
    */
-  template <typename Protocol1, typename DatagramSocketService1>
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
   typename enable_if<is_convertible<Protocol1, Protocol>::value,
       basic_datagram_socket>::type& operator=(
-        basic_datagram_socket<Protocol1, DatagramSocketService1>&& other)
+        basic_datagram_socket<Protocol1 ASIO_SVC_TARG1>&& other)
   {
-    basic_socket<Protocol, DatagramSocketService>::operator=(
-        ASIO_MOVE_CAST2(basic_datagram_socket<
-          Protocol1, DatagramSocketService1>)(other));
+    basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
     return *this;
   }
 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
 
+  /// Destroys the socket.
+  /**
+   * This function destroys the socket, cancelling any outstanding asynchronous
+   * operations associated with the socket as if by calling @c cancel.
+   */
+  ~basic_datagram_socket()
+  {
+  }
+
   /// Send some data on a connected socket.
   /**
    * This function is used to send data on the datagram socket. The function
@@ -338,8 +349,18 @@
     // not meet the documented type requirements for a WriteHandler.
     ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_send(this->get_implementation(),
         buffers, 0, ASIO_MOVE_CAST(WriteHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_send(this->get_implementation(),
+        buffers, 0, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Start an asynchronous send on a connected socket.
@@ -381,8 +402,18 @@
     // not meet the documented type requirements for a WriteHandler.
     ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_send(this->get_implementation(),
         buffers, flags, ASIO_MOVE_CAST(WriteHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_send(this->get_implementation(),
+        buffers, flags, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Send a datagram to the specified endpoint.
@@ -521,9 +552,20 @@
     // not meet the documented type requirements for a WriteHandler.
     ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_send_to(
         this->get_implementation(), buffers, destination, 0,
         ASIO_MOVE_CAST(WriteHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_send_to(
+        this->get_implementation(), buffers, destination, 0,
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Start an asynchronous send.
@@ -564,9 +606,20 @@
     // not meet the documented type requirements for a WriteHandler.
     ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_send_to(
         this->get_implementation(), buffers, destination, flags,
         ASIO_MOVE_CAST(WriteHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_send_to(
+        this->get_implementation(), buffers, destination, flags,
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Receive some data on a connected socket.
@@ -704,8 +757,18 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive(this->get_implementation(),
         buffers, 0, ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive(this->get_implementation(),
+        buffers, 0, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Start an asynchronous receive on a connected socket.
@@ -747,8 +810,18 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive(this->get_implementation(),
         buffers, flags, ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive(this->get_implementation(),
+        buffers, flags, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Receive a datagram with the endpoint of the sender.
@@ -887,9 +960,20 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive_from(
         this->get_implementation(), buffers, sender_endpoint, 0,
         ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive_from(
+        this->get_implementation(), buffers, sender_endpoint, 0,
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Start an asynchronous receive.
@@ -932,9 +1016,20 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive_from(
         this->get_implementation(), buffers, sender_endpoint, flags,
         ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive_from(
+        this->get_implementation(), buffers, sender_endpoint, flags,
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 };
 
diff --git a/asio/include/asio/basic_deadline_timer.hpp b/asio/include/asio/basic_deadline_timer.hpp
index 030053e..085c8ee 100644
--- a/asio/include/asio/basic_deadline_timer.hpp
+++ b/asio/include/asio/basic_deadline_timer.hpp
@@ -2,7 +2,7 @@
 // basic_deadline_timer.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -22,10 +22,17 @@
 
 #include <cstddef>
 #include "asio/basic_io_object.hpp"
-#include "asio/deadline_timer_service.hpp"
 #include "asio/detail/handler_type_requirements.hpp"
 #include "asio/detail/throw_error.hpp"
 #include "asio/error.hpp"
+#include "asio/time_traits.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/deadline_timer_service.hpp"
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/detail/deadline_timer_service.hpp"
+# define ASIO_SVC_T detail::deadline_timer_service<TimeTraits>
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 #include "asio/detail/push_options.hpp"
 
@@ -120,12 +127,15 @@
  * it contains the value asio::error::operation_aborted.
  */
 template <typename Time,
-    typename TimeTraits = asio::time_traits<Time>,
-    typename TimerService = deadline_timer_service<Time, TimeTraits> >
+    typename TimeTraits = asio::time_traits<Time>
+    ASIO_SVC_TPARAM_DEF2(= deadline_timer_service<Time, TimeTraits>)>
 class basic_deadline_timer
-  : public basic_io_object<TimerService>
+  : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>
 {
 public:
+  /// The type of the executor associated with the object.
+  typedef io_context::executor_type executor_type;
+
   /// The time traits type.
   typedef TimeTraits traits_type;
 
@@ -145,7 +155,7 @@
    * handlers for any asynchronous operations performed on the timer.
    */
   explicit basic_deadline_timer(asio::io_context& io_context)
-    : basic_io_object<TimerService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
   }
 
@@ -161,7 +171,7 @@
    */
   basic_deadline_timer(asio::io_context& io_context,
       const time_type& expiry_time)
-    : basic_io_object<TimerService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
     asio::error_code ec;
     this->get_service().expires_at(this->get_implementation(), expiry_time, ec);
@@ -180,7 +190,7 @@
    */
   basic_deadline_timer(asio::io_context& io_context,
       const duration_type& expiry_time)
-    : basic_io_object<TimerService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
     asio::error_code ec;
     this->get_service().expires_from_now(
@@ -188,6 +198,89 @@
     asio::detail::throw_error(ec, "expires_from_now");
   }
 
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+  /// Move-construct a basic_deadline_timer from another.
+  /**
+   * This constructor moves a timer from one object to another.
+   *
+   * @param other The other basic_deadline_timer object from which the move will
+   * occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c basic_deadline_timer(io_context&) constructor.
+   */
+  basic_deadline_timer(basic_deadline_timer&& other)
+    : basic_io_object<ASIO_SVC_T>(std::move(other))
+  {
+  }
+
+  /// Move-assign a basic_deadline_timer from another.
+  /**
+   * This assignment operator moves a timer from one object to another. Cancels
+   * any outstanding asynchronous operations associated with the target object.
+   *
+   * @param other The other basic_deadline_timer object from which the move will
+   * occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c basic_deadline_timer(io_context&) constructor.
+   */
+  basic_deadline_timer& operator=(basic_deadline_timer&& other)
+  {
+    basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+  /// Destroys the timer.
+  /**
+   * This function destroys the timer, cancelling any outstanding asynchronous
+   * wait operations associated with the timer as if by calling @c cancel.
+   */
+  ~basic_deadline_timer()
+  {
+  }
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+  // These functions are provided by basic_io_object<>.
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_context()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_context();
+  }
+
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_service()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_service();
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+  /// Get the executor associated with the object.
+  executor_type get_executor() ASIO_NOEXCEPT
+  {
+    return basic_io_object<ASIO_SVC_T>::get_executor();
+  }
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
   /// Cancel any asynchronous operations that are waiting on the timer.
   /**
    * This function forces the completion of any pending asynchronous wait
@@ -506,8 +599,18 @@
     // not meet the documented type requirements for a WaitHandler.
     ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_wait(this->get_implementation(),
         ASIO_MOVE_CAST(WaitHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WaitHandler,
+      void (asio::error_code)> init(handler);
+
+    this->get_service().async_wait(this->get_implementation(),
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 };
 
@@ -515,6 +618,10 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#if !defined(ASIO_ENABLE_OLD_SERVICES)
+# undef ASIO_SVC_T
+#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // defined(ASIO_HAS_BOOST_DATE_TIME)
        // || defined(GENERATING_DOCUMENTATION)
 
diff --git a/asio/include/asio/basic_io_object.hpp b/asio/include/asio/basic_io_object.hpp
index 40cf896..b0ccfcb 100644
--- a/asio/include/asio/basic_io_object.hpp
+++ b/asio/include/asio/basic_io_object.hpp
@@ -2,7 +2,7 @@
 // basic_io_object.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -34,12 +34,13 @@
     typedef typename service_type::implementation_type implementation_type;
 
     template <typename T, typename U>
-    static auto eval(T* t, U* u) -> decltype(t->move_construct(*u, *u), char());
-    static char (&eval(...))[2];
+    static auto asio_service_has_move_eval(T* t, U* u)
+      -> decltype(t->move_construct(*u, *u), char());
+    static char (&asio_service_has_move_eval(...))[2];
 
   public:
     static const bool value =
-      sizeof(service_has_move::eval(
+      sizeof(asio_service_has_move_eval(
         static_cast<service_type*>(0),
         static_cast<implementation_type*>(0))) == 1;
   };
diff --git a/asio/include/asio/basic_raw_socket.hpp b/asio/include/asio/basic_raw_socket.hpp
index 3ca392b..3011493 100644
--- a/asio/include/asio/basic_raw_socket.hpp
+++ b/asio/include/asio/basic_raw_socket.hpp
@@ -2,7 +2,7 @@
 // basic_raw_socket.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -22,7 +22,10 @@
 #include "asio/detail/throw_error.hpp"
 #include "asio/detail/type_traits.hpp"
 #include "asio/error.hpp"
-#include "asio/raw_socket_service.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/raw_socket_service.hpp"
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 #include "asio/detail/push_options.hpp"
 
@@ -37,14 +40,19 @@
  * @e Distinct @e objects: Safe.@n
  * @e Shared @e objects: Unsafe.
  */
-template <typename Protocol,
-    typename RawSocketService = raw_socket_service<Protocol> >
+template <typename Protocol
+    ASIO_SVC_TPARAM_DEF1(= raw_socket_service<Protocol>)>
 class basic_raw_socket
-  : public basic_socket<Protocol, RawSocketService>
+  : public basic_socket<Protocol ASIO_SVC_TARG>
 {
 public:
   /// The native representation of a socket.
-  typedef typename RawSocketService::native_handle_type native_handle_type;
+#if defined(GENERATING_DOCUMENTATION)
+  typedef implementation_defined native_handle_type;
+#else
+  typedef typename basic_socket<
+    Protocol ASIO_SVC_TARG>::native_handle_type native_handle_type;
+#endif
 
   /// The protocol type.
   typedef Protocol protocol_type;
@@ -62,7 +70,7 @@
    * socket.
    */
   explicit basic_raw_socket(asio::io_context& io_context)
-    : basic_socket<Protocol, RawSocketService>(io_context)
+    : basic_socket<Protocol ASIO_SVC_TARG>(io_context)
   {
   }
 
@@ -80,7 +88,7 @@
    */
   basic_raw_socket(asio::io_context& io_context,
       const protocol_type& protocol)
-    : basic_socket<Protocol, RawSocketService>(io_context, protocol)
+    : basic_socket<Protocol ASIO_SVC_TARG>(io_context, protocol)
   {
   }
 
@@ -102,7 +110,7 @@
    */
   basic_raw_socket(asio::io_context& io_context,
       const endpoint_type& endpoint)
-    : basic_socket<Protocol, RawSocketService>(io_context, endpoint)
+    : basic_socket<Protocol ASIO_SVC_TARG>(io_context, endpoint)
   {
   }
 
@@ -123,7 +131,7 @@
    */
   basic_raw_socket(asio::io_context& io_context,
       const protocol_type& protocol, const native_handle_type& native_socket)
-    : basic_socket<Protocol, RawSocketService>(
+    : basic_socket<Protocol ASIO_SVC_TARG>(
         io_context, protocol, native_socket)
   {
   }
@@ -140,8 +148,7 @@
    * constructed using the @c basic_raw_socket(io_context&) constructor.
    */
   basic_raw_socket(basic_raw_socket&& other)
-    : basic_socket<Protocol, RawSocketService>(
-        ASIO_MOVE_CAST(basic_raw_socket)(other))
+    : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
   {
   }
 
@@ -157,8 +164,7 @@
    */
   basic_raw_socket& operator=(basic_raw_socket&& other)
   {
-    basic_socket<Protocol, RawSocketService>::operator=(
-        ASIO_MOVE_CAST(basic_raw_socket)(other));
+    basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
     return *this;
   }
 
@@ -172,12 +178,10 @@
    * @note Following the move, the moved-from object is in the same state as if
    * constructed using the @c basic_raw_socket(io_context&) constructor.
    */
-  template <typename Protocol1, typename RawSocketService1>
-  basic_raw_socket(basic_raw_socket<Protocol1, RawSocketService1>&& other,
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
+  basic_raw_socket(basic_raw_socket<Protocol1 ASIO_SVC_TARG1>&& other,
       typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
-    : basic_socket<Protocol, RawSocketService>(
-        ASIO_MOVE_CAST2(basic_raw_socket<
-          Protocol1, RawSocketService1>)(other))
+    : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
   {
   }
 
@@ -191,18 +195,25 @@
    * @note Following the move, the moved-from object is in the same state as if
    * constructed using the @c basic_raw_socket(io_context&) constructor.
    */
-  template <typename Protocol1, typename RawSocketService1>
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
   typename enable_if<is_convertible<Protocol1, Protocol>::value,
       basic_raw_socket>::type& operator=(
-        basic_raw_socket<Protocol1, RawSocketService1>&& other)
+        basic_raw_socket<Protocol1 ASIO_SVC_TARG1>&& other)
   {
-    basic_socket<Protocol, RawSocketService>::operator=(
-        ASIO_MOVE_CAST2(basic_raw_socket<
-          Protocol1, RawSocketService1>)(other));
+    basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
     return *this;
   }
 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
 
+  /// Destroys the socket.
+  /**
+   * This function destroys the socket, cancelling any outstanding asynchronous
+   * operations associated with the socket as if by calling @c cancel.
+   */
+  ~basic_raw_socket()
+  {
+  }
+
   /// Send some data on a connected socket.
   /**
    * This function is used to send data on the raw socket. The function call
@@ -330,8 +341,18 @@
     // not meet the documented type requirements for a WriteHandler.
     ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_send(this->get_implementation(),
         buffers, 0, ASIO_MOVE_CAST(WriteHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_send(this->get_implementation(),
+        buffers, 0, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Start an asynchronous send on a connected socket.
@@ -373,8 +394,18 @@
     // not meet the documented type requirements for a WriteHandler.
     ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_send(this->get_implementation(),
         buffers, flags, ASIO_MOVE_CAST(WriteHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_send(this->get_implementation(),
+        buffers, flags, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Send raw data to the specified endpoint.
@@ -513,8 +544,18 @@
     // not meet the documented type requirements for a WriteHandler.
     ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_send_to(this->get_implementation(),
         buffers, destination, 0, ASIO_MOVE_CAST(WriteHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_send_to(this->get_implementation(),
+        buffers, destination, 0, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Start an asynchronous send.
@@ -555,9 +596,20 @@
     // not meet the documented type requirements for a WriteHandler.
     ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_send_to(
         this->get_implementation(), buffers, destination, flags,
         ASIO_MOVE_CAST(WriteHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_send_to(
+        this->get_implementation(), buffers, destination, flags,
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Receive some data on a connected socket.
@@ -695,8 +747,18 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive(this->get_implementation(),
         buffers, 0, ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive(this->get_implementation(),
+        buffers, 0, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Start an asynchronous receive on a connected socket.
@@ -738,8 +800,18 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive(this->get_implementation(),
         buffers, flags, ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive(this->get_implementation(),
+        buffers, flags, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Receive raw data with the endpoint of the sender.
@@ -878,9 +950,20 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive_from(
         this->get_implementation(), buffers, sender_endpoint, 0,
         ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive_from(
+        this->get_implementation(), buffers, sender_endpoint, 0,
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Start an asynchronous receive.
@@ -923,9 +1006,20 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive_from(
         this->get_implementation(), buffers, sender_endpoint, flags,
         ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive_from(
+        this->get_implementation(), buffers, sender_endpoint, flags,
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 };
 
diff --git a/asio/include/asio/basic_seq_packet_socket.hpp b/asio/include/asio/basic_seq_packet_socket.hpp
index 2271cea..ca992ec 100644
--- a/asio/include/asio/basic_seq_packet_socket.hpp
+++ b/asio/include/asio/basic_seq_packet_socket.hpp
@@ -2,7 +2,7 @@
 // basic_seq_packet_socket.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -21,7 +21,10 @@
 #include "asio/detail/handler_type_requirements.hpp"
 #include "asio/detail/throw_error.hpp"
 #include "asio/error.hpp"
-#include "asio/seq_packet_socket_service.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/seq_packet_socket_service.hpp"
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 #include "asio/detail/push_options.hpp"
 
@@ -36,15 +39,19 @@
  * @e Distinct @e objects: Safe.@n
  * @e Shared @e objects: Unsafe.
  */
-template <typename Protocol,
-    typename SeqPacketSocketService = seq_packet_socket_service<Protocol> >
+template <typename Protocol
+    ASIO_SVC_TPARAM_DEF1(= seq_packet_socket_service<Protocol>)>
 class basic_seq_packet_socket
-  : public basic_socket<Protocol, SeqPacketSocketService>
+  : public basic_socket<Protocol ASIO_SVC_TARG>
 {
 public:
   /// The native representation of a socket.
-  typedef typename SeqPacketSocketService::native_handle_type
-    native_handle_type;
+#if defined(GENERATING_DOCUMENTATION)
+  typedef implementation_defined native_handle_type;
+#else
+  typedef typename basic_socket<
+    Protocol ASIO_SVC_TARG>::native_handle_type native_handle_type;
+#endif
 
   /// The protocol type.
   typedef Protocol protocol_type;
@@ -63,7 +70,7 @@
    * the socket.
    */
   explicit basic_seq_packet_socket(asio::io_context& io_context)
-    : basic_socket<Protocol, SeqPacketSocketService>(io_context)
+    : basic_socket<Protocol ASIO_SVC_TARG>(io_context)
   {
   }
 
@@ -83,7 +90,7 @@
    */
   basic_seq_packet_socket(asio::io_context& io_context,
       const protocol_type& protocol)
-    : basic_socket<Protocol, SeqPacketSocketService>(io_context, protocol)
+    : basic_socket<Protocol ASIO_SVC_TARG>(io_context, protocol)
   {
   }
 
@@ -105,7 +112,7 @@
    */
   basic_seq_packet_socket(asio::io_context& io_context,
       const endpoint_type& endpoint)
-    : basic_socket<Protocol, SeqPacketSocketService>(io_context, endpoint)
+    : basic_socket<Protocol ASIO_SVC_TARG>(io_context, endpoint)
   {
   }
 
@@ -126,7 +133,7 @@
    */
   basic_seq_packet_socket(asio::io_context& io_context,
       const protocol_type& protocol, const native_handle_type& native_socket)
-    : basic_socket<Protocol, SeqPacketSocketService>(
+    : basic_socket<Protocol ASIO_SVC_TARG>(
         io_context, protocol, native_socket)
   {
   }
@@ -144,8 +151,7 @@
    * constructed using the @c basic_seq_packet_socket(io_context&) constructor.
    */
   basic_seq_packet_socket(basic_seq_packet_socket&& other)
-    : basic_socket<Protocol, SeqPacketSocketService>(
-        ASIO_MOVE_CAST(basic_seq_packet_socket)(other))
+    : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
   {
   }
 
@@ -162,8 +168,7 @@
    */
   basic_seq_packet_socket& operator=(basic_seq_packet_socket&& other)
   {
-    basic_socket<Protocol, SeqPacketSocketService>::operator=(
-        ASIO_MOVE_CAST(basic_seq_packet_socket)(other));
+    basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
     return *this;
   }
 
@@ -179,13 +184,11 @@
    * @note Following the move, the moved-from object is in the same state as if
    * constructed using the @c basic_seq_packet_socket(io_context&) constructor.
    */
-  template <typename Protocol1, typename SeqPacketSocketService1>
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
   basic_seq_packet_socket(
-      basic_seq_packet_socket<Protocol1, SeqPacketSocketService1>&& other,
+      basic_seq_packet_socket<Protocol1 ASIO_SVC_TARG1>&& other,
       typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
-    : basic_socket<Protocol, SeqPacketSocketService>(
-        ASIO_MOVE_CAST2(basic_seq_packet_socket<
-          Protocol1, SeqPacketSocketService1>)(other))
+    : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
   {
   }
 
@@ -201,18 +204,25 @@
    * @note Following the move, the moved-from object is in the same state as if
    * constructed using the @c basic_seq_packet_socket(io_context&) constructor.
    */
-  template <typename Protocol1, typename SeqPacketSocketService1>
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
   typename enable_if<is_convertible<Protocol1, Protocol>::value,
       basic_seq_packet_socket>::type& operator=(
-        basic_seq_packet_socket<Protocol1, SeqPacketSocketService1>&& other)
+        basic_seq_packet_socket<Protocol1 ASIO_SVC_TARG1>&& other)
   {
-    basic_socket<Protocol, SeqPacketSocketService>::operator=(
-        ASIO_MOVE_CAST2(basic_seq_packet_socket<
-          Protocol1, SeqPacketSocketService1>)(other));
+    basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
     return *this;
   }
 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
 
+  /// Destroys the socket.
+  /**
+   * This function destroys the socket, cancelling any outstanding asynchronous
+   * operations associated with the socket as if by calling @c cancel.
+   */
+  ~basic_seq_packet_socket()
+  {
+  }
+
   /// Send some data on the socket.
   /**
    * This function is used to send data on the sequenced packet socket. The
@@ -317,8 +327,18 @@
     // not meet the documented type requirements for a WriteHandler.
     ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_send(this->get_implementation(),
         buffers, flags, ASIO_MOVE_CAST(WriteHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_send(this->get_implementation(),
+        buffers, flags, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Receive some data on the socket.
@@ -355,8 +375,13 @@
       socket_base::message_flags& out_flags)
   {
     asio::error_code ec;
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     std::size_t s = this->get_service().receive(
         this->get_implementation(), buffers, 0, out_flags, ec);
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    std::size_t s = this->get_service().receive_with_flags(
+        this->get_implementation(), buffers, 0, out_flags, ec);
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
     asio::detail::throw_error(ec, "receive");
     return s;
   }
@@ -402,8 +427,13 @@
       socket_base::message_flags& out_flags)
   {
     asio::error_code ec;
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     std::size_t s = this->get_service().receive(
         this->get_implementation(), buffers, in_flags, out_flags, ec);
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    std::size_t s = this->get_service().receive_with_flags(
+        this->get_implementation(), buffers, in_flags, out_flags, ec);
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
     asio::detail::throw_error(ec, "receive");
     return s;
   }
@@ -436,8 +466,13 @@
       socket_base::message_flags in_flags,
       socket_base::message_flags& out_flags, asio::error_code& ec)
   {
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().receive(this->get_implementation(),
         buffers, in_flags, out_flags, ec);
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    return this->get_service().receive_with_flags(this->get_implementation(),
+        buffers, in_flags, out_flags, ec);
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Start an asynchronous receive.
@@ -489,9 +524,20 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive(
         this->get_implementation(), buffers, 0, out_flags,
         ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive_with_flags(
+        this->get_implementation(), buffers, 0, out_flags,
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Start an asynchronous receive.
@@ -548,9 +594,20 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive(
         this->get_implementation(), buffers, in_flags, out_flags,
         ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive_with_flags(
+        this->get_implementation(), buffers, in_flags, out_flags,
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 };
 
diff --git a/asio/include/asio/basic_serial_port.hpp b/asio/include/asio/basic_serial_port.hpp
index e472117..b6ac51e 100644
--- a/asio/include/asio/basic_serial_port.hpp
+++ b/asio/include/asio/basic_serial_port.hpp
@@ -2,7 +2,7 @@
 // basic_serial_port.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -18,6 +18,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_SERIAL_PORT) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -215,10 +217,11 @@
    *
    * @param ec Set the indicate what error occurred, if any.
    */
-  asio::error_code open(const std::string& device,
+  ASIO_SYNC_OP_VOID open(const std::string& device,
       asio::error_code& ec)
   {
-    return this->get_service().open(this->get_implementation(), device, ec);
+    this->get_service().open(this->get_implementation(), device, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Assign an existing native serial port to the serial port.
@@ -245,11 +248,12 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code assign(const native_handle_type& native_serial_port,
+  ASIO_SYNC_OP_VOID assign(const native_handle_type& native_serial_port,
       asio::error_code& ec)
   {
-    return this->get_service().assign(this->get_implementation(),
+    this->get_service().assign(this->get_implementation(),
         native_serial_port, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the serial port is open.
@@ -281,9 +285,10 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code close(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID close(asio::error_code& ec)
   {
-    return this->get_service().close(this->get_implementation(), ec);
+    this->get_service().close(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native serial port representation.
@@ -320,9 +325,10 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code cancel(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
   {
-    return this->get_service().cancel(this->get_implementation(), ec);
+    this->get_service().cancel(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Send a break sequence to the serial port.
@@ -346,9 +352,10 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code send_break(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID send_break(asio::error_code& ec)
   {
-    return this->get_service().send_break(this->get_implementation(), ec);
+    this->get_service().send_break(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Set an option on the serial port.
@@ -390,11 +397,11 @@
    * asio::serial_port_base::character_size
    */
   template <typename SettableSerialPortOption>
-  asio::error_code set_option(const SettableSerialPortOption& option,
+  ASIO_SYNC_OP_VOID set_option(const SettableSerialPortOption& option,
       asio::error_code& ec)
   {
-    return this->get_service().set_option(
-        this->get_implementation(), option, ec);
+    this->get_service().set_option(this->get_implementation(), option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get an option from the serial port.
@@ -438,11 +445,11 @@
    * asio::serial_port_base::character_size
    */
   template <typename GettableSerialPortOption>
-  asio::error_code get_option(GettableSerialPortOption& option,
+  ASIO_SYNC_OP_VOID get_option(GettableSerialPortOption& option,
       asio::error_code& ec)
   {
-    return this->get_service().get_option(
-        this->get_implementation(), option, ec);
+    this->get_service().get_option(this->get_implementation(), option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Write some data to the serial port.
@@ -676,4 +683,6 @@
 #endif // defined(ASIO_HAS_SERIAL_PORT)
        //   || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_BASIC_SERIAL_PORT_HPP
diff --git a/asio/include/asio/basic_signal_set.hpp b/asio/include/asio/basic_signal_set.hpp
index 642d10a..6f1d07e 100644
--- a/asio/include/asio/basic_signal_set.hpp
+++ b/asio/include/asio/basic_signal_set.hpp
@@ -2,7 +2,7 @@
 // basic_signal_set.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include "asio/basic_io_object.hpp"
 #include "asio/detail/handler_type_requirements.hpp"
 #include "asio/detail/throw_error.hpp"
@@ -211,11 +213,10 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code add(int signal_number,
-      asio::error_code& ec)
+  ASIO_SYNC_OP_VOID add(int signal_number, asio::error_code& ec)
   {
-    return this->get_service().add(
-        this->get_implementation(), signal_number, ec);
+    this->get_service().add(this->get_implementation(), signal_number, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Remove a signal from a signal_set.
@@ -249,11 +250,11 @@
    * @note Removes any notifications that have been queued for the specified
    * signal number.
    */
-  asio::error_code remove(int signal_number,
+  ASIO_SYNC_OP_VOID remove(int signal_number,
       asio::error_code& ec)
   {
-    return this->get_service().remove(
-        this->get_implementation(), signal_number, ec);
+    this->get_service().remove(this->get_implementation(), signal_number, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Remove all signals from a signal_set.
@@ -281,9 +282,10 @@
    *
    * @note Removes all queued notifications.
    */
-  asio::error_code clear(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID clear(asio::error_code& ec)
   {
-    return this->get_service().clear(this->get_implementation(), ec);
+    this->get_service().clear(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Cancel all operations associated with the signal set.
@@ -335,9 +337,10 @@
    * These handlers can no longer be cancelled, and therefore are passed an
    * error code that indicates the successful completion of the wait operation.
    */
-  asio::error_code cancel(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
   {
-    return this->get_service().cancel(this->get_implementation(), ec);
+    this->get_service().cancel(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Start an asynchronous operation to wait for a signal to be delivered.
@@ -383,4 +386,6 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_BASIC_SIGNAL_SET_HPP
diff --git a/asio/include/asio/basic_socket.hpp b/asio/include/asio/basic_socket.hpp
index 582982a..a1e7b81 100644
--- a/asio/include/asio/basic_socket.hpp
+++ b/asio/include/asio/basic_socket.hpp
@@ -2,7 +2,7 @@
 // basic_socket.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -25,6 +25,23 @@
 #include "asio/post.hpp"
 #include "asio/socket_base.hpp"
 
+#if defined(ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(ASIO_HAS_MOVE)
+
+#if !defined(ASIO_ENABLE_OLD_SERVICES)
+# if defined(ASIO_WINDOWS_RUNTIME)
+#  include "asio/detail/winrt_ssocket_service.hpp"
+#  define ASIO_SVC_T detail::winrt_ssocket_service<Protocol>
+# elif defined(ASIO_HAS_IOCP)
+#  include "asio/detail/win_iocp_socket_service.hpp"
+#  define ASIO_SVC_T detail::win_iocp_socket_service<Protocol>
+# else
+#  include "asio/detail/reactive_socket_service.hpp"
+#  define ASIO_SVC_T detail::reactive_socket_service<Protocol>
+# endif
+#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
@@ -38,14 +55,21 @@
  * @e Distinct @e objects: Safe.@n
  * @e Shared @e objects: Unsafe.
  */
-template <typename Protocol, typename SocketService>
+template <typename Protocol ASIO_SVC_TPARAM>
 class basic_socket
-  : public basic_io_object<SocketService>,
+  : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>,
     public socket_base
 {
 public:
+  /// The type of the executor associated with the object.
+  typedef io_context::executor_type executor_type;
+
   /// The native representation of a socket.
-  typedef typename SocketService::native_handle_type native_handle_type;
+#if defined(GENERATING_DOCUMENTATION)
+  typedef implementation_defined native_handle_type;
+#else
+  typedef typename ASIO_SVC_T::native_handle_type native_handle_type;
+#endif
 
   /// The protocol type.
   typedef Protocol protocol_type;
@@ -53,8 +77,10 @@
   /// The endpoint type.
   typedef typename Protocol::endpoint endpoint_type;
 
+#if !defined(ASIO_NO_EXTENSIONS)
   /// A basic_socket is always the lowest layer.
-  typedef basic_socket<Protocol, SocketService> lowest_layer_type;
+  typedef basic_socket<Protocol ASIO_SVC_TARG> lowest_layer_type;
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
   /// Construct a basic_socket without opening it.
   /**
@@ -64,7 +90,7 @@
    * dispatch handlers for any asynchronous operations performed on the socket.
    */
   explicit basic_socket(asio::io_context& io_context)
-    : basic_io_object<SocketService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
   }
 
@@ -81,7 +107,7 @@
    */
   basic_socket(asio::io_context& io_context,
       const protocol_type& protocol)
-    : basic_io_object<SocketService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
     asio::error_code ec;
     this->get_service().open(this->get_implementation(), protocol, ec);
@@ -105,7 +131,7 @@
    */
   basic_socket(asio::io_context& io_context,
       const endpoint_type& endpoint)
-    : basic_io_object<SocketService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
     asio::error_code ec;
     const protocol_type protocol = endpoint.protocol();
@@ -130,7 +156,7 @@
    */
   basic_socket(asio::io_context& io_context,
       const protocol_type& protocol, const native_handle_type& native_socket)
-    : basic_io_object<SocketService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
     asio::error_code ec;
     this->get_service().assign(this->get_implementation(),
@@ -150,8 +176,7 @@
    * constructed using the @c basic_socket(io_context&) constructor.
    */
   basic_socket(basic_socket&& other)
-    : basic_io_object<SocketService>(
-        ASIO_MOVE_CAST(basic_socket)(other))
+    : basic_io_object<ASIO_SVC_T>(std::move(other))
   {
   }
 
@@ -167,13 +192,12 @@
    */
   basic_socket& operator=(basic_socket&& other)
   {
-    basic_io_object<SocketService>::operator=(
-        ASIO_MOVE_CAST(basic_socket)(other));
+    basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
     return *this;
   }
 
   // All sockets have access to each other's implementations.
-  template <typename Protocol1, typename SocketService1>
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
   friend class basic_socket;
 
   /// Move-construct a basic_socket from a socket of another protocol type.
@@ -186,10 +210,10 @@
    * @note Following the move, the moved-from object is in the same state as if
    * constructed using the @c basic_socket(io_context&) constructor.
    */
-  template <typename Protocol1, typename SocketService1>
-  basic_socket(basic_socket<Protocol1, SocketService1>&& other,
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
+  basic_socket(basic_socket<Protocol1 ASIO_SVC_TARG1>&& other,
       typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
-    : basic_io_object<SocketService>(other.get_service().get_io_context())
+    : basic_io_object<ASIO_SVC_T>(other.get_service().get_io_context())
   {
     this->get_service().template converting_move_construct<Protocol1>(
         this->get_implementation(), other.get_implementation());
@@ -205,19 +229,58 @@
    * @note Following the move, the moved-from object is in the same state as if
    * constructed using the @c basic_socket(io_context&) constructor.
    */
-  template <typename Protocol1, typename SocketService1>
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
   typename enable_if<is_convertible<Protocol1, Protocol>::value,
       basic_socket>::type& operator=(
-        basic_socket<Protocol1, SocketService1>&& other)
+        basic_socket<Protocol1 ASIO_SVC_TARG1>&& other)
   {
-    basic_socket tmp(ASIO_MOVE_CAST2(basic_socket<
-            Protocol1, SocketService1>)(other));
-    basic_io_object<SocketService>::operator=(
-        ASIO_MOVE_CAST(basic_socket)(tmp));
+    basic_socket tmp(std::move(other));
+    basic_io_object<ASIO_SVC_T>::operator=(std::move(tmp));
     return *this;
   }
 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+  // These functions are provided by basic_io_object<>.
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_context()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_context();
+  }
+
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_service()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_service();
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+  /// Get the executor associated with the object.
+  executor_type get_executor() ASIO_NOEXCEPT
+  {
+    return basic_io_object<ASIO_SVC_T>::get_executor();
+  }
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
+#if !defined(ASIO_NO_EXTENSIONS)
   /// Get a reference to the lowest layer.
   /**
    * This function returns a reference to the lowest layer in a stack of
@@ -245,6 +308,7 @@
   {
     return *this;
   }
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
   /// Open the socket using the specified protocol.
   /**
@@ -286,10 +350,11 @@
    * }
    * @endcode
    */
-  asio::error_code open(const protocol_type& protocol,
+  ASIO_SYNC_OP_VOID open(const protocol_type& protocol,
       asio::error_code& ec)
   {
-    return this->get_service().open(this->get_implementation(), protocol, ec);
+    this->get_service().open(this->get_implementation(), protocol, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Assign an existing native socket to the socket.
@@ -321,11 +386,12 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code assign(const protocol_type& protocol,
+  ASIO_SYNC_OP_VOID assign(const protocol_type& protocol,
       const native_handle_type& native_socket, asio::error_code& ec)
   {
-    return this->get_service().assign(this->get_implementation(),
+    this->get_service().assign(this->get_implementation(),
         protocol, native_socket, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the socket is open.
@@ -377,9 +443,10 @@
    * @note For portable behaviour with respect to graceful closure of a
    * connected socket, call shutdown() before closing the socket.
    */
-  asio::error_code close(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID close(asio::error_code& ec)
   {
-    return this->get_service().close(this->get_implementation(), ec);
+    this->get_service().close(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native socket representation.
@@ -482,9 +549,10 @@
         "operation_not_supported when used on Windows XP, Windows Server 2003, "
         "or earlier. Consult documentation for details."))
 #endif
-  asio::error_code cancel(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
   {
-    return this->get_service().cancel(this->get_implementation(), ec);
+    this->get_service().cancel(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the socket is at the out-of-band data mark.
@@ -602,10 +670,11 @@
    * }
    * @endcode
    */
-  asio::error_code bind(const endpoint_type& endpoint,
+  ASIO_SYNC_OP_VOID bind(const endpoint_type& endpoint,
       asio::error_code& ec)
   {
-    return this->get_service().bind(this->get_implementation(), endpoint, ec);
+    this->get_service().bind(this->get_implementation(), endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Connect the socket to the specified endpoint.
@@ -672,20 +741,21 @@
    * }
    * @endcode
    */
-  asio::error_code connect(const endpoint_type& peer_endpoint,
+  ASIO_SYNC_OP_VOID connect(const endpoint_type& peer_endpoint,
       asio::error_code& ec)
   {
     if (!is_open())
     {
-      if (this->get_service().open(this->get_implementation(),
-            peer_endpoint.protocol(), ec))
+      this->get_service().open(this->get_implementation(),
+            peer_endpoint.protocol(), ec);
+      if (ec)
       {
-        return ec;
+        ASIO_SYNC_OP_VOID_RETURN(ec);
       }
     }
 
-    return this->get_service().connect(
-        this->get_implementation(), peer_endpoint, ec);
+    this->get_service().connect(this->get_implementation(), peer_endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Start an asynchronous connect.
@@ -743,7 +813,8 @@
     {
       asio::error_code ec;
       const protocol_type protocol = peer_endpoint.protocol();
-      if (this->get_service().open(this->get_implementation(), protocol, ec))
+      this->get_service().open(this->get_implementation(), protocol, ec);
+      if (ec)
       {
         async_completion<ConnectHandler,
           void (asio::error_code)> init(handler);
@@ -752,14 +823,24 @@
             asio::detail::bind_handler(
               ASIO_MOVE_CAST(ASIO_HANDLER_TYPE(
                 ConnectHandler, void (asio::error_code)))(
-                  init.handler), ec));
+                  init.completion_handler), ec));
 
         return init.result.get();
       }
     }
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_connect(this->get_implementation(),
         peer_endpoint, ASIO_MOVE_CAST(ConnectHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ConnectHandler,
+      void (asio::error_code)> init(handler);
+
+    this->get_service().async_connect(
+        this->get_implementation(), peer_endpoint, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Set an option on the socket.
@@ -844,11 +925,11 @@
    * @endcode
    */
   template <typename SettableSocketOption>
-  asio::error_code set_option(const SettableSocketOption& option,
+  ASIO_SYNC_OP_VOID set_option(const SettableSocketOption& option,
       asio::error_code& ec)
   {
-    return this->get_service().set_option(
-        this->get_implementation(), option, ec);
+    this->get_service().set_option(this->get_implementation(), option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get an option from the socket.
@@ -935,11 +1016,11 @@
    * @endcode
    */
   template <typename GettableSocketOption>
-  asio::error_code get_option(GettableSocketOption& option,
+  ASIO_SYNC_OP_VOID get_option(GettableSocketOption& option,
       asio::error_code& ec) const
   {
-    return this->get_service().get_option(
-        this->get_implementation(), option, ec);
+    this->get_service().get_option(this->get_implementation(), option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Perform an IO control command on the socket.
@@ -1000,11 +1081,11 @@
    * @endcode
    */
   template <typename IoControlCommand>
-  asio::error_code io_control(IoControlCommand& command,
+  ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
       asio::error_code& ec)
   {
-    return this->get_service().io_control(
-        this->get_implementation(), command, ec);
+    this->get_service().io_control(this->get_implementation(), command, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the socket.
@@ -1056,11 +1137,11 @@
    * operations. Asynchronous operations will never fail with the error
    * asio::error::would_block.
    */
-  asio::error_code non_blocking(
+  ASIO_SYNC_OP_VOID non_blocking(
       bool mode, asio::error_code& ec)
   {
-    return this->get_service().non_blocking(
-        this->get_implementation(), mode, ec);
+    this->get_service().non_blocking(this->get_implementation(), mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the native socket implementation.
@@ -1330,11 +1411,12 @@
    *   sock.async_wait(tcp::socket::wait_write, op);
    * } @endcode
    */
-  asio::error_code native_non_blocking(
+  ASIO_SYNC_OP_VOID native_non_blocking(
       bool mode, asio::error_code& ec)
   {
-    return this->get_service().native_non_blocking(
+    this->get_service().native_non_blocking(
         this->get_implementation(), mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the local endpoint of the socket.
@@ -1483,10 +1565,11 @@
    * }
    * @endcode
    */
-  asio::error_code shutdown(shutdown_type what,
+  ASIO_SYNC_OP_VOID shutdown(shutdown_type what,
       asio::error_code& ec)
   {
-    return this->get_service().shutdown(this->get_implementation(), what, ec);
+    this->get_service().shutdown(this->get_implementation(), what, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Wait for the socket to become ready to read, ready to write, or to have
@@ -1531,9 +1614,10 @@
    * socket.wait(asio::ip::tcp::socket::wait_read, ec);
    * @endcode
    */
-  asio::error_code wait(wait_type w, asio::error_code& ec)
+  ASIO_SYNC_OP_VOID wait(wait_type w, asio::error_code& ec)
   {
-    return this->get_service().wait(this->get_implementation(), w, ec);
+    this->get_service().wait(this->get_implementation(), w, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Asynchronously wait for the socket to become ready to read, ready to
@@ -1581,19 +1665,42 @@
     // not meet the documented type requirements for a WaitHandler.
     ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_wait(this->get_implementation(),
         w, ASIO_MOVE_CAST(WaitHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WaitHandler,
+      void (asio::error_code)> init(handler);
+
+    this->get_service().async_wait(this->get_implementation(),
+        w, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
 protected:
   /// Protected destructor to prevent deletion through this type.
+  /**
+   * This function destroys the socket, cancelling any outstanding asynchronous
+   * operations associated with the socket as if by calling @c cancel.
+   */
   ~basic_socket()
   {
   }
+
+private:
+  // Disallow copying and assignment.
+  basic_socket(const basic_socket&) ASIO_DELETED;
+  basic_socket& operator=(const basic_socket&) ASIO_DELETED;
 };
 
 } // namespace asio
 
 #include "asio/detail/pop_options.hpp"
 
+#if !defined(ASIO_ENABLE_OLD_SERVICES)
+# undef ASIO_SVC_T
+#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_BASIC_SOCKET_HPP
diff --git a/asio/include/asio/basic_socket_acceptor.hpp b/asio/include/asio/basic_socket_acceptor.hpp
index 92d2c4b..9554bb9 100644
--- a/asio/include/asio/basic_socket_acceptor.hpp
+++ b/asio/include/asio/basic_socket_acceptor.hpp
@@ -2,7 +2,7 @@
 // basic_socket_acceptor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -22,9 +22,27 @@
 #include "asio/detail/throw_error.hpp"
 #include "asio/detail/type_traits.hpp"
 #include "asio/error.hpp"
-#include "asio/socket_acceptor_service.hpp"
 #include "asio/socket_base.hpp"
 
+#if defined(ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(ASIO_HAS_MOVE)
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/socket_acceptor_service.hpp"
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+# if defined(ASIO_WINDOWS_RUNTIME)
+#  include "asio/detail/null_socket_service.hpp"
+#  define ASIO_SVC_T detail::null_socket_service<Protocol>
+# elif defined(ASIO_HAS_IOCP)
+#  include "asio/detail/win_iocp_socket_service.hpp"
+#  define ASIO_SVC_T detail::win_iocp_socket_service<Protocol>
+# else
+#  include "asio/detail/reactive_socket_service.hpp"
+#  define ASIO_SVC_T detail::reactive_socket_service<Protocol>
+# endif
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
@@ -49,15 +67,22 @@
  * acceptor.listen();
  * @endcode
  */
-template <typename Protocol,
-    typename SocketAcceptorService = socket_acceptor_service<Protocol> >
+template <typename Protocol
+    ASIO_SVC_TPARAM_DEF1(= socket_acceptor_service<Protocol>)>
 class basic_socket_acceptor
-  : public basic_io_object<SocketAcceptorService>,
+  : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>,
     public socket_base
 {
 public:
+  /// The type of the executor associated with the object.
+  typedef io_context::executor_type executor_type;
+
   /// The native representation of an acceptor.
-  typedef typename SocketAcceptorService::native_handle_type native_handle_type;
+#if defined(GENERATING_DOCUMENTATION)
+  typedef implementation_defined native_handle_type;
+#else
+  typedef typename ASIO_SVC_T::native_handle_type native_handle_type;
+#endif
 
   /// The protocol type.
   typedef Protocol protocol_type;
@@ -76,7 +101,7 @@
    * acceptor.
    */
   explicit basic_socket_acceptor(asio::io_context& io_context)
-    : basic_io_object<SocketAcceptorService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
   }
 
@@ -94,7 +119,7 @@
    */
   basic_socket_acceptor(asio::io_context& io_context,
       const protocol_type& protocol)
-    : basic_io_object<SocketAcceptorService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
     asio::error_code ec;
     this->get_service().open(this->get_implementation(), protocol, ec);
@@ -130,7 +155,7 @@
    */
   basic_socket_acceptor(asio::io_context& io_context,
       const endpoint_type& endpoint, bool reuse_addr = true)
-    : basic_io_object<SocketAcceptorService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
     asio::error_code ec;
     const protocol_type protocol = endpoint.protocol();
@@ -145,7 +170,7 @@
     this->get_service().bind(this->get_implementation(), endpoint, ec);
     asio::detail::throw_error(ec, "bind");
     this->get_service().listen(this->get_implementation(),
-        socket_base::max_connections, ec);
+        socket_base::max_listen_connections, ec);
     asio::detail::throw_error(ec, "listen");
   }
 
@@ -166,7 +191,7 @@
    */
   basic_socket_acceptor(asio::io_context& io_context,
       const protocol_type& protocol, const native_handle_type& native_acceptor)
-    : basic_io_object<SocketAcceptorService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
     asio::error_code ec;
     this->get_service().assign(this->get_implementation(),
@@ -186,8 +211,7 @@
    * constructed using the @c basic_socket_acceptor(io_context&) constructor.
    */
   basic_socket_acceptor(basic_socket_acceptor&& other)
-    : basic_io_object<SocketAcceptorService>(
-        ASIO_MOVE_CAST(basic_socket_acceptor)(other))
+    : basic_io_object<ASIO_SVC_T>(std::move(other))
   {
   }
 
@@ -203,13 +227,12 @@
    */
   basic_socket_acceptor& operator=(basic_socket_acceptor&& other)
   {
-    basic_io_object<SocketAcceptorService>::operator=(
-        ASIO_MOVE_CAST(basic_socket_acceptor)(other));
+    basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
     return *this;
   }
 
   // All socket acceptors have access to each other's implementations.
-  template <typename Protocol1, typename SocketAcceptorService1>
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
   friend class basic_socket_acceptor;
 
   /// Move-construct a basic_socket_acceptor from an acceptor of another
@@ -223,11 +246,11 @@
    * @note Following the move, the moved-from object is in the same state as if
    * constructed using the @c basic_socket(io_context&) constructor.
    */
-  template <typename Protocol1, typename SocketAcceptorService1>
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
   basic_socket_acceptor(
-      basic_socket_acceptor<Protocol1, SocketAcceptorService1>&& other,
+      basic_socket_acceptor<Protocol1 ASIO_SVC_TARG1>&& other,
       typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
-    : basic_io_object<SocketAcceptorService>(
+    : basic_io_object<ASIO_SVC_T>(
         other.get_service().get_io_context())
   {
     this->get_service().template converting_move_construct<Protocol1>(
@@ -245,19 +268,67 @@
    * @note Following the move, the moved-from object is in the same state as if
    * constructed using the @c basic_socket(io_context&) constructor.
    */
-  template <typename Protocol1, typename SocketAcceptorService1>
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
   typename enable_if<is_convertible<Protocol1, Protocol>::value,
       basic_socket_acceptor>::type& operator=(
-        basic_socket_acceptor<Protocol1, SocketAcceptorService1>&& other)
+        basic_socket_acceptor<Protocol1 ASIO_SVC_TARG1>&& other)
   {
-    basic_socket_acceptor tmp(ASIO_MOVE_CAST2(basic_socket_acceptor<
-            Protocol1, SocketAcceptorService1>)(other));
-    basic_io_object<SocketAcceptorService>::operator=(
-        ASIO_MOVE_CAST(basic_socket_acceptor)(tmp));
+    basic_socket_acceptor tmp(std::move(other));
+    basic_io_object<ASIO_SVC_T>::operator=(std::move(tmp));
     return *this;
   }
 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
 
+  /// Destroys the acceptor.
+  /**
+   * This function destroys the acceptor, cancelling any outstanding
+   * asynchronous operations associated with the acceptor as if by calling
+   * @c cancel.
+   */
+  ~basic_socket_acceptor()
+  {
+  }
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+  // These functions are provided by basic_io_object<>.
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_context()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_context();
+  }
+
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_service()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_service();
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+  /// Get the executor associated with the object.
+  executor_type get_executor() ASIO_NOEXCEPT
+  {
+    return basic_io_object<ASIO_SVC_T>::get_executor();
+  }
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
   /// Open the acceptor using the specified protocol.
   /**
    * This function opens the socket acceptor so that it will use the specified
@@ -300,10 +371,11 @@
    * }
    * @endcode
    */
-  asio::error_code open(const protocol_type& protocol,
+  ASIO_SYNC_OP_VOID open(const protocol_type& protocol,
       asio::error_code& ec)
   {
-    return this->get_service().open(this->get_implementation(), protocol, ec);
+    this->get_service().open(this->get_implementation(), protocol, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Assigns an existing native acceptor to the acceptor.
@@ -335,11 +407,12 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code assign(const protocol_type& protocol,
+  ASIO_SYNC_OP_VOID assign(const protocol_type& protocol,
       const native_handle_type& native_acceptor, asio::error_code& ec)
   {
-    return this->get_service().assign(this->get_implementation(),
+    this->get_service().assign(this->get_implementation(),
         protocol, native_acceptor, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the acceptor is open.
@@ -396,10 +469,11 @@
    * }
    * @endcode
    */
-  asio::error_code bind(const endpoint_type& endpoint,
+  ASIO_SYNC_OP_VOID bind(const endpoint_type& endpoint,
       asio::error_code& ec)
   {
-    return this->get_service().bind(this->get_implementation(), endpoint, ec);
+    this->get_service().bind(this->get_implementation(), endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Place the acceptor into the state where it will listen for new
@@ -412,7 +486,7 @@
    *
    * @throws asio::system_error Thrown on failure.
    */
-  void listen(int backlog = socket_base::max_connections)
+  void listen(int backlog = socket_base::max_listen_connections)
   {
     asio::error_code ec;
     this->get_service().listen(this->get_implementation(), backlog, ec);
@@ -434,16 +508,17 @@
    * asio::ip::tcp::acceptor acceptor(io_context);
    * ...
    * asio::error_code ec;
-   * acceptor.listen(asio::socket_base::max_connections, ec);
+   * acceptor.listen(asio::socket_base::max_listen_connections, ec);
    * if (ec)
    * {
    *   // An error occurred.
    * }
    * @endcode
    */
-  asio::error_code listen(int backlog, asio::error_code& ec)
+  ASIO_SYNC_OP_VOID listen(int backlog, asio::error_code& ec)
   {
-    return this->get_service().listen(this->get_implementation(), backlog, ec);
+    this->get_service().listen(this->get_implementation(), backlog, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Close the acceptor.
@@ -485,9 +560,10 @@
    * }
    * @endcode
    */
-  asio::error_code close(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID close(asio::error_code& ec)
   {
-    return this->get_service().close(this->get_implementation(), ec);
+    this->get_service().close(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native acceptor representation.
@@ -524,9 +600,10 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code cancel(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
   {
-    return this->get_service().cancel(this->get_implementation(), ec);
+    this->get_service().cancel(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Set an option on the acceptor.
@@ -585,11 +662,11 @@
    * @endcode
    */
   template <typename SettableSocketOption>
-  asio::error_code set_option(const SettableSocketOption& option,
+  ASIO_SYNC_OP_VOID set_option(const SettableSocketOption& option,
       asio::error_code& ec)
   {
-    return this->get_service().set_option(
-        this->get_implementation(), option, ec);
+    this->get_service().set_option(this->get_implementation(), option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get an option from the acceptor.
@@ -650,11 +727,11 @@
    * @endcode
    */
   template <typename GettableSocketOption>
-  asio::error_code get_option(GettableSocketOption& option,
+  ASIO_SYNC_OP_VOID get_option(GettableSocketOption& option,
       asio::error_code& ec)
   {
-    return this->get_service().get_option(
-        this->get_implementation(), option, ec);
+    this->get_service().get_option(this->get_implementation(), option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Perform an IO control command on the acceptor.
@@ -711,11 +788,11 @@
    * @endcode
    */
   template <typename IoControlCommand>
-  asio::error_code io_control(IoControlCommand& command,
+  ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
       asio::error_code& ec)
   {
-    return this->get_service().io_control(
-        this->get_implementation(), command, ec);
+    this->get_service().io_control(this->get_implementation(), command, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the acceptor.
@@ -767,11 +844,11 @@
    * operations. Asynchronous operations will never fail with the error
    * asio::error::would_block.
    */
-  asio::error_code non_blocking(
+  ASIO_SYNC_OP_VOID non_blocking(
       bool mode, asio::error_code& ec)
   {
-    return this->get_service().non_blocking(
-        this->get_implementation(), mode, ec);
+    this->get_service().non_blocking(this->get_implementation(), mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the native acceptor implementation.
@@ -831,11 +908,12 @@
    * function fails with asio::error::invalid_argument, as the
    * combination does not make sense.
    */
-  asio::error_code native_non_blocking(
+  ASIO_SYNC_OP_VOID native_non_blocking(
       bool mode, asio::error_code& ec)
   {
-    return this->get_service().native_non_blocking(
+    this->get_service().native_non_blocking(
         this->get_implementation(), mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the local endpoint of the acceptor.
@@ -931,9 +1009,10 @@
    * acceptor.wait(asio::ip::tcp::acceptor::wait_read, ec);
    * @endcode
    */
-  asio::error_code wait(wait_type w, asio::error_code& ec)
+  ASIO_SYNC_OP_VOID wait(wait_type w, asio::error_code& ec)
   {
-    return this->get_service().wait(this->get_implementation(), w, ec);
+    this->get_service().wait(this->get_implementation(), w, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Asynchronously wait for the acceptor to become ready to read, ready to
@@ -983,10 +1062,21 @@
     // not meet the documented type requirements for a WaitHandler.
     ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_wait(this->get_implementation(),
         w, ASIO_MOVE_CAST(WaitHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WaitHandler,
+      void (asio::error_code)> init(handler);
+
+    this->get_service().async_wait(this->get_implementation(),
+        w, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
+#if !defined(ASIO_NO_EXTENSIONS)
   /// Accept a new connection.
   /**
    * This function is used to accept a new connection from a peer into the
@@ -1005,9 +1095,15 @@
    * acceptor.accept(socket);
    * @endcode
    */
+#if defined(ASIO_ENABLE_OLD_SERVICES)
   template <typename Protocol1, typename SocketService>
   void accept(basic_socket<Protocol1, SocketService>& peer,
       typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+  template <typename Protocol1>
+  void accept(basic_socket<Protocol1>& peer,
+      typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   {
     asio::error_code ec;
     this->get_service().accept(this->get_implementation(),
@@ -1038,14 +1134,22 @@
    * }
    * @endcode
    */
+#if defined(ASIO_ENABLE_OLD_SERVICES)
   template <typename Protocol1, typename SocketService>
-  asio::error_code accept(
+  ASIO_SYNC_OP_VOID accept(
       basic_socket<Protocol1, SocketService>& peer,
       asio::error_code& ec,
       typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+  template <typename Protocol1>
+  ASIO_SYNC_OP_VOID accept(
+      basic_socket<Protocol1>& peer, asio::error_code& ec,
+      typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   {
-    return this->get_service().accept(this->get_implementation(),
+    this->get_service().accept(this->get_implementation(),
         peer, static_cast<endpoint_type*>(0), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Start an asynchronous accept.
@@ -1086,20 +1190,39 @@
    * acceptor.async_accept(socket, accept_handler);
    * @endcode
    */
+#if defined(ASIO_ENABLE_OLD_SERVICES)
   template <typename Protocol1, typename SocketService, typename AcceptHandler>
   ASIO_INITFN_RESULT_TYPE(AcceptHandler,
       void (asio::error_code))
   async_accept(basic_socket<Protocol1, SocketService>& peer,
       ASIO_MOVE_ARG(AcceptHandler) handler,
       typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+  template <typename Protocol1, typename AcceptHandler>
+  ASIO_INITFN_RESULT_TYPE(AcceptHandler,
+      void (asio::error_code))
+  async_accept(basic_socket<Protocol1>& peer,
+      ASIO_MOVE_ARG(AcceptHandler) handler,
+      typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   {
     // If you get an error on the following line it means that your handler does
     // not meet the documented type requirements for a AcceptHandler.
     ASIO_ACCEPT_HANDLER_CHECK(AcceptHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_accept(this->get_implementation(),
         peer, static_cast<endpoint_type*>(0),
         ASIO_MOVE_CAST(AcceptHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<AcceptHandler,
+      void (asio::error_code)> init(handler);
+
+    this->get_service().async_accept(this->get_implementation(),
+        peer, static_cast<endpoint_type*>(0), init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Accept a new connection and obtain the endpoint of the peer
@@ -1125,9 +1248,13 @@
    * acceptor.accept(socket, endpoint);
    * @endcode
    */
+#if defined(ASIO_ENABLE_OLD_SERVICES)
   template <typename SocketService>
   void accept(basic_socket<protocol_type, SocketService>& peer,
       endpoint_type& peer_endpoint)
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+  void accept(basic_socket<protocol_type>& peer, endpoint_type& peer_endpoint)
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   {
     asio::error_code ec;
     this->get_service().accept(this->get_implementation(),
@@ -1163,13 +1290,19 @@
    * }
    * @endcode
    */
+#if defined(ASIO_ENABLE_OLD_SERVICES)
   template <typename SocketService>
-  asio::error_code accept(
+  ASIO_SYNC_OP_VOID accept(
       basic_socket<protocol_type, SocketService>& peer,
       endpoint_type& peer_endpoint, asio::error_code& ec)
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+  ASIO_SYNC_OP_VOID accept(basic_socket<protocol_type>& peer,
+      endpoint_type& peer_endpoint, asio::error_code& ec)
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   {
-    return this->get_service().accept(
+    this->get_service().accept(
         this->get_implementation(), peer, &peer_endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Start an asynchronous accept.
@@ -1198,19 +1331,38 @@
    * of the handler will be performed in a manner equivalent to using
    * asio::io_context::post().
    */
+#if defined(ASIO_ENABLE_OLD_SERVICES)
   template <typename SocketService, typename AcceptHandler>
   ASIO_INITFN_RESULT_TYPE(AcceptHandler,
       void (asio::error_code))
   async_accept(basic_socket<protocol_type, SocketService>& peer,
       endpoint_type& peer_endpoint, ASIO_MOVE_ARG(AcceptHandler) handler)
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+  template <typename AcceptHandler>
+  ASIO_INITFN_RESULT_TYPE(AcceptHandler,
+      void (asio::error_code))
+  async_accept(basic_socket<protocol_type>& peer,
+      endpoint_type& peer_endpoint, ASIO_MOVE_ARG(AcceptHandler) handler)
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   {
     // If you get an error on the following line it means that your handler does
     // not meet the documented type requirements for a AcceptHandler.
     ASIO_ACCEPT_HANDLER_CHECK(AcceptHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_accept(this->get_implementation(), peer,
         &peer_endpoint, ASIO_MOVE_CAST(AcceptHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<AcceptHandler,
+      void (asio::error_code)> init(handler);
+
+    this->get_service().async_accept(this->get_implementation(),
+        peer, &peer_endpoint, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 #if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
   /// Accept a new connection.
@@ -1321,10 +1473,22 @@
     ASIO_MOVE_ACCEPT_HANDLER_CHECK(MoveAcceptHandler,
         handler, typename Protocol::socket) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_accept(
         this->get_implementation(), static_cast<asio::io_context*>(0),
         static_cast<endpoint_type*>(0),
         ASIO_MOVE_CAST(MoveAcceptHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<MoveAcceptHandler,
+      void (asio::error_code,
+        typename Protocol::socket)> init(handler);
+
+    this->get_service().async_accept(
+        this->get_implementation(), static_cast<asio::io_context*>(0),
+        static_cast<endpoint_type*>(0), init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Accept a new connection.
@@ -1447,9 +1611,20 @@
     ASIO_MOVE_ACCEPT_HANDLER_CHECK(MoveAcceptHandler,
         handler, typename Protocol::socket) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_accept(this->get_implementation(),
         &io_context, static_cast<endpoint_type*>(0),
         ASIO_MOVE_CAST(MoveAcceptHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<MoveAcceptHandler,
+      void (asio::error_code,
+        typename Protocol::socket)> init(handler);
+
+    this->get_service().async_accept(this->get_implementation(),
+        &io_context, static_cast<endpoint_type*>(0), init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Accept a new connection.
@@ -1577,9 +1752,21 @@
     ASIO_MOVE_ACCEPT_HANDLER_CHECK(MoveAcceptHandler,
         handler, typename Protocol::socket) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_accept(this->get_implementation(),
         static_cast<asio::io_context*>(0), &peer_endpoint,
         ASIO_MOVE_CAST(MoveAcceptHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<MoveAcceptHandler,
+      void (asio::error_code,
+        typename Protocol::socket)> init(handler);
+
+    this->get_service().async_accept(this->get_implementation(),
+        static_cast<asio::io_context*>(0), &peer_endpoint,
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Accept a new connection.
@@ -1720,9 +1907,20 @@
     ASIO_MOVE_ACCEPT_HANDLER_CHECK(MoveAcceptHandler,
         handler, typename Protocol::socket) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_accept(
         this->get_implementation(), &io_context, &peer_endpoint,
         ASIO_MOVE_CAST(MoveAcceptHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<MoveAcceptHandler,
+      void (asio::error_code,
+        typename Protocol::socket)> init(handler);
+
+    this->get_service().async_accept(this->get_implementation(),
+        &io_context, &peer_endpoint, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
 };
@@ -1731,4 +1929,8 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#if !defined(ASIO_ENABLE_OLD_SERVICES)
+# undef ASIO_SVC_T
+#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_BASIC_SOCKET_ACCEPTOR_HPP
diff --git a/asio/include/asio/basic_socket_iostream.hpp b/asio/include/asio/basic_socket_iostream.hpp
index 12a008b..ad4759b 100644
--- a/asio/include/asio/basic_socket_iostream.hpp
+++ b/asio/include/asio/basic_socket_iostream.hpp
@@ -2,7 +2,7 @@
 // basic_socket_iostream.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -22,7 +22,10 @@
 #include <istream>
 #include <ostream>
 #include "asio/basic_socket_streambuf.hpp"
-#include "asio/stream_socket_service.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/stream_socket_service.hpp"
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 #if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
 
@@ -33,8 +36,8 @@
 //   explicit basic_socket_iostream(T1 x1, ..., Tn xn)
 //     : std::basic_iostream<char>(
 //         &this->detail::socket_iostream_base<
-//           Protocol, StreamSocketService, Time,
-//           TimeTraits, TimerService>::streambuf_)
+//           Protocol ASIO_SVC_TARG, Clock,
+//           WaitTraits ASIO_SVC_TARG1>::streambuf_)
 //   {
 //     if (rdbuf()->connect(x1, ..., xn) == 0)
 //       this->setstate(std::ios_base::failbit);
@@ -46,8 +49,8 @@
   explicit basic_socket_iostream(ASIO_VARIADIC_BYVAL_PARAMS(n)) \
     : std::basic_iostream<char>( \
         &this->detail::socket_iostream_base< \
-          Protocol, StreamSocketService, Time, \
-          TimeTraits, TimerService>::streambuf_) \
+          Protocol ASIO_SVC_TARG, Clock, \
+          WaitTraits ASIO_SVC_TARG1>::streambuf_) \
   { \
     this->setf(std::ios_base::unitbuf); \
     if (rdbuf()->connect(ASIO_VARIADIC_BYVAL_ARGS(n)) == 0) \
@@ -82,60 +85,103 @@
 
 // A separate base class is used to ensure that the streambuf is initialised
 // prior to the basic_socket_iostream's basic_iostream base class.
-template <typename Protocol, typename StreamSocketService,
-    typename Time, typename TimeTraits, typename TimerService>
+template <typename Protocol ASIO_SVC_TPARAM,
+    typename Clock, typename WaitTraits ASIO_SVC_TPARAM1>
 class socket_iostream_base
 {
 protected:
-  basic_socket_streambuf<Protocol, StreamSocketService,
-    Time, TimeTraits, TimerService> streambuf_;
+  socket_iostream_base()
+  {
+  }
+
+#if defined(ASIO_HAS_MOVE)
+  socket_iostream_base(socket_iostream_base&& other)
+    : streambuf_(std::move(other.streambuf_))
+  {
+  }
+
+  socket_iostream_base(basic_stream_socket<Protocol> s)
+    : streambuf_(std::move(s))
+  {
+  }
+
+  socket_iostream_base& operator=(socket_iostream_base&& other)
+  {
+    streambuf_ = std::move(other.streambuf_);
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE)
+
+  basic_socket_streambuf<Protocol ASIO_SVC_TARG,
+    Clock, WaitTraits ASIO_SVC_TARG1> streambuf_;
 };
 
-}
+} // namespace detail
+
+#if !defined(ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
+#define ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol
+    ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>),
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+    typename Clock = boost::posix_time::ptime,
+    typename WaitTraits = time_traits<Clock>
+    ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)>
+#else
+    typename Clock = chrono::steady_clock,
+    typename WaitTraits = wait_traits<Clock>
+    ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)>
+#endif
+class basic_socket_iostream;
+
+#endif // !defined(ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
 
 /// Iostream interface for a socket.
+#if defined(GENERATING_DOCUMENTATION)
 template <typename Protocol,
-    typename StreamSocketService = stream_socket_service<Protocol>,
-#if defined(ASIO_HAS_BOOST_DATE_TIME) \
-  || defined(GENERATING_DOCUMENTATION)
-    typename Time = boost::posix_time::ptime,
-    typename TimeTraits = asio::time_traits<Time>,
-    typename TimerService = deadline_timer_service<Time, TimeTraits> >
-#else
-    typename Time = steady_timer::clock_type,
-    typename TimeTraits = steady_timer::traits_type,
-    typename TimerService = steady_timer::service_type>
-#endif
+    typename Clock = chrono::steady_clock,
+    typename WaitTraits = wait_traits<Clock> >
+#else // defined(GENERATING_DOCUMENTATION)
+template <typename Protocol ASIO_SVC_TPARAM,
+    typename Clock, typename WaitTraits ASIO_SVC_TPARAM1>
+#endif // defined(GENERATING_DOCUMENTATION)
 class basic_socket_iostream
-  : private detail::socket_iostream_base<Protocol,
-        StreamSocketService, Time, TimeTraits, TimerService>,
+  : private detail::socket_iostream_base<Protocol
+        ASIO_SVC_TARG, Clock, WaitTraits ASIO_SVC_TARG1>,
     public std::basic_iostream<char>
 {
 private:
   // These typedefs are intended keep this class's implementation independent
-  // of whether it's using Boost.DateTime, Boost.Chrono or std::chrono.
+  // of whether it's using Boost.DateClock, Boost.Chrono or std::chrono.
 #if defined(ASIO_HAS_BOOST_DATE_TIME)
-  typedef TimeTraits traits_helper;
+  typedef WaitTraits traits_helper;
 #else
-  typedef detail::chrono_time_traits<Time, TimeTraits> traits_helper;
+  typedef detail::chrono_time_traits<Clock, WaitTraits> traits_helper;
 #endif
 
 public:
+  /// The protocol type.
+  typedef Protocol protocol_type;
+
   /// The endpoint type.
   typedef typename Protocol::endpoint endpoint_type;
 
+  /// The clock type.
+  typedef Clock clock_type;
+
 #if defined(GENERATING_DOCUMENTATION)
   /// (Deprecated: Use time_point.) The time type.
-  typedef typename TimeTraits::time_type time_type;
+  typedef typename WaitTraits::time_type time_type;
 
   /// The time type.
-  typedef typename TimeTraits::time_point time_point;
+  typedef typename WaitTraits::time_point time_point;
 
   /// (Deprecated: Use duration.) The duration type.
-  typedef typename TimeTraits::duration_type duration_type;
+  typedef typename WaitTraits::duration_type duration_type;
 
   /// The duration type.
-  typedef typename TimeTraits::duration duration;
+  typedef typename WaitTraits::duration duration;
 #else
 # if !defined(ASIO_NO_DEPRECATED)
   typedef typename traits_helper::time_type time_type;
@@ -149,12 +195,49 @@
   basic_socket_iostream()
     : std::basic_iostream<char>(
         &this->detail::socket_iostream_base<
-          Protocol, StreamSocketService, Time,
-          TimeTraits, TimerService>::streambuf_)
+          Protocol ASIO_SVC_TARG, Clock,
+          WaitTraits ASIO_SVC_TARG1>::streambuf_)
   {
     this->setf(std::ios_base::unitbuf);
   }
 
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+  /// Construct a basic_socket_iostream from the supplied socket.
+  explicit basic_socket_iostream(basic_stream_socket<protocol_type> s)
+    : detail::socket_iostream_base<
+        Protocol ASIO_SVC_TARG, Clock,
+        WaitTraits ASIO_SVC_TARG1>(std::move(s)),
+      std::basic_iostream<char>(
+        &this->detail::socket_iostream_base<
+          Protocol ASIO_SVC_TARG, Clock,
+          WaitTraits ASIO_SVC_TARG1>::streambuf_)
+  {
+    this->setf(std::ios_base::unitbuf);
+  }
+
+  /// Move-construct a basic_socket_iostream from another.
+  basic_socket_iostream(basic_socket_iostream&& other)
+    : detail::socket_iostream_base<
+        Protocol ASIO_SVC_TARG, Clock,
+        WaitTraits ASIO_SVC_TARG1>(std::move(other)),
+      std::basic_iostream<char>(std::move(other))
+  {
+    this->set_rdbuf(&this->detail::socket_iostream_base<
+          Protocol ASIO_SVC_TARG, Clock,
+          WaitTraits ASIO_SVC_TARG1>::streambuf_);
+  }
+
+  /// Move-assign a basic_socket_iostream from another.
+  basic_socket_iostream& operator=(basic_socket_iostream&& other)
+  {
+    std::basic_iostream<char>::operator=(std::move(other));
+    detail::socket_iostream_base<
+        Protocol ASIO_SVC_TARG, Clock,
+        WaitTraits ASIO_SVC_TARG1>::operator=(std::move(other));
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
 #if defined(GENERATING_DOCUMENTATION)
   /// Establish a connection to an endpoint corresponding to a resolver query.
   /**
@@ -169,8 +252,8 @@
   explicit basic_socket_iostream(T... x)
     : std::basic_iostream<char>(
         &this->detail::socket_iostream_base<
-          Protocol, StreamSocketService, Time,
-          TimeTraits, TimerService>::streambuf_)
+          Protocol ASIO_SVC_TARG, Clock,
+          WaitTraits ASIO_SVC_TARG1>::streambuf_)
   {
     this->setf(std::ios_base::unitbuf);
     if (rdbuf()->connect(x...) == 0)
@@ -208,14 +291,20 @@
   }
 
   /// Return a pointer to the underlying streambuf.
-  basic_socket_streambuf<Protocol, StreamSocketService,
-    Time, TimeTraits, TimerService>* rdbuf() const
+  basic_socket_streambuf<Protocol ASIO_SVC_TARG,
+    Clock, WaitTraits ASIO_SVC_TARG1>* rdbuf() const
   {
-    return const_cast<basic_socket_streambuf<Protocol, StreamSocketService,
-      Time, TimeTraits, TimerService>*>(
+    return const_cast<basic_socket_streambuf<Protocol ASIO_SVC_TARG,
+      Clock, WaitTraits ASIO_SVC_TARG1>*>(
         &this->detail::socket_iostream_base<
-          Protocol, StreamSocketService, Time,
-          TimeTraits, TimerService>::streambuf_);
+          Protocol ASIO_SVC_TARG, Clock,
+          WaitTraits ASIO_SVC_TARG1>::streambuf_);
+  }
+
+  /// Get a reference to the underlying socket.
+  basic_socket<Protocol ASIO_SVC_TARG>& socket()
+  {
+    return rdbuf()->socket();
   }
 
   /// Get the last error associated with the stream.
@@ -232,7 +321,7 @@
    */
   const asio::error_code& error() const
   {
-    return rdbuf()->puberror();
+    return rdbuf()->error();
   }
 
 #if !defined(ASIO_NO_DEPRECATED)
@@ -309,6 +398,12 @@
     rdbuf()->expires_from_now(expiry_time);
   }
 #endif // !defined(ASIO_NO_DEPRECATED)
+
+private:
+  // Disallow copying and assignment.
+  basic_socket_iostream(const basic_socket_iostream&) ASIO_DELETED;
+  basic_socket_iostream& operator=(
+      const basic_socket_iostream&) ASIO_DELETED;
 };
 
 } // namespace asio
diff --git a/asio/include/asio/basic_socket_streambuf.hpp b/asio/include/asio/basic_socket_streambuf.hpp
index 0a51459..42fb3ca 100644
--- a/asio/include/asio/basic_socket_streambuf.hpp
+++ b/asio/include/asio/basic_socket_streambuf.hpp
@@ -2,7 +2,7 @@
 // basic_socket_streambuf.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -20,15 +20,24 @@
 #if !defined(ASIO_NO_IOSTREAM)
 
 #include <streambuf>
+#include <vector>
 #include "asio/basic_socket.hpp"
-#include "asio/deadline_timer_service.hpp"
-#include "asio/detail/array.hpp"
+#include "asio/basic_stream_socket.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/memory.hpp"
 #include "asio/detail/throw_error.hpp"
 #include "asio/io_context.hpp"
-#include "asio/stream_socket_service.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/stream_socket_service.hpp"
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 #if defined(ASIO_HAS_BOOST_DATE_TIME)
-# include "asio/deadline_timer.hpp"
+# if defined(ASIO_ENABLE_OLD_SERVICES)
+#  include "asio/deadline_timer_service.hpp"
+# else // defined(ASIO_ENABLE_OLD_SERVICES)
+#  include "asio/detail/deadline_timer_service.hpp"
+# endif // defined(ASIO_ENABLE_OLD_SERVICES)
 #else
 # include "asio/steady_timer.hpp"
 #endif
@@ -39,14 +48,11 @@
 
 // A macro that should expand to:
 //   template <typename T1, ..., typename Tn>
-//   basic_socket_streambuf<Protocol, StreamSocketService,
-//     Time, TimeTraits, TimerService>* connect(
-//       T1 x1, ..., Tn xn)
+//   basic_socket_streambuf* connect(T1 x1, ..., Tn xn)
 //   {
 //     init_buffers();
-//     this->basic_socket<Protocol, StreamSocketService>::close(ec_);
 //     typedef typename Protocol::resolver resolver_type;
-//     resolver_type resolver(detail::socket_streambuf_base::io_context_);
+//     resolver_type resolver(socket().get_executor().context());
 //     connect_to_endpoints(
 //         resolver.resolve(x1, ..., xn, ec_));
 //     return !ec_ ? this : 0;
@@ -55,14 +61,11 @@
 
 # define ASIO_PRIVATE_CONNECT_DEF(n) \
   template <ASIO_VARIADIC_TPARAMS(n)> \
-  basic_socket_streambuf<Protocol, StreamSocketService, \
-    Time, TimeTraits, TimerService>* connect( \
-      ASIO_VARIADIC_BYVAL_PARAMS(n)) \
+  basic_socket_streambuf* connect(ASIO_VARIADIC_BYVAL_PARAMS(n)) \
   { \
     init_buffers(); \
-    this->basic_socket<Protocol, StreamSocketService>::close(ec_); \
     typedef typename Protocol::resolver resolver_type; \
-    resolver_type resolver(detail::socket_streambuf_base::io_context_); \
+    resolver_type resolver(socket().get_executor().context()); \
     connect_to_endpoints( \
         resolver.resolve(ASIO_VARIADIC_BYVAL_ARGS(n), ec_)); \
     return !ec_ ? this : 0; \
@@ -71,64 +74,118 @@
 
 #endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
 
+#if !defined(ASIO_ENABLE_OLD_SERVICES)
+# define ASIO_SVC_T1 detail::deadline_timer_service<traits_helper>
+#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
 namespace detail {
 
-// A separate base class is used to ensure that the io_context is initialised
-// prior to the basic_socket_streambuf's basic_socket base class.
-class socket_streambuf_base
+// A separate base class is used to ensure that the io_context member is
+// initialised prior to the basic_socket_streambuf's basic_socket base class.
+class socket_streambuf_io_context
 {
 protected:
-  io_context io_context_;
+  socket_streambuf_io_context(io_context* ctx)
+    : default_io_context_(ctx)
+  {
+  }
+
+  shared_ptr<io_context> default_io_context_;
+};
+
+// A separate base class is used to ensure that the dynamically allocated
+// buffers are constructed prior to the basic_socket_streambuf's basic_socket
+// base class. This makes moving the socket is the last potentially throwing
+// step in the streambuf's move constructor, giving the constructor a strong
+// exception safety guarantee.
+class socket_streambuf_buffers
+{
+protected:
+  socket_streambuf_buffers()
+    : get_buffer_(buffer_size),
+      put_buffer_(buffer_size)
+  {
+  }
+
+  enum { buffer_size = 512 };
+  std::vector<char> get_buffer_;
+  std::vector<char> put_buffer_;
 };
 
 } // namespace detail
 
-/// Iostream streambuf for a socket.
-template <typename Protocol,
-    typename StreamSocketService = stream_socket_service<Protocol>,
-#if defined(ASIO_HAS_BOOST_DATE_TIME) \
-  || defined(GENERATING_DOCUMENTATION)
-    typename Time = boost::posix_time::ptime,
-    typename TimeTraits = asio::time_traits<Time>,
-    typename TimerService = deadline_timer_service<Time, TimeTraits> >
+#if !defined(ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
+#define ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol
+    ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>),
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+    typename Clock = boost::posix_time::ptime,
+    typename WaitTraits = time_traits<Clock>
+    ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)>
 #else
-    typename Time = steady_timer::clock_type,
-    typename TimeTraits = steady_timer::traits_type,
-    typename TimerService = steady_timer::service_type>
+    typename Clock = chrono::steady_clock,
+    typename WaitTraits = wait_traits<Clock>
+    ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)>
 #endif
+class basic_socket_streambuf;
+
+#endif // !defined(ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
+
+/// Iostream streambuf for a socket.
+#if defined(GENERATING_DOCUMENTATION)
+template <typename Protocol,
+    typename Clock = chrono::steady_clock,
+    typename WaitTraits = wait_traits<Clock> >
+#else // defined(GENERATING_DOCUMENTATION)
+template <typename Protocol ASIO_SVC_TPARAM,
+    typename Clock, typename WaitTraits ASIO_SVC_TPARAM1>
+#endif // defined(GENERATING_DOCUMENTATION)
 class basic_socket_streambuf
   : public std::streambuf,
-    private detail::socket_streambuf_base,
-    public basic_socket<Protocol, StreamSocketService>
+    private detail::socket_streambuf_io_context,
+    private detail::socket_streambuf_buffers,
+#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+    private basic_socket<Protocol ASIO_SVC_TARG>
+#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+    public basic_socket<Protocol ASIO_SVC_TARG>
+#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
 {
 private:
   // These typedefs are intended keep this class's implementation independent
-  // of whether it's using Boost.DateTime, Boost.Chrono or std::chrono.
+  // of whether it's using Boost.DateClock, Boost.Chrono or std::chrono.
 #if defined(ASIO_HAS_BOOST_DATE_TIME)
-  typedef TimeTraits traits_helper;
+  typedef WaitTraits traits_helper;
 #else
-  typedef detail::chrono_time_traits<Time, TimeTraits> traits_helper;
+  typedef detail::chrono_time_traits<Clock, WaitTraits> traits_helper;
 #endif
 
 public:
+  /// The protocol type.
+  typedef Protocol protocol_type;
+
   /// The endpoint type.
   typedef typename Protocol::endpoint endpoint_type;
 
+  /// The clock type.
+  typedef Clock clock_type;
+
 #if defined(GENERATING_DOCUMENTATION)
   /// (Deprecated: Use time_point.) The time type.
-  typedef typename TimeTraits::time_type time_type;
+  typedef typename WaitTraits::time_type time_type;
 
   /// The time type.
-  typedef typename TimeTraits::time_point time_point;
+  typedef typename WaitTraits::time_point time_point;
 
   /// (Deprecated: Use duration.) The duration type.
-  typedef typename TimeTraits::duration_type duration_type;
+  typedef typename WaitTraits::duration_type duration_type;
 
   /// The duration type.
-  typedef typename TimeTraits::duration duration;
+  typedef typename WaitTraits::duration duration;
 #else
 # if !defined(ASIO_NO_DEPRECATED)
   typedef typename traits_helper::time_type time_type;
@@ -140,22 +197,64 @@
 
   /// Construct a basic_socket_streambuf without establishing a connection.
   basic_socket_streambuf()
-    : basic_socket<Protocol, StreamSocketService>(
-        this->detail::socket_streambuf_base::io_context_),
-      unbuffered_(false),
-      timer_service_(0),
-      timer_state_(no_timer)
+    : detail::socket_streambuf_io_context(new io_context),
+      basic_socket<Protocol ASIO_SVC_TARG>(*default_io_context_),
+      expiry_time_(max_expiry_time())
   {
     init_buffers();
   }
 
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+  /// Construct a basic_socket_streambuf from the supplied socket.
+  explicit basic_socket_streambuf(basic_stream_socket<protocol_type> s)
+    : detail::socket_streambuf_io_context(0),
+      basic_socket<Protocol ASIO_SVC_TARG>(std::move(s)),
+      expiry_time_(max_expiry_time())
+  {
+    init_buffers();
+  }
+
+  /// Move-construct a basic_socket_streambuf from another.
+  basic_socket_streambuf(basic_socket_streambuf&& other)
+    : detail::socket_streambuf_io_context(other),
+      basic_socket<Protocol ASIO_SVC_TARG>(std::move(other.socket())),
+      ec_(other.ec_),
+      expiry_time_(other.expiry_time_)
+  {
+    get_buffer_.swap(other.get_buffer_);
+    put_buffer_.swap(other.put_buffer_);
+    setg(other.eback(), other.gptr(), other.egptr());
+    setp(other.pptr(), other.epptr());
+    other.ec_ = asio::error_code();
+    other.expiry_time_ = max_expiry_time();
+    other.init_buffers();
+  }
+
+  /// Move-assign a basic_socket_streambuf from another.
+  basic_socket_streambuf& operator=(basic_socket_streambuf&& other)
+  {
+    this->close();
+    socket() = std::move(other.socket());
+    detail::socket_streambuf_io_context::operator=(other);
+    ec_ = other.ec_;
+    expiry_time_ = other.expiry_time_;
+    get_buffer_.swap(other.get_buffer_);
+    put_buffer_.swap(other.put_buffer_);
+    setg(other.eback(), other.gptr(), other.egptr());
+    setp(other.pptr(), other.epptr());
+    other.ec_ = asio::error_code();
+    other.expiry_time_ = max_expiry_time();
+    other.put_buffer_.resize(buffer_size);
+    other.init_buffers();
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
   /// Destructor flushes buffered data.
   virtual ~basic_socket_streambuf()
   {
     if (pptr() != pbase())
       overflow(traits_type::eof());
-
-    destroy_timer();
   }
 
   /// Establish a connection.
@@ -165,29 +264,11 @@
    * @return \c this if a connection was successfully established, a null
    * pointer otherwise.
    */
-  basic_socket_streambuf<Protocol, StreamSocketService,
-    Time, TimeTraits, TimerService>* connect(
-      const endpoint_type& endpoint)
+  basic_socket_streambuf* connect(const endpoint_type& endpoint)
   {
     init_buffers();
-
-    this->basic_socket<Protocol, StreamSocketService>::close(ec_);
-
-    if (timer_state_ == timer_has_expired)
-    {
-      ec_ = asio::error::operation_aborted;
-      return 0;
-    }
-
-    io_handler handler = { this };
-    this->basic_socket<Protocol, StreamSocketService>::async_connect(
-        endpoint, handler);
-
-    ec_ = asio::error::would_block;
-    this->get_service().get_io_context().restart();
-    do this->get_service().get_io_context().run_one();
-    while (ec_ == asio::error::would_block);
-
+    ec_ = asio::error_code();
+    this->connect_to_endpoints(&endpoint, &endpoint + 1);
     return !ec_ ? this : 0;
   }
 
@@ -202,17 +283,14 @@
    * pointer otherwise.
    */
   template <typename T1, ..., typename TN>
-  basic_socket_streambuf<Protocol, StreamSocketService>* connect(
-      T1 t1, ..., TN tn);
+  basic_socket_streambuf* connect(T1 t1, ..., TN tn);
 #elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
   template <typename... T>
-  basic_socket_streambuf<Protocol, StreamSocketService,
-    Time, TimeTraits, TimerService>* connect(T... x)
+  basic_socket_streambuf* connect(T... x)
   {
     init_buffers();
-    this->basic_socket<Protocol, StreamSocketService>::close(ec_);
     typedef typename Protocol::resolver resolver_type;
-    resolver_type resolver(detail::socket_streambuf_base::io_context_);
+    resolver_type resolver(socket().get_executor().context());
     connect_to_endpoints(resolver.resolve(x..., ec_));
     return !ec_ ? this : 0;
   }
@@ -225,27 +303,43 @@
    * @return \c this if a connection was successfully established, a null
    * pointer otherwise.
    */
-  basic_socket_streambuf<Protocol, StreamSocketService,
-    Time, TimeTraits, TimerService>* close()
+  basic_socket_streambuf* close()
   {
     sync();
-    this->basic_socket<Protocol, StreamSocketService>::close(ec_);
+    socket().close(ec_);
     if (!ec_)
       init_buffers();
     return !ec_ ? this : 0;
   }
 
+  /// Get a reference to the underlying socket.
+  basic_socket<Protocol ASIO_SVC_TARG>& socket()
+  {
+    return *this;
+  }
+
   /// Get the last error associated with the stream buffer.
   /**
    * @return An \c error_code corresponding to the last error from the stream
    * buffer.
    */
+  const asio::error_code& error() const
+  {
+    return ec_;
+  }
+
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use error().) Get the last error associated with the stream
+  /// buffer.
+  /**
+   * @return An \c error_code corresponding to the last error from the stream
+   * buffer.
+   */
   const asio::error_code& puberror() const
   {
     return error();
   }
 
-#if !defined(ASIO_NO_DEPRECATED)
   /// (Deprecated: Use expiry().) Get the stream buffer's expiry time as an
   /// absolute time.
   /**
@@ -254,9 +348,7 @@
    */
   time_point expires_at() const
   {
-    return timer_service_
-      ? timer_service_->expires_at(timer_implementation_)
-      : time_point();
+    return expiry_time_;
   }
 #endif // !defined(ASIO_NO_DEPRECATED)
 
@@ -267,13 +359,7 @@
    */
   time_point expiry() const
   {
-    return timer_service_
-#if defined(ASIO_HAS_BOOST_DATE_TIME)
-      ? timer_service_->expires_at(timer_implementation_)
-#else // defined(ASIO_HAS_BOOST_DATE_TIME)
-      ? timer_service_->expiry(timer_implementation_)
-#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-      : time_point();
+    return expiry_time_;
   }
 
   /// Set the stream buffer's expiry time as an absolute time.
@@ -287,33 +373,7 @@
    */
   void expires_at(const time_point& expiry_time)
   {
-    construct_timer();
-
-    asio::error_code ec;
-    timer_service_->expires_at(timer_implementation_, expiry_time, ec);
-    asio::detail::throw_error(ec, "expires_at");
-
-    start_timer();
-  }
-
-  /// Set the stream buffer's expiry time relative to now.
-  /**
-   * This function sets the expiry time associated with the stream. Stream
-   * operations performed after this time (where the operations cannot be
-   * completed using the internal buffers) will fail with the error
-   * asio::error::operation_aborted.
-   *
-   * @param expiry_time The expiry time to be used for the timer.
-   */
-  void expires_at(const duration& expiry_time)
-  {
-    construct_timer();
-
-    asio::error_code ec;
-    timer_service_->expires_from_now(timer_implementation_, expiry_time, ec);
-    asio::detail::throw_error(ec, "expires_from_now");
-
-    start_timer();
+    expiry_time_ = expiry_time;
   }
 
   /// Set the stream buffer's expiry time relative to now.
@@ -327,17 +387,7 @@
    */
   void expires_after(const duration& expiry_time)
   {
-    construct_timer();
-
-    asio::error_code ec;
-#if defined(ASIO_HAS_BOOST_DATE_TIME)
-    timer_service_->expires_from_now(timer_implementation_, expiry_time, ec);
-#else // defined(ASIO_HAS_BOOST_DATE_TIME)
-    timer_service_->expires_after(timer_implementation_, expiry_time, ec);
-#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-    asio::detail::throw_error(ec, "after");
-
-    start_timer();
+    expiry_time_ = traits_helper::add(traits_helper::now(), expiry_time);
   }
 
 #if !defined(ASIO_NO_DEPRECATED)
@@ -363,108 +413,124 @@
    */
   void expires_from_now(const duration& expiry_time)
   {
-    construct_timer();
-
-    asio::error_code ec;
-    timer_service_->expires_from_now(timer_implementation_, expiry_time, ec);
-    asio::detail::throw_error(ec, "expires_from_now");
-
-    start_timer();
+    expiry_time_ = traits_helper::add(traits_helper::now(), expiry_time);
   }
 #endif // !defined(ASIO_NO_DEPRECATED)
 
 protected:
   int_type underflow()
   {
-    if (gptr() == egptr())
+#if defined(ASIO_WINDOWS_RUNTIME)
+    ec_ = asio::error::operation_not_supported;
+    return traits_type::eof();
+#else // defined(ASIO_WINDOWS_RUNTIME)
+    if (gptr() != egptr())
+      return traits_type::eof();
+
+    for (;;)
     {
-      if (timer_state_ == timer_has_expired)
+      // Check if we are past the expiry time.
+      if (traits_helper::less_than(expiry_time_, traits_helper::now()))
       {
-        ec_ = asio::error::operation_aborted;
+        ec_ = asio::error::timed_out;
         return traits_type::eof();
       }
 
-      io_handler handler = { this };
-      this->get_service().async_receive(this->get_implementation(),
-          asio::buffer(asio::buffer(get_buffer_) + putback_max),
-          0, handler);
+      // Try to complete the operation without blocking.
+      if (!socket().native_non_blocking())
+        socket().native_non_blocking(true, ec_);
+      detail::buffer_sequence_adapter<mutable_buffer, mutable_buffer>
+        bufs(asio::buffer(get_buffer_) + putback_max);
+      detail::signed_size_type bytes = detail::socket_ops::recv(
+          socket().native_handle(), bufs.buffers(), bufs.count(), 0, ec_);
 
-      ec_ = asio::error::would_block;
-      this->get_service().get_io_context().restart();
-      do this->get_service().get_io_context().run_one();
-      while (ec_ == asio::error::would_block);
-      if (ec_)
+      // Check if operation succeeded.
+      if (bytes > 0)
+      {
+        setg(&get_buffer_[0], &get_buffer_[0] + putback_max,
+            &get_buffer_[0] + putback_max + bytes);
+        return traits_type::to_int_type(*gptr());
+      }
+
+      // Check for EOF.
+      if (bytes == 0)
+      {
+        ec_ = asio::error::eof;
+        return traits_type::eof();
+      }
+
+      // Operation failed.
+      if (ec_ != asio::error::would_block
+          && ec_ != asio::error::try_again)
         return traits_type::eof();
 
-      setg(&get_buffer_[0], &get_buffer_[0] + putback_max,
-          &get_buffer_[0] + putback_max + bytes_transferred_);
-      return traits_type::to_int_type(*gptr());
+      // Wait for socket to become ready.
+      if (detail::socket_ops::poll_read(
+            socket().native_handle(), 0, timeout(), ec_) < 0)
+        return traits_type::eof();
     }
-    else
-    {
-      return traits_type::eof();
-    }
+#endif // defined(ASIO_WINDOWS_RUNTIME)
   }
 
   int_type overflow(int_type c)
   {
-    if (unbuffered_)
+#if defined(ASIO_WINDOWS_RUNTIME)
+    ec_ = asio::error::operation_not_supported;
+    return traits_type::eof();
+#else // defined(ASIO_WINDOWS_RUNTIME)
+    char_type ch = traits_type::to_char_type(c);
+
+    // Determine what needs to be sent.
+    const_buffer output_buffer;
+    if (put_buffer_.empty())
     {
       if (traits_type::eq_int_type(c, traits_type::eof()))
-      {
-        // Nothing to do.
-        return traits_type::not_eof(c);
-      }
-      else
-      {
-        if (timer_state_ == timer_has_expired)
-        {
-          ec_ = asio::error::operation_aborted;
-          return traits_type::eof();
-        }
-
-        // Send the single character immediately.
-        char_type ch = traits_type::to_char_type(c);
-        io_handler handler = { this };
-        this->get_service().async_send(this->get_implementation(),
-            asio::buffer(&ch, sizeof(char_type)), 0, handler);
-
-        ec_ = asio::error::would_block;
-        this->get_service().get_io_context().restart();
-        do this->get_service().get_io_context().run_one();
-        while (ec_ == asio::error::would_block);
-        if (ec_)
-          return traits_type::eof();
-
-        return c;
-      }
+        return traits_type::not_eof(c); // Nothing to do.
+      output_buffer = asio::buffer(&ch, sizeof(char_type));
     }
     else
     {
-      // Send all data in the output buffer.
-      asio::const_buffer buffer =
-        asio::buffer(pbase(), pptr() - pbase());
-      while (buffer.size() > 0)
+      output_buffer = asio::buffer(pbase(),
+          (pptr() - pbase()) * sizeof(char_type));
+    }
+
+    while (output_buffer.size() > 0)
+    {
+      // Check if we are past the expiry time.
+      if (traits_helper::less_than(expiry_time_, traits_helper::now()))
       {
-        if (timer_state_ == timer_has_expired)
-        {
-          ec_ = asio::error::operation_aborted;
-          return traits_type::eof();
-        }
-
-        io_handler handler = { this };
-        this->get_service().async_send(this->get_implementation(),
-            asio::buffer(buffer), 0, handler);
-
-        ec_ = asio::error::would_block;
-        this->get_service().get_io_context().restart();
-        do this->get_service().get_io_context().run_one();
-        while (ec_ == asio::error::would_block);
-        if (ec_)
-          return traits_type::eof();
-
-        buffer = buffer + bytes_transferred_;
+        ec_ = asio::error::timed_out;
+        return traits_type::eof();
       }
+
+      // Try to complete the operation without blocking.
+      if (!socket().native_non_blocking())
+        socket().native_non_blocking(true, ec_);
+      detail::buffer_sequence_adapter<
+        const_buffer, const_buffer> bufs(output_buffer);
+      detail::signed_size_type bytes = detail::socket_ops::send(
+          socket().native_handle(), bufs.buffers(), bufs.count(), 0, ec_);
+
+      // Check if operation succeeded.
+      if (bytes > 0)
+      {
+        output_buffer += static_cast<std::size_t>(bytes);
+        continue;
+      }
+
+      // Operation failed.
+      if (ec_ != asio::error::would_block
+          && ec_ != asio::error::try_again)
+        return traits_type::eof();
+
+      // Wait for socket to become ready.
+      if (detail::socket_ops::poll_write(
+            socket().native_handle(), 0, timeout(), ec_) < 0)
+        return traits_type::eof();
+    }
+
+    if (!put_buffer_.empty())
+    {
       setp(&put_buffer_[0], &put_buffer_[0] + put_buffer_.size());
 
       // If the new character is eof then our work here is done.
@@ -472,10 +538,12 @@
         return traits_type::not_eof(c);
 
       // Add the new character to the output buffer.
-      *pptr() = traits_type::to_char_type(c);
+      *pptr() = ch;
       pbump(1);
-      return c;
     }
+
+    return c;
+#endif // defined(ASIO_WINDOWS_RUNTIME)
   }
 
   int sync()
@@ -487,156 +555,137 @@
   {
     if (pptr() == pbase() && s == 0 && n == 0)
     {
-      unbuffered_ = true;
+      put_buffer_.clear();
       setp(0, 0);
+      sync();
       return this;
     }
 
     return 0;
   }
 
-  /// Get the last error associated with the stream buffer.
-  /**
-   * @return An \c error_code corresponding to the last error from the stream
-   * buffer.
-   */
-  virtual const asio::error_code& error() const
-  {
-    return ec_;
-  }
-
 private:
+  // Disallow copying and assignment.
+  basic_socket_streambuf(const basic_socket_streambuf&) ASIO_DELETED;
+  basic_socket_streambuf& operator=(
+      const basic_socket_streambuf&) ASIO_DELETED;
+
   void init_buffers()
   {
     setg(&get_buffer_[0],
         &get_buffer_[0] + putback_max,
         &get_buffer_[0] + putback_max);
-    if (unbuffered_)
+
+    if (put_buffer_.empty())
       setp(0, 0);
     else
       setp(&put_buffer_[0], &put_buffer_[0] + put_buffer_.size());
   }
 
+  int timeout() const
+  {
+    int64_t msec = traits_helper::to_posix_duration(
+        traits_helper::subtract(expiry_time_,
+          traits_helper::now())).total_milliseconds();
+    if (msec > (std::numeric_limits<int>::max)())
+      msec = (std::numeric_limits<int>::max)();
+    else if (msec < 0)
+      msec = 0;
+    return static_cast<int>(msec);
+  }
+
   template <typename EndpointSequence>
   void connect_to_endpoints(const EndpointSequence& endpoints)
   {
-    if (!ec_)
-    {
-      typename EndpointSequence::iterator i = endpoints.begin();
-      typename EndpointSequence::iterator end = endpoints.end();
-      ec_ = asio::error::host_not_found;
-      while (ec_ && i != end)
-      {
-        this->basic_socket<Protocol, StreamSocketService>::close(ec_);
-
-        if (timer_state_ == timer_has_expired)
-        {
-          ec_ = asio::error::operation_aborted;
-          return;
-        }
-
-        io_handler handler = { this };
-        this->basic_socket<Protocol, StreamSocketService>::async_connect(
-            *i, handler);
-
-        ec_ = asio::error::would_block;
-        this->get_service().get_io_context().restart();
-        do this->get_service().get_io_context().run_one();
-        while (ec_ == asio::error::would_block);
-
-        ++i;
-      }
-    }
+    this->connect_to_endpoints(endpoints.begin(), endpoints.end());
   }
 
-  struct io_handler;
-  friend struct io_handler;
-  struct io_handler
+  template <typename EndpointIterator>
+  void connect_to_endpoints(EndpointIterator begin, EndpointIterator end)
   {
-    basic_socket_streambuf* this_;
+#if defined(ASIO_WINDOWS_RUNTIME)
+    ec_ = asio::error::operation_not_supported;
+#else // defined(ASIO_WINDOWS_RUNTIME)
+    if (ec_)
+      return;
 
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred = 0)
+    ec_ = asio::error::not_found;
+    for (EndpointIterator i = begin; i != end; ++i)
     {
-      this_->ec_ = ec;
-      this_->bytes_transferred_ = bytes_transferred;
+      // Check if we are past the expiry time.
+      if (traits_helper::less_than(expiry_time_, traits_helper::now()))
+      {
+        ec_ = asio::error::timed_out;
+        return;
+      }
+
+      // Close and reopen the socket.
+      typename Protocol::endpoint ep(*i);
+      socket().close(ec_);
+      socket().open(ep.protocol(), ec_);
+      if (ec_)
+        continue;
+
+      // Try to complete the operation without blocking.
+      if (!socket().native_non_blocking())
+        socket().native_non_blocking(true, ec_);
+      detail::socket_ops::connect(socket().native_handle(),
+          ep.data(), ep.size(), ec_);
+
+      // Check if operation succeeded.
+      if (!ec_)
+        return;
+
+      // Operation failed.
+      if (ec_ != asio::error::in_progress
+          && ec_ != asio::error::would_block)
+        continue;
+
+      // Wait for socket to become ready.
+      if (detail::socket_ops::poll_connect(
+            socket().native_handle(), timeout(), ec_) < 0)
+        continue;
+
+      // Get the error code from the connect operation.
+      int connect_error = 0;
+      size_t connect_error_len = sizeof(connect_error);
+      if (detail::socket_ops::getsockopt(socket().native_handle(), 0,
+            SOL_SOCKET, SO_ERROR, &connect_error, &connect_error_len, ec_)
+          == detail::socket_error_retval)
+        return;
+
+      // Check the result of the connect operation.
+      ec_ = asio::error_code(connect_error,
+          asio::error::get_system_category());
+      if (!ec_)
+        return;
     }
-  };
+#endif // defined(ASIO_WINDOWS_RUNTIME)
+  }
 
-  struct timer_handler;
-  friend struct timer_handler;
-  struct timer_handler
+  // Helper function to get the maximum expiry time.
+  static time_point max_expiry_time()
   {
-    basic_socket_streambuf* this_;
-
-    void operator()(const asio::error_code&)
-    {
-      time_point now = traits_helper::now();
-
 #if defined(ASIO_HAS_BOOST_DATE_TIME)
-      time_point expiry_time = this_->timer_service_->expires_at(
-            this_->timer_implementation_);
+    return boost::posix_time::pos_infin;
 #else // defined(ASIO_HAS_BOOST_DATE_TIME)
-      time_point expiry_time = this_->timer_service_->expiry(
-            this_->timer_implementation_);
+    return (time_point::max)();
 #endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-
-      if (traits_helper::less_than(now, expiry_time))
-      {
-        this_->timer_state_ = timer_is_pending;
-        this_->timer_service_->async_wait(this_->timer_implementation_, *this);
-      }
-      else
-      {
-        this_->timer_state_ = timer_has_expired;
-        asio::error_code ec;
-        this_->basic_socket<Protocol, StreamSocketService>::close(ec);
-      }
-    }
-  };
-
-  void construct_timer()
-  {
-    if (timer_service_ == 0)
-    {
-      TimerService& timer_service = use_service<TimerService>(
-          detail::socket_streambuf_base::io_context_);
-      timer_service.construct(timer_implementation_);
-      timer_service_ = &timer_service;
-    }
-  }
-
-  void destroy_timer()
-  {
-    if (timer_service_)
-      timer_service_->destroy(timer_implementation_);
-  }
-
-  void start_timer()
-  {
-    if (timer_state_ != timer_is_pending)
-    {
-      timer_handler handler = { this };
-      handler(asio::error_code());
-    }
   }
 
   enum { putback_max = 8 };
-  enum { buffer_size = 512 };
-  asio::detail::array<char, buffer_size> get_buffer_;
-  asio::detail::array<char, buffer_size> put_buffer_;
-  bool unbuffered_;
   asio::error_code ec_;
-  std::size_t bytes_transferred_;
-  TimerService* timer_service_;
-  typename TimerService::implementation_type timer_implementation_;
-  enum state { no_timer, timer_is_pending, timer_has_expired } timer_state_;
+  time_point expiry_time_;
 };
 
 } // namespace asio
 
 #include "asio/detail/pop_options.hpp"
 
+#if !defined(ASIO_ENABLE_OLD_SERVICES)
+# undef ASIO_SVC_T1
+#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
 # undef ASIO_PRIVATE_CONNECT_DEF
 #endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
diff --git a/asio/include/asio/basic_stream_socket.hpp b/asio/include/asio/basic_stream_socket.hpp
index 4708786..31e6850 100644
--- a/asio/include/asio/basic_stream_socket.hpp
+++ b/asio/include/asio/basic_stream_socket.hpp
@@ -2,7 +2,7 @@
 // basic_stream_socket.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -22,7 +22,10 @@
 #include "asio/detail/handler_type_requirements.hpp"
 #include "asio/detail/throw_error.hpp"
 #include "asio/error.hpp"
-#include "asio/stream_socket_service.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/stream_socket_service.hpp"
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 #include "asio/detail/push_options.hpp"
 
@@ -40,14 +43,19 @@
  * @par Concepts:
  * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
  */
-template <typename Protocol,
-    typename StreamSocketService = stream_socket_service<Protocol> >
+template <typename Protocol
+    ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>)>
 class basic_stream_socket
-  : public basic_socket<Protocol, StreamSocketService>
+  : public basic_socket<Protocol ASIO_SVC_TARG>
 {
 public:
   /// The native representation of a socket.
-  typedef typename StreamSocketService::native_handle_type native_handle_type;
+#if defined(GENERATING_DOCUMENTATION)
+  typedef implementation_defined native_handle_type;
+#else
+  typedef typename basic_socket<
+    Protocol ASIO_SVC_TARG>::native_handle_type native_handle_type;
+#endif
 
   /// The protocol type.
   typedef Protocol protocol_type;
@@ -65,7 +73,7 @@
    * dispatch handlers for any asynchronous operations performed on the socket.
    */
   explicit basic_stream_socket(asio::io_context& io_context)
-    : basic_socket<Protocol, StreamSocketService>(io_context)
+    : basic_socket<Protocol ASIO_SVC_TARG>(io_context)
   {
   }
 
@@ -83,7 +91,7 @@
    */
   basic_stream_socket(asio::io_context& io_context,
       const protocol_type& protocol)
-    : basic_socket<Protocol, StreamSocketService>(io_context, protocol)
+    : basic_socket<Protocol ASIO_SVC_TARG>(io_context, protocol)
   {
   }
 
@@ -104,7 +112,7 @@
    */
   basic_stream_socket(asio::io_context& io_context,
       const endpoint_type& endpoint)
-    : basic_socket<Protocol, StreamSocketService>(io_context, endpoint)
+    : basic_socket<Protocol ASIO_SVC_TARG>(io_context, endpoint)
   {
   }
 
@@ -124,7 +132,7 @@
    */
   basic_stream_socket(asio::io_context& io_context,
       const protocol_type& protocol, const native_handle_type& native_socket)
-    : basic_socket<Protocol, StreamSocketService>(
+    : basic_socket<Protocol ASIO_SVC_TARG>(
         io_context, protocol, native_socket)
   {
   }
@@ -141,8 +149,7 @@
    * constructed using the @c basic_stream_socket(io_context&) constructor.
    */
   basic_stream_socket(basic_stream_socket&& other)
-    : basic_socket<Protocol, StreamSocketService>(
-        ASIO_MOVE_CAST(basic_stream_socket)(other))
+    : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
   {
   }
 
@@ -158,8 +165,7 @@
    */
   basic_stream_socket& operator=(basic_stream_socket&& other)
   {
-    basic_socket<Protocol, StreamSocketService>::operator=(
-        ASIO_MOVE_CAST(basic_stream_socket)(other));
+    basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
     return *this;
   }
 
@@ -174,13 +180,11 @@
    * @note Following the move, the moved-from object is in the same state as if
    * constructed using the @c basic_stream_socket(io_context&) constructor.
    */
-  template <typename Protocol1, typename StreamSocketService1>
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
   basic_stream_socket(
-      basic_stream_socket<Protocol1, StreamSocketService1>&& other,
+      basic_stream_socket<Protocol1 ASIO_SVC_TARG1>&& other,
       typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
-    : basic_socket<Protocol, StreamSocketService>(
-        ASIO_MOVE_CAST2(basic_stream_socket<
-          Protocol1, StreamSocketService1>)(other))
+    : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
   {
   }
 
@@ -194,18 +198,25 @@
    * @note Following the move, the moved-from object is in the same state as if
    * constructed using the @c basic_stream_socket(io_context&) constructor.
    */
-  template <typename Protocol1, typename StreamSocketService1>
+  template <typename Protocol1 ASIO_SVC_TPARAM1>
   typename enable_if<is_convertible<Protocol1, Protocol>::value,
       basic_stream_socket>::type& operator=(
-        basic_stream_socket<Protocol1, StreamSocketService1>&& other)
+        basic_stream_socket<Protocol1 ASIO_SVC_TARG1>&& other)
   {
-    basic_socket<Protocol, StreamSocketService>::operator=(
-        ASIO_MOVE_CAST2(basic_stream_socket<
-          Protocol1, StreamSocketService1>)(other));
+    basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
     return *this;
   }
 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
 
+  /// Destroys the socket.
+  /**
+   * This function destroys the socket, cancelling any outstanding asynchronous
+   * operations associated with the socket as if by calling @c cancel.
+   */
+  ~basic_stream_socket()
+  {
+  }
+
   /// Send some data on the socket.
   /**
    * This function is used to send data on the stream socket. The function
@@ -350,9 +361,20 @@
     // not meet the documented type requirements for a WriteHandler.
     ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_send(
         this->get_implementation(), buffers, 0,
         ASIO_MOVE_CAST(WriteHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_send(
+        this->get_implementation(), buffers, 0,
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Start an asynchronous send.
@@ -403,9 +425,20 @@
     // not meet the documented type requirements for a WriteHandler.
     ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_send(
         this->get_implementation(), buffers, flags,
         ASIO_MOVE_CAST(WriteHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_send(
+        this->get_implementation(), buffers, flags,
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Receive some data on the socket.
@@ -560,8 +593,18 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive(this->get_implementation(),
         buffers, 0, ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive(this->get_implementation(),
+        buffers, 0, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Start an asynchronous receive.
@@ -614,8 +657,18 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive(this->get_implementation(),
         buffers, flags, ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive(this->get_implementation(),
+        buffers, flags, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Write some data to the socket.
@@ -723,8 +776,18 @@
     // not meet the documented type requirements for a WriteHandler.
     ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_send(this->get_implementation(),
         buffers, 0, ASIO_MOVE_CAST(WriteHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_send(this->get_implementation(),
+        buffers, 0, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Read some data from the socket.
@@ -836,8 +899,18 @@
     // not meet the documented type requirements for a ReadHandler.
     ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_receive(this->get_implementation(),
         buffers, 0, ASIO_MOVE_CAST(ReadHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_receive(this->get_implementation(),
+        buffers, 0, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 };
 
diff --git a/asio/include/asio/basic_streambuf.hpp b/asio/include/asio/basic_streambuf.hpp
index d848255..0f06032 100644
--- a/asio/include/asio/basic_streambuf.hpp
+++ b/asio/include/asio/basic_streambuf.hpp
@@ -2,7 +2,7 @@
 // basic_streambuf.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -119,8 +119,8 @@
   /// The type used to represent the output sequence as a list of buffers.
   typedef implementation_defined mutable_buffers_type;
 #else
-  typedef asio::const_buffers_1 const_buffers_type;
-  typedef asio::mutable_buffers_1 mutable_buffers_type;
+  typedef ASIO_CONST_BUFFER const_buffers_type;
+  typedef ASIO_MUTABLE_BUFFER mutable_buffers_type;
 #endif
 
   /// Construct a basic_streambuf object.
diff --git a/asio/include/asio/basic_streambuf_fwd.hpp b/asio/include/asio/basic_streambuf_fwd.hpp
index d3b3406..361997b 100644
--- a/asio/include/asio/basic_streambuf_fwd.hpp
+++ b/asio/include/asio/basic_streambuf_fwd.hpp
@@ -2,7 +2,7 @@
 // basic_streambuf_fwd.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/basic_waitable_timer.hpp b/asio/include/asio/basic_waitable_timer.hpp
index 1a35370..6e9a3e1 100644
--- a/asio/include/asio/basic_waitable_timer.hpp
+++ b/asio/include/asio/basic_waitable_timer.hpp
@@ -2,7 +2,7 @@
 // basic_waitable_timer.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -22,12 +22,36 @@
 #include "asio/detail/throw_error.hpp"
 #include "asio/error.hpp"
 #include "asio/wait_traits.hpp"
-#include "asio/waitable_timer_service.hpp"
+
+#if defined(ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(ASIO_HAS_MOVE)
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/waitable_timer_service.hpp"
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/detail/chrono_time_traits.hpp"
+# include "asio/detail/deadline_timer_service.hpp"
+# define ASIO_SVC_T \
+    detail::deadline_timer_service< \
+      detail::chrono_time_traits<Clock, WaitTraits> >
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
 
+#if !defined(ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
+#define ASIO_BASIC_WAITABLE_TIMER_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Clock,
+    typename WaitTraits = asio::wait_traits<Clock>
+    ASIO_SVC_TPARAM_DEF2(= waitable_timer_service<Clock, WaitTraits>)>
+class basic_waitable_timer;
+
+#endif // !defined(ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
+
 /// Provides waitable timer functionality.
 /**
  * The basic_waitable_timer class template provides the ability to perform a
@@ -120,13 +144,14 @@
  * @li If a wait handler is cancelled, the asio::error_code passed to
  * it contains the value asio::error::operation_aborted.
  */
-template <typename Clock,
-    typename WaitTraits = asio::wait_traits<Clock>,
-    typename WaitableTimerService = waitable_timer_service<Clock, WaitTraits> >
+template <typename Clock, typename WaitTraits ASIO_SVC_TPARAM>
 class basic_waitable_timer
-  : public basic_io_object<WaitableTimerService>
+  : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>
 {
 public:
+  /// The type of the executor associated with the object.
+  typedef io_context::executor_type executor_type;
+
   /// The clock type.
   typedef Clock clock_type;
 
@@ -149,7 +174,7 @@
    * handlers for any asynchronous operations performed on the timer.
    */
   explicit basic_waitable_timer(asio::io_context& io_context)
-    : basic_io_object<WaitableTimerService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
   }
 
@@ -165,7 +190,7 @@
    */
   basic_waitable_timer(asio::io_context& io_context,
       const time_point& expiry_time)
-    : basic_io_object<WaitableTimerService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
     asio::error_code ec;
     this->get_service().expires_at(this->get_implementation(), expiry_time, ec);
@@ -184,7 +209,7 @@
    */
   basic_waitable_timer(asio::io_context& io_context,
       const duration& expiry_time)
-    : basic_io_object<WaitableTimerService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
     asio::error_code ec;
     this->get_service().expires_after(
@@ -204,14 +229,14 @@
    * constructed using the @c basic_waitable_timer(io_context&) constructor.
    */
   basic_waitable_timer(basic_waitable_timer&& other)
-    : basic_io_object<WaitableTimerService>(
-        ASIO_MOVE_CAST(basic_waitable_timer)(other))
+    : basic_io_object<ASIO_SVC_T>(std::move(other))
   {
   }
 
   /// Move-assign a basic_waitable_timer from another.
   /**
-   * This assignment operator moves a timer from one object to another.
+   * This assignment operator moves a timer from one object to another. Cancels
+   * any outstanding asynchronous operations associated with the target object.
    *
    * @param other The other basic_waitable_timer object from which the move will
    * occur.
@@ -221,12 +246,60 @@
    */
   basic_waitable_timer& operator=(basic_waitable_timer&& other)
   {
-    basic_io_object<WaitableTimerService>::operator=(
-        ASIO_MOVE_CAST(basic_waitable_timer)(other));
+    basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
     return *this;
   }
 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
 
+  /// Destroys the timer.
+  /**
+   * This function destroys the timer, cancelling any outstanding asynchronous
+   * wait operations associated with the timer as if by calling @c cancel.
+   */
+  ~basic_waitable_timer()
+  {
+  }
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+  // These functions are provided by basic_io_object<>.
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_context()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_context();
+  }
+
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_service()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_service();
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+  /// Get the executor associated with the object.
+  executor_type get_executor() ASIO_NOEXCEPT
+  {
+    return basic_io_object<ASIO_SVC_T>::get_executor();
+  }
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
   /// Cancel any asynchronous operations that are waiting on the timer.
   /**
    * This function forces the completion of any pending asynchronous wait
@@ -257,7 +330,9 @@
     return s;
   }
 
-  /// Cancel any asynchronous operations that are waiting on the timer.
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use non-error_code overload.) Cancel any asynchronous
+  /// operations that are waiting on the timer.
   /**
    * This function forces the completion of any pending asynchronous wait
    * operations against the timer. The handler for each cancelled operation will
@@ -283,6 +358,7 @@
   {
     return this->get_service().cancel(this->get_implementation(), ec);
   }
+#endif // !defined(ASIO_NO_DEPRECATED)
 
   /// Cancels one asynchronous operation that is waiting on the timer.
   /**
@@ -317,7 +393,9 @@
     return s;
   }
 
-  /// Cancels one asynchronous operation that is waiting on the timer.
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use non-error_code overload.) Cancels one asynchronous
+  /// operation that is waiting on the timer.
   /**
    * This function forces the completion of one pending asynchronous wait
    * operation against the timer. Handlers are cancelled in FIFO order. The
@@ -346,7 +424,6 @@
     return this->get_service().cancel_one(this->get_implementation(), ec);
   }
 
-#if !defined(ASIO_NO_DEPRECATED)
   /// (Deprecated: Use expiry().) Get the timer's expiry time as an absolute
   /// time.
   /**
@@ -400,7 +477,9 @@
     return s;
   }
 
-  /// Set the timer's expiry time as an absolute time.
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use non-error_code overload.) Set the timer's expiry time as
+  /// an absolute time.
   /**
    * This function sets the expiry time. Any pending asynchronous wait
    * operations will be cancelled. The handler for each cancelled operation will
@@ -428,6 +507,7 @@
     return this->get_service().expires_at(
         this->get_implementation(), expiry_time, ec);
   }
+#endif // !defined(ASIO_NO_DEPRECATED)
 
   /// Set the timer's expiry time relative to now.
   /**
@@ -460,35 +540,6 @@
     return s;
   }
 
-  /// Set the timer's expiry time relative to now.
-  /**
-   * This function sets the expiry time. Any pending asynchronous wait
-   * operations will be cancelled. The handler for each cancelled operation will
-   * be invoked with the asio::error::operation_aborted error code.
-   *
-   * @param expiry_time The expiry time to be used for the timer.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @return The number of asynchronous operations that were cancelled.
-   *
-   * @note If the timer has already expired when expires_after() is called,
-   * then the handlers for asynchronous wait operations will:
-   *
-   * @li have already been invoked; or
-   *
-   * @li have been queued for invocation in the near future.
-   *
-   * These handlers can no longer be cancelled, and therefore are passed an
-   * error code that indicates the successful completion of the wait operation.
-   */
-  std::size_t expires_after(const duration& expiry_time,
-      asio::error_code& ec)
-  {
-    return this->get_service().expires_after(
-        this->get_implementation(), expiry_time, ec);
-  }
-
 #if !defined(ASIO_NO_DEPRECATED)
   /// (Deprecated: Use expiry().) Get the timer's expiry time relative to now.
   /**
@@ -622,13 +673,33 @@
     // not meet the documented type requirements for a WaitHandler.
     ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_wait(this->get_implementation(),
         ASIO_MOVE_CAST(WaitHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    async_completion<WaitHandler,
+      void (asio::error_code)> init(handler);
+
+    this->get_service().async_wait(this->get_implementation(),
+        init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
+
+private:
+  // Disallow copying and assignment.
+  basic_waitable_timer(const basic_waitable_timer&) ASIO_DELETED;
+  basic_waitable_timer& operator=(
+      const basic_waitable_timer&) ASIO_DELETED;
 };
 
 } // namespace asio
 
 #include "asio/detail/pop_options.hpp"
 
+#if !defined(ASIO_ENABLE_OLD_SERVICES)
+# undef ASIO_SVC_T
+#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_BASIC_WAITABLE_TIMER_HPP
diff --git a/asio/include/asio/bind_executor.hpp b/asio/include/asio/bind_executor.hpp
index 562ce18..3ed890d 100644
--- a/asio/include/asio/bind_executor.hpp
+++ b/asio/include/asio/bind_executor.hpp
@@ -2,7 +2,7 @@
 // bind_executor.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,9 +18,11 @@
 #include "asio/detail/config.hpp"
 #include "asio/detail/type_traits.hpp"
 #include "asio/detail/variadic_templates.hpp"
+#include "asio/associated_executor.hpp"
 #include "asio/associated_allocator.hpp"
 #include "asio/async_result.hpp"
-#include "asio/handler_type.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/is_executor.hpp"
 #include "asio/uses_executor.hpp"
 
 #include "asio/detail/push_options.hpp"
@@ -166,27 +168,27 @@
 protected:
   template <typename E, typename U>
   executor_binder_base(ASIO_MOVE_ARG(E) e, ASIO_MOVE_ARG(U) u)
-    : Executor(ASIO_MOVE_CAST(E)(e)),
-      target_(executor_arg_t(), static_cast<const Executor&>(*this),
-          ASIO_MOVE_CAST(U)(u))
+    : executor_(ASIO_MOVE_CAST(E)(e)),
+      target_(executor_arg_t(), executor_, ASIO_MOVE_CAST(U)(u))
   {
   }
 
+  Executor executor_;
   T target_;
 };
 
 template <typename T, typename Executor>
 class executor_binder_base<T, Executor, false>
-  : protected Executor
 {
 protected:
   template <typename E, typename U>
   executor_binder_base(ASIO_MOVE_ARG(E) e, ASIO_MOVE_ARG(U) u)
-    : Executor(ASIO_MOVE_CAST(E)(e)),
+    : executor_(ASIO_MOVE_CAST(E)(e)),
       target_(ASIO_MOVE_CAST(U)(u))
   {
   }
 
+  Executor executor_;
   T target_;
 };
 
@@ -393,7 +395,7 @@
   /// Obtain the associated executor.
   executor_type get_executor() const ASIO_NOEXCEPT
   {
-    return static_cast<const Executor&>(*this);
+    return this->executor_;
   }
 
 #if defined(GENERATING_DOCUMENTATION)
@@ -519,6 +521,35 @@
   : true_type {};
 
 template <typename T, typename Executor, typename Signature>
+class async_result<executor_binder<T, Executor>, Signature>
+{
+public:
+  typedef executor_binder<
+    typename async_result<T, Signature>::completion_handler_type, Executor>
+      completion_handler_type;
+
+  typedef typename async_result<T, Signature>::return_type return_type;
+
+  explicit async_result(executor_binder<T, Executor>& b)
+    : target_(b.get())
+  {
+  }
+
+  return_type get()
+  {
+    return target_.get();
+  }
+
+private:
+  async_result(const async_result&) ASIO_DELETED;
+  async_result& operator=(const async_result&) ASIO_DELETED;
+
+  async_result<T, Signature> target_;
+};
+
+#if !defined(ASIO_NO_DEPRECATED)
+
+template <typename T, typename Executor, typename Signature>
 struct handler_type<executor_binder<T, Executor>, Signature>
 {
   typedef executor_binder<
@@ -545,6 +576,8 @@
   async_result<T> target_;
 };
 
+#endif // !defined(ASIO_NO_DEPRECATED)
+
 template <typename T, typename Executor, typename Allocator>
 struct associated_allocator<executor_binder<T, Executor>, Allocator>
 {
diff --git a/asio/include/asio/buffer.hpp b/asio/include/asio/buffer.hpp
index 9222daa..7d53dde 100644
--- a/asio/include/asio/buffer.hpp
+++ b/asio/include/asio/buffer.hpp
@@ -2,7 +2,7 @@
 // buffer.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -24,6 +24,7 @@
 #include <vector>
 #include "asio/detail/array_fwd.hpp"
 #include "asio/detail/is_buffer_sequence.hpp"
+#include "asio/detail/string_view.hpp"
 #include "asio/detail/throw_exception.hpp"
 #include "asio/detail/type_traits.hpp"
 
@@ -134,6 +135,15 @@
     return size_;
   }
 
+  /// Move the start of the buffer by the specified number of bytes.
+  mutable_buffer& operator+=(std::size_t n) ASIO_NOEXCEPT
+  {
+    std::size_t offset = n < size_ ? n : size_;
+    data_ = static_cast<char*>(data_) + offset;
+    size_ -= offset;
+    return *this;
+  }
+
 private:
   void* data_;
   std::size_t size_;
@@ -143,8 +153,10 @@
 #endif // ASIO_ENABLE_BUFFER_DEBUGGING
 };
 
-/// Adapts a single modifiable buffer so that it meets the requirements of the
-/// MutableBufferSequence concept.
+#if !defined(ASIO_NO_DEPRECATED)
+
+/// (Deprecated: Use mutable_buffer.) Adapts a single modifiable buffer so that
+/// it meets the requirements of the MutableBufferSequence concept.
 class mutable_buffers_1
   : public mutable_buffer
 {
@@ -161,6 +173,14 @@
   {
   }
 
+#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
+  mutable_buffers_1(void* data, std::size_t size,
+      asio::detail::function<void()> debug_check)
+    : mutable_buffer(data, size, debug_check)
+  {
+  }
+#endif // ASIO_ENABLE_BUFFER_DEBUGGING
+
   /// Construct to represent a single modifiable buffer.
   explicit mutable_buffers_1(const mutable_buffer& b) ASIO_NOEXCEPT
     : mutable_buffer(b)
@@ -180,6 +200,8 @@
   }
 };
 
+#endif // !defined(ASIO_NO_DEPRECATED)
+
 /// Holds a buffer that cannot be modified.
 /**
  * The const_buffer class provides a safe representation of a buffer that cannot
@@ -257,6 +279,15 @@
     return size_;
   }
 
+  /// Move the start of the buffer by the specified number of bytes.
+  const_buffer& operator+=(std::size_t n) ASIO_NOEXCEPT
+  {
+    std::size_t offset = n < size_ ? n : size_;
+    data_ = static_cast<const char*>(data_) + offset;
+    size_ -= offset;
+    return *this;
+  }
+
 private:
   const void* data_;
   std::size_t size_;
@@ -266,8 +297,10 @@
 #endif // ASIO_ENABLE_BUFFER_DEBUGGING
 };
 
-/// Adapts a single non-modifiable buffer so that it meets the requirements of
-/// the ConstBufferSequence concept.
+#if !defined(ASIO_NO_DEPRECATED)
+
+/// (Deprecated: Use const_buffer.) Adapts a single non-modifiable buffer so
+/// that it meets the requirements of the ConstBufferSequence concept.
 class const_buffers_1
   : public const_buffer
 {
@@ -284,6 +317,14 @@
   {
   }
 
+#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
+  const_buffers_1(const void* data, std::size_t size,
+      asio::detail::function<void()> debug_check)
+    : const_buffer(data, size, debug_check)
+  {
+  }
+#endif // ASIO_ENABLE_BUFFER_DEBUGGING
+
   /// Construct to represent a single non-modifiable buffer.
   explicit const_buffers_1(const const_buffer& b) ASIO_NOEXCEPT
     : const_buffer(b)
@@ -303,6 +344,8 @@
   }
 };
 
+#endif // !defined(ASIO_NO_DEPRECATED)
+
 /// Trait to determine whether a type satisfies the MutableBufferSequence
 /// requirements.
 template <typename T>
@@ -327,14 +370,13 @@
 {
 };
 
-/// Trait to determine whether a type satisfies the DynamicBufferSequence
-/// requirements.
+/// Trait to determine whether a type satisfies the DynamicBuffer requirements.
 template <typename T>
-struct is_dynamic_buffer_sequence
+struct is_dynamic_buffer
 #if defined(GENERATING_DOCUMENTATION)
   : integral_constant<bool, automatically_determined>
 #else // defined(GENERATING_DOCUMENTATION)
-  : asio::detail::is_dynamic_buffer_sequence<T>
+  : asio::detail::is_dynamic_buffer<T>
 #endif // defined(GENERATING_DOCUMENTATION)
 {
 };
@@ -367,59 +409,181 @@
   mutable_buffer buf_;
 };
 
-/** @defgroup buffer_size asio::buffer_size
+/** @defgroup buffer_sequence_begin asio::buffer_sequence_begin
  *
- * @brief The asio::buffer_size function determines the total number of
- * bytes in a buffer or buffer sequence.
+ * @brief The asio::buffer_sequence_begin function returns an iterator
+ * pointing to the first element in a buffer sequence.
  */
 /*@{*/
 
-/// Get the number of bytes in a modifiable buffer.
-inline std::size_t buffer_size(const mutable_buffer& b) ASIO_NOEXCEPT
+/// Get an iterator to the first element in a buffer sequence.
+inline const mutable_buffer* buffer_sequence_begin(const mutable_buffer& b)
 {
-  return b.size();
+  return &b;
 }
 
-/// Get the number of bytes in a modifiable buffer.
-inline std::size_t buffer_size(const mutable_buffers_1& b) ASIO_NOEXCEPT
+/// Get an iterator to the first element in a buffer sequence.
+inline const const_buffer* buffer_sequence_begin(const const_buffer& b)
 {
-  return b.size();
+  return &b;
 }
 
-/// Get the number of bytes in a non-modifiable buffer.
-inline std::size_t buffer_size(const const_buffer& b) ASIO_NOEXCEPT
+#if defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
+
+/// Get an iterator to the first element in a buffer sequence.
+template <typename C>
+inline auto buffer_sequence_begin(C& c) -> decltype(c.begin())
 {
-  return b.size();
+  return c.begin();
 }
 
-/// Get the number of bytes in a non-modifiable buffer.
-inline std::size_t buffer_size(const const_buffers_1& b) ASIO_NOEXCEPT
+/// Get an iterator to the first element in a buffer sequence.
+template <typename C>
+inline auto buffer_sequence_begin(const C& c) -> decltype(c.begin())
 {
-  return b.size();
+  return c.begin();
 }
 
-/// Get the total number of bytes in a buffer sequence.
-/** 
- * The @c BufferSequence template parameter may meet either of the @c
- * ConstBufferSequence or @c MutableBufferSequence type requirements.
+#else // defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
+
+template <typename C>
+inline typename C::iterator buffer_sequence_begin(C& c)
+{
+  return c.begin();
+}
+
+template <typename C>
+inline typename C::const_iterator buffer_sequence_begin(const C& c)
+{
+  return c.begin();
+}
+
+#endif // defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
+
+/*@}*/
+
+/** @defgroup buffer_sequence_end asio::buffer_sequence_end
+ *
+ * @brief The asio::buffer_sequence_end function returns an iterator
+ * pointing to one past the end element in a buffer sequence.
  */
+/*@{*/
+
+/// Get an iterator to one past the end element in a buffer sequence.
+inline const mutable_buffer* buffer_sequence_end(const mutable_buffer& b)
+{
+  return &b + 1;
+}
+
+/// Get an iterator to one past the end element in a buffer sequence.
+inline const const_buffer* buffer_sequence_end(const const_buffer& b)
+{
+  return &b + 1;
+}
+
+#if defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
+
+/// Get an iterator to one past the end element in a buffer sequence.
+template <typename C>
+inline auto buffer_sequence_end(C& c) -> decltype(c.end())
+{
+  return c.end();
+}
+
+/// Get an iterator to one past the end element in a buffer sequence.
+template <typename C>
+inline auto buffer_sequence_end(const C& c) -> decltype(c.end())
+{
+  return c.end();
+}
+
+#else // defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
+
+template <typename C>
+inline typename C::iterator buffer_sequence_end(C& c)
+{
+  return c.end();
+}
+
+template <typename C>
+inline typename C::const_iterator buffer_sequence_end(const C& c)
+{
+  return c.end();
+}
+
+#endif // defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
+
+/*@}*/
+
+namespace detail {
+
+// Tag types used to select appropriately optimised overloads.
+struct one_buffer {};
+struct multiple_buffers {};
+
+// Helper trait to detect single buffers.
 template <typename BufferSequence>
-inline std::size_t buffer_size(const BufferSequence& b,
-    typename enable_if<
-      is_const_buffer_sequence<BufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
+struct buffer_sequence_cardinality :
+  conditional<
+    is_same<BufferSequence, mutable_buffer>::value
+#if !defined(ASIO_NO_DEPRECATED)
+      || is_same<BufferSequence, mutable_buffers_1>::value
+      || is_same<BufferSequence, const_buffers_1>::value
+#endif // !defined(ASIO_NO_DEPRECATED)
+      || is_same<BufferSequence, const_buffer>::value,
+    one_buffer, multiple_buffers>::type {};
+
+template <typename Iterator>
+inline std::size_t buffer_size(one_buffer,
+    Iterator begin, Iterator) ASIO_NOEXCEPT
+{
+  return const_buffer(*begin).size();
+}
+
+template <typename Iterator>
+inline std::size_t buffer_size(multiple_buffers,
+    Iterator begin, Iterator end) ASIO_NOEXCEPT
 {
   std::size_t total_buffer_size = 0;
 
-  typename BufferSequence::const_iterator iter = b.begin();
-  typename BufferSequence::const_iterator end = b.end();
+  Iterator iter = begin;
   for (; iter != end; ++iter)
-    total_buffer_size += iter->size();
+  {
+    const_buffer b(*iter);
+    total_buffer_size += b.size();
+  }
 
   return total_buffer_size;
 }
 
-/*@}*/
+} // namespace detail
+
+/// Get the total number of bytes in a buffer sequence.
+/**
+ * The @c buffer_size function determines the total size of all buffers in the
+ * buffer sequence, as if computed as follows:
+ *
+ * @code size_t total_size = 0;
+ * auto i = asio::buffer_sequence_begin(buffers);
+ * auto end = asio::buffer_sequence_end(buffers);
+ * for (; i != end; ++i)
+ * {
+ *   const_buffer b(*i);
+ *   total_size += b.size();
+ * }
+ * return total_size; @endcode
+ *
+ * The @c BufferSequence template parameter may meet either of the @c
+ * ConstBufferSequence or @c MutableBufferSequence type requirements.
+ */
+template <typename BufferSequence>
+inline std::size_t buffer_size(const BufferSequence& b) ASIO_NOEXCEPT
+{
+  return detail::buffer_size(
+      detail::buffer_sequence_cardinality<BufferSequence>(),
+      asio::buffer_sequence_begin(b),
+      asio::buffer_sequence_end(b));
+}
 
 #if !defined(ASIO_NO_DEPRECATED)
 
@@ -469,12 +633,11 @@
  * @relates mutable_buffer
  */
 inline mutable_buffer operator+(const mutable_buffer& b,
-    std::size_t start) ASIO_NOEXCEPT
+    std::size_t n) ASIO_NOEXCEPT
 {
-  if (start > b.size())
-    return mutable_buffer();
-  char* new_data = static_cast<char*>(b.data()) + start;
-  std::size_t new_size = b.size() - start;
+  std::size_t offset = n < b.size() ? n : b.size();
+  char* new_data = static_cast<char*>(b.data()) + offset;
+  std::size_t new_size = b.size() - offset;
   return mutable_buffer(new_data, new_size
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
       , b.get_debug_check()
@@ -486,10 +649,10 @@
 /**
  * @relates mutable_buffer
  */
-inline mutable_buffer operator+(std::size_t start,
+inline mutable_buffer operator+(std::size_t n,
     const mutable_buffer& b) ASIO_NOEXCEPT
 {
-  return b + start;
+  return b + n;
 }
 
 /// Create a new non-modifiable buffer that is offset from the start of another.
@@ -497,12 +660,11 @@
  * @relates const_buffer
  */
 inline const_buffer operator+(const const_buffer& b,
-    std::size_t start) ASIO_NOEXCEPT
+    std::size_t n) ASIO_NOEXCEPT
 {
-  if (start > b.size())
-    return const_buffer();
-  const char* new_data = static_cast<const char*>(b.data()) + start;
-  std::size_t new_size = b.size() - start;
+  std::size_t offset = n < b.size() ? n : b.size();
+  const char* new_data = static_cast<const char*>(b.data()) + offset;
+  std::size_t new_size = b.size() - offset;
   return const_buffer(new_data, new_size
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
       , b.get_debug_check()
@@ -514,10 +676,10 @@
 /**
  * @relates const_buffer
  */
-inline const_buffer operator+(std::size_t start,
+inline const_buffer operator+(std::size_t n,
     const const_buffer& b) ASIO_NOEXCEPT
 {
-  return b + start;
+  return b + n;
 }
 
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
@@ -625,9 +787,10 @@
  *
  * The @ref buffer_copy function may be used to copy raw bytes between
  * individual buffers and buffer sequences.
- *
- * In particular, when used with the @ref buffer_size, the @ref buffer_copy
- * function can be used to linearise a sequence of buffers. For example:
+*
+ * In particular, when used with the @ref buffer_size function, the @ref
+ * buffer_copy function can be used to linearise a sequence of buffers. For
+ * example:
  *
  * @code vector<const_buffer> buffers = ...;
  *
@@ -716,26 +879,35 @@
  */
 /*@{*/
 
+#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+# define ASIO_MUTABLE_BUFFER mutable_buffer
+# define ASIO_CONST_BUFFER const_buffer
+#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+# define ASIO_MUTABLE_BUFFER mutable_buffers_1
+# define ASIO_CONST_BUFFER const_buffers_1
+#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+
 /// Create a new modifiable buffer from an existing buffer.
 /**
- * @returns <tt>mutable_buffers_1(b)</tt>.
+ * @returns <tt>mutable_buffer(b)</tt>.
  */
-inline mutable_buffers_1 buffer(const mutable_buffer& b) ASIO_NOEXCEPT
+inline ASIO_MUTABLE_BUFFER buffer(
+    const mutable_buffer& b) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(b);
+  return ASIO_MUTABLE_BUFFER(b);
 }
 
 /// Create a new modifiable buffer from an existing buffer.
 /**
- * @returns A mutable_buffers_1 value equivalent to:
- * @code mutable_buffers_1(
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
  *     b.data(),
  *     min(b.size(), max_size_in_bytes)); @endcode
  */
-inline mutable_buffers_1 buffer(const mutable_buffer& b,
+inline ASIO_MUTABLE_BUFFER buffer(const mutable_buffer& b,
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(
+  return ASIO_MUTABLE_BUFFER(
       mutable_buffer(b.data(),
         b.size() < max_size_in_bytes
         ? b.size() : max_size_in_bytes
@@ -747,111 +919,110 @@
 
 /// Create a new non-modifiable buffer from an existing buffer.
 /**
- * @returns <tt>const_buffers_1(b)</tt>.
+ * @returns <tt>const_buffer(b)</tt>.
  */
-inline const_buffers_1 buffer(const const_buffer& b) ASIO_NOEXCEPT
+inline ASIO_CONST_BUFFER buffer(
+    const const_buffer& b) ASIO_NOEXCEPT
 {
-  return const_buffers_1(b);
+  return ASIO_CONST_BUFFER(b);
 }
 
 /// Create a new non-modifiable buffer from an existing buffer.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     b.data(),
  *     min(b.size(), max_size_in_bytes)); @endcode
  */
-inline const_buffers_1 buffer(const const_buffer& b,
+inline ASIO_CONST_BUFFER buffer(const const_buffer& b,
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(b.data(),
-        b.size() < max_size_in_bytes
-        ? b.size() : max_size_in_bytes
+  return ASIO_CONST_BUFFER(b.data(),
+      b.size() < max_size_in_bytes
+      ? b.size() : max_size_in_bytes
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
-        , b.get_debug_check()
+      , b.get_debug_check()
 #endif // ASIO_ENABLE_BUFFER_DEBUGGING
-        ));
+      );
 }
 
 /// Create a new modifiable buffer that represents the given memory range.
 /**
- * @returns <tt>mutable_buffers_1(data, size_in_bytes)</tt>.
+ * @returns <tt>mutable_buffer(data, size_in_bytes)</tt>.
  */
-inline mutable_buffers_1 buffer(void* data,
+inline ASIO_MUTABLE_BUFFER buffer(void* data,
     std::size_t size_in_bytes) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(mutable_buffer(data, size_in_bytes));
+  return ASIO_MUTABLE_BUFFER(data, size_in_bytes);
 }
 
 /// Create a new non-modifiable buffer that represents the given memory range.
 /**
- * @returns <tt>const_buffers_1(data, size_in_bytes)</tt>.
+ * @returns <tt>const_buffer(data, size_in_bytes)</tt>.
  */
-inline const_buffers_1 buffer(const void* data,
+inline ASIO_CONST_BUFFER buffer(const void* data,
     std::size_t size_in_bytes) ASIO_NOEXCEPT
 {
-  return const_buffers_1(const_buffer(data, size_in_bytes));
+  return ASIO_CONST_BUFFER(data, size_in_bytes);
 }
 
 /// Create a new modifiable buffer that represents the given POD array.
 /**
- * @returns A mutable_buffers_1 value equivalent to:
- * @code mutable_buffers_1(
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
  *     static_cast<void*>(data),
  *     N * sizeof(PodType)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline mutable_buffers_1 buffer(PodType (&data)[N]) ASIO_NOEXCEPT
+inline ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N]) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(mutable_buffer(data, N * sizeof(PodType)));
+  return ASIO_MUTABLE_BUFFER(data, N * sizeof(PodType));
 }
  
 /// Create a new modifiable buffer that represents the given POD array.
 /**
- * @returns A mutable_buffers_1 value equivalent to:
- * @code mutable_buffers_1(
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
  *     static_cast<void*>(data),
  *     min(N * sizeof(PodType), max_size_in_bytes)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline mutable_buffers_1 buffer(PodType (&data)[N],
+inline ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N],
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(
-      mutable_buffer(data,
-        N * sizeof(PodType) < max_size_in_bytes
-        ? N * sizeof(PodType) : max_size_in_bytes));
+  return ASIO_MUTABLE_BUFFER(data,
+      N * sizeof(PodType) < max_size_in_bytes
+      ? N * sizeof(PodType) : max_size_in_bytes);
 }
  
 /// Create a new non-modifiable buffer that represents the given POD array.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     static_cast<const void*>(data),
  *     N * sizeof(PodType)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline const_buffers_1 buffer(const PodType (&data)[N]) ASIO_NOEXCEPT
+inline ASIO_CONST_BUFFER buffer(
+    const PodType (&data)[N]) ASIO_NOEXCEPT
 {
-  return const_buffers_1(const_buffer(data, N * sizeof(PodType)));
+  return ASIO_CONST_BUFFER(data, N * sizeof(PodType));
 }
 
 /// Create a new non-modifiable buffer that represents the given POD array.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     static_cast<const void*>(data),
  *     min(N * sizeof(PodType), max_size_in_bytes)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline const_buffers_1 buffer(const PodType (&data)[N],
+inline ASIO_CONST_BUFFER buffer(const PodType (&data)[N],
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(data,
-        N * sizeof(PodType) < max_size_in_bytes
-        ? N * sizeof(PodType) : max_size_in_bytes));
+  return ASIO_CONST_BUFFER(data,
+      N * sizeof(PodType) < max_size_in_bytes
+      ? N * sizeof(PodType) : max_size_in_bytes);
 }
 
 #if defined(ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
@@ -877,14 +1048,14 @@
 struct buffer_types_base<false>
 {
   typedef mutable_buffer buffer_type;
-  typedef mutable_buffers_1 container_type;
+  typedef ASIO_MUTABLE_BUFFER container_type;
 };
 
 template <>
 struct buffer_types_base<true>
 {
   typedef const_buffer buffer_type;
-  typedef const_buffers_1 container_type;
+  typedef ASIO_CONST_BUFFER container_type;
 };
 
 template <typename PodType>
@@ -926,206 +1097,195 @@
 
 /// Create a new modifiable buffer that represents the given POD array.
 /**
- * @returns A mutable_buffers_1 value equivalent to:
- * @code mutable_buffers_1(
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
  *     data.data(),
  *     data.size() * sizeof(PodType)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline mutable_buffers_1 buffer(
+inline ASIO_MUTABLE_BUFFER buffer(
     boost::array<PodType, N>& data) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(
-      mutable_buffer(data.c_array(), data.size() * sizeof(PodType)));
+  return ASIO_MUTABLE_BUFFER(
+      data.c_array(), data.size() * sizeof(PodType));
 }
 
 /// Create a new modifiable buffer that represents the given POD array.
 /**
- * @returns A mutable_buffers_1 value equivalent to:
- * @code mutable_buffers_1(
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
  *     data.data(),
  *     min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline mutable_buffers_1 buffer(boost::array<PodType, N>& data,
+inline ASIO_MUTABLE_BUFFER buffer(boost::array<PodType, N>& data,
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(
-      mutable_buffer(data.c_array(),
-        data.size() * sizeof(PodType) < max_size_in_bytes
-        ? data.size() * sizeof(PodType) : max_size_in_bytes));
+  return ASIO_MUTABLE_BUFFER(data.c_array(),
+      data.size() * sizeof(PodType) < max_size_in_bytes
+      ? data.size() * sizeof(PodType) : max_size_in_bytes);
 }
 
 /// Create a new non-modifiable buffer that represents the given POD array.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     data.data(),
  *     data.size() * sizeof(PodType)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline const_buffers_1 buffer(
+inline ASIO_CONST_BUFFER buffer(
     boost::array<const PodType, N>& data) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(data.data(), data.size() * sizeof(PodType)));
+  return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
 }
 
 /// Create a new non-modifiable buffer that represents the given POD array.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     data.data(),
  *     min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline const_buffers_1 buffer(boost::array<const PodType, N>& data,
+inline ASIO_CONST_BUFFER buffer(boost::array<const PodType, N>& data,
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(data.data(),
-        data.size() * sizeof(PodType) < max_size_in_bytes
-        ? data.size() * sizeof(PodType) : max_size_in_bytes));
+  return ASIO_CONST_BUFFER(data.data(),
+      data.size() * sizeof(PodType) < max_size_in_bytes
+      ? data.size() * sizeof(PodType) : max_size_in_bytes);
 }
 
 #endif // defined(ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
 
 /// Create a new non-modifiable buffer that represents the given POD array.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     data.data(),
  *     data.size() * sizeof(PodType)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline const_buffers_1 buffer(
+inline ASIO_CONST_BUFFER buffer(
     const boost::array<PodType, N>& data) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(data.data(), data.size() * sizeof(PodType)));
+  return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
 }
 
 /// Create a new non-modifiable buffer that represents the given POD array.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     data.data(),
  *     min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline const_buffers_1 buffer(const boost::array<PodType, N>& data,
+inline ASIO_CONST_BUFFER buffer(const boost::array<PodType, N>& data,
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(data.data(),
-        data.size() * sizeof(PodType) < max_size_in_bytes
-        ? data.size() * sizeof(PodType) : max_size_in_bytes));
+  return ASIO_CONST_BUFFER(data.data(),
+      data.size() * sizeof(PodType) < max_size_in_bytes
+      ? data.size() * sizeof(PodType) : max_size_in_bytes);
 }
 
 #if defined(ASIO_HAS_STD_ARRAY) || defined(GENERATING_DOCUMENTATION)
 
 /// Create a new modifiable buffer that represents the given POD array.
 /**
- * @returns A mutable_buffers_1 value equivalent to:
- * @code mutable_buffers_1(
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
  *     data.data(),
  *     data.size() * sizeof(PodType)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline mutable_buffers_1 buffer(
+inline ASIO_MUTABLE_BUFFER buffer(
     std::array<PodType, N>& data) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(
-      mutable_buffer(data.data(), data.size() * sizeof(PodType)));
+  return ASIO_MUTABLE_BUFFER(data.data(), data.size() * sizeof(PodType));
 }
 
 /// Create a new modifiable buffer that represents the given POD array.
 /**
- * @returns A mutable_buffers_1 value equivalent to:
- * @code mutable_buffers_1(
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
  *     data.data(),
  *     min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline mutable_buffers_1 buffer(std::array<PodType, N>& data,
+inline ASIO_MUTABLE_BUFFER buffer(std::array<PodType, N>& data,
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(
-      mutable_buffer(data.data(),
-        data.size() * sizeof(PodType) < max_size_in_bytes
-        ? data.size() * sizeof(PodType) : max_size_in_bytes));
+  return ASIO_MUTABLE_BUFFER(data.data(),
+      data.size() * sizeof(PodType) < max_size_in_bytes
+      ? data.size() * sizeof(PodType) : max_size_in_bytes);
 }
 
 /// Create a new non-modifiable buffer that represents the given POD array.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     data.data(),
  *     data.size() * sizeof(PodType)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline const_buffers_1 buffer(
+inline ASIO_CONST_BUFFER buffer(
     std::array<const PodType, N>& data) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(data.data(), data.size() * sizeof(PodType)));
+  return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
 }
 
 /// Create a new non-modifiable buffer that represents the given POD array.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     data.data(),
  *     min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline const_buffers_1 buffer(std::array<const PodType, N>& data,
+inline ASIO_CONST_BUFFER buffer(std::array<const PodType, N>& data,
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(data.data(),
-        data.size() * sizeof(PodType) < max_size_in_bytes
-        ? data.size() * sizeof(PodType) : max_size_in_bytes));
+  return ASIO_CONST_BUFFER(data.data(),
+      data.size() * sizeof(PodType) < max_size_in_bytes
+      ? data.size() * sizeof(PodType) : max_size_in_bytes);
 }
 
 /// Create a new non-modifiable buffer that represents the given POD array.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     data.data(),
  *     data.size() * sizeof(PodType)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline const_buffers_1 buffer(
+inline ASIO_CONST_BUFFER buffer(
     const std::array<PodType, N>& data) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(data.data(), data.size() * sizeof(PodType)));
+  return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
 }
 
 /// Create a new non-modifiable buffer that represents the given POD array.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     data.data(),
  *     min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
  */
 template <typename PodType, std::size_t N>
-inline const_buffers_1 buffer(const std::array<PodType, N>& data,
+inline ASIO_CONST_BUFFER buffer(const std::array<PodType, N>& data,
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(data.data(),
-        data.size() * sizeof(PodType) < max_size_in_bytes
-        ? data.size() * sizeof(PodType) : max_size_in_bytes));
+  return ASIO_CONST_BUFFER(data.data(),
+      data.size() * sizeof(PodType) < max_size_in_bytes
+      ? data.size() * sizeof(PodType) : max_size_in_bytes);
 }
 
 #endif // defined(ASIO_HAS_STD_ARRAY) || defined(GENERATING_DOCUMENTATION)
 
 /// Create a new modifiable buffer that represents the given POD vector.
 /**
- * @returns A mutable_buffers_1 value equivalent to:
- * @code mutable_buffers_1(
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
  *     data.size() ? &data[0] : 0,
  *     data.size() * sizeof(PodType)); @endcode
  *
@@ -1133,23 +1293,23 @@
  * invalidate iterators.
  */
 template <typename PodType, typename Allocator>
-inline mutable_buffers_1 buffer(
+inline ASIO_MUTABLE_BUFFER buffer(
     std::vector<PodType, Allocator>& data) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(
-      mutable_buffer(data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
+  return ASIO_MUTABLE_BUFFER(
+      data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
-        , detail::buffer_debug_check<
-            typename std::vector<PodType, Allocator>::iterator
-          >(data.begin())
+      , detail::buffer_debug_check<
+          typename std::vector<PodType, Allocator>::iterator
+        >(data.begin())
 #endif // ASIO_ENABLE_BUFFER_DEBUGGING
-        ));
+      );
 }
 
 /// Create a new modifiable buffer that represents the given POD vector.
 /**
- * @returns A mutable_buffers_1 value equivalent to:
- * @code mutable_buffers_1(
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
  *     data.size() ? &data[0] : 0,
  *     min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
  *
@@ -1157,25 +1317,24 @@
  * invalidate iterators.
  */
 template <typename PodType, typename Allocator>
-inline mutable_buffers_1 buffer(std::vector<PodType, Allocator>& data,
+inline ASIO_MUTABLE_BUFFER buffer(std::vector<PodType, Allocator>& data,
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(
-      mutable_buffer(data.size() ? &data[0] : 0,
-        data.size() * sizeof(PodType) < max_size_in_bytes
-        ? data.size() * sizeof(PodType) : max_size_in_bytes
+  return ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
+      data.size() * sizeof(PodType) < max_size_in_bytes
+      ? data.size() * sizeof(PodType) : max_size_in_bytes
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
-        , detail::buffer_debug_check<
-            typename std::vector<PodType, Allocator>::iterator
-          >(data.begin())
+      , detail::buffer_debug_check<
+          typename std::vector<PodType, Allocator>::iterator
+        >(data.begin())
 #endif // ASIO_ENABLE_BUFFER_DEBUGGING
-        ));
+      );
 }
 
 /// Create a new non-modifiable buffer that represents the given POD vector.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     data.size() ? &data[0] : 0,
  *     data.size() * sizeof(PodType)); @endcode
  *
@@ -1183,23 +1342,23 @@
  * invalidate iterators.
  */
 template <typename PodType, typename Allocator>
-inline const_buffers_1 buffer(
+inline ASIO_CONST_BUFFER buffer(
     const std::vector<PodType, Allocator>& data) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
+  return ASIO_CONST_BUFFER(
+      data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
-        , detail::buffer_debug_check<
-            typename std::vector<PodType, Allocator>::const_iterator
-          >(data.begin())
+      , detail::buffer_debug_check<
+          typename std::vector<PodType, Allocator>::const_iterator
+        >(data.begin())
 #endif // ASIO_ENABLE_BUFFER_DEBUGGING
-        ));
+      );
 }
 
 /// Create a new non-modifiable buffer that represents the given POD vector.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     data.size() ? &data[0] : 0,
  *     min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
  *
@@ -1207,48 +1366,47 @@
  * invalidate iterators.
  */
 template <typename PodType, typename Allocator>
-inline const_buffers_1 buffer(
+inline ASIO_CONST_BUFFER buffer(
     const std::vector<PodType, Allocator>& data,
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(data.size() ? &data[0] : 0,
-        data.size() * sizeof(PodType) < max_size_in_bytes
-        ? data.size() * sizeof(PodType) : max_size_in_bytes
+  return ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
+      data.size() * sizeof(PodType) < max_size_in_bytes
+      ? data.size() * sizeof(PodType) : max_size_in_bytes
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
-        , detail::buffer_debug_check<
-            typename std::vector<PodType, Allocator>::const_iterator
-          >(data.begin())
+      , detail::buffer_debug_check<
+          typename std::vector<PodType, Allocator>::const_iterator
+        >(data.begin())
 #endif // ASIO_ENABLE_BUFFER_DEBUGGING
-        ));
+      );
 }
 
 /// Create a new modifiable buffer that represents the given string.
 /**
- * @returns <tt>mutable_buffers_1(data.size() ? &data[0] : 0,
+ * @returns <tt>mutable_buffer(data.size() ? &data[0] : 0,
  * data.size() * sizeof(Elem))</tt>.
  *
  * @note The buffer is invalidated by any non-const operation called on the
  * given string object.
  */
 template <typename Elem, typename Traits, typename Allocator>
-inline mutable_buffers_1 buffer(
+inline ASIO_MUTABLE_BUFFER buffer(
     std::basic_string<Elem, Traits, Allocator>& data) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(mutable_buffer(data.size() ? &data[0] : 0,
-        data.size() * sizeof(Elem)
+  return ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
+      data.size() * sizeof(Elem)
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
-        , detail::buffer_debug_check<
-            typename std::basic_string<Elem, Traits, Allocator>::iterator
-          >(data.begin())
+      , detail::buffer_debug_check<
+          typename std::basic_string<Elem, Traits, Allocator>::iterator
+        >(data.begin())
 #endif // ASIO_ENABLE_BUFFER_DEBUGGING
-        ));
+      );
 }
 
 /// Create a new non-modifiable buffer that represents the given string.
 /**
- * @returns A mutable_buffers_1 value equivalent to:
- * @code mutable_buffers_1(
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
  *     data.size() ? &data[0] : 0,
  *     min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
  *
@@ -1256,46 +1414,45 @@
  * given string object.
  */
 template <typename Elem, typename Traits, typename Allocator>
-inline mutable_buffers_1 buffer(
+inline ASIO_MUTABLE_BUFFER buffer(
     std::basic_string<Elem, Traits, Allocator>& data,
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return mutable_buffers_1(
-      mutable_buffer(data.size() ? &data[0] : 0,
-        data.size() * sizeof(Elem) < max_size_in_bytes
-        ? data.size() * sizeof(Elem) : max_size_in_bytes
+  return ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
+      data.size() * sizeof(Elem) < max_size_in_bytes
+      ? data.size() * sizeof(Elem) : max_size_in_bytes
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
-        , detail::buffer_debug_check<
-            typename std::basic_string<Elem, Traits, Allocator>::iterator
-          >(data.begin())
+      , detail::buffer_debug_check<
+          typename std::basic_string<Elem, Traits, Allocator>::iterator
+        >(data.begin())
 #endif // ASIO_ENABLE_BUFFER_DEBUGGING
-        ));
+      );
 }
 
 /// Create a new non-modifiable buffer that represents the given string.
 /**
- * @returns <tt>const_buffers_1(data.data(), data.size() * sizeof(Elem))</tt>.
+ * @returns <tt>const_buffer(data.data(), data.size() * sizeof(Elem))</tt>.
  *
  * @note The buffer is invalidated by any non-const operation called on the
  * given string object.
  */
 template <typename Elem, typename Traits, typename Allocator>
-inline const_buffers_1 buffer(
+inline ASIO_CONST_BUFFER buffer(
     const std::basic_string<Elem, Traits, Allocator>& data) ASIO_NOEXCEPT
 {
-  return const_buffers_1(const_buffer(data.data(), data.size() * sizeof(Elem)
+  return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(Elem)
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
-        , detail::buffer_debug_check<
-            typename std::basic_string<Elem, Traits, Allocator>::const_iterator
-          >(data.begin())
+      , detail::buffer_debug_check<
+          typename std::basic_string<Elem, Traits, Allocator>::const_iterator
+        >(data.begin())
 #endif // ASIO_ENABLE_BUFFER_DEBUGGING
-        ));
+      );
 }
 
 /// Create a new non-modifiable buffer that represents the given string.
 /**
- * @returns A const_buffers_1 value equivalent to:
- * @code const_buffers_1(
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
  *     data.data(),
  *     min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
  *
@@ -1303,25 +1460,72 @@
  * given string object.
  */
 template <typename Elem, typename Traits, typename Allocator>
-inline const_buffers_1 buffer(
+inline ASIO_CONST_BUFFER buffer(
     const std::basic_string<Elem, Traits, Allocator>& data,
     std::size_t max_size_in_bytes) ASIO_NOEXCEPT
 {
-  return const_buffers_1(
-      const_buffer(data.data(),
-        data.size() * sizeof(Elem) < max_size_in_bytes
-        ? data.size() * sizeof(Elem) : max_size_in_bytes
+  return ASIO_CONST_BUFFER(data.data(),
+      data.size() * sizeof(Elem) < max_size_in_bytes
+      ? data.size() * sizeof(Elem) : max_size_in_bytes
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
-        , detail::buffer_debug_check<
-            typename std::basic_string<Elem, Traits, Allocator>::const_iterator
-          >(data.begin())
+      , detail::buffer_debug_check<
+          typename std::basic_string<Elem, Traits, Allocator>::const_iterator
+        >(data.begin())
 #endif // ASIO_ENABLE_BUFFER_DEBUGGING
-        ));
+      );
 }
 
+#if defined(ASIO_HAS_STD_STRING_VIEW) \
+  || defined(GENERATING_DOCUMENTATION)
+
+/// Create a new modifiable buffer that represents the given string_view.
+/**
+ * @returns <tt>mutable_buffer(data.size() ? &data[0] : 0,
+ * data.size() * sizeof(Elem))</tt>.
+ */
+template <typename Elem, typename Traits>
+inline ASIO_CONST_BUFFER buffer(
+    basic_string_view<Elem, Traits> data) ASIO_NOEXCEPT
+{
+  return ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
+      data.size() * sizeof(Elem)
+#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
+      , detail::buffer_debug_check<
+          typename basic_string_view<Elem, Traits>::iterator
+        >(data.begin())
+#endif // ASIO_ENABLE_BUFFER_DEBUGGING
+      );
+}
+
+/// Create a new non-modifiable buffer that represents the given string.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ *     data.size() ? &data[0] : 0,
+ *     min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
+ */
+template <typename Elem, typename Traits>
+inline ASIO_CONST_BUFFER buffer(
+    basic_string_view<Elem, Traits> data,
+    std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+{
+  return ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
+      data.size() * sizeof(Elem) < max_size_in_bytes
+      ? data.size() * sizeof(Elem) : max_size_in_bytes
+#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
+      , detail::buffer_debug_check<
+          typename basic_string_view<Elem, Traits>::iterator
+        >(data.begin())
+#endif // ASIO_ENABLE_BUFFER_DEBUGGING
+      );
+}
+
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+       //  || defined(GENERATING_DOCUMENTATION)
+
 /*@}*/
 
-/// Adapt a basic_string to the DynamicBufferSequence requirements.
+/// Adapt a basic_string to the DynamicBuffer requirements.
 /**
  * Requires that <tt>sizeof(Elem) == 1</tt>.
  */
@@ -1330,10 +1534,10 @@
 {
 public:
   /// The type used to represent the input sequence as a list of buffers.
-  typedef const_buffers_1 const_buffers_type;
+  typedef ASIO_CONST_BUFFER const_buffers_type;
 
   /// The type used to represent the output sequence as a list of buffers.
-  typedef mutable_buffers_1 mutable_buffers_type;
+  typedef ASIO_MUTABLE_BUFFER mutable_buffers_type;
 
   /// Construct a dynamic buffer from a string.
   /**
@@ -1402,7 +1606,7 @@
    */
   const_buffers_type data() const ASIO_NOEXCEPT
   {
-    return asio::buffer(string_, size_);
+    return const_buffers_type(asio::buffer(string_, size_));
   }
 
   /// Get a list of buffers that represents the output sequence, with the given
@@ -1462,7 +1666,7 @@
   void consume(std::size_t n)
   {
     std::size_t consume_length = (std::min)(n, size_);
-    string_.erase(consume_length);
+    string_.erase(0, consume_length);
     size_ -= consume_length;
   }
 
@@ -1472,7 +1676,7 @@
   const std::size_t max_size_;
 };
 
-/// Adapt a vector to the DynamicBufferSequence requirements.
+/// Adapt a vector to the DynamicBuffer requirements.
 /**
  * Requires that <tt>sizeof(Elem) == 1</tt>.
  */
@@ -1481,10 +1685,10 @@
 {
 public:
   /// The type used to represent the input sequence as a list of buffers.
-  typedef const_buffers_1 const_buffers_type;
+  typedef ASIO_CONST_BUFFER const_buffers_type;
 
   /// The type used to represent the output sequence as a list of buffers.
-  typedef mutable_buffers_1 mutable_buffers_type;
+  typedef ASIO_MUTABLE_BUFFER mutable_buffers_type;
 
   /// Construct a dynamic buffer from a string.
   /**
@@ -1553,7 +1757,7 @@
    */
   const_buffers_type data() const ASIO_NOEXCEPT
   {
-    return asio::buffer(vector_, size_);
+    return const_buffers_type(asio::buffer(vector_, size_));
   }
 
   /// Get a list of buffers that represents the output sequence, with the given
@@ -1613,7 +1817,7 @@
   void consume(std::size_t n)
   {
     std::size_t consume_length = (std::min)(n, size_);
-    vector_.erase(consume_length);
+    vector_.erase(vector_.begin(), vector_.begin() + consume_length);
     size_ -= consume_length;
   }
 
@@ -1707,27 +1911,10 @@
  */
 /*@{*/
 
-/// Copies bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A non-modifiable buffer representing the memory region from
- * which the bytes will be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffer& target,
-    const const_buffer& source) ASIO_NOEXCEPT
+namespace detail {
+
+inline std::size_t buffer_copy_1(const mutable_buffer& target,
+    const const_buffer& source)
 {
   using namespace std; // For memcpy.
   std::size_t target_size = target.size();
@@ -1737,427 +1924,81 @@
   return n;
 }
 
-/// Copies bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A non-modifiable buffer representing the memory region from
- * which the bytes will be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffer& target,
-    const const_buffers_1& source) ASIO_NOEXCEPT
+template <typename TargetIterator, typename SourceIterator>
+inline std::size_t buffer_copy(one_buffer, one_buffer,
+    TargetIterator target_begin, TargetIterator,
+    SourceIterator source_begin, SourceIterator) ASIO_NOEXCEPT
 {
-  return buffer_copy(target, static_cast<const const_buffer&>(source));
+  return (buffer_copy_1)(*target_begin, *source_begin);
 }
 
-/// Copies bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A modifiable buffer representing the memory region from which
- * the bytes will be copied. The contents of the source buffer will not be
- * modified.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffer& target,
-    const mutable_buffer& source) ASIO_NOEXCEPT
+template <typename TargetIterator, typename SourceIterator>
+inline std::size_t buffer_copy(one_buffer, one_buffer,
+    TargetIterator target_begin, TargetIterator,
+    SourceIterator source_begin, SourceIterator,
+    std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
 {
-  return buffer_copy(target, const_buffer(source));
+  return (buffer_copy_1)(*target_begin,
+      asio::buffer(*source_begin, max_bytes_to_copy));
 }
 
-/// Copies bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A modifiable buffer representing the memory region from which
- * the bytes will be copied. The contents of the source buffer will not be
- * modified.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffer& target,
-    const mutable_buffers_1& source) ASIO_NOEXCEPT
-{
-  return buffer_copy(target, const_buffer(source));
-}
-
-/// Copies bytes from a source buffer sequence to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A non-modifiable buffer sequence representing the memory
- * regions from which the bytes will be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename ConstBufferSequence>
-std::size_t buffer_copy(const mutable_buffer& target,
-    const ConstBufferSequence& source,
-    typename enable_if<
-      is_const_buffer_sequence<ConstBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
+template <typename TargetIterator, typename SourceIterator>
+std::size_t buffer_copy(one_buffer, multiple_buffers,
+    TargetIterator target_begin, TargetIterator,
+    SourceIterator source_begin, SourceIterator source_end,
+    std::size_t max_bytes_to_copy
+      = (std::numeric_limits<std::size_t>::max)()) ASIO_NOEXCEPT
 {
   std::size_t total_bytes_copied = 0;
+  SourceIterator source_iter = source_begin;
 
-  typename ConstBufferSequence::const_iterator source_iter = source.begin();
-  typename ConstBufferSequence::const_iterator source_end = source.end();
-
-  for (mutable_buffer target_buffer(target);
+  for (mutable_buffer target_buffer(
+        asio::buffer(*target_begin, max_bytes_to_copy));
       target_buffer.size() && source_iter != source_end; ++source_iter)
   {
     const_buffer source_buffer(*source_iter);
-    std::size_t bytes_copied = buffer_copy(target_buffer, source_buffer);
+    std::size_t bytes_copied = (buffer_copy_1)(target_buffer, source_buffer);
     total_bytes_copied += bytes_copied;
-    target_buffer = target_buffer + bytes_copied;
+    target_buffer += bytes_copied;
   }
 
   return total_bytes_copied;
 }
 
-/// Copies bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A non-modifiable buffer representing the memory region from
- * which the bytes will be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffers_1& target,
-    const const_buffer& source) ASIO_NOEXCEPT
-{
-  return buffer_copy(static_cast<const mutable_buffer&>(target), source);
-}
-
-/// Copies bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A non-modifiable buffer representing the memory region from
- * which the bytes will be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffers_1& target,
-    const const_buffers_1& source) ASIO_NOEXCEPT
-{
-  return buffer_copy(static_cast<const mutable_buffer&>(target),
-      static_cast<const const_buffer&>(source));
-}
-
-/// Copies bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A modifiable buffer representing the memory region from which
- * the bytes will be copied. The contents of the source buffer will not be
- * modified.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffers_1& target,
-    const mutable_buffer& source) ASIO_NOEXCEPT
-{
-  return buffer_copy(static_cast<const mutable_buffer&>(target),
-      const_buffer(source));
-}
-
-/// Copies bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A modifiable buffer representing the memory region from which
- * the bytes will be copied. The contents of the source buffer will not be
- * modified.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffers_1& target,
-    const mutable_buffers_1& source) ASIO_NOEXCEPT
-{
-  return buffer_copy(static_cast<const mutable_buffer&>(target),
-      const_buffer(source));
-}
-
-/// Copies bytes from a source buffer sequence to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A non-modifiable buffer sequence representing the memory
- * regions from which the bytes will be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename ConstBufferSequence>
-inline std::size_t buffer_copy(const mutable_buffers_1& target,
-    const ConstBufferSequence& source,
-    typename enable_if<
-      is_const_buffer_sequence<ConstBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
-{
-  return buffer_copy(static_cast<const mutable_buffer&>(target), source);
-}
-
-/// Copies bytes from a source buffer to a target buffer sequence.
-/**
- * @param target A modifiable buffer sequence representing the memory regions to
- * which the bytes will be copied.
- *
- * @param source A non-modifiable buffer representing the memory region from
- * which the bytes will be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename MutableBufferSequence>
-std::size_t buffer_copy(const MutableBufferSequence& target,
-    const const_buffer& source,
-    typename enable_if<
-      is_mutable_buffer_sequence<MutableBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
+template <typename TargetIterator, typename SourceIterator>
+std::size_t buffer_copy(multiple_buffers, one_buffer,
+    TargetIterator target_begin, TargetIterator target_end,
+    SourceIterator source_begin, SourceIterator,
+    std::size_t max_bytes_to_copy
+      = (std::numeric_limits<std::size_t>::max)()) ASIO_NOEXCEPT
 {
   std::size_t total_bytes_copied = 0;
+  TargetIterator target_iter = target_begin;
 
-  typename MutableBufferSequence::const_iterator target_iter = target.begin();
-  typename MutableBufferSequence::const_iterator target_end = target.end();
-
-  for (const_buffer source_buffer(source);
+  for (const_buffer source_buffer(
+        asio::buffer(*source_begin, max_bytes_to_copy));
       source_buffer.size() && target_iter != target_end; ++target_iter)
   {
     mutable_buffer target_buffer(*target_iter);
-    std::size_t bytes_copied = buffer_copy(target_buffer, source_buffer);
+    std::size_t bytes_copied = (buffer_copy_1)(target_buffer, source_buffer);
     total_bytes_copied += bytes_copied;
-    source_buffer = source_buffer + bytes_copied;
+    source_buffer += bytes_copied;
   }
 
   return total_bytes_copied;
 }
 
-/// Copies bytes from a source buffer to a target buffer sequence.
-/**
- * @param target A modifiable buffer sequence representing the memory regions to
- * which the bytes will be copied.
- *
- * @param source A non-modifiable buffer representing the memory region from
- * which the bytes will be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename MutableBufferSequence>
-inline std::size_t buffer_copy(const MutableBufferSequence& target,
-    const const_buffers_1& source,
-    typename enable_if<
-      is_mutable_buffer_sequence<MutableBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
-{
-  return buffer_copy(target, static_cast<const const_buffer&>(source));
-}
-
-/// Copies bytes from a source buffer to a target buffer sequence.
-/**
- * @param target A modifiable buffer sequence representing the memory regions to
- * which the bytes will be copied.
- *
- * @param source A modifiable buffer representing the memory region from which
- * the bytes will be copied. The contents of the source buffer will not be
- * modified.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename MutableBufferSequence>
-inline std::size_t buffer_copy(const MutableBufferSequence& target,
-    const mutable_buffer& source,
-    typename enable_if<
-      is_mutable_buffer_sequence<MutableBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
-{
-  return buffer_copy(target, const_buffer(source));
-}
-
-/// Copies bytes from a source buffer to a target buffer sequence.
-/**
- * @param target A modifiable buffer sequence representing the memory regions to
- * which the bytes will be copied.
- *
- * @param source A modifiable buffer representing the memory region from which
- * the bytes will be copied. The contents of the source buffer will not be
- * modified.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename MutableBufferSequence>
-inline std::size_t buffer_copy(const MutableBufferSequence& target,
-    const mutable_buffers_1& source,
-    typename enable_if<
-      is_mutable_buffer_sequence<MutableBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
-{
-  return buffer_copy(target, const_buffer(source));
-}
-
-/// Copies bytes from a source buffer sequence to a target buffer sequence.
-/**
- * @param target A modifiable buffer sequence representing the memory regions to
- * which the bytes will be copied.
- *
- * @param source A non-modifiable buffer sequence representing the memory
- * regions from which the bytes will be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename MutableBufferSequence, typename ConstBufferSequence>
-std::size_t buffer_copy(const MutableBufferSequence& target,
-    const ConstBufferSequence& source,
-    typename enable_if<
-      is_mutable_buffer_sequence<MutableBufferSequence>::value &&
-      is_const_buffer_sequence<ConstBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
+template <typename TargetIterator, typename SourceIterator>
+std::size_t buffer_copy(multiple_buffers, multiple_buffers,
+    TargetIterator target_begin, TargetIterator target_end,
+    SourceIterator source_begin, SourceIterator source_end) ASIO_NOEXCEPT
 {
   std::size_t total_bytes_copied = 0;
 
-  typename MutableBufferSequence::const_iterator target_iter = target.begin();
-  typename MutableBufferSequence::const_iterator target_end = target.end();
+  TargetIterator target_iter = target_begin;
   std::size_t target_buffer_offset = 0;
 
-  typename ConstBufferSequence::const_iterator source_iter = source.begin();
-  typename ConstBufferSequence::const_iterator source_end = source.end();
+  SourceIterator source_iter = source_begin;
   std::size_t source_buffer_offset = 0;
 
   while (target_iter != target_end && source_iter != source_end)
@@ -2168,7 +2009,7 @@
     const_buffer source_buffer =
       const_buffer(*source_iter) + source_buffer_offset;
 
-    std::size_t bytes_copied = buffer_copy(target_buffer, source_buffer);
+    std::size_t bytes_copied = (buffer_copy_1)(target_buffer, source_buffer);
     total_bytes_copied += bytes_copied;
 
     if (bytes_copied == target_buffer.size())
@@ -2191,139 +2032,64 @@
   return total_bytes_copied;
 }
 
-/// Copies a limited number of bytes from a source buffer to a target buffer.
+template <typename TargetIterator, typename SourceIterator>
+std::size_t buffer_copy(multiple_buffers, multiple_buffers,
+    TargetIterator target_begin, TargetIterator target_end,
+    SourceIterator source_begin, SourceIterator source_end,
+    std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
+{
+  std::size_t total_bytes_copied = 0;
+
+  TargetIterator target_iter = target_begin;
+  std::size_t target_buffer_offset = 0;
+
+  SourceIterator source_iter = source_begin;
+  std::size_t source_buffer_offset = 0;
+
+  while (total_bytes_copied != max_bytes_to_copy
+      && target_iter != target_end && source_iter != source_end)
+  {
+    mutable_buffer target_buffer =
+      mutable_buffer(*target_iter) + target_buffer_offset;
+
+    const_buffer source_buffer =
+      const_buffer(*source_iter) + source_buffer_offset;
+
+    std::size_t bytes_copied = (buffer_copy_1)(
+        target_buffer, asio::buffer(source_buffer,
+          max_bytes_to_copy - total_bytes_copied));
+    total_bytes_copied += bytes_copied;
+
+    if (bytes_copied == target_buffer.size())
+    {
+      ++target_iter;
+      target_buffer_offset = 0;
+    }
+    else
+      target_buffer_offset += bytes_copied;
+
+    if (bytes_copied == source_buffer.size())
+    {
+      ++source_iter;
+      source_buffer_offset = 0;
+    }
+    else
+      source_buffer_offset += bytes_copied;
+  }
+
+  return total_bytes_copied;
+}
+
+} // namespace detail
+
+/// Copies bytes from a source buffer sequence to a target buffer sequence.
 /**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A non-modifiable buffer representing the memory region from
+ * @param target A modifiable buffer sequence representing the memory regions to
  * which the bytes will be copied.
  *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffer& target,
-    const const_buffer& source,
-    std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
-{
-  return buffer_copy(buffer(target, max_bytes_to_copy), source);
-}
-
-/// Copies a limited number of bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A non-modifiable buffer representing the memory region from
- * which the bytes will be copied.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffer& target,
-    const const_buffers_1& source,
-    std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
-{
-  return buffer_copy(buffer(target, max_bytes_to_copy), source);
-}
-
-/// Copies a limited number of bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A modifiable buffer representing the memory region from which
- * the bytes will be copied. The contents of the source buffer will not be
- * modified.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffer& target,
-    const mutable_buffer& source,
-    std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
-{
-  return buffer_copy(buffer(target, max_bytes_to_copy), source);
-}
-
-/// Copies a limited number of bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A modifiable buffer representing the memory region from which
- * the bytes will be copied. The contents of the source buffer will not be
- * modified.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffer& target,
-    const mutable_buffers_1& source,
-    std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
-{
-  return buffer_copy(buffer(target, max_bytes_to_copy), source);
-}
-
-/// Copies a limited number of bytes from a source buffer sequence to a target
-/// buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
  * @param source A non-modifiable buffer sequence representing the memory
  * regions from which the bytes will be copied.
  *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
  * @returns The number of bytes copied.
  *
  * @note The number of bytes copied is the lesser of:
@@ -2332,313 +2098,20 @@
  *
  * @li @c buffer_size(source)
  *
- * @li @c max_bytes_to_copy
- *
  * This function is implemented in terms of @c memcpy, and consequently it
  * cannot be used to copy between overlapping memory regions.
  */
-template <typename ConstBufferSequence>
-inline std::size_t buffer_copy(const mutable_buffer& target,
-    const ConstBufferSequence& source, std::size_t max_bytes_to_copy,
-    typename enable_if<
-      is_const_buffer_sequence<ConstBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
-{
-  return buffer_copy(buffer(target, max_bytes_to_copy), source);
-}
-
-/// Copies a limited number of bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A non-modifiable buffer representing the memory region from
- * which the bytes will be copied.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffers_1& target,
-    const const_buffer& source,
-    std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
-{
-  return buffer_copy(buffer(target, max_bytes_to_copy), source);
-}
-
-/// Copies a limited number of bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A non-modifiable buffer representing the memory region from
- * which the bytes will be copied.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffers_1& target,
-    const const_buffers_1& source,
-    std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
-{
-  return buffer_copy(buffer(target, max_bytes_to_copy), source);
-}
-
-/// Copies a limited number of bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A modifiable buffer representing the memory region from which
- * the bytes will be copied. The contents of the source buffer will not be
- * modified.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffers_1& target,
-    const mutable_buffer& source,
-    std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
-{
-  return buffer_copy(buffer(target, max_bytes_to_copy), source);
-}
-
-/// Copies a limited number of bytes from a source buffer to a target buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A modifiable buffer representing the memory region from which
- * the bytes will be copied. The contents of the source buffer will not be
- * modified.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-inline std::size_t buffer_copy(const mutable_buffers_1& target,
-    const mutable_buffers_1& source,
-    std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
-{
-  return buffer_copy(buffer(target, max_bytes_to_copy), source);
-}
-
-/// Copies a limited number of bytes from a source buffer sequence to a target
-/// buffer.
-/**
- * @param target A modifiable buffer representing the memory region to which
- * the bytes will be copied.
- *
- * @param source A non-modifiable buffer sequence representing the memory
- * regions from which the bytes will be copied.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename ConstBufferSequence>
-inline std::size_t buffer_copy(const mutable_buffers_1& target,
-    const ConstBufferSequence& source, std::size_t max_bytes_to_copy,
-    typename enable_if<
-      is_const_buffer_sequence<ConstBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
-{
-  return buffer_copy(buffer(target, max_bytes_to_copy), source);
-}
-
-/// Copies a limited number of bytes from a source buffer to a target buffer
-/// sequence.
-/**
- * @param target A modifiable buffer sequence representing the memory regions to
- * which the bytes will be copied.
- *
- * @param source A non-modifiable buffer representing the memory region from
- * which the bytes will be copied.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename MutableBufferSequence>
+template <typename MutableBufferSequence, typename ConstBufferSequence>
 inline std::size_t buffer_copy(const MutableBufferSequence& target,
-    const const_buffer& source, std::size_t max_bytes_to_copy,
-    typename enable_if<
-      is_mutable_buffer_sequence<MutableBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
+    const ConstBufferSequence& source) ASIO_NOEXCEPT
 {
-  return buffer_copy(target, buffer(source, max_bytes_to_copy));
-}
-
-/// Copies a limited number of bytes from a source buffer to a target buffer
-/// sequence.
-/**
- * @param target A modifiable buffer sequence representing the memory regions to
- * which the bytes will be copied.
- *
- * @param source A non-modifiable buffer representing the memory region from
- * which the bytes will be copied.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename MutableBufferSequence>
-inline std::size_t buffer_copy(const MutableBufferSequence& target,
-    const const_buffers_1& source, std::size_t max_bytes_to_copy,
-    typename enable_if<
-      is_mutable_buffer_sequence<MutableBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
-{
-  return buffer_copy(target, buffer(source, max_bytes_to_copy));
-}
-
-/// Copies a limited number of bytes from a source buffer to a target buffer
-/// sequence.
-/**
- * @param target A modifiable buffer sequence representing the memory regions to
- * which the bytes will be copied.
- *
- * @param source A modifiable buffer representing the memory region from which
- * the bytes will be copied. The contents of the source buffer will not be
- * modified.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename MutableBufferSequence>
-inline std::size_t buffer_copy(const MutableBufferSequence& target,
-    const mutable_buffer& source, std::size_t max_bytes_to_copy,
-    typename enable_if<
-      is_mutable_buffer_sequence<MutableBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
-{
-  return buffer_copy(target, buffer(source, max_bytes_to_copy));
-}
-
-/// Copies a limited number of bytes from a source buffer to a target buffer
-/// sequence.
-/**
- * @param target A modifiable buffer sequence representing the memory regions to
- * which the bytes will be copied.
- *
- * @param source A modifiable buffer representing the memory region from which
- * the bytes will be copied. The contents of the source buffer will not be
- * modified.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename MutableBufferSequence>
-inline std::size_t buffer_copy(const MutableBufferSequence& target,
-    const mutable_buffers_1& source, std::size_t max_bytes_to_copy,
-    typename enable_if<
-      is_mutable_buffer_sequence<MutableBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
-{
-  return buffer_copy(target, buffer(source, max_bytes_to_copy));
+  return detail::buffer_copy(
+      detail::buffer_sequence_cardinality<MutableBufferSequence>(),
+      detail::buffer_sequence_cardinality<ConstBufferSequence>(),
+      asio::buffer_sequence_begin(target),
+      asio::buffer_sequence_end(target),
+      asio::buffer_sequence_begin(source),
+      asio::buffer_sequence_end(source));
 }
 
 /// Copies a limited number of bytes from a source buffer sequence to a target
@@ -2666,54 +2139,17 @@
  * cannot be used to copy between overlapping memory regions.
  */
 template <typename MutableBufferSequence, typename ConstBufferSequence>
-std::size_t buffer_copy(const MutableBufferSequence& target,
-    const ConstBufferSequence& source, std::size_t max_bytes_to_copy,
-    typename enable_if<
-      is_mutable_buffer_sequence<MutableBufferSequence>::value &&
-      is_const_buffer_sequence<ConstBufferSequence>::value
-    >::type* = 0) ASIO_NOEXCEPT
+inline std::size_t buffer_copy(const MutableBufferSequence& target,
+    const ConstBufferSequence& source,
+    std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
 {
-  std::size_t total_bytes_copied = 0;
-
-  typename MutableBufferSequence::const_iterator target_iter = target.begin();
-  typename MutableBufferSequence::const_iterator target_end = target.end();
-  std::size_t target_buffer_offset = 0;
-
-  typename ConstBufferSequence::const_iterator source_iter = source.begin();
-  typename ConstBufferSequence::const_iterator source_end = source.end();
-  std::size_t source_buffer_offset = 0;
-
-  while (total_bytes_copied != max_bytes_to_copy
-      && target_iter != target_end && source_iter != source_end)
-  {
-    mutable_buffer target_buffer =
-      mutable_buffer(*target_iter) + target_buffer_offset;
-
-    const_buffer source_buffer =
-      const_buffer(*source_iter) + source_buffer_offset;
-
-    std::size_t bytes_copied = buffer_copy(target_buffer,
-        source_buffer, max_bytes_to_copy - total_bytes_copied);
-    total_bytes_copied += bytes_copied;
-
-    if (bytes_copied == target_buffer.size())
-    {
-      ++target_iter;
-      target_buffer_offset = 0;
-    }
-    else
-      target_buffer_offset += bytes_copied;
-
-    if (bytes_copied == source_buffer.size())
-    {
-      ++source_iter;
-      source_buffer_offset = 0;
-    }
-    else
-      source_buffer_offset += bytes_copied;
-  }
-
-  return total_bytes_copied;
+  return detail::buffer_copy(
+      detail::buffer_sequence_cardinality<MutableBufferSequence>(),
+      detail::buffer_sequence_cardinality<ConstBufferSequence>(),
+      asio::buffer_sequence_begin(target),
+      asio::buffer_sequence_end(target),
+      asio::buffer_sequence_begin(source),
+      asio::buffer_sequence_end(source), max_bytes_to_copy);
 }
 
 /*@}*/
diff --git a/asio/include/asio/buffered_read_stream.hpp b/asio/include/asio/buffered_read_stream.hpp
index daa6f59..908dd37 100644
--- a/asio/include/asio/buffered_read_stream.hpp
+++ b/asio/include/asio/buffered_read_stream.hpp
@@ -2,7 +2,7 @@
 // buffered_read_stream.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -128,9 +128,10 @@
   }
 
   /// Close the stream.
-  asio::error_code close(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID close(asio::error_code& ec)
   {
-    return next_layer_.close(ec);
+    next_layer_.close(ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Write the given data to the stream. Returns the number of bytes written.
@@ -158,14 +159,8 @@
   async_write_some(const ConstBufferSequence& buffers,
       ASIO_MOVE_ARG(WriteHandler) handler)
   {
-    async_completion<WriteHandler,
-      void (asio::error_code, std::size_t)> init(handler);
-
-    next_layer_.async_write_some(buffers,
-        ASIO_MOVE_CAST(ASIO_HANDLER_TYPE(WriteHandler,
-            void (asio::error_code, std::size_t)))(init.handler));
-
-    return init.result.get();
+    return next_layer_.async_write_some(buffers,
+        ASIO_MOVE_CAST(WriteHandler)(handler));
   }
 
   /// Fill the buffer with some data. Returns the number of bytes placed in the
diff --git a/asio/include/asio/buffered_read_stream_fwd.hpp b/asio/include/asio/buffered_read_stream_fwd.hpp
index 58664c9..3f1646a 100644
--- a/asio/include/asio/buffered_read_stream_fwd.hpp
+++ b/asio/include/asio/buffered_read_stream_fwd.hpp
@@ -2,7 +2,7 @@
 // buffered_read_stream_fwd.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/buffered_stream.hpp b/asio/include/asio/buffered_stream.hpp
index 516e213..cabab60 100644
--- a/asio/include/asio/buffered_stream.hpp
+++ b/asio/include/asio/buffered_stream.hpp
@@ -2,7 +2,7 @@
 // buffered_stream.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -119,9 +119,10 @@
   }
 
   /// Close the stream.
-  asio::error_code close(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID close(asio::error_code& ec)
   {
-    return stream_impl_.close(ec);
+    stream_impl_.close(ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Flush all data from the buffer to the next layer. Returns the number of
diff --git a/asio/include/asio/buffered_stream_fwd.hpp b/asio/include/asio/buffered_stream_fwd.hpp
index 1bad0a8..cc445d2 100644
--- a/asio/include/asio/buffered_stream_fwd.hpp
+++ b/asio/include/asio/buffered_stream_fwd.hpp
@@ -2,7 +2,7 @@
 // buffered_stream_fwd.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/buffered_write_stream.hpp b/asio/include/asio/buffered_write_stream.hpp
index 0fa7547..9cdab8b 100644
--- a/asio/include/asio/buffered_write_stream.hpp
+++ b/asio/include/asio/buffered_write_stream.hpp
@@ -2,7 +2,7 @@
 // buffered_write_stream.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -128,9 +128,10 @@
   }
 
   /// Close the stream.
-  asio::error_code close(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID close(asio::error_code& ec)
   {
-    return next_layer_.close(ec);
+    next_layer_.close(ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Flush all data from the buffer to the next layer. Returns the number of
@@ -193,14 +194,8 @@
   async_read_some(const MutableBufferSequence& buffers,
       ASIO_MOVE_ARG(ReadHandler) handler)
   {
-    async_completion<ReadHandler,
-      void (asio::error_code, std::size_t)> init(handler);
-
-    next_layer_.async_read_some(buffers,
-        ASIO_MOVE_CAST(ASIO_HANDLER_TYPE(ReadHandler,
-            void (asio::error_code, std::size_t)))(init.handler));
-
-    return init.result.get();
+    return next_layer_.async_read_some(buffers,
+        ASIO_MOVE_CAST(ReadHandler)(handler));
   }
 
   /// Peek at the incoming data on the stream. Returns the number of bytes read.
diff --git a/asio/include/asio/buffered_write_stream_fwd.hpp b/asio/include/asio/buffered_write_stream_fwd.hpp
index 027382d..88f93a4 100644
--- a/asio/include/asio/buffered_write_stream_fwd.hpp
+++ b/asio/include/asio/buffered_write_stream_fwd.hpp
@@ -2,7 +2,7 @@
 // buffered_write_stream_fwd.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/buffers_iterator.hpp b/asio/include/asio/buffers_iterator.hpp
index c6eccfb..9080915 100644
--- a/asio/include/asio/buffers_iterator.hpp
+++ b/asio/include/asio/buffers_iterator.hpp
@@ -2,7 +2,7 @@
 // buffers_iterator.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -65,7 +65,44 @@
     typedef buffers_iterator_types_helper<is_mutable> helper;
     typedef typename helper::buffer_type buffer_type;
     typedef typename helper::template byte_type<ByteType>::type byte_type;
+    typedef typename BufferSequence::const_iterator const_iterator;
   };
+
+  template <typename ByteType>
+  struct buffers_iterator_types<mutable_buffer, ByteType>
+  {
+    typedef mutable_buffer buffer_type;
+    typedef ByteType byte_type;
+    typedef const mutable_buffer* const_iterator;
+  };
+
+  template <typename ByteType>
+  struct buffers_iterator_types<const_buffer, ByteType>
+  {
+    typedef const_buffer buffer_type;
+    typedef typename add_const<ByteType>::type byte_type;
+    typedef const const_buffer* const_iterator;
+  };
+
+#if !defined(ASIO_NO_DEPRECATED)
+
+  template <typename ByteType>
+  struct buffers_iterator_types<mutable_buffers_1, ByteType>
+  {
+    typedef mutable_buffer buffer_type;
+    typedef ByteType byte_type;
+    typedef const mutable_buffer* const_iterator;
+  };
+
+  template <typename ByteType>
+  struct buffers_iterator_types<const_buffers_1, ByteType>
+  {
+    typedef const_buffer buffer_type;
+    typedef typename add_const<ByteType>::type byte_type;
+    typedef const const_buffer* const_iterator;
+  };
+
+#endif // !defined(ASIO_NO_DEPRECATED)
 }
 
 /// A random access iterator over the bytes in a buffer sequence.
@@ -76,6 +113,9 @@
   typedef typename detail::buffers_iterator_types<
       BufferSequence, ByteType>::buffer_type buffer_type;
 
+  typedef typename detail::buffers_iterator_types<BufferSequence,
+          ByteType>::const_iterator buffer_sequence_iterator_type;
+
 public:
   /// The type used for the distance between two iterators.
   typedef std::ptrdiff_t difference_type;
@@ -130,9 +170,9 @@
 #endif // defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
   {
     buffers_iterator new_iter;
-    new_iter.begin_ = buffers.begin();
-    new_iter.current_ = buffers.begin();
-    new_iter.end_ = buffers.end();
+    new_iter.begin_ = asio::buffer_sequence_begin(buffers);
+    new_iter.current_ = asio::buffer_sequence_begin(buffers);
+    new_iter.end_ = asio::buffer_sequence_end(buffers);
     while (new_iter.current_ != new_iter.end_)
     {
       new_iter.current_buffer_ = *new_iter.current_;
@@ -150,9 +190,9 @@
 #endif // defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
   {
     buffers_iterator new_iter;
-    new_iter.begin_ = buffers.begin();
-    new_iter.current_ = buffers.begin();
-    new_iter.end_ = buffers.end();
+    new_iter.begin_ = asio::buffer_sequence_begin(buffers);
+    new_iter.current_ = asio::buffer_sequence_begin(buffers);
+    new_iter.end_ = asio::buffer_sequence_end(buffers);
     while (new_iter.current_ != new_iter.end_)
     {
       buffer_type buffer = *new_iter.current_;
@@ -347,7 +387,7 @@
     }
 
     // Find the previous non-empty buffer.
-    typename BufferSequence::const_iterator iter = current_;
+    buffer_sequence_iterator_type iter = current_;
     while (iter != begin_)
     {
       --iter;
@@ -426,7 +466,7 @@
         }
 
         // Find the previous non-empty buffer.
-        typename BufferSequence::const_iterator iter = current_;
+        buffer_sequence_iterator_type iter = current_;
         while (iter != begin_)
         {
           --iter;
@@ -452,9 +492,9 @@
 
   buffer_type current_buffer_;
   std::size_t current_buffer_position_;
-  typename BufferSequence::const_iterator begin_;
-  typename BufferSequence::const_iterator current_;
-  typename BufferSequence::const_iterator end_;
+  buffer_sequence_iterator_type begin_;
+  buffer_sequence_iterator_type current_;
+  buffer_sequence_iterator_type end_;
   std::size_t position_;
 };
 
diff --git a/asio/include/asio/completion_condition.hpp b/asio/include/asio/completion_condition.hpp
index b17b44a..cb22ddd 100644
--- a/asio/include/asio/completion_condition.hpp
+++ b/asio/include/asio/completion_condition.hpp
@@ -2,7 +2,7 @@
 // completion_condition.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/connect.hpp b/asio/include/asio/connect.hpp
index f63f335..7dba932 100644
--- a/asio/include/asio/connect.hpp
+++ b/asio/include/asio/connect.hpp
@@ -2,7 +2,7 @@
 // connect.hpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -86,8 +86,9 @@
  * tcp::socket s(io_context);
  * asio::connect(s, r.resolve(q)); @endcode
  */
-template <typename Protocol, typename SocketService, typename EndpointSequence>
-typename Protocol::endpoint connect(basic_socket<Protocol, SocketService>& s,
+template <typename Protocol ASIO_SVC_TPARAM, typename EndpointSequence>
+typename Protocol::endpoint connect(
+    basic_socket<Protocol ASIO_SVC_TARG>& s,
     const EndpointSequence& endpoints,
     typename enable_if<is_endpoint_sequence<
         EndpointSequence>::value>::type* = 0);
@@ -122,8 +123,9 @@
  *   // An error occurred.
  * } @endcode
  */
-template <typename Protocol, typename SocketService, typename EndpointSequence>
-typename Protocol::endpoint connect(basic_socket<Protocol, SocketService>& s,
+template <typename Protocol ASIO_SVC_TPARAM, typename EndpointSequence>
+typename Protocol::endpoint connect(
+    basic_socket<Protocol ASIO_SVC_TARG>& s,
     const EndpointSequence& endpoints, asio::error_code& ec,
     typename enable_if<is_endpoint_sequence<
         EndpointSequence>::value>::type* = 0);
@@ -153,8 +155,8 @@
  * Iterator represents the end of the sequence. This is a valid assumption for
  * iterator types such as @c asio::ip::tcp::resolver::iterator.
  */
-template <typename Protocol, typename SocketService, typename Iterator>
-Iterator connect(basic_socket<Protocol, SocketService>& s, Iterator begin,
+template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
     typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
 
 /// (Deprecated.) Establishes a socket connection by trying each endpoint in a
@@ -181,8 +183,8 @@
  * Iterator represents the end of the sequence. This is a valid assumption for
  * iterator types such as @c asio::ip::tcp::resolver::iterator.
  */
-template <typename Protocol, typename SocketService, typename Iterator>
-Iterator connect(basic_socket<Protocol, SocketService>& s,
+template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, asio::error_code& ec,
     typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
 #endif // !defined(ASIO_NO_DEPRECATED)
@@ -214,8 +216,8 @@
  * tcp::socket s(io_context);
  * asio::connect(s, e.begin(), e.end()); @endcode
  */
-template <typename Protocol, typename SocketService, typename Iterator>
-Iterator connect(basic_socket<Protocol, SocketService>& s,
+template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, Iterator end);
 
 /// Establishes a socket connection by trying each endpoint in a sequence.
@@ -251,8 +253,8 @@
  *   // An error occurred.
  * } @endcode
  */
-template <typename Protocol, typename SocketService, typename Iterator>
-Iterator connect(basic_socket<Protocol, SocketService>& s,
+template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, Iterator end, asio::error_code& ec);
 
 /// Establishes a socket connection by trying each endpoint in a sequence.
@@ -306,9 +308,10 @@
  *     r.resolve(q), my_connect_condition());
  * std::cout << "Connected to: " << e << std::endl; @endcode
  */
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename EndpointSequence, typename ConnectCondition>
-typename Protocol::endpoint connect(basic_socket<Protocol, SocketService>& s,
+typename Protocol::endpoint connect(
+    basic_socket<Protocol ASIO_SVC_TARG>& s,
     const EndpointSequence& endpoints, ConnectCondition connect_condition,
     typename enable_if<is_endpoint_sequence<
         EndpointSequence>::value>::type* = 0);
@@ -373,9 +376,10 @@
  *   std::cout << "Connected to: " << e << std::endl;
  * } @endcode
  */
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename EndpointSequence, typename ConnectCondition>
-typename Protocol::endpoint connect(basic_socket<Protocol, SocketService>& s,
+typename Protocol::endpoint connect(
+    basic_socket<Protocol ASIO_SVC_TARG>& s,
     const EndpointSequence& endpoints, ConnectCondition connect_condition,
     asio::error_code& ec,
     typename enable_if<is_endpoint_sequence<
@@ -417,9 +421,9 @@
  * Iterator represents the end of the sequence. This is a valid assumption for
  * iterator types such as @c asio::ip::tcp::resolver::iterator.
  */
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol, SocketService>& s,
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, ConnectCondition connect_condition,
     typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
 
@@ -458,9 +462,9 @@
  * Iterator represents the end of the sequence. This is a valid assumption for
  * iterator types such as @c asio::ip::tcp::resolver::iterator.
  */
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol, SocketService>& s, Iterator begin,
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
     ConnectCondition connect_condition, asio::error_code& ec,
     typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
 #endif // !defined(ASIO_NO_DEPRECATED)
@@ -519,9 +523,9 @@
  *     s, e.begin(), e.end(), my_connect_condition());
  * std::cout << "Connected to: " << i->endpoint() << std::endl; @endcode
  */
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol, SocketService>& s, Iterator begin,
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
     Iterator end, ConnectCondition connect_condition);
 
 /// Establishes a socket connection by trying each endpoint in a sequence.
@@ -587,9 +591,9 @@
  *   std::cout << "Connected to: " << i->endpoint() << std::endl;
  * } @endcode
  */
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol, SocketService>& s,
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, Iterator end, ConnectCondition connect_condition,
     asio::error_code& ec);
 
@@ -664,11 +668,11 @@
  *   // ...
  * } @endcode
  */
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename EndpointSequence, typename RangeConnectHandler>
 ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
     void (asio::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol, SocketService>& s,
+async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     const EndpointSequence& endpoints,
     ASIO_MOVE_ARG(RangeConnectHandler) handler,
     typename enable_if<is_endpoint_sequence<
@@ -710,11 +714,11 @@
  * Iterator represents the end of the sequence. This is a valid assumption for
  * iterator types such as @c asio::ip::tcp::resolver::iterator.
  */
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename IteratorConnectHandler>
 ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
     void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, SocketService>& s,
+async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, ASIO_MOVE_ARG(IteratorConnectHandler) handler,
     typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
 #endif // !defined(ASIO_NO_DEPRECATED)
@@ -768,11 +772,11 @@
  *   // ...
  * } @endcode
  */
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename IteratorConnectHandler>
 ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
     void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, SocketService>& s,
+async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, Iterator end,
     ASIO_MOVE_ARG(IteratorConnectHandler) handler);
 
@@ -871,11 +875,11 @@
  *   }
  * } @endcode
  */
-template <typename Protocol, typename SocketService, typename EndpointSequence,
+template <typename Protocol ASIO_SVC_TPARAM, typename EndpointSequence,
     typename ConnectCondition, typename RangeConnectHandler>
 ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
     void (asio::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol, SocketService>& s,
+async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     const EndpointSequence& endpoints, ConnectCondition connect_condition,
     ASIO_MOVE_ARG(RangeConnectHandler) handler,
     typename enable_if<is_endpoint_sequence<
@@ -928,11 +932,11 @@
  * Iterator represents the end of the sequence. This is a valid assumption for
  * iterator types such as @c asio::ip::tcp::resolver::iterator.
  */
-template <typename Protocol, typename SocketService, typename Iterator,
+template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
     typename ConnectCondition, typename IteratorConnectHandler>
 ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
     void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, SocketService>& s, Iterator begin,
+async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
     ConnectCondition connect_condition,
     ASIO_MOVE_ARG(IteratorConnectHandler) handler,
     typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
@@ -1036,11 +1040,11 @@
  *   }
  * } @endcode
  */
-template <typename Protocol, typename SocketService, typename Iterator,
+template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
     typename ConnectCondition, typename IteratorConnectHandler>
 ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
     void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, SocketService>& s,
+async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, Iterator end, ConnectCondition connect_condition,
     ASIO_MOVE_ARG(IteratorConnectHandler) handler);
 
diff --git a/asio/include/asio/coroutine.hpp b/asio/include/asio/coroutine.hpp
index ca456b2..d4a0335 100644
--- a/asio/include/asio/coroutine.hpp
+++ b/asio/include/asio/coroutine.hpp
@@ -2,7 +2,7 @@
 // coroutine.hpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/datagram_socket_service.hpp b/asio/include/asio/datagram_socket_service.hpp
index 91fbdc9..4b9047d 100644
--- a/asio/include/asio/datagram_socket_service.hpp
+++ b/asio/include/asio/datagram_socket_service.hpp
@@ -2,7 +2,7 @@
 // datagram_socket_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,6 +16,9 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include <cstddef>
 #include "asio/async_result.hpp"
 #include "asio/detail/type_traits.hpp"
@@ -131,22 +134,23 @@
   }
 
   // Open a new datagram socket implementation.
-  asio::error_code open(implementation_type& impl,
+  ASIO_SYNC_OP_VOID open(implementation_type& impl,
       const protocol_type& protocol, asio::error_code& ec)
   {
     if (protocol.type() == ASIO_OS_DEF(SOCK_DGRAM))
       service_impl_.open(impl, protocol, ec);
     else
       ec = asio::error::invalid_argument;
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Assign an existing native socket to a datagram socket.
-  asio::error_code assign(implementation_type& impl,
+  ASIO_SYNC_OP_VOID assign(implementation_type& impl,
       const protocol_type& protocol, const native_handle_type& native_socket,
       asio::error_code& ec)
   {
-    return service_impl_.assign(impl, protocol, native_socket, ec);
+    service_impl_.assign(impl, protocol, native_socket, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the socket is open.
@@ -156,10 +160,11 @@
   }
 
   /// Close a datagram socket implementation.
-  asio::error_code close(implementation_type& impl,
+  ASIO_SYNC_OP_VOID close(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.close(impl, ec);
+    service_impl_.close(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native socket implementation.
@@ -169,10 +174,11 @@
   }
 
   /// Cancel all asynchronous operations associated with the socket.
-  asio::error_code cancel(implementation_type& impl,
+  ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.cancel(impl, ec);
+    service_impl_.cancel(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the socket is at the out-of-band data mark.
@@ -190,17 +196,19 @@
   }
 
   // Bind the datagram socket to the specified local endpoint.
-  asio::error_code bind(implementation_type& impl,
+  ASIO_SYNC_OP_VOID bind(implementation_type& impl,
       const endpoint_type& endpoint, asio::error_code& ec)
   {
-    return service_impl_.bind(impl, endpoint, ec);
+    service_impl_.bind(impl, endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Connect the datagram socket to the specified endpoint.
-  asio::error_code connect(implementation_type& impl,
+  ASIO_SYNC_OP_VOID connect(implementation_type& impl,
       const endpoint_type& peer_endpoint, asio::error_code& ec)
   {
-    return service_impl_.connect(impl, peer_endpoint, ec);
+    service_impl_.connect(impl, peer_endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Start an asynchronous connect.
@@ -214,33 +222,36 @@
     async_completion<ConnectHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_connect(impl, peer_endpoint, init.handler);
+    service_impl_.async_connect(impl, peer_endpoint, init.completion_handler);
 
     return init.result.get();
   }
 
   /// Set a socket option.
   template <typename SettableSocketOption>
-  asio::error_code set_option(implementation_type& impl,
+  ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
       const SettableSocketOption& option, asio::error_code& ec)
   {
-    return service_impl_.set_option(impl, option, ec);
+    service_impl_.set_option(impl, option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get a socket option.
   template <typename GettableSocketOption>
-  asio::error_code get_option(const implementation_type& impl,
+  ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
       GettableSocketOption& option, asio::error_code& ec) const
   {
-    return service_impl_.get_option(impl, option, ec);
+    service_impl_.get_option(impl, option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Perform an IO control command on the socket.
   template <typename IoControlCommand>
-  asio::error_code io_control(implementation_type& impl,
+  ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
       IoControlCommand& command, asio::error_code& ec)
   {
-    return service_impl_.io_control(impl, command, ec);
+    service_impl_.io_control(impl, command, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the socket.
@@ -250,10 +261,11 @@
   }
 
   /// Sets the non-blocking mode of the socket.
-  asio::error_code non_blocking(implementation_type& impl,
+  ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
       bool mode, asio::error_code& ec)
   {
-    return service_impl_.non_blocking(impl, mode, ec);
+    service_impl_.non_blocking(impl, mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the native socket implementation.
@@ -263,10 +275,11 @@
   }
 
   /// Sets the non-blocking mode of the native socket implementation.
-  asio::error_code native_non_blocking(implementation_type& impl,
+  ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
       bool mode, asio::error_code& ec)
   {
-    return service_impl_.native_non_blocking(impl, mode, ec);
+    service_impl_.native_non_blocking(impl, mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the local endpoint.
@@ -284,18 +297,20 @@
   }
 
   /// Disable sends or receives on the socket.
-  asio::error_code shutdown(implementation_type& impl,
+  ASIO_SYNC_OP_VOID shutdown(implementation_type& impl,
       socket_base::shutdown_type what, asio::error_code& ec)
   {
-    return service_impl_.shutdown(impl, what, ec);
+    service_impl_.shutdown(impl, what, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Wait for the socket to become ready to read, ready to write, or to have
   /// pending error conditions.
-  asio::error_code wait(implementation_type& impl,
+  ASIO_SYNC_OP_VOID wait(implementation_type& impl,
       socket_base::wait_type w, asio::error_code& ec)
   {
-    return service_impl_.wait(impl, w, ec);
+    service_impl_.wait(impl, w, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Asynchronously wait for the socket to become ready to read, ready to
@@ -309,7 +324,7 @@
     async_completion<WaitHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_wait(impl, w, init.handler);
+    service_impl_.async_wait(impl, w, init.completion_handler);
 
     return init.result.get();
   }
@@ -334,7 +349,7 @@
     async_completion<WriteHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_send(impl, buffers, flags, init.handler);
+    service_impl_.async_send(impl, buffers, flags, init.completion_handler);
 
     return init.result.get();
   }
@@ -361,7 +376,7 @@
       void (asio::error_code, std::size_t)> init(handler);
 
     service_impl_.async_send_to(impl, buffers,
-        destination, flags, init.handler);
+        destination, flags, init.completion_handler);
 
     return init.result.get();
   }
@@ -387,7 +402,7 @@
     async_completion<ReadHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_receive(impl, buffers, flags, init.handler);
+    service_impl_.async_receive(impl, buffers, flags, init.completion_handler);
 
     return init.result.get();
   }
@@ -415,7 +430,7 @@
       void (asio::error_code, std::size_t)> init(handler);
 
     service_impl_.async_receive_from(impl, buffers,
-        sender_endpoint, flags, init.handler);
+        sender_endpoint, flags, init.completion_handler);
 
     return init.result.get();
   }
@@ -435,4 +450,6 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_DATAGRAM_SOCKET_SERVICE_HPP
diff --git a/asio/include/asio/deadline_timer.hpp b/asio/include/asio/deadline_timer.hpp
index 8bf22ce..1ffbfe5 100644
--- a/asio/include/asio/deadline_timer.hpp
+++ b/asio/include/asio/deadline_timer.hpp
@@ -2,7 +2,7 @@
 // deadline_timer.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/deadline_timer_service.hpp b/asio/include/asio/deadline_timer_service.hpp
index 5ef64c8..7acac1c 100644
--- a/asio/include/asio/deadline_timer_service.hpp
+++ b/asio/include/asio/deadline_timer_service.hpp
@@ -2,7 +2,7 @@
 // deadline_timer_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_BOOST_DATE_TIME) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -25,7 +27,6 @@
 #include "asio/detail/deadline_timer_service.hpp"
 #include "asio/io_context.hpp"
 #include "asio/time_traits.hpp"
-#include "asio/detail/timer_queue_ptime.hpp"
 
 #include "asio/detail/push_options.hpp"
 
@@ -144,7 +145,7 @@
     async_completion<WaitHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_wait(impl, init.handler);
+    service_impl_.async_wait(impl, init.completion_handler);
 
     return init.result.get();
   }
@@ -167,4 +168,6 @@
 #endif // defined(ASIO_HAS_BOOST_DATE_TIME)
        // || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_DEADLINE_TIMER_SERVICE_HPP
diff --git a/asio/include/asio/defer.hpp b/asio/include/asio/defer.hpp
index 448364a..5e80614 100644
--- a/asio/include/asio/defer.hpp
+++ b/asio/include/asio/defer.hpp
@@ -2,7 +2,7 @@
 // defer.hpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/array.hpp b/asio/include/asio/detail/array.hpp
index 125f84d..cfb0acc 100644
--- a/asio/include/asio/detail/array.hpp
+++ b/asio/include/asio/detail/array.hpp
@@ -2,7 +2,7 @@
 // detail/array.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/array_fwd.hpp b/asio/include/asio/detail/array_fwd.hpp
index b53eca3..6a19a82 100644
--- a/asio/include/asio/detail/array_fwd.hpp
+++ b/asio/include/asio/detail/array_fwd.hpp
@@ -2,7 +2,7 @@
 // detail/array_fwd.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/assert.hpp b/asio/include/asio/detail/assert.hpp
index 104c0d1..22bb4b9 100644
--- a/asio/include/asio/detail/assert.hpp
+++ b/asio/include/asio/detail/assert.hpp
@@ -2,7 +2,7 @@
 // detail/assert.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/atomic_count.hpp b/asio/include/asio/detail/atomic_count.hpp
index 5956da0..798f915 100644
--- a/asio/include/asio/detail/atomic_count.hpp
+++ b/asio/include/asio/detail/atomic_count.hpp
@@ -2,7 +2,7 @@
 // detail/atomic_count.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/base_from_completion_cond.hpp b/asio/include/asio/detail/base_from_completion_cond.hpp
index a1aa61e..9f5165b 100644
--- a/asio/include/asio/detail/base_from_completion_cond.hpp
+++ b/asio/include/asio/detail/base_from_completion_cond.hpp
@@ -2,7 +2,7 @@
 // detail/base_from_completion_cond.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/bind_handler.hpp b/asio/include/asio/detail/bind_handler.hpp
index 617a196..3752464 100644
--- a/asio/include/asio/detail/bind_handler.hpp
+++ b/asio/include/asio/detail/bind_handler.hpp
@@ -2,7 +2,7 @@
 // detail/bind_handler.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/buffer_resize_guard.hpp b/asio/include/asio/detail/buffer_resize_guard.hpp
index 5a33c3f..2768c8a 100644
--- a/asio/include/asio/detail/buffer_resize_guard.hpp
+++ b/asio/include/asio/detail/buffer_resize_guard.hpp
@@ -2,7 +2,7 @@
 // detail/buffer_resize_guard.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/buffer_sequence_adapter.hpp b/asio/include/asio/detail/buffer_sequence_adapter.hpp
index e3ad23d..f81e312 100644
--- a/asio/include/asio/detail/buffer_sequence_adapter.hpp
+++ b/asio/include/asio/detail/buffer_sequence_adapter.hpp
@@ -2,7 +2,7 @@
 // detail/buffer_sequence_adapter.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -27,11 +27,12 @@
 
 class buffer_sequence_adapter_base
 {
-protected:
 #if defined(ASIO_WINDOWS_RUNTIME)
+public:
   // The maximum number of buffers to support in a single operation.
   enum { max_buffers = 1 };
 
+protected:
   typedef Windows::Storage::Streams::IBuffer^ native_buffer_type;
 
   ASIO_DECL static void init_native_buffer(
@@ -42,9 +43,11 @@
       native_buffer_type& buf,
       const asio::const_buffer& buffer);
 #elif defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+public:
   // The maximum number of buffers to support in a single operation.
   enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
 
+protected:
   typedef WSABUF native_buffer_type;
 
   static void init_native_buffer(WSABUF& buf,
@@ -61,9 +64,11 @@
     buf.len = static_cast<ULONG>(buffer.size());
   }
 #else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+public:
   // The maximum number of buffers to support in a single operation.
   enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
 
+protected:
   typedef iovec native_buffer_type;
 
   static void init_iov_base(void*& base, void* addr)
@@ -102,14 +107,9 @@
   explicit buffer_sequence_adapter(const Buffers& buffer_sequence)
     : count_(0), total_buffer_size_(0)
   {
-    typename Buffers::const_iterator iter = buffer_sequence.begin();
-    typename Buffers::const_iterator end = buffer_sequence.end();
-    for (; iter != end && count_ < max_buffers; ++iter, ++count_)
-    {
-      Buffer buffer(*iter);
-      init_native_buffer(buffers_[count_], buffer);
-      total_buffer_size_ += buffer.size();
-    }
+    buffer_sequence_adapter::init(
+        asio::buffer_sequence_begin(buffer_sequence),
+        asio::buffer_sequence_end(buffer_sequence));
   }
 
   native_buffer_type* buffers()
@@ -122,6 +122,11 @@
     return count_;
   }
 
+  std::size_t total_size() const
+  {
+    return total_buffer_size_;
+  }
+
   bool all_empty() const
   {
     return total_buffer_size_ == 0;
@@ -129,8 +134,42 @@
 
   static bool all_empty(const Buffers& buffer_sequence)
   {
-    typename Buffers::const_iterator iter = buffer_sequence.begin();
-    typename Buffers::const_iterator end = buffer_sequence.end();
+    return buffer_sequence_adapter::all_empty(
+        asio::buffer_sequence_begin(buffer_sequence),
+        asio::buffer_sequence_end(buffer_sequence));
+  }
+
+  static void validate(const Buffers& buffer_sequence)
+  {
+    buffer_sequence_adapter::validate(
+        asio::buffer_sequence_begin(buffer_sequence),
+        asio::buffer_sequence_end(buffer_sequence));
+  }
+
+  static Buffer first(const Buffers& buffer_sequence)
+  {
+    return buffer_sequence_adapter::first(
+        asio::buffer_sequence_begin(buffer_sequence),
+        asio::buffer_sequence_end(buffer_sequence));
+  }
+
+private:
+  template <typename Iterator>
+  void init(Iterator begin, Iterator end)
+  {
+    Iterator iter = begin;
+    for (; iter != end && count_ < max_buffers; ++iter, ++count_)
+    {
+      Buffer buffer(*iter);
+      init_native_buffer(buffers_[count_], buffer);
+      total_buffer_size_ += buffer.size();
+    }
+  }
+
+  template <typename Iterator>
+  static bool all_empty(Iterator begin, Iterator end)
+  {
+    Iterator iter = begin;
     std::size_t i = 0;
     for (; iter != end && i < max_buffers; ++iter, ++i)
       if (Buffer(*iter).size() > 0)
@@ -138,10 +177,10 @@
     return true;
   }
 
-  static void validate(const Buffers& buffer_sequence)
+  template <typename Iterator>
+  static void validate(Iterator begin, Iterator end)
   {
-    typename Buffers::const_iterator iter = buffer_sequence.begin();
-    typename Buffers::const_iterator end = buffer_sequence.end();
+    Iterator iter = begin;
     for (; iter != end; ++iter)
     {
       Buffer buffer(*iter);
@@ -149,10 +188,10 @@
     }
   }
 
-  static Buffer first(const Buffers& buffer_sequence)
+  template <typename Iterator>
+  static Buffer first(Iterator begin, Iterator end)
   {
-    typename Buffers::const_iterator iter = buffer_sequence.begin();
-    typename Buffers::const_iterator end = buffer_sequence.end();
+    Iterator iter = begin;
     for (; iter != end; ++iter)
     {
       Buffer buffer(*iter);
@@ -162,13 +201,118 @@
     return Buffer();
   }
 
-private:
   native_buffer_type buffers_[max_buffers];
   std::size_t count_;
   std::size_t total_buffer_size_;
 };
 
 template <typename Buffer>
+class buffer_sequence_adapter<Buffer, asio::mutable_buffer>
+  : buffer_sequence_adapter_base
+{
+public:
+  explicit buffer_sequence_adapter(
+      const asio::mutable_buffer& buffer_sequence)
+  {
+    init_native_buffer(buffer_, Buffer(buffer_sequence));
+    total_buffer_size_ = buffer_sequence.size();
+  }
+
+  native_buffer_type* buffers()
+  {
+    return &buffer_;
+  }
+
+  std::size_t count() const
+  {
+    return 1;
+  }
+
+  std::size_t total_size() const
+  {
+    return total_buffer_size_;
+  }
+
+  bool all_empty() const
+  {
+    return total_buffer_size_ == 0;
+  }
+
+  static bool all_empty(const asio::mutable_buffer& buffer_sequence)
+  {
+    return buffer_sequence.size() == 0;
+  }
+
+  static void validate(const asio::mutable_buffer& buffer_sequence)
+  {
+    buffer_sequence.data();
+  }
+
+  static Buffer first(const asio::mutable_buffer& buffer_sequence)
+  {
+    return Buffer(buffer_sequence);
+  }
+
+private:
+  native_buffer_type buffer_;
+  std::size_t total_buffer_size_;
+};
+
+template <typename Buffer>
+class buffer_sequence_adapter<Buffer, asio::const_buffer>
+  : buffer_sequence_adapter_base
+{
+public:
+  explicit buffer_sequence_adapter(
+      const asio::const_buffer& buffer_sequence)
+  {
+    init_native_buffer(buffer_, Buffer(buffer_sequence));
+    total_buffer_size_ = buffer_sequence.size();
+  }
+
+  native_buffer_type* buffers()
+  {
+    return &buffer_;
+  }
+
+  std::size_t count() const
+  {
+    return 1;
+  }
+
+  std::size_t total_size() const
+  {
+    return total_buffer_size_;
+  }
+
+  bool all_empty() const
+  {
+    return total_buffer_size_ == 0;
+  }
+
+  static bool all_empty(const asio::const_buffer& buffer_sequence)
+  {
+    return buffer_sequence.size() == 0;
+  }
+
+  static void validate(const asio::const_buffer& buffer_sequence)
+  {
+    buffer_sequence.data();
+  }
+
+  static Buffer first(const asio::const_buffer& buffer_sequence)
+  {
+    return Buffer(buffer_sequence);
+  }
+
+private:
+  native_buffer_type buffer_;
+  std::size_t total_buffer_size_;
+};
+
+#if !defined(ASIO_NO_DEPRECATED)
+
+template <typename Buffer>
 class buffer_sequence_adapter<Buffer, asio::mutable_buffers_1>
   : buffer_sequence_adapter_base
 {
@@ -190,6 +334,11 @@
     return 1;
   }
 
+  std::size_t total_size() const
+  {
+    return total_buffer_size_;
+  }
+
   bool all_empty() const
   {
     return total_buffer_size_ == 0;
@@ -237,6 +386,11 @@
     return 1;
   }
 
+  std::size_t total_size() const
+  {
+    return total_buffer_size_;
+  }
+
   bool all_empty() const
   {
     return total_buffer_size_ == 0;
@@ -262,6 +416,8 @@
   std::size_t total_buffer_size_;
 };
 
+#endif // !defined(ASIO_NO_DEPRECATED)
+
 template <typename Buffer, typename Elem>
 class buffer_sequence_adapter<Buffer, boost::array<Elem, 2> >
   : buffer_sequence_adapter_base
@@ -285,6 +441,11 @@
     return 2;
   }
 
+  std::size_t total_size() const
+  {
+    return total_buffer_size_;
+  }
+
   bool all_empty() const
   {
     return total_buffer_size_ == 0;
@@ -337,6 +498,11 @@
     return 2;
   }
 
+  std::size_t total_size() const
+  {
+    return total_buffer_size_;
+  }
+
   bool all_empty() const
   {
     return total_buffer_size_ == 0;
diff --git a/asio/include/asio/detail/buffered_stream_storage.hpp b/asio/include/asio/detail/buffered_stream_storage.hpp
index 4e6bcd3..a71120d 100644
--- a/asio/include/asio/detail/buffered_stream_storage.hpp
+++ b/asio/include/asio/detail/buffered_stream_storage.hpp
@@ -2,7 +2,7 @@
 // detail/buffered_stream_storage.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/call_stack.hpp b/asio/include/asio/detail/call_stack.hpp
index b700a00..9835e64 100644
--- a/asio/include/asio/detail/call_stack.hpp
+++ b/asio/include/asio/detail/call_stack.hpp
@@ -2,7 +2,7 @@
 // detail/call_stack.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/chrono.hpp b/asio/include/asio/detail/chrono.hpp
index 93cf894..31d6c6e 100644
--- a/asio/include/asio/detail/chrono.hpp
+++ b/asio/include/asio/detail/chrono.hpp
@@ -2,7 +2,7 @@
 // detail/chrono.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -38,11 +38,11 @@
 using std::chrono::hours;
 using std::chrono::time_point_cast;
 #if defined(ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
-typedef std::chrono::monotonic_clock system_clock;
+typedef std::chrono::monotonic_clock steady_clock;
 #else // defined(ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
-using std::chrono::system_clock;
-#endif // defined(ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
 using std::chrono::steady_clock;
+#endif // defined(ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
+using std::chrono::system_clock;
 using std::chrono::high_resolution_clock;
 #elif defined(ASIO_HAS_BOOST_CHRONO)
 using boost::chrono::duration;
diff --git a/asio/include/asio/detail/chrono_time_traits.hpp b/asio/include/asio/detail/chrono_time_traits.hpp
index 525d551..b6236a5 100644
--- a/asio/include/asio/detail/chrono_time_traits.hpp
+++ b/asio/include/asio/detail/chrono_time_traits.hpp
@@ -2,7 +2,7 @@
 // detail/chrono_time_traits.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/completion_handler.hpp b/asio/include/asio/detail/completion_handler.hpp
index bb61cb5..e510ded 100644
--- a/asio/include/asio/detail/completion_handler.hpp
+++ b/asio/include/asio/detail/completion_handler.hpp
@@ -2,7 +2,7 @@
 // detail/completion_handler.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/concurrency_hint.hpp b/asio/include/asio/detail/concurrency_hint.hpp
new file mode 100644
index 0000000..7548093
--- /dev/null
+++ b/asio/include/asio/detail/concurrency_hint.hpp
@@ -0,0 +1,88 @@
+//
+// detail/concurrency_hint.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ASIO_DETAIL_CONCURRENCY_HINT_HPP
+#define ASIO_DETAIL_CONCURRENCY_HINT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/noncopyable.hpp"
+
+// The concurrency hint ID and mask are used to identify when a "well-known"
+// concurrency hint value has been passed to the io_context.
+#define ASIO_CONCURRENCY_HINT_ID 0xA5100000u
+#define ASIO_CONCURRENCY_HINT_ID_MASK 0xFFFF0000u
+
+// If set, this bit indicates that the scheduler should perform locking.
+#define ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER 0x1u
+
+// If set, this bit indicates that the reactor should perform locking.
+#define ASIO_CONCURRENCY_HINT_LOCKING_REACTOR 0x2u
+
+// Helper macro to determine if we have a special concurrency hint.
+#define ASIO_CONCURRENCY_HINT_IS_SPECIAL(hint) \
+  ((static_cast<unsigned>(hint) \
+    & ASIO_CONCURRENCY_HINT_ID_MASK) \
+      == ASIO_CONCURRENCY_HINT_ID)
+
+// Helper macro to determine if locking is enabled for a given facility.
+#define ASIO_CONCURRENCY_HINT_IS_LOCKING(facility, hint) \
+  (((static_cast<unsigned>(hint) \
+    & (ASIO_CONCURRENCY_HINT_ID_MASK \
+      | ASIO_CONCURRENCY_HINT_LOCKING_ ## facility)) \
+        ^ ASIO_CONCURRENCY_HINT_ID) != 0)
+
+// This special concurrency hint disables locking in both the scheduler and
+// reactor I/O. This hint has the following restrictions:
+//
+// - Care must be taken to ensure that all operations on the io_context and any
+//   of its associated I/O objects (such as sockets and timers) occur in only
+//   one thread at a time.
+//
+// - Asynchronous resolve operations fail with operation_not_supported.
+//
+// - If a signal_set is used with the io_context, signal_set objects cannot be
+//   used with any other io_context in the program.
+#define ASIO_CONCURRENCY_HINT_UNSAFE \
+  static_cast<int>(ASIO_CONCURRENCY_HINT_ID)
+
+// This special concurrency hint disables locking in the reactor I/O. This hint
+// has the following restrictions:
+//
+// - Care must be taken to ensure that run functions on the io_context, and all
+//   operations on the io_context's associated I/O objects (such as sockets and
+//   timers), occur in only one thread at a time.
+#define ASIO_CONCURRENCY_HINT_UNSAFE_IO \
+  static_cast<int>(ASIO_CONCURRENCY_HINT_ID \
+      | ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER)
+
+// The special concurrency hint provides full thread safety.
+#define ASIO_CONCURRENCY_HINT_SAFE \
+  static_cast<int>(ASIO_CONCURRENCY_HINT_ID \
+      | ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER \
+      | ASIO_CONCURRENCY_HINT_LOCKING_REACTOR)
+
+// This #define may be overridden at compile time to specify a program-wide
+// default concurrency hint, used by the zero-argument io_context constructor.
+#if !defined(ASIO_CONCURRENCY_HINT_DEFAULT)
+# define ASIO_CONCURRENCY_HINT_DEFAULT -1
+#endif // !defined(ASIO_CONCURRENCY_HINT_DEFAULT)
+
+// This #define may be overridden at compile time to specify a program-wide
+// concurrency hint, used by the one-argument io_context constructor when
+// passed a value of 1.
+#if !defined(ASIO_CONCURRENCY_HINT_1)
+# define ASIO_CONCURRENCY_HINT_1 1
+#endif // !defined(ASIO_CONCURRENCY_HINT_DEFAULT)
+
+#endif // ASIO_DETAIL_CONCURRENCY_HINT_HPP
diff --git a/asio/include/asio/detail/conditionally_enabled_event.hpp b/asio/include/asio/detail/conditionally_enabled_event.hpp
new file mode 100644
index 0000000..7ce806a
--- /dev/null
+++ b/asio/include/asio/detail/conditionally_enabled_event.hpp
@@ -0,0 +1,112 @@
+//
+// detail/conditionally_enabled_event.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ASIO_DETAIL_CONDITIONALLY_ENABLED_EVENT_HPP
+#define ASIO_DETAIL_CONDITIONALLY_ENABLED_EVENT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/conditionally_enabled_mutex.hpp"
+#include "asio/detail/event.hpp"
+#include "asio/detail/noncopyable.hpp"
+#include "asio/detail/null_event.hpp"
+#include "asio/detail/scoped_lock.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Mutex adapter used to conditionally enable or disable locking.
+class conditionally_enabled_event
+  : private noncopyable
+{
+public:
+  // Constructor.
+  conditionally_enabled_event()
+  {
+  }
+
+  // Destructor.
+  ~conditionally_enabled_event()
+  {
+  }
+
+  // Signal the event. (Retained for backward compatibility.)
+  void signal(conditionally_enabled_mutex::scoped_lock& lock)
+  {
+    if (lock.mutex_.enabled_)
+      event_.signal(lock);
+  }
+
+  // Signal all waiters.
+  void signal_all(conditionally_enabled_mutex::scoped_lock& lock)
+  {
+    if (lock.mutex_.enabled_)
+      event_.signal_all(lock);
+  }
+
+  // Unlock the mutex and signal one waiter.
+  void unlock_and_signal_one(
+      conditionally_enabled_mutex::scoped_lock& lock)
+  {
+    if (lock.mutex_.enabled_)
+      event_.unlock_and_signal_one(lock);
+  }
+
+  // If there's a waiter, unlock the mutex and signal it.
+  bool maybe_unlock_and_signal_one(
+      conditionally_enabled_mutex::scoped_lock& lock)
+  {
+    if (lock.mutex_.enabled_)
+      return event_.maybe_unlock_and_signal_one(lock);
+    else
+      return false;
+  }
+
+  // Reset the event.
+  void clear(conditionally_enabled_mutex::scoped_lock& lock)
+  {
+    if (lock.mutex_.enabled_)
+      event_.clear(lock);
+  }
+
+  // Wait for the event to become signalled.
+  void wait(conditionally_enabled_mutex::scoped_lock& lock)
+  {
+    if (lock.mutex_.enabled_)
+      event_.wait(lock);
+    else
+      null_event().wait(lock);
+  }
+
+  // Timed wait for the event to become signalled.
+  bool wait_for_usec(
+      conditionally_enabled_mutex::scoped_lock& lock, long usec)
+  {
+    if (lock.mutex_.enabled_)
+      return event_.wait_for_usec(lock, usec);
+    else
+      return null_event().wait_for_usec(lock, usec);
+  }
+
+private:
+  asio::detail::event event_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_CONDITIONALLY_ENABLED_EVENT_HPP
diff --git a/asio/include/asio/detail/conditionally_enabled_mutex.hpp b/asio/include/asio/detail/conditionally_enabled_mutex.hpp
new file mode 100644
index 0000000..39c1687
--- /dev/null
+++ b/asio/include/asio/detail/conditionally_enabled_mutex.hpp
@@ -0,0 +1,149 @@
+//
+// detail/conditionally_enabled_mutex.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ASIO_DETAIL_CONDITIONALLY_ENABLED_MUTEX_HPP
+#define ASIO_DETAIL_CONDITIONALLY_ENABLED_MUTEX_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/mutex.hpp"
+#include "asio/detail/noncopyable.hpp"
+#include "asio/detail/scoped_lock.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Mutex adapter used to conditionally enable or disable locking.
+class conditionally_enabled_mutex
+  : private noncopyable
+{
+public:
+  // Helper class to lock and unlock a mutex automatically.
+  class scoped_lock
+    : private noncopyable
+  {
+  public:
+    // Tag type used to distinguish constructors.
+    enum adopt_lock_t { adopt_lock };
+
+    // Constructor adopts a lock that is already held.
+    scoped_lock(conditionally_enabled_mutex& m, adopt_lock_t)
+      : mutex_(m),
+        locked_(m.enabled_)
+    {
+    }
+
+    // Constructor acquires the lock.
+    explicit scoped_lock(conditionally_enabled_mutex& m)
+      : mutex_(m)
+    {
+      if (m.enabled_)
+      {
+        mutex_.mutex_.lock();
+        locked_ = true;
+      }
+      else
+        locked_ = false;
+    }
+
+    // Destructor releases the lock.
+    ~scoped_lock()
+    {
+      if (locked_)
+        mutex_.mutex_.unlock();
+    }
+
+    // Explicitly acquire the lock.
+    void lock()
+    {
+      if (mutex_.enabled_ && !locked_)
+      {
+        mutex_.mutex_.lock();
+        locked_ = true;
+      }
+    }
+
+    // Explicitly release the lock.
+    void unlock()
+    {
+      if (locked_)
+      {
+        mutex_.unlock();
+        locked_ = false;
+      }
+    }
+
+    // Test whether the lock is held.
+    bool locked() const
+    {
+      return locked_;
+    }
+
+    // Get the underlying mutex.
+    asio::detail::mutex& mutex()
+    {
+      return mutex_.mutex_;
+    }
+
+  private:
+    friend class conditionally_enabled_event;
+    conditionally_enabled_mutex& mutex_;
+    bool locked_;
+  };
+
+  // Constructor.
+  explicit conditionally_enabled_mutex(bool enabled)
+    : enabled_(enabled)
+  {
+  }
+
+  // Destructor.
+  ~conditionally_enabled_mutex()
+  {
+  }
+
+  // Determine whether locking is enabled.
+  bool enabled() const
+  {
+    return enabled_;
+  }
+
+  // Lock the mutex.
+  void lock()
+  {
+    if (enabled_)
+      mutex_.lock();
+  }
+
+  // Unlock the mutex.
+  void unlock()
+  {
+    if (enabled_)
+      mutex_.unlock();
+  }
+
+private:
+  friend class scoped_lock;
+  friend class conditionally_enabled_event;
+  asio::detail::mutex mutex_;
+  const bool enabled_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_CONDITIONALLY_ENABLED_MUTEX_HPP
diff --git a/asio/include/asio/detail/config.hpp b/asio/include/asio/detail/config.hpp
index f40fd8c..d9bb835 100644
--- a/asio/include/asio/detail/config.hpp
+++ b/asio/include/asio/detail/config.hpp
@@ -2,7 +2,7 @@
 // detail/config.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -65,7 +65,8 @@
 #if !defined(ASIO_MSVC)
 # if defined(ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
 #  define ASIO_MSVC BOOST_MSVC
-# elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)
+# elif defined(_MSC_VER) && (defined(__INTELLISENSE__) \
+      || (!defined(__MWERKS__) && !defined(__EDG_VERSION__)))
 #  define ASIO_MSVC _MSC_VER
 # endif // defined(ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
 #endif // defined(ASIO_MSVC)
@@ -675,6 +676,55 @@
 # endif // !defined(ASIO_DISABLE_STD_CALL_ONCE)
 #endif // !defined(ASIO_HAS_STD_CALL_ONCE)
 
+// Standard library support for futures.
+#if !defined(ASIO_HAS_STD_FUTURE)
+# if !defined(ASIO_DISABLE_STD_FUTURE)
+#  if defined(__clang__)
+#   if defined(ASIO_HAS_CLANG_LIBCXX)
+#    define ASIO_HAS_STD_FUTURE 1
+#   elif (__cplusplus >= 201103)
+#    if __has_include(<future>)
+#     define ASIO_HAS_STD_FUTURE 1
+#    endif // __has_include(<mutex>)
+#   endif // (__cplusplus >= 201103)
+#  endif // defined(__clang__)
+#  if defined(__GNUC__)
+#   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#     define ASIO_HAS_STD_FUTURE 1
+#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+#  endif // defined(__GNUC__)
+#  if defined(ASIO_MSVC)
+#   if (_MSC_VER >= 1700)
+#    define ASIO_HAS_STD_FUTURE 1
+#   endif // (_MSC_VER >= 1700)
+#  endif // defined(ASIO_MSVC)
+# endif // !defined(ASIO_DISABLE_STD_FUTURE)
+#endif // !defined(ASIO_HAS_STD_FUTURE)
+
+// Standard library support for experimental::string_view.
+#if !defined(ASIO_HAS_STD_STRING_VIEW)
+# if !defined(ASIO_DISABLE_STD_STRING_VIEW)
+#  if defined(__clang__)
+#   if (__cplusplus >= 201103)
+#    if __has_include(<experimental/string_view>)
+#     define ASIO_HAS_STD_STRING_VIEW 1
+#     define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
+#    endif // __has_include(<experimental/string_view>)
+#   endif // (__cplusplus >= 201103)
+#  endif // defined(__clang__)
+#  if defined(__GNUC__)
+#   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
+#    if (__cplusplus >= 201300)
+#     define ASIO_HAS_STD_STRING_VIEW 1
+#     define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
+#    endif // (__cplusplus >= 201300)
+#   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+#  endif // defined(__GNUC__)
+# endif // !defined(ASIO_DISABLE_STD_STRING_VIEW)
+#endif // !defined(ASIO_HAS_STD_STRING_VIEW)
+
 // Windows App target. Windows but with a limited API.
 #if !defined(ASIO_WINDOWS_APP)
 # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603)
@@ -964,15 +1014,25 @@
 
 // Can use getaddrinfo() and getnameinfo().
 #if !defined(ASIO_HAS_GETADDRINFO)
-# if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
-#  if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
+# if !defined(ASIO_DISABLE_GETADDRINFO)
+#  if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+#   if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
+#    define ASIO_HAS_GETADDRINFO 1
+#   elif defined(UNDER_CE)
+#    define ASIO_HAS_GETADDRINFO 1
+#   endif // defined(UNDER_CE)
+#  elif defined(__MACH__) && defined(__APPLE__)
+#   if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+#    if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
+#     define ASIO_HAS_GETADDRINFO 1
+#    endif // (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
+#   else // defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+#    define ASIO_HAS_GETADDRINFO 1
+#   endif // defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+#  else // defined(__MACH__) && defined(__APPLE__)
 #   define ASIO_HAS_GETADDRINFO 1
-#  elif defined(UNDER_CE)
-#   define ASIO_HAS_GETADDRINFO 1
-#  endif // defined(UNDER_CE)
-# elif !(defined(__MACH__) && defined(__APPLE__))
-#  define ASIO_HAS_GETADDRINFO 1
-# endif // !(defined(__MACH__) && defined(__APPLE__))
+#  endif // defined(__MACH__) && defined(__APPLE__)
+# endif // !defined(ASIO_DISABLE_GETADDRINFO)
 #endif // !defined(ASIO_HAS_GETADDRINFO)
 
 // Whether standard iostreams are disabled.
@@ -1154,4 +1214,40 @@
         //   || (defined(__MACH__) && defined(__APPLE__))
 #endif // !defined(ASIO_DISABLE_SSIZE_T)
 
+// Helper macros to manage the transition away from the old services-based API.
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# define ASIO_SVC_TPARAM , typename Service
+# define ASIO_SVC_TPARAM_DEF1(d1) , typename Service d1
+# define ASIO_SVC_TPARAM_DEF2(d1, d2) , typename Service d1, d2
+# define ASIO_SVC_TARG , Service
+# define ASIO_SVC_T Service
+# define ASIO_SVC_TPARAM1 , typename Service1
+# define ASIO_SVC_TPARAM1_DEF1(d1) , typename Service1 d1
+# define ASIO_SVC_TPARAM1_DEF2(d1, d2) , typename Service1 d1, d2
+# define ASIO_SVC_TARG1 , Service1
+# define ASIO_SVC_T1 Service1
+# define ASIO_SVC_ACCESS public
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+# define ASIO_SVC_TPARAM
+# define ASIO_SVC_TPARAM_DEF1(d1)
+# define ASIO_SVC_TPARAM_DEF2(d1, d2)
+# define ASIO_SVC_TARG
+// ASIO_SVC_T is defined at each point of use.
+# define ASIO_SVC_TPARAM1
+# define ASIO_SVC_TPARAM1_DEF1(d1)
+# define ASIO_SVC_TPARAM1_DEF2(d1, d2)
+# define ASIO_SVC_TARG1
+// ASIO_SVC_T1 is defined at each point of use.
+# define ASIO_SVC_ACCESS protected
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
+// Helper macros to manage transition away from error_code return values.
+#if defined(ASIO_NO_DEPRECATED)
+# define ASIO_SYNC_OP_VOID void
+# define ASIO_SYNC_OP_VOID_RETURN(e) return
+#else // defined(ASIO_NO_DEPRECATED)
+# define ASIO_SYNC_OP_VOID asio::error_code
+# define ASIO_SYNC_OP_VOID_RETURN(e) return e
+#endif // defined(ASIO_NO_DEPRECATED)
+
 #endif // ASIO_DETAIL_CONFIG_HPP
diff --git a/asio/include/asio/detail/consuming_buffers.hpp b/asio/include/asio/detail/consuming_buffers.hpp
index f6c6103..e99ca67 100644
--- a/asio/include/asio/detail/consuming_buffers.hpp
+++ b/asio/include/asio/detail/consuming_buffers.hpp
@@ -2,7 +2,7 @@
 // detail/consuming_buffers.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,8 +17,8 @@
 
 #include "asio/detail/config.hpp"
 #include <cstddef>
-#include <iterator>
 #include "asio/buffer.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
 #include "asio/detail/limits.hpp"
 
 #include "asio/detail/push_options.hpp"
@@ -26,261 +26,362 @@
 namespace asio {
 namespace detail {
 
-// A proxy iterator for a sub-range in a list of buffers.
-template <typename Buffer, typename Buffer_Iterator>
-class consuming_buffers_iterator
+
+// A buffer sequence used to represent a subsequence of the buffers.
+template <typename Buffer>
+struct prepared_buffers
 {
-public:
-  /// The type used for the distance between two iterators.
-  typedef std::ptrdiff_t difference_type;
-
-  /// The type of the value pointed to by the iterator.
   typedef Buffer value_type;
+  typedef const Buffer* const_iterator;
 
-  /// The type of the result of applying operator->() to the iterator.
-  typedef const Buffer* pointer;
-
-  /// The type of the result of applying operator*() to the iterator.
-  typedef const Buffer& reference;
-
-  /// The iterator category.
-  typedef std::forward_iterator_tag iterator_category;
-
-  // Default constructor creates an end iterator.
-  consuming_buffers_iterator()
-    : at_end_(true)
+  enum
   {
-  }
+    max_buffers = buffer_sequence_adapter_base::max_buffers < 8
+      ? buffer_sequence_adapter_base::max_buffers : 8
+  };
 
-  // Construct with a buffer for the first entry and an iterator
-  // range for the remaining entries.
-  consuming_buffers_iterator(bool at_end, const Buffer& first,
-      Buffer_Iterator begin_remainder, Buffer_Iterator end_remainder,
-      std::size_t max_size)
-    : at_end_(max_size > 0 ? at_end : true),
-      first_(buffer(first, max_size)),
-      begin_remainder_(begin_remainder),
-      end_remainder_(end_remainder),
-      offset_(0),
-      max_size_(max_size)
-  {
-  }
+  prepared_buffers() : count(0) {}
+  const_iterator begin() const { return elems; }
+  const_iterator end() const { return elems + count; }
 
-  // Dereference an iterator.
-  const Buffer& operator*() const
-  {
-    return dereference();
-  }
-
-  // Dereference an iterator.
-  const Buffer* operator->() const
-  {
-    return &dereference();
-  }
-
-  // Increment operator (prefix).
-  consuming_buffers_iterator& operator++()
-  {
-    increment();
-    return *this;
-  }
-
-  // Increment operator (postfix).
-  consuming_buffers_iterator operator++(int)
-  {
-    consuming_buffers_iterator tmp(*this);
-    ++*this;
-    return tmp;
-  }
-
-  // Test two iterators for equality.
-  friend bool operator==(const consuming_buffers_iterator& a,
-      const consuming_buffers_iterator& b)
-  {
-    return a.equal(b);
-  }
-
-  // Test two iterators for inequality.
-  friend bool operator!=(const consuming_buffers_iterator& a,
-      const consuming_buffers_iterator& b)
-  {
-    return !a.equal(b);
-  }
-
-private:
-  void increment()
-  {
-    if (!at_end_)
-    {
-      if (begin_remainder_ == end_remainder_
-          || offset_ + first_.size() >= max_size_)
-      {
-        at_end_ = true;
-      }
-      else
-      {
-        offset_ += first_.size();
-        first_ = buffer(*begin_remainder_++, max_size_ - offset_);
-      }
-    }
-  }
-
-  bool equal(const consuming_buffers_iterator& other) const
-  {
-    if (at_end_ && other.at_end_)
-      return true;
-    return !at_end_ && !other.at_end_
-      && first_.data() == other.first_.data()
-      && first_.size() == other.first_.size()
-      && begin_remainder_ == other.begin_remainder_
-      && end_remainder_ == other.end_remainder_;
-  }
-
-  const Buffer& dereference() const
-  {
-    return first_;
-  }
-
-  bool at_end_;
-  Buffer first_;
-  Buffer_Iterator begin_remainder_;
-  Buffer_Iterator end_remainder_;
-  std::size_t offset_;
-  std::size_t max_size_;
+  Buffer elems[max_buffers];
+  std::size_t count;
 };
 
 // A proxy for a sub-range in a list of buffers.
-template <typename Buffer, typename Buffers>
+template <typename Buffer, typename Buffers, typename Buffer_Iterator>
 class consuming_buffers
 {
 public:
-  // The type for each element in the list of buffers.
-  typedef Buffer value_type;
-
-  // A forward-only iterator type that may be used to read elements.
-  typedef consuming_buffers_iterator<Buffer, typename Buffers::const_iterator>
-    const_iterator;
-
   // Construct to represent the entire list of buffers.
-  consuming_buffers(const Buffers& buffers)
+  explicit consuming_buffers(const Buffers& buffers)
     : buffers_(buffers),
-      at_end_(buffers_.begin() == buffers_.end()),
-      begin_remainder_(buffers_.begin()),
-      max_size_((std::numeric_limits<std::size_t>::max)())
+      total_size_(asio::buffer_size(buffers)),
+      total_consumed_(0),
+      next_elem_(0),
+      next_elem_offset_(0)
   {
-    if (!at_end_)
+  }
+
+  // Determine if we are at the end of the buffers.
+  bool empty() const
+  {
+    return total_consumed_ >= total_size_;
+  }
+
+  // Get the buffer for a single transfer, with a size.
+  prepared_buffers<Buffer> prepare(std::size_t max_size)
+  {
+    prepared_buffers<Buffer> result;
+
+    Buffer_Iterator next = asio::buffer_sequence_begin(buffers_);
+    Buffer_Iterator end = asio::buffer_sequence_end(buffers_);
+
+    std::advance(next, next_elem_);
+    std::size_t elem_offset = next_elem_offset_;
+    while (next != end && max_size > 0 && result.count < result.max_buffers)
     {
-      first_ = *buffers_.begin();
-      ++begin_remainder_;
+      Buffer next_buf = Buffer(*next) + elem_offset;
+      result.elems[result.count] = asio::buffer(next_buf, max_size);
+      max_size -= result.elems[result.count].size();
+      elem_offset = 0;
+      if (result.elems[result.count].size() > 0)
+        ++result.count;
+      ++next;
     }
-  }
 
-  // Copy constructor.
-  consuming_buffers(const consuming_buffers& other)
-    : buffers_(other.buffers_),
-      at_end_(other.at_end_),
-      first_(other.first_),
-      begin_remainder_(buffers_.begin()),
-      max_size_(other.max_size_)
-  {
-    typename Buffers::const_iterator first = other.buffers_.begin();
-    typename Buffers::const_iterator second = other.begin_remainder_;
-    std::advance(begin_remainder_, std::distance(first, second));
-  }
-
-  // Assignment operator.
-  consuming_buffers& operator=(const consuming_buffers& other)
-  {
-    buffers_ = other.buffers_;
-    at_end_ = other.at_end_;
-    first_ = other.first_;
-    begin_remainder_ = buffers_.begin();
-    typename Buffers::const_iterator first = other.buffers_.begin();
-    typename Buffers::const_iterator second = other.begin_remainder_;
-    std::advance(begin_remainder_, std::distance(first, second));
-    max_size_ = other.max_size_;
-    return *this;
-  }
-
-  // Get a forward-only iterator to the first element.
-  const_iterator begin() const
-  {
-    return const_iterator(at_end_, first_,
-        begin_remainder_, buffers_.end(), max_size_);
-  }
-
-  // Get a forward-only iterator for one past the last element.
-  const_iterator end() const
-  {
-    return const_iterator();
-  }
-
-  // Set the maximum size for a single transfer.
-  void prepare(std::size_t max_size)
-  {
-    max_size_ = max_size;
+    return result;
   }
 
   // Consume the specified number of bytes from the buffers.
   void consume(std::size_t size)
   {
-    // Remove buffers from the start until the specified size is reached.
-    while (size > 0 && !at_end_)
+    total_consumed_ += size;
+
+    Buffer_Iterator next = asio::buffer_sequence_begin(buffers_);
+    Buffer_Iterator end = asio::buffer_sequence_end(buffers_);
+
+    std::advance(end, next_elem_);
+    while (next != end && size > 0)
     {
-      if (first_.size() <= size)
+      Buffer next_buf = Buffer(*next) + next_elem_offset_;
+      if (size < next_buf.size())
       {
-        size -= first_.size();
-        if (begin_remainder_ == buffers_.end())
-          at_end_ = true;
-        else
-          first_ = *begin_remainder_++;
-      }
-      else
-      {
-        first_ = first_ + size;
+        next_elem_offset_ += size;
         size = 0;
       }
-    }
-
-    // Remove any more empty buffers at the start.
-    while (!at_end_ && first_.size() == 0)
-    {
-      if (begin_remainder_ == buffers_.end())
-        at_end_ = true;
       else
-        first_ = *begin_remainder_++;
+      {
+        size -= next_buf.size();
+        next_elem_offset_ = 0;
+        ++next_elem_;
+        ++next;
+      }
     }
   }
 
+  // Get the total number of bytes consumed from the buffers.
+  std::size_t total_consumed() const
+  {
+    return total_consumed_;
+  }
+
 private:
   Buffers buffers_;
-  bool at_end_;
-  Buffer first_;
-  typename Buffers::const_iterator begin_remainder_;
-  std::size_t max_size_;
+  std::size_t total_size_;
+  std::size_t total_consumed_;
+  std::size_t next_elem_;
+  std::size_t next_elem_offset_;
 };
 
+// Base class of all consuming_buffers specialisations for single buffers.
+template <typename Buffer>
+class consuming_single_buffer
+{
+public:
+  // Construct to represent the entire list of buffers.
+  template <typename Buffer1>
+  explicit consuming_single_buffer(const Buffer1& buffer)
+    : buffer_(buffer),
+      total_consumed_(0)
+  {
+  }
+
+  // Determine if we are at the end of the buffers.
+  bool empty() const
+  {
+    return total_consumed_ >= buffer_.size();
+  }
+
+  // Get the buffer for a single transfer, with a size.
+  Buffer prepare(std::size_t max_size)
+  {
+    return asio::buffer(buffer_ + total_consumed_, max_size);
+  }
+
+  // Consume the specified number of bytes from the buffers.
+  void consume(std::size_t size)
+  {
+    total_consumed_ += size;
+  }
+
+  // Get the total number of bytes consumed from the buffers.
+  std::size_t total_consumed() const
+  {
+    return total_consumed_;
+  }
+
+private:
+  Buffer buffer_;
+  std::size_t total_consumed_;
+};
+
+template <>
+class consuming_buffers<mutable_buffer, mutable_buffer, const mutable_buffer*>
+  : public consuming_single_buffer<ASIO_MUTABLE_BUFFER>
+{
+public:
+  explicit consuming_buffers(const mutable_buffer& buffer)
+    : consuming_single_buffer<ASIO_MUTABLE_BUFFER>(buffer)
+  {
+  }
+};
+
+template <>
+class consuming_buffers<const_buffer, mutable_buffer, const mutable_buffer*>
+  : public consuming_single_buffer<ASIO_CONST_BUFFER>
+{
+public:
+  explicit consuming_buffers(const mutable_buffer& buffer)
+    : consuming_single_buffer<ASIO_CONST_BUFFER>(buffer)
+  {
+  }
+};
+
+template <>
+class consuming_buffers<const_buffer, const_buffer, const const_buffer*>
+  : public consuming_single_buffer<ASIO_CONST_BUFFER>
+{
+public:
+  explicit consuming_buffers(const const_buffer& buffer)
+    : consuming_single_buffer<ASIO_CONST_BUFFER>(buffer)
+  {
+  }
+};
+
+#if !defined(ASIO_NO_DEPRECATED)
+
+template <>
+class consuming_buffers<mutable_buffer,
+    mutable_buffers_1, const mutable_buffer*>
+  : public consuming_single_buffer<ASIO_MUTABLE_BUFFER>
+{
+public:
+  explicit consuming_buffers(const mutable_buffers_1& buffer)
+    : consuming_single_buffer<ASIO_MUTABLE_BUFFER>(buffer)
+  {
+  }
+};
+
+template <>
+class consuming_buffers<const_buffer, mutable_buffers_1, const mutable_buffer*>
+  : public consuming_single_buffer<ASIO_CONST_BUFFER>
+{
+public:
+  explicit consuming_buffers(const mutable_buffers_1& buffer)
+    : consuming_single_buffer<ASIO_CONST_BUFFER>(buffer)
+  {
+  }
+};
+
+template <>
+class consuming_buffers<const_buffer, const_buffers_1, const const_buffer*>
+  : public consuming_single_buffer<ASIO_CONST_BUFFER>
+{
+public:
+  explicit consuming_buffers(const const_buffers_1& buffer)
+    : consuming_single_buffer<ASIO_CONST_BUFFER>(buffer)
+  {
+  }
+};
+
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+template <typename Buffer, typename Elem>
+class consuming_buffers<Buffer, boost::array<Elem, 2>,
+    typename boost::array<Elem, 2>::const_iterator>
+{
+public:
+  // Construct to represent the entire list of buffers.
+  explicit consuming_buffers(const boost::array<Elem, 2>& buffers)
+    : buffers_(buffers),
+      total_consumed_(0)
+  {
+  }
+
+  // Determine if we are at the end of the buffers.
+  bool empty() const
+  {
+    return total_consumed_ >=
+      Buffer(buffers_[0]).size() + Buffer(buffers_[1]).size();
+  }
+
+  // Get the buffer for a single transfer, with a size.
+  boost::array<Buffer, 2> prepare(std::size_t max_size)
+  {
+    boost::array<Buffer, 2> result = {{
+      Buffer(buffers_[0]), Buffer(buffers_[1]) }};
+    std::size_t buffer0_size = result[0].size();
+    result[0] = asio::buffer(result[0] + total_consumed_, max_size);
+    result[1] = asio::buffer(
+        result[1] + (total_consumed_ < buffer0_size
+          ? 0 : total_consumed_ - buffer0_size),
+        max_size - result[0].size());
+    return result;
+  }
+
+  // Consume the specified number of bytes from the buffers.
+  void consume(std::size_t size)
+  {
+    total_consumed_ += size;
+  }
+
+  // Get the total number of bytes consumed from the buffers.
+  std::size_t total_consumed() const
+  {
+    return total_consumed_;
+  }
+
+private:
+  boost::array<Elem, 2> buffers_;
+  std::size_t total_consumed_;
+};
+
+#if defined(ASIO_HAS_STD_ARRAY)
+
+template <typename Buffer, typename Elem>
+class consuming_buffers<Buffer, std::array<Elem, 2>,
+    typename std::array<Elem, 2>::const_iterator>
+{
+public:
+  // Construct to represent the entire list of buffers.
+  explicit consuming_buffers(const std::array<Elem, 2>& buffers)
+    : buffers_(buffers),
+      total_consumed_(0)
+  {
+  }
+
+  // Determine if we are at the end of the buffers.
+  bool empty() const
+  {
+    return total_consumed_ >=
+      Buffer(buffers_[0]).size() + Buffer(buffers_[1]).size();
+  }
+
+  // Get the buffer for a single transfer, with a size.
+  std::array<Buffer, 2> prepare(std::size_t max_size)
+  {
+    std::array<Buffer, 2> result = {{
+      Buffer(buffers_[0]), Buffer(buffers_[1]) }};
+    std::size_t buffer0_size = result[0].size();
+    result[0] = asio::buffer(result[0] + total_consumed_, max_size);
+    result[1] = asio::buffer(
+        result[1] + (total_consumed_ < buffer0_size
+          ? 0 : total_consumed_ - buffer0_size),
+        max_size - result[0].size());
+    return result;
+  }
+
+  // Consume the specified number of bytes from the buffers.
+  void consume(std::size_t size)
+  {
+    total_consumed_ += size;
+  }
+
+  // Get the total number of bytes consumed from the buffers.
+  std::size_t total_consumed() const
+  {
+    return total_consumed_;
+  }
+
+private:
+  std::array<Elem, 2> buffers_;
+  std::size_t total_consumed_;
+};
+
+#endif // defined(ASIO_HAS_STD_ARRAY)
+
 // Specialisation for null_buffers to ensure that the null_buffers type is
 // always passed through to the underlying read or write operation.
 template <typename Buffer>
-class consuming_buffers<Buffer, asio::null_buffers>
+class consuming_buffers<Buffer, null_buffers, const mutable_buffer*>
   : public asio::null_buffers
 {
 public:
-  consuming_buffers(const asio::null_buffers&)
+  consuming_buffers(const null_buffers&)
   {
     // No-op.
   }
 
-  void prepare(std::size_t)
+  bool empty()
   {
-    // No-op.
+    return false;
+  }
+
+  null_buffers prepare(std::size_t)
+  {
+    return null_buffers();
   }
 
   void consume(std::size_t)
   {
     // No-op.
   }
+
+  std::size_t total_consume() const
+  {
+    return 0;
+  }
 };
 
 } // namespace detail
diff --git a/asio/include/asio/detail/cstddef.hpp b/asio/include/asio/detail/cstddef.hpp
index f784247..a5092ce 100644
--- a/asio/include/asio/detail/cstddef.hpp
+++ b/asio/include/asio/detail/cstddef.hpp
@@ -2,7 +2,7 @@
 // detail/cstddef.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/cstdint.hpp b/asio/include/asio/detail/cstdint.hpp
index 5bb7c24..2c06414 100644
--- a/asio/include/asio/detail/cstdint.hpp
+++ b/asio/include/asio/detail/cstdint.hpp
@@ -2,7 +2,7 @@
 // detail/cstdint.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/date_time_fwd.hpp b/asio/include/asio/detail/date_time_fwd.hpp
index 74e33a9..918bb7b 100644
--- a/asio/include/asio/detail/date_time_fwd.hpp
+++ b/asio/include/asio/detail/date_time_fwd.hpp
@@ -2,7 +2,7 @@
 // detail/date_time_fwd.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/deadline_timer_service.hpp b/asio/include/asio/detail/deadline_timer_service.hpp
index 13af0ff..816f16f 100644
--- a/asio/include/asio/detail/deadline_timer_service.hpp
+++ b/asio/include/asio/detail/deadline_timer_service.hpp
@@ -2,7 +2,7 @@
 // detail/deadline_timer_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -26,6 +26,7 @@
 #include "asio/detail/socket_ops.hpp"
 #include "asio/detail/socket_types.hpp"
 #include "asio/detail/timer_queue.hpp"
+#include "asio/detail/timer_queue_ptime.hpp"
 #include "asio/detail/timer_scheduler.hpp"
 #include "asio/detail/wait_handler.hpp"
 #include "asio/detail/wait_op.hpp"
@@ -42,6 +43,7 @@
 
 template <typename Time_Traits>
 class deadline_timer_service
+  : public service_base<deadline_timer_service<Time_Traits> >
 {
 public:
   // The time type.
@@ -62,7 +64,8 @@
 
   // Constructor.
   deadline_timer_service(asio::io_context& io_context)
-    : scheduler_(asio::use_service<timer_scheduler>(io_context))
+    : service_base<deadline_timer_service<Time_Traits> >(io_context),
+      scheduler_(asio::use_service<timer_scheduler>(io_context))
   {
     scheduler_.init_task();
     scheduler_.add_timer_queue(timer_queue_);
@@ -170,6 +173,18 @@
     return impl.expiry;
   }
 
+  // Get the expiry time for the timer as an absolute time.
+  time_type expires_at(const implementation_type& impl) const
+  {
+    return impl.expiry;
+  }
+
+  // Get the expiry time for the timer relative to now.
+  duration_type expires_from_now(const implementation_type& impl) const
+  {
+    return Time_Traits::subtract(this->expiry(impl), Time_Traits::now());
+  }
+
   // Set the expiry time for the timer as an absolute time.
   std::size_t expires_at(implementation_type& impl,
       const time_type& expiry_time, asio::error_code& ec)
@@ -188,6 +203,14 @@
         Time_Traits::add(Time_Traits::now(), expiry_time), ec);
   }
 
+  // Set the expiry time for the timer relative to now.
+  std::size_t expires_from_now(implementation_type& impl,
+      const duration_type& expiry_time, asio::error_code& ec)
+  {
+    return expires_at(impl,
+        Time_Traits::add(Time_Traits::now(), expiry_time), ec);
+  }
+
   // Perform a blocking wait on the timer.
   void wait(implementation_type& impl, asio::error_code& ec)
   {
diff --git a/asio/include/asio/detail/dependent_type.hpp b/asio/include/asio/detail/dependent_type.hpp
index abb4817..a4737e2 100644
--- a/asio/include/asio/detail/dependent_type.hpp
+++ b/asio/include/asio/detail/dependent_type.hpp
@@ -2,7 +2,7 @@
 // detail/dependent_type.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/descriptor_ops.hpp b/asio/include/asio/detail/descriptor_ops.hpp
index a620ec1..677f010 100644
--- a/asio/include/asio/detail/descriptor_ops.hpp
+++ b/asio/include/asio/detail/descriptor_ops.hpp
@@ -2,7 +2,7 @@
 // detail/descriptor_ops.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -22,6 +22,7 @@
   && !defined(__CYGWIN__)
 
 #include <cstddef>
+#include "asio/error.hpp"
 #include "asio/error_code.hpp"
 #include "asio/detail/socket_types.hpp"
 
diff --git a/asio/include/asio/detail/descriptor_read_op.hpp b/asio/include/asio/detail/descriptor_read_op.hpp
index db52b59..f1027b0 100644
--- a/asio/include/asio/detail/descriptor_read_op.hpp
+++ b/asio/include/asio/detail/descriptor_read_op.hpp
@@ -2,7 +2,7 @@
 // detail/descriptor_read_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -44,15 +44,16 @@
   {
   }
 
-  static bool do_perform(reactor_op* base)
+  static status do_perform(reactor_op* base)
   {
     descriptor_read_op_base* o(static_cast<descriptor_read_op_base*>(base));
 
     buffer_sequence_adapter<asio::mutable_buffer,
         MutableBufferSequence> bufs(o->buffers_);
 
-    bool result = descriptor_ops::non_blocking_read(o->descriptor_,
-        bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_);
+    status result = descriptor_ops::non_blocking_read(o->descriptor_,
+        bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_)
+      ? done : not_done;
 
     ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_read",
           o->ec_, o->bytes_transferred_));
diff --git a/asio/include/asio/detail/descriptor_write_op.hpp b/asio/include/asio/detail/descriptor_write_op.hpp
index ba18152..96d6e5b 100644
--- a/asio/include/asio/detail/descriptor_write_op.hpp
+++ b/asio/include/asio/detail/descriptor_write_op.hpp
@@ -2,7 +2,7 @@
 // detail/descriptor_write_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -44,15 +44,16 @@
   {
   }
 
-  static bool do_perform(reactor_op* base)
+  static status do_perform(reactor_op* base)
   {
     descriptor_write_op_base* o(static_cast<descriptor_write_op_base*>(base));
 
     buffer_sequence_adapter<asio::const_buffer,
         ConstBufferSequence> bufs(o->buffers_);
 
-    bool result = descriptor_ops::non_blocking_write(o->descriptor_,
-        bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_);
+    status result = descriptor_ops::non_blocking_write(o->descriptor_,
+        bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_)
+      ? done : not_done;
 
     ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_write",
           o->ec_, o->bytes_transferred_));
diff --git a/asio/include/asio/detail/dev_poll_reactor.hpp b/asio/include/asio/detail/dev_poll_reactor.hpp
index 5889c50..1f59cf3 100644
--- a/asio/include/asio/detail/dev_poll_reactor.hpp
+++ b/asio/include/asio/detail/dev_poll_reactor.hpp
@@ -2,7 +2,7 @@
 // detail/dev_poll_reactor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -158,7 +158,7 @@
   // Get the timeout value for the /dev/poll DP_POLL operation. The timeout
   // value is returned as a number of milliseconds. A return value of -1
   // indicates that the poll should block indefinitely.
-  ASIO_DECL int get_timeout();
+  ASIO_DECL int get_timeout(int msec);
 
   // Cancel all operations associated with the given descriptor. The do_cancel
   // function of the handler objects will be invoked. This function does not
diff --git a/asio/include/asio/detail/epoll_reactor.hpp b/asio/include/asio/detail/epoll_reactor.hpp
index 445990a..ba8b2a1 100644
--- a/asio/include/asio/detail/epoll_reactor.hpp
+++ b/asio/include/asio/detail/epoll_reactor.hpp
@@ -2,7 +2,7 @@
 // detail/epoll_reactor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -20,8 +20,8 @@
 #if defined(ASIO_HAS_EPOLL)
 
 #include "asio/detail/atomic_count.hpp"
+#include "asio/detail/conditionally_enabled_mutex.hpp"
 #include "asio/detail/limits.hpp"
-#include "asio/detail/mutex.hpp"
 #include "asio/detail/object_pool.hpp"
 #include "asio/detail/op_queue.hpp"
 #include "asio/detail/reactor_op.hpp"
@@ -40,6 +40,10 @@
 class epoll_reactor
   : public execution_context_service_base<epoll_reactor>
 {
+private:
+  // The mutex type used by this reactor.
+  typedef conditionally_enabled_mutex mutex;
+
 public:
   enum op_types { read_op = 0, write_op = 1,
     connect_op = 1, except_op = 2, max_ops = 3 };
@@ -58,9 +62,10 @@
     int descriptor_;
     uint32_t registered_events_;
     op_queue<reactor_op> op_queue_[max_ops];
+    bool try_speculative_[max_ops];
     bool shutdown_;
 
-    ASIO_DECL descriptor_state();
+    ASIO_DECL descriptor_state(bool locking);
     void set_ready_events(uint32_t events) { task_result_ = events; }
     ASIO_DECL operation* perform_io(uint32_t events);
     ASIO_DECL static void do_complete(
@@ -159,7 +164,7 @@
       typename timer_queue<Time_Traits>::per_timer_data& source);
 
   // Run epoll once until interrupted or events are ready to be dispatched.
-  ASIO_DECL void run(bool block, op_queue<operation>& ops);
+  ASIO_DECL void run(long usec, op_queue<operation>& ops);
 
   // Interrupt the select loop.
   ASIO_DECL void interrupt();
@@ -193,7 +198,7 @@
   // Get the timeout value for the epoll_wait call. The timeout value is
   // returned as a number of milliseconds. A return value of -1 indicates
   // that epoll_wait should block indefinitely.
-  ASIO_DECL int get_timeout();
+  ASIO_DECL int get_timeout(int msec);
 
 #if defined(ASIO_HAS_TIMERFD)
   // Get the timeout value for the timer descriptor. The return value is the
diff --git a/asio/include/asio/detail/event.hpp b/asio/include/asio/detail/event.hpp
index 2f6934c..bb07fcd 100644
--- a/asio/include/asio/detail/event.hpp
+++ b/asio/include/asio/detail/event.hpp
@@ -2,7 +2,7 @@
 // detail/event.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/eventfd_select_interrupter.hpp b/asio/include/asio/detail/eventfd_select_interrupter.hpp
index daa4389..fcc8663 100644
--- a/asio/include/asio/detail/eventfd_select_interrupter.hpp
+++ b/asio/include/asio/detail/eventfd_select_interrupter.hpp
@@ -2,7 +2,7 @@
 // detail/eventfd_select_interrupter.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/include/asio/detail/executor_op.hpp b/asio/include/asio/detail/executor_op.hpp
index 0386043..3145130 100644
--- a/asio/include/asio/detail/executor_op.hpp
+++ b/asio/include/asio/detail/executor_op.hpp
@@ -2,7 +2,7 @@
 // detail/executor_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/fd_set_adapter.hpp b/asio/include/asio/detail/fd_set_adapter.hpp
index 661f145..44c4c46 100644
--- a/asio/include/asio/detail/fd_set_adapter.hpp
+++ b/asio/include/asio/detail/fd_set_adapter.hpp
@@ -2,7 +2,7 @@
 // detail/fd_set_adapter.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/fenced_block.hpp b/asio/include/asio/detail/fenced_block.hpp
index 6b5a60e..c07c85f 100644
--- a/asio/include/asio/detail/fenced_block.hpp
+++ b/asio/include/asio/detail/fenced_block.hpp
@@ -2,7 +2,7 @@
 // detail/fenced_block.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/functional.hpp b/asio/include/asio/detail/functional.hpp
index caf0659..a72a5fc 100644
--- a/asio/include/asio/detail/functional.hpp
+++ b/asio/include/asio/detail/functional.hpp
@@ -2,7 +2,7 @@
 // detail/functional.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/gcc_arm_fenced_block.hpp b/asio/include/asio/detail/gcc_arm_fenced_block.hpp
index f60f4e4..debdd3c 100644
--- a/asio/include/asio/detail/gcc_arm_fenced_block.hpp
+++ b/asio/include/asio/detail/gcc_arm_fenced_block.hpp
@@ -2,7 +2,7 @@
 // detail/gcc_arm_fenced_block.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/gcc_hppa_fenced_block.hpp b/asio/include/asio/detail/gcc_hppa_fenced_block.hpp
index 22f018e..cd41eb2 100644
--- a/asio/include/asio/detail/gcc_hppa_fenced_block.hpp
+++ b/asio/include/asio/detail/gcc_hppa_fenced_block.hpp
@@ -2,7 +2,7 @@
 // detail/gcc_hppa_fenced_block.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/gcc_sync_fenced_block.hpp b/asio/include/asio/detail/gcc_sync_fenced_block.hpp
index c2c12fe..1933099 100644
--- a/asio/include/asio/detail/gcc_sync_fenced_block.hpp
+++ b/asio/include/asio/detail/gcc_sync_fenced_block.hpp
@@ -2,7 +2,7 @@
 // detail/gcc_sync_fenced_block.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/gcc_x86_fenced_block.hpp b/asio/include/asio/detail/gcc_x86_fenced_block.hpp
index a8b38fa..0ec66c5 100644
--- a/asio/include/asio/detail/gcc_x86_fenced_block.hpp
+++ b/asio/include/asio/detail/gcc_x86_fenced_block.hpp
@@ -2,7 +2,7 @@
 // detail/gcc_x86_fenced_block.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/global.hpp b/asio/include/asio/detail/global.hpp
index ab1b4f5..87c57a0 100644
--- a/asio/include/asio/detail/global.hpp
+++ b/asio/include/asio/detail/global.hpp
@@ -2,7 +2,7 @@
 // detail/global.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/handler_alloc_helpers.hpp b/asio/include/asio/detail/handler_alloc_helpers.hpp
index 704b760..0658b98 100644
--- a/asio/include/asio/detail/handler_alloc_helpers.hpp
+++ b/asio/include/asio/detail/handler_alloc_helpers.hpp
@@ -2,7 +2,7 @@
 // detail/handler_alloc_helpers.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/handler_cont_helpers.hpp b/asio/include/asio/detail/handler_cont_helpers.hpp
index ef95de3..defdf26 100644
--- a/asio/include/asio/detail/handler_cont_helpers.hpp
+++ b/asio/include/asio/detail/handler_cont_helpers.hpp
@@ -2,7 +2,7 @@
 // detail/handler_cont_helpers.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/handler_invoke_helpers.hpp b/asio/include/asio/detail/handler_invoke_helpers.hpp
index d1b743d..91325ee 100644
--- a/asio/include/asio/detail/handler_invoke_helpers.hpp
+++ b/asio/include/asio/detail/handler_invoke_helpers.hpp
@@ -2,7 +2,7 @@
 // detail/handler_invoke_helpers.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/handler_tracking.hpp b/asio/include/asio/detail/handler_tracking.hpp
index 4b81a8e..6ea19a3 100644
--- a/asio/include/asio/detail/handler_tracking.hpp
+++ b/asio/include/asio/detail/handler_tracking.hpp
@@ -2,7 +2,7 @@
 // detail/handler_tracking.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/handler_type_requirements.hpp b/asio/include/asio/detail/handler_type_requirements.hpp
index 6e769ad..c72d8e6 100644
--- a/asio/include/asio/detail/handler_type_requirements.hpp
+++ b/asio/include/asio/detail/handler_type_requirements.hpp
@@ -2,7 +2,7 @@
 // detail/handler_type_requirements.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -50,7 +50,7 @@
 #endif // !defined(ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS)
 
 #if defined(ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
-# include "asio/handler_type.hpp"
+# include "asio/async_result.hpp"
 #endif // defined(ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
 
 // Newer gcc, clang need special treatment to suppress unused typedef warnings.
diff --git a/asio/include/asio/detail/handler_work.hpp b/asio/include/asio/detail/handler_work.hpp
index 90828dc..327c552 100644
--- a/asio/include/asio/detail/handler_work.hpp
+++ b/asio/include/asio/detail/handler_work.hpp
@@ -2,7 +2,7 @@
 // detail/handler_work.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/hash_map.hpp b/asio/include/asio/detail/hash_map.hpp
index e11b542..8c52edc 100644
--- a/asio/include/asio/detail/hash_map.hpp
+++ b/asio/include/asio/detail/hash_map.hpp
@@ -2,7 +2,7 @@
 // detail/hash_map.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -243,15 +243,15 @@
   {
     if (num_buckets == num_buckets_)
       return;
-    num_buckets_ = num_buckets;
-    ASIO_ASSERT(num_buckets_ != 0);
+    ASIO_ASSERT(num_buckets != 0);
 
     iterator end_iter = values_.end();
 
     // Update number of buckets and initialise all buckets to empty.
-    bucket_type* tmp = new bucket_type[num_buckets_];
+    bucket_type* tmp = new bucket_type[num_buckets];
     delete[] buckets_;
     buckets_ = tmp;
+    num_buckets_ = num_buckets;
     for (std::size_t i = 0; i < num_buckets_; ++i)
       buckets_[i].first = buckets_[i].last = end_iter;
 
diff --git a/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp b/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp
index fcdad8f..9bf955f 100644
--- a/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp
+++ b/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp
@@ -2,7 +2,7 @@
 // detail/impl/buffer_sequence_adapter.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/descriptor_ops.ipp b/asio/include/asio/detail/impl/descriptor_ops.ipp
index 6de1385..07355e8 100644
--- a/asio/include/asio/detail/impl/descriptor_ops.ipp
+++ b/asio/include/asio/detail/impl/descriptor_ops.ipp
@@ -2,7 +2,7 @@
 // detail/impl/descriptor_ops.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/dev_poll_reactor.hpp b/asio/include/asio/detail/impl/dev_poll_reactor.hpp
index 9ed9585..f6c00a5 100644
--- a/asio/include/asio/detail/impl/dev_poll_reactor.hpp
+++ b/asio/include/asio/detail/impl/dev_poll_reactor.hpp
@@ -2,7 +2,7 @@
 // detail/impl/dev_poll_reactor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/dev_poll_reactor.ipp b/asio/include/asio/detail/impl/dev_poll_reactor.ipp
index 19fcc71..ac0cede 100644
--- a/asio/include/asio/detail/impl/dev_poll_reactor.ipp
+++ b/asio/include/asio/detail/impl/dev_poll_reactor.ipp
@@ -2,7 +2,7 @@
 // detail/impl/dev_poll_reactor.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -234,7 +234,7 @@
     op_queue_[i].cancel_operations(descriptor, ops, ec);
 }
 
-void dev_poll_reactor::run(bool block, op_queue<operation>& ops)
+void dev_poll_reactor::run(long usec, op_queue<operation>& ops)
 {
   asio::detail::mutex::scoped_lock lock(mutex_);
 
@@ -266,7 +266,15 @@
     pending_event_change_index_.clear();
   }
 
-  int timeout = block ? get_timeout() : 0;
+  // Calculate timeout.
+  int timeout;
+  if (usec == 0)
+    timeout = 0;
+  else
+  {
+    timeout = (usec < 0) ? -1 : ((usec - 1) / 1000 + 1);
+    timeout = get_timeout(timeout);
+  }
   lock.unlock();
 
   // Block on the /dev/poll descriptor.
@@ -380,11 +388,13 @@
   timer_queues_.erase(&queue);
 }
 
-int dev_poll_reactor::get_timeout()
+int dev_poll_reactor::get_timeout(int msec)
 {
   // By default we will wait no longer than 5 minutes. This will ensure that
   // any changes to the system clock are detected after no longer than this.
-  return timer_queues_.wait_duration_msec(5 * 60 * 1000);
+  const int max_msec = 5 * 60 * 1000;
+  return timer_queues_.wait_duration_msec(
+      (msec < 0 || max_msec < msec) ? max_msec : msec);
 }
 
 void dev_poll_reactor::cancel_ops_unlocked(socket_type descriptor,
diff --git a/asio/include/asio/detail/impl/epoll_reactor.hpp b/asio/include/asio/detail/impl/epoll_reactor.hpp
index 595813e..a906654 100644
--- a/asio/include/asio/detail/impl/epoll_reactor.hpp
+++ b/asio/include/asio/detail/impl/epoll_reactor.hpp
@@ -2,7 +2,7 @@
 // detail/impl/epoll_reactor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -71,7 +71,7 @@
     typename timer_queue<Time_Traits>::per_timer_data& target,
     typename timer_queue<Time_Traits>::per_timer_data& source)
 {
-  asio::detail::mutex::scoped_lock lock(mutex_);
+  mutex::scoped_lock lock(mutex_);
   op_queue<operation> ops;
   queue.cancel_timer(target, ops);
   queue.move_timer(target, source);
diff --git a/asio/include/asio/detail/impl/epoll_reactor.ipp b/asio/include/asio/detail/impl/epoll_reactor.ipp
index 143df36..382061e 100644
--- a/asio/include/asio/detail/impl/epoll_reactor.ipp
+++ b/asio/include/asio/detail/impl/epoll_reactor.ipp
@@ -2,7 +2,7 @@
 // detail/impl/epoll_reactor.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -37,11 +37,13 @@
 epoll_reactor::epoll_reactor(asio::execution_context& ctx)
   : execution_context_service_base<epoll_reactor>(ctx),
     scheduler_(use_service<scheduler>(ctx)),
-    mutex_(),
+    mutex_(ASIO_CONCURRENCY_HINT_IS_LOCKING(
+          SCHEDULER, scheduler_.concurrency_hint())),
     interrupter_(),
     epoll_fd_(do_epoll_create()),
     timer_fd_(do_timerfd_create()),
-    shutdown_(false)
+    shutdown_(false),
+    registered_descriptors_mutex_(mutex_.enabled())
 {
   // Add the interrupter's descriptor to epoll.
   epoll_event ev = { 0, { 0 } };
@@ -160,6 +162,8 @@
     descriptor_data->reactor_ = this;
     descriptor_data->descriptor_ = descriptor;
     descriptor_data->shutdown_ = false;
+    for (int i = 0; i < max_ops; ++i)
+      descriptor_data->try_speculative_[i] = true;
   }
 
   epoll_event ev = { 0, { 0 } };
@@ -168,7 +172,18 @@
   ev.data.ptr = descriptor_data;
   int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, descriptor, &ev);
   if (result != 0)
+  {
+    if (errno == EPERM)
+    {
+      // This file descriptor type is not supported by epoll. However, if it is
+      // a regular file then operations on it will not block. We will allow
+      // this descriptor to be used and fail later if an operation on it would
+      // otherwise require a trip through the reactor.
+      descriptor_data->registered_events_ = 0;
+      return 0;
+    }
     return errno;
+  }
 
   return 0;
 }
@@ -190,6 +205,8 @@
     descriptor_data->descriptor_ = descriptor;
     descriptor_data->shutdown_ = false;
     descriptor_data->op_queue_[op_type].push(op);
+    for (int i = 0; i < max_ops; ++i)
+      descriptor_data->try_speculative_[i] = true;
   }
 
   epoll_event ev = { 0, { 0 } };
@@ -236,9 +253,22 @@
         && (op_type != read_op
           || descriptor_data->op_queue_[except_op].empty()))
     {
-      if (op->perform())
+      if (descriptor_data->try_speculative_[op_type])
       {
-        descriptor_lock.unlock();
+        if (reactor_op::status status = op->perform())
+        {
+          if (status == reactor_op::done_and_exhausted)
+            if (descriptor_data->registered_events_ != 0)
+              descriptor_data->try_speculative_[op_type] = false;
+          descriptor_lock.unlock();
+          scheduler_.post_immediate_completion(op, is_continuation);
+          return;
+        }
+      }
+
+      if (descriptor_data->registered_events_ == 0)
+      {
+        op->ec_ = asio::error::operation_not_supported;
         scheduler_.post_immediate_completion(op, is_continuation);
         return;
       }
@@ -264,6 +294,12 @@
         }
       }
     }
+    else if (descriptor_data->registered_events_ == 0)
+    {
+      op->ec_ = asio::error::operation_not_supported;
+      scheduler_.post_immediate_completion(op, is_continuation);
+      return;
+    }
     else
     {
       if (op_type == write_op)
@@ -321,7 +357,7 @@
       // The descriptor will be automatically removed from the epoll set when
       // it is closed.
     }
-    else
+    else if (descriptor_data->registered_events_ != 0)
     {
       epoll_event ev = { 0, { 0 } };
       epoll_ctl(epoll_fd_, EPOLL_CTL_DEL, descriptor, &ev);
@@ -385,7 +421,7 @@
   }
 }
 
-void epoll_reactor::run(bool block, op_queue<operation>& ops)
+void epoll_reactor::run(long usec, op_queue<operation>& ops)
 {
   // This code relies on the fact that the scheduler queues the reactor task
   // behind all descriptor operations generated by this function. This means,
@@ -393,14 +429,18 @@
   // operations have already been dequeued. Therefore it is now safe for us to
   // reuse and return them for the scheduler to queue again.
 
-  // Calculate a timeout only if timerfd is not used.
+  // Calculate timeout. Check the timer queues only if timerfd is not in use.
   int timeout;
-  if (timer_fd_ != -1)
-    timeout = block ? -1 : 0;
+  if (usec == 0)
+    timeout = 0;
   else
   {
-    mutex::scoped_lock lock(mutex_);
-    timeout = block ? get_timeout() : 0;
+    timeout = (usec < 0) ? -1 : ((usec - 1) / 1000 + 1);
+    if (timer_fd_ == -1)
+    {
+      mutex::scoped_lock lock(mutex_);
+      timeout = get_timeout(timeout);
+    }
   }
 
   // Block on the epoll descriptor.
@@ -554,7 +594,7 @@
 epoll_reactor::descriptor_state* epoll_reactor::allocate_descriptor_state()
 {
   mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
-  return registered_descriptors_.alloc();
+  return registered_descriptors_.alloc(registered_descriptors_mutex_.enabled());
 }
 
 void epoll_reactor::free_descriptor_state(epoll_reactor::descriptor_state* s)
@@ -590,11 +630,13 @@
   interrupt();
 }
 
-int epoll_reactor::get_timeout()
+int epoll_reactor::get_timeout(int msec)
 {
   // By default we will wait no longer than 5 minutes. This will ensure that
   // any changes to the system clock are detected after no longer than this.
-  return timer_queues_.wait_duration_msec(5 * 60 * 1000);
+  const int max_msec = 5 * 60 * 1000;
+  return timer_queues_.wait_duration_msec(
+      (msec < 0 || max_msec < msec) ? max_msec : msec);
 }
 
 #if defined(ASIO_HAS_TIMERFD)
@@ -644,8 +686,9 @@
   operation* first_op_;
 };
 
-epoll_reactor::descriptor_state::descriptor_state()
-  : operation(&epoll_reactor::descriptor_state::do_complete)
+epoll_reactor::descriptor_state::descriptor_state(bool locking)
+  : operation(&epoll_reactor::descriptor_state::do_complete),
+    mutex_(locking)
 {
 }
 
@@ -662,12 +705,18 @@
   {
     if (events & (flag[j] | EPOLLERR | EPOLLHUP))
     {
+      try_speculative_[j] = true;
       while (reactor_op* op = op_queue_[j].front())
       {
-        if (op->perform())
+        if (reactor_op::status status = op->perform())
         {
           op_queue_[j].pop();
           io_cleanup.ops_.push(op);
+          if (status == reactor_op::done_and_exhausted)
+          {
+            try_speculative_[j] = false;
+            break;
+          }
         }
         else
           break;
diff --git a/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp b/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
index 744ab0c..152bffd 100644
--- a/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
+++ b/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
@@ -2,7 +2,7 @@
 // detail/impl/eventfd_select_interrupter.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/include/asio/detail/impl/handler_tracking.ipp b/asio/include/asio/detail/impl/handler_tracking.ipp
index 4095a01..7e628d0 100644
--- a/asio/include/asio/detail/impl/handler_tracking.ipp
+++ b/asio/include/asio/detail/impl/handler_tracking.ipp
@@ -2,7 +2,7 @@
 // detail/impl/handler_tracking.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/kqueue_reactor.hpp b/asio/include/asio/detail/impl/kqueue_reactor.hpp
index 1a86d00..eaa7a55 100644
--- a/asio/include/asio/detail/impl/kqueue_reactor.hpp
+++ b/asio/include/asio/detail/impl/kqueue_reactor.hpp
@@ -2,7 +2,7 @@
 // detail/impl/kqueue_reactor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -43,7 +43,7 @@
     const typename Time_Traits::time_type& time,
     typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
 {
-  asio::detail::mutex::scoped_lock lock(mutex_);
+  mutex::scoped_lock lock(mutex_);
 
   if (shutdown_)
   {
@@ -62,7 +62,7 @@
     typename timer_queue<Time_Traits>::per_timer_data& timer,
     std::size_t max_cancelled)
 {
-  asio::detail::mutex::scoped_lock lock(mutex_);
+  mutex::scoped_lock lock(mutex_);
   op_queue<operation> ops;
   std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
   lock.unlock();
@@ -75,7 +75,7 @@
     typename timer_queue<Time_Traits>::per_timer_data& target,
     typename timer_queue<Time_Traits>::per_timer_data& source)
 {
-  asio::detail::mutex::scoped_lock lock(mutex_);
+  mutex::scoped_lock lock(mutex_);
   op_queue<operation> ops;
   queue.cancel_timer(target, ops);
   queue.move_timer(target, source);
diff --git a/asio/include/asio/detail/impl/kqueue_reactor.ipp b/asio/include/asio/detail/impl/kqueue_reactor.ipp
index c3accc6..6ba6458 100644
--- a/asio/include/asio/detail/impl/kqueue_reactor.ipp
+++ b/asio/include/asio/detail/impl/kqueue_reactor.ipp
@@ -2,7 +2,7 @@
 // detail/impl/kqueue_reactor.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -42,10 +42,12 @@
 kqueue_reactor::kqueue_reactor(asio::execution_context& ctx)
   : execution_context_service_base<kqueue_reactor>(ctx),
     scheduler_(use_service<scheduler>(ctx)),
-    mutex_(),
+    mutex_(ASIO_CONCURRENCY_HINT_IS_LOCKING(
+          SCHEDULER, scheduler_.concurrency_hint())),
     kqueue_fd_(do_kqueue_create()),
     interrupter_(),
-    shutdown_(false)
+    shutdown_(false),
+    registered_descriptors_mutex_(mutex_.enabled())
 {
   struct kevent events[1];
   ASIO_KQUEUE_EV_SET(&events[0], interrupter_.read_descriptor(),
@@ -367,13 +369,13 @@
   }
 }
 
-void kqueue_reactor::run(bool block, op_queue<operation>& ops)
+void kqueue_reactor::run(long usec, op_queue<operation>& ops)
 {
   mutex::scoped_lock lock(mutex_);
 
   // Determine how long to block while waiting for events.
   timespec timeout_buf = { 0, 0 };
-  timespec* timeout = block ? get_timeout(timeout_buf) : &timeout_buf;
+  timespec* timeout = usec ? get_timeout(usec, timeout_buf) : &timeout_buf;
 
   lock.unlock();
 
@@ -496,7 +498,7 @@
 kqueue_reactor::descriptor_state* kqueue_reactor::allocate_descriptor_state()
 {
   mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
-  return registered_descriptors_.alloc();
+  return registered_descriptors_.alloc(registered_descriptors_mutex_.enabled());
 }
 
 void kqueue_reactor::free_descriptor_state(kqueue_reactor::descriptor_state* s)
@@ -517,11 +519,13 @@
   timer_queues_.erase(&queue);
 }
 
-timespec* kqueue_reactor::get_timeout(timespec& ts)
+timespec* kqueue_reactor::get_timeout(long usec, timespec& ts)
 {
   // By default we will wait no longer than 5 minutes. This will ensure that
   // any changes to the system clock are detected after no longer than this.
-  long usec = timer_queues_.wait_duration_usec(5 * 60 * 1000 * 1000);
+  const long max_usec = 5 * 60 * 1000 * 1000;
+  usec = timer_queues_.wait_duration_usec(
+      (usec < 0 || max_usec < usec) ? max_usec : usec);
   ts.tv_sec = usec / 1000000;
   ts.tv_nsec = (usec % 1000000) * 1000;
   return &ts;
diff --git a/asio/include/asio/detail/impl/null_event.ipp b/asio/include/asio/detail/impl/null_event.ipp
new file mode 100644
index 0000000..71b6080
--- /dev/null
+++ b/asio/include/asio/detail/impl/null_event.ipp
@@ -0,0 +1,74 @@
+//
+// detail/impl/null_event.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ASIO_DETAIL_IMPL_NULL_EVENT_IPP
+#define ASIO_DETAIL_IMPL_NULL_EVENT_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_WINDOWS_RUNTIME)
+# include <thread>
+#elif defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+# include "asio/detail/socket_types.hpp"
+#else
+# include <unistd.h>
+# if defined(__hpux)
+#  include <sys/time.h>
+# endif
+# if !defined(__hpux) || defined(__SELECT)
+#  include <sys/select.h>
+# endif
+#endif
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+void null_event::do_wait()
+{
+#if defined(ASIO_WINDOWS_RUNTIME)
+  std::this_thread::sleep_until(std::chrono::steady_clock::time_point::max());
+#elif defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+  ::Sleep(INFINITE);
+#else
+  ::pause();
+#endif
+}
+
+void null_event::do_wait_for_usec(long usec)
+{
+#if defined(ASIO_WINDOWS_RUNTIME)
+  std::this_thread::sleep_for(std::chrono::microseconds(usec));
+#elif defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+  ::Sleep(usec / 1000);
+#elif defined(__hpux) && defined(__SELECT)
+  timespec ts;
+  ts.tv_sec = usec / 1000000;
+  ts.tv_nsec = (usec % 1000000) * 1000;
+  ::pselect(0, 0, 0, 0, &ts, 0);
+#else
+  timeval tv;
+  tv.tv_sec = usec / 1000000;
+  tv.tv_usec = usec % 1000000;
+  ::select(0, 0, 0, 0, &tv);
+#endif
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_IMPL_NULL_EVENT_IPP
diff --git a/asio/include/asio/detail/impl/pipe_select_interrupter.ipp b/asio/include/asio/detail/impl/pipe_select_interrupter.ipp
index d05f16f..435da01 100644
--- a/asio/include/asio/detail/impl/pipe_select_interrupter.ipp
+++ b/asio/include/asio/detail/impl/pipe_select_interrupter.ipp
@@ -2,7 +2,7 @@
 // detail/impl/pipe_select_interrupter.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/posix_event.ipp b/asio/include/asio/detail/impl/posix_event.ipp
index ec2c116..a62c434 100644
--- a/asio/include/asio/detail/impl/posix_event.ipp
+++ b/asio/include/asio/detail/impl/posix_event.ipp
@@ -2,7 +2,7 @@
 // detail/impl/posix_event.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -31,7 +31,16 @@
 posix_event::posix_event()
   : state_(0)
 {
+#if (defined(__MACH__) && defined(__APPLE__))
   int error = ::pthread_cond_init(&cond_, 0);
+#else // (defined(__MACH__) && defined(__APPLE__))
+  ::pthread_condattr_t attr;
+  ::pthread_condattr_init(&attr);
+  int error = ::pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
+  if (error == 0)
+    error = ::pthread_cond_init(&cond_, &attr);
+#endif // (defined(__MACH__) && defined(__APPLE__))
+
   asio::error_code ec(error,
       asio::error::get_system_category());
   asio::detail::throw_error(ec, "event");
diff --git a/asio/include/asio/detail/impl/posix_mutex.ipp b/asio/include/asio/detail/impl/posix_mutex.ipp
index a768867..c629f6b 100644
--- a/asio/include/asio/detail/impl/posix_mutex.ipp
+++ b/asio/include/asio/detail/impl/posix_mutex.ipp
@@ -2,7 +2,7 @@
 // detail/impl/posix_mutex.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/posix_thread.ipp b/asio/include/asio/detail/impl/posix_thread.ipp
index 470751a..a4eb2a8 100644
--- a/asio/include/asio/detail/impl/posix_thread.ipp
+++ b/asio/include/asio/detail/impl/posix_thread.ipp
@@ -2,7 +2,7 @@
 // detail/impl/posix_thread.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/posix_tss_ptr.ipp b/asio/include/asio/detail/impl/posix_tss_ptr.ipp
index 8f39ab2..4d35ebc 100644
--- a/asio/include/asio/detail/impl/posix_tss_ptr.ipp
+++ b/asio/include/asio/detail/impl/posix_tss_ptr.ipp
@@ -2,7 +2,7 @@
 // detail/impl/posix_tss_ptr.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/reactive_descriptor_service.ipp b/asio/include/asio/detail/impl/reactive_descriptor_service.ipp
index 849abe8..7aaf362 100644
--- a/asio/include/asio/detail/impl/reactive_descriptor_service.ipp
+++ b/asio/include/asio/detail/impl/reactive_descriptor_service.ipp
@@ -2,7 +2,7 @@
 // detail/impl/reactive_descriptor_service.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -31,7 +31,8 @@
 
 reactive_descriptor_service::reactive_descriptor_service(
     asio::io_context& io_context)
-  : reactor_(asio::use_service<reactor>(io_context))
+  : service_base<reactive_descriptor_service>(io_context),
+    reactor_(asio::use_service<reactor>(io_context))
 {
   reactor_.init_task();
 }
diff --git a/asio/include/asio/detail/impl/reactive_serial_port_service.ipp b/asio/include/asio/detail/impl/reactive_serial_port_service.ipp
index d16c7cd..7ea37a4 100644
--- a/asio/include/asio/detail/impl/reactive_serial_port_service.ipp
+++ b/asio/include/asio/detail/impl/reactive_serial_port_service.ipp
@@ -2,7 +2,7 @@
 // detail/impl/reactive_serial_port_service.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -31,7 +31,8 @@
 
 reactive_serial_port_service::reactive_serial_port_service(
     asio::io_context& io_context)
-  : descriptor_service_(io_context)
+  : service_base<reactive_serial_port_service>(io_context),
+    descriptor_service_(io_context)
 {
 }
 
diff --git a/asio/include/asio/detail/impl/reactive_socket_service_base.ipp b/asio/include/asio/detail/impl/reactive_socket_service_base.ipp
index 2592093..f1ed1fa 100644
--- a/asio/include/asio/detail/impl/reactive_socket_service_base.ipp
+++ b/asio/include/asio/detail/impl/reactive_socket_service_base.ipp
@@ -2,7 +2,7 @@
 // detail/reactive_socket_service_base.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -35,7 +35,7 @@
   reactor_.init_task();
 }
 
-void reactive_socket_service_base::shutdown()
+void reactive_socket_service_base::base_shutdown()
 {
 }
 
diff --git a/asio/include/asio/detail/impl/resolver_service_base.ipp b/asio/include/asio/detail/impl/resolver_service_base.ipp
index 9b225b7..5899db5 100644
--- a/asio/include/asio/detail/impl/resolver_service_base.ipp
+++ b/asio/include/asio/detail/impl/resolver_service_base.ipp
@@ -2,7 +2,7 @@
 // detail/impl/resolver_service_base.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -36,20 +36,20 @@
 resolver_service_base::resolver_service_base(
     asio::io_context& io_context)
   : io_context_impl_(asio::use_service<io_context_impl>(io_context)),
-    work_io_context_(new asio::io_context),
+    work_io_context_(new asio::io_context(-1)),
     work_io_context_impl_(asio::use_service<
         io_context_impl>(*work_io_context_)),
-    work_(new asio::io_context::work(*work_io_context_)),
+    work_(asio::make_work_guard(*work_io_context_)),
     work_thread_(0)
 {
 }
 
 resolver_service_base::~resolver_service_base()
 {
-  shutdown();
+  base_shutdown();
 }
 
-void resolver_service_base::shutdown()
+void resolver_service_base::base_shutdown()
 {
   work_.reset();
   if (work_io_context_.get())
@@ -64,7 +64,7 @@
   }
 }
 
-void resolver_service_base::notify_fork(
+void resolver_service_base::base_notify_fork(
     asio::io_context::fork_event fork_ev)
 {
   if (work_thread_.get())
@@ -98,6 +98,19 @@
   impl.reset();
 }
 
+void resolver_service_base::move_construct(implementation_type& impl,
+    implementation_type& other_impl)
+{
+  impl = ASIO_MOVE_CAST(implementation_type)(other_impl);
+}
+
+void resolver_service_base::move_assign(implementation_type& impl,
+    resolver_service_base&, implementation_type& other_impl)
+{
+  destroy(impl);
+  impl = ASIO_MOVE_CAST(implementation_type)(other_impl);
+}
+
 void resolver_service_base::cancel(
     resolver_service_base::implementation_type& impl)
 {
@@ -107,11 +120,20 @@
   impl.reset(static_cast<void*>(0), socket_ops::noop_deleter());
 }
 
-void resolver_service_base::start_resolve_op(operation* op)
+void resolver_service_base::start_resolve_op(resolve_op* op)
 {
-  start_work_thread();
-  io_context_impl_.work_started();
-  work_io_context_impl_.post_immediate_completion(op, false);
+  if (ASIO_CONCURRENCY_HINT_IS_LOCKING(SCHEDULER,
+        io_context_impl_.concurrency_hint()))
+  {
+    start_work_thread();
+    io_context_impl_.work_started();
+    work_io_context_impl_.post_immediate_completion(op, false);
+  }
+  else
+  {
+    op->ec_ = asio::error::operation_not_supported;
+    io_context_impl_.post_immediate_completion(op, false);
+  }
 }
 
 void resolver_service_base::start_work_thread()
diff --git a/asio/include/asio/detail/impl/scheduler.ipp b/asio/include/asio/detail/impl/scheduler.ipp
index 91d5794..1b20465 100644
--- a/asio/include/asio/detail/impl/scheduler.ipp
+++ b/asio/include/asio/detail/impl/scheduler.ipp
@@ -2,7 +2,7 @@
 // detail/impl/scheduler.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,7 @@
 
 #include "asio/detail/config.hpp"
 
+#include "asio/detail/concurrency_hint.hpp"
 #include "asio/detail/event.hpp"
 #include "asio/detail/limits.hpp"
 #include "asio/detail/reactor.hpp"
@@ -86,13 +87,17 @@
 scheduler::scheduler(
     asio::execution_context& ctx, int concurrency_hint)
   : asio::detail::execution_context_service_base<scheduler>(ctx),
-    one_thread_(concurrency_hint == 1),
-    mutex_(),
+    one_thread_(concurrency_hint == 1
+        || !ASIO_CONCURRENCY_HINT_IS_LOCKING(
+          SCHEDULER, concurrency_hint)),
+    mutex_(ASIO_CONCURRENCY_HINT_IS_LOCKING(
+          SCHEDULER, concurrency_hint)),
     task_(0),
     task_interrupted_(true),
     outstanding_work_(0),
     stopped_(false),
-    shutdown_(false)
+    shutdown_(false),
+    concurrency_hint_(concurrency_hint)
 {
   ASIO_HANDLER_TRACKING_INIT;
 }
@@ -167,6 +172,24 @@
   return do_run_one(lock, this_thread, ec);
 }
 
+std::size_t scheduler::wait_one(long usec, asio::error_code& ec)
+{
+  ec = asio::error_code();
+  if (outstanding_work_ == 0)
+  {
+    stop();
+    return 0;
+  }
+
+  thread_info this_thread;
+  this_thread.private_outstanding_work = 0;
+  thread_call_stack::context ctx(this, this_thread);
+
+  mutex::scoped_lock lock(mutex_);
+
+  return do_wait_one(lock, this_thread, usec, ec);
+}
+
 std::size_t scheduler::poll(asio::error_code& ec)
 {
   ec = asio::error_code();
@@ -356,7 +379,7 @@
         // Run the task. May throw an exception. Only block if the operation
         // queue is empty and we're not polling, otherwise we want to return
         // as soon as possible.
-        task_->run(!more_handlers, this_thread.private_op_queue);
+        task_->run(more_handlers ? 0 : -1, this_thread.private_op_queue);
       }
       else
       {
@@ -387,6 +410,76 @@
   return 0;
 }
 
+std::size_t scheduler::do_wait_one(mutex::scoped_lock& lock,
+    scheduler::thread_info& this_thread, long usec,
+    const asio::error_code& ec)
+{
+  if (stopped_)
+    return 0;
+
+  operation* o = op_queue_.front();
+  if (o == 0)
+  {
+    wakeup_event_.clear(lock);
+    wakeup_event_.wait_for_usec(lock, usec);
+    usec = 0; // Wait at most once.
+    o = op_queue_.front();
+  }
+
+  if (o == &task_operation_)
+  {
+    op_queue_.pop();
+    bool more_handlers = (!op_queue_.empty());
+
+    task_interrupted_ = more_handlers;
+
+    if (more_handlers && !one_thread_)
+      wakeup_event_.unlock_and_signal_one(lock);
+    else
+      lock.unlock();
+
+    {
+      task_cleanup on_exit = { this, &lock, &this_thread };
+      (void)on_exit;
+
+      // Run the task. May throw an exception. Only block if the operation
+      // queue is empty and we're not polling, otherwise we want to return
+      // as soon as possible.
+      task_->run(more_handlers ? 0 : usec, this_thread.private_op_queue);
+    }
+
+    o = op_queue_.front();
+    if (o == &task_operation_)
+    {
+      if (!one_thread_)
+        wakeup_event_.maybe_unlock_and_signal_one(lock);
+      return 0;
+    }
+  }
+
+  if (o == 0)
+    return 0;
+
+  op_queue_.pop();
+  bool more_handlers = (!op_queue_.empty());
+
+  std::size_t task_result = o->task_result_;
+
+  if (more_handlers && !one_thread_)
+    wake_one_thread_and_unlock(lock);
+  else
+    lock.unlock();
+
+  // Ensure the count of outstanding work is decremented on block exit.
+  work_cleanup on_exit = { this, &lock, &this_thread };
+  (void)on_exit;
+
+  // Complete the operation. May throw an exception. Deletes the object.
+  o->complete(this, ec, task_result);
+
+  return 1;
+}
+
 std::size_t scheduler::do_poll_one(mutex::scoped_lock& lock,
     scheduler::thread_info& this_thread,
     const asio::error_code& ec)
@@ -407,7 +500,7 @@
       // Run the task. May throw an exception. Only block if the operation
       // queue is empty and we're not polling, otherwise we want to return
       // as soon as possible.
-      task_->run(false, this_thread.private_op_queue);
+      task_->run(0, this_thread.private_op_queue);
     }
 
     o = op_queue_.front();
diff --git a/asio/include/asio/detail/impl/select_reactor.hpp b/asio/include/asio/detail/impl/select_reactor.hpp
index 4fb58f4..04e17f8 100644
--- a/asio/include/asio/detail/impl/select_reactor.hpp
+++ b/asio/include/asio/detail/impl/select_reactor.hpp
@@ -2,7 +2,7 @@
 // detail/impl/select_reactor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/select_reactor.ipp b/asio/include/asio/detail/impl/select_reactor.ipp
index a3d2876..dc0737b 100644
--- a/asio/include/asio/detail/impl/select_reactor.ipp
+++ b/asio/include/asio/detail/impl/select_reactor.ipp
@@ -2,7 +2,7 @@
 // detail/impl/select_reactor.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -180,7 +180,7 @@
     op_queue_[i].cancel_operations(descriptor, ops);
 }
 
-void select_reactor::run(bool block, op_queue<operation>& ops)
+void select_reactor::run(long usec, op_queue<operation>& ops)
 {
   asio::detail::mutex::scoped_lock lock(mutex_);
 
@@ -217,12 +217,12 @@
 
   // We can return immediately if there's no work to do and the reactor is
   // not supposed to block.
-  if (!block && !have_work_to_do)
+  if (!usec && !have_work_to_do)
     return;
 
   // Determine how long to block while waiting for events.
   timeval tv_buf = { 0, 0 };
-  timeval* tv = block ? get_timeout(tv_buf) : &tv_buf;
+  timeval* tv = usec ? get_timeout(usec, tv_buf) : &tv_buf;
 
   lock.unlock();
 
@@ -289,11 +289,13 @@
   timer_queues_.erase(&queue);
 }
 
-timeval* select_reactor::get_timeout(timeval& tv)
+timeval* select_reactor::get_timeout(long usec, timeval& tv)
 {
   // By default we will wait no longer than 5 minutes. This will ensure that
   // any changes to the system clock are detected after no longer than this.
-  long usec = timer_queues_.wait_duration_usec(5 * 60 * 1000 * 1000);
+  const long max_usec = 5 * 60 * 1000 * 1000;
+  usec = timer_queues_.wait_duration_usec(
+      (usec < 0 || max_usec < usec) ? max_usec : usec);
   tv.tv_sec = usec / 1000000;
   tv.tv_usec = usec % 1000000;
   return &tv;
diff --git a/asio/include/asio/detail/impl/service_registry.hpp b/asio/include/asio/detail/impl/service_registry.hpp
index efa4733..1b735e1 100644
--- a/asio/include/asio/detail/impl/service_registry.hpp
+++ b/asio/include/asio/detail/impl/service_registry.hpp
@@ -2,7 +2,7 @@
 // detail/impl/service_registry.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -24,7 +24,7 @@
 Service& service_registry::use_service()
 {
   execution_context::service::key key;
-  init_key(key, Service::id);
+  init_key<Service>(key, 0);
   factory_type factory = &service_registry::create<Service, execution_context>;
   return *static_cast<Service*>(do_use_service(key, factory, &owner_));
 }
@@ -33,7 +33,7 @@
 Service& service_registry::use_service(io_context& owner)
 {
   execution_context::service::key key;
-  init_key(key, Service::id);
+  init_key<Service>(key, 0);
   factory_type factory = &service_registry::create<Service, io_context>;
   return *static_cast<Service*>(do_use_service(key, factory, &owner));
 }
@@ -42,7 +42,7 @@
 void service_registry::add_service(Service* new_service)
 {
   execution_context::service::key key;
-  init_key(key, Service::id);
+  init_key<Service>(key, 0);
   return do_add_service(key, new_service);
 }
 
@@ -50,13 +50,29 @@
 bool service_registry::has_service() const
 {
   execution_context::service::key key;
-  init_key(key, Service::id);
+  init_key<Service>(key, 0);
   return do_has_service(key);
 }
 
+template <typename Service>
+inline void service_registry::init_key(
+    execution_context::service::key& key, ...)
+{
+  init_key_from_id(key, Service::id);
+}
+
 #if !defined(ASIO_NO_TYPEID)
 template <typename Service>
 void service_registry::init_key(execution_context::service::key& key,
+    typename enable_if<
+      is_base_of<typename Service::key_type, Service>::value>::type*)
+{
+  key.type_info_ = &typeid(typeid_wrapper<Service>);
+  key.id_ = 0;
+}
+
+template <typename Service>
+void service_registry::init_key_from_id(execution_context::service::key& key,
     const service_id<Service>& /*id*/)
 {
   key.type_info_ = &typeid(typeid_wrapper<Service>);
diff --git a/asio/include/asio/detail/impl/service_registry.ipp b/asio/include/asio/detail/impl/service_registry.ipp
index 39dad4d..ef1955f 100644
--- a/asio/include/asio/detail/impl/service_registry.ipp
+++ b/asio/include/asio/detail/impl/service_registry.ipp
@@ -2,7 +2,7 @@
 // detail/impl/service_registry.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -84,7 +84,7 @@
       services[i - 1]->notify_fork(fork_ev);
 }
 
-void service_registry::init_key(execution_context::service::key& key,
+void service_registry::init_key_from_id(execution_context::service::key& key,
     const execution_context::id& id)
 {
   key.type_info_ = 0;
diff --git a/asio/include/asio/detail/impl/signal_set_service.ipp b/asio/include/asio/detail/impl/signal_set_service.ipp
index f26fbe0..114a0b1 100644
--- a/asio/include/asio/detail/impl/signal_set_service.ipp
+++ b/asio/include/asio/detail/impl/signal_set_service.ipp
@@ -2,7 +2,7 @@
 // detail/impl/signal_set_service.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,10 +18,12 @@
 #include "asio/detail/config.hpp"
 
 #include <cstring>
+#include <stdexcept>
 #include "asio/detail/reactor.hpp"
 #include "asio/detail/signal_blocker.hpp"
 #include "asio/detail/signal_set_service.hpp"
 #include "asio/detail/static_mutex.hpp"
+#include "asio/detail/throw_exception.hpp"
 
 #include "asio/detail/push_options.hpp"
 
@@ -91,7 +93,7 @@
   {
   }
 
-  static bool do_perform(reactor_op*)
+  static status do_perform(reactor_op*)
   {
     signal_state* state = get_signal_state();
 
@@ -101,7 +103,7 @@
       if (signal_number >= 0 && signal_number < max_signal_number)
         signal_set_service::deliver_signal(signal_number);
 
-    return false;
+    return not_done;
   }
 
   static void do_complete(void* /*owner*/, operation* base,
@@ -118,7 +120,8 @@
 
 signal_set_service::signal_set_service(
     asio::io_context& io_context)
-  : io_context_(asio::use_service<io_context_impl>(io_context)),
+  : service_base<signal_set_service>(io_context),
+    io_context_(asio::use_service<io_context_impl>(io_context)),
 #if !defined(ASIO_WINDOWS) \
   && !defined(ASIO_WINDOWS_RUNTIME) \
   && !defined(__CYGWIN__)
@@ -506,6 +509,22 @@
     open_descriptors();
 #endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
 
+  // If an io_context object is thread-unsafe then it must be the only
+  // io_context used to create signal_set objects.
+  if (state->service_list_ != 0)
+  {
+    if (!ASIO_CONCURRENCY_HINT_IS_LOCKING(SCHEDULER,
+          service->io_context_.concurrency_hint())
+        || !ASIO_CONCURRENCY_HINT_IS_LOCKING(SCHEDULER,
+          state->service_list_->io_context_.concurrency_hint()))
+    {
+      std::logic_error ex(
+          "Thread-unsafe io_context objects require "
+          "exclusive access to signal handling.");
+      asio::detail::throw_exception(ex);
+    }
+  }
+
   // Insert service into linked list of all services.
   service->next_ = state->service_list_;
   service->prev_ = 0;
diff --git a/asio/include/asio/detail/impl/socket_ops.ipp b/asio/include/asio/detail/impl/socket_ops.ipp
index cc93d63..9c1336c 100644
--- a/asio/include/asio/detail/impl/socket_ops.ipp
+++ b/asio/include/asio/detail/impl/socket_ops.ipp
@@ -2,7 +2,7 @@
 // detail/impl/socket_ops.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -168,7 +168,7 @@
       return invalid_socket;
 
     // Wait for socket to become ready.
-    if (socket_ops::poll_read(s, 0, ec) < 0)
+    if (socket_ops::poll_read(s, 0, -1, ec) < 0)
       return invalid_socket;
   }
 }
@@ -505,7 +505,7 @@
   }
 
   // Wait for socket to become ready.
-  if (socket_ops::poll_connect(s, ec) < 0)
+  if (socket_ops::poll_connect(s, -1, ec) < 0)
     return;
 
   // Get the error code from the connect operation.
@@ -827,7 +827,7 @@
       return 0;
 
     // Wait for socket to become ready.
-    if (socket_ops::poll_read(s, 0, ec) < 0)
+    if (socket_ops::poll_read(s, 0, -1, ec) < 0)
       return 0;
   }
 }
@@ -966,7 +966,7 @@
       return 0;
 
     // Wait for socket to become ready.
-    if (socket_ops::poll_read(s, 0, ec) < 0)
+    if (socket_ops::poll_read(s, 0, -1, ec) < 0)
       return 0;
   }
 }
@@ -1079,7 +1079,7 @@
       return 0;
 
     // Wait for socket to become ready.
-    if (socket_ops::poll_read(s, 0, ec) < 0)
+    if (socket_ops::poll_read(s, 0, -1, ec) < 0)
       return 0;
   }
 }
@@ -1206,7 +1206,7 @@
       return 0;
 
     // Wait for socket to become ready.
-    if (socket_ops::poll_write(s, 0, ec) < 0)
+    if (socket_ops::poll_write(s, 0, -1, ec) < 0)
       return 0;
   }
 }
@@ -1330,7 +1330,7 @@
       return 0;
 
     // Wait for socket to become ready.
-    if (socket_ops::poll_write(s, 0, ec) < 0)
+    if (socket_ops::poll_write(s, 0, -1, ec) < 0)
       return 0;
   }
 }
@@ -1784,7 +1784,8 @@
 #endif
 }
 
-int poll_read(socket_type s, state_type state, asio::error_code& ec)
+int poll_read(socket_type s, state_type state,
+    int msec, asio::error_code& ec)
 {
   if (s == invalid_socket)
   {
@@ -1798,10 +1799,22 @@
   fd_set fds;
   FD_ZERO(&fds);
   FD_SET(s, &fds);
-  timeval zero_timeout;
-  zero_timeout.tv_sec = 0;
-  zero_timeout.tv_usec = 0;
-  timeval* timeout = (state & user_set_non_blocking) ? &zero_timeout : 0;
+  timeval timeout_obj;
+  timeval* timeout;
+  if (state & user_set_non_blocking)
+  {
+    timeout_obj.tv_sec = 0;
+    timeout_obj.tv_usec = 0;
+    timeout = &timeout_obj;
+  }
+  else if (msec >= 0)
+  {
+    timeout_obj.tv_sec = msec / 1000;
+    timeout_obj.tv_usec = (msec % 1000) * 1000;
+    timeout = &timeout_obj;
+  }
+  else
+    timeout = 0;
   clear_last_error();
   int result = error_wrapper(::select(s + 1, &fds, 0, 0, timeout), ec);
 #else // defined(ASIO_WINDOWS)
@@ -1811,7 +1824,7 @@
   fds.fd = s;
   fds.events = POLLIN;
   fds.revents = 0;
-  int timeout = (state & user_set_non_blocking) ? 0 : -1;
+  int timeout = (state & user_set_non_blocking) ? 0 : msec;
   clear_last_error();
   int result = error_wrapper(::poll(&fds, 1, timeout), ec);
 #endif // defined(ASIO_WINDOWS)
@@ -1825,7 +1838,8 @@
   return result;
 }
 
-int poll_write(socket_type s, state_type state, asio::error_code& ec)
+int poll_write(socket_type s, state_type state,
+    int msec, asio::error_code& ec)
 {
   if (s == invalid_socket)
   {
@@ -1839,10 +1853,22 @@
   fd_set fds;
   FD_ZERO(&fds);
   FD_SET(s, &fds);
-  timeval zero_timeout;
-  zero_timeout.tv_sec = 0;
-  zero_timeout.tv_usec = 0;
-  timeval* timeout = (state & user_set_non_blocking) ? &zero_timeout : 0;
+  timeval timeout_obj;
+  timeval* timeout;
+  if (state & user_set_non_blocking)
+  {
+    timeout_obj.tv_sec = 0;
+    timeout_obj.tv_usec = 0;
+    timeout = &timeout_obj;
+  }
+  else if (msec >= 0)
+  {
+    timeout_obj.tv_sec = msec / 1000;
+    timeout_obj.tv_usec = (msec % 1000) * 1000;
+    timeout = &timeout_obj;
+  }
+  else
+    timeout = 0;
   clear_last_error();
   int result = error_wrapper(::select(s + 1, 0, &fds, 0, timeout), ec);
 #else // defined(ASIO_WINDOWS)
@@ -1852,7 +1878,7 @@
   fds.fd = s;
   fds.events = POLLOUT;
   fds.revents = 0;
-  int timeout = (state & user_set_non_blocking) ? 0 : -1;
+  int timeout = (state & user_set_non_blocking) ? 0 : msec;
   clear_last_error();
   int result = error_wrapper(::poll(&fds, 1, timeout), ec);
 #endif // defined(ASIO_WINDOWS)
@@ -1866,7 +1892,8 @@
   return result;
 }
 
-int poll_error(socket_type s, state_type state, asio::error_code& ec)
+int poll_error(socket_type s, state_type state,
+    int msec, asio::error_code& ec)
 {
   if (s == invalid_socket)
   {
@@ -1880,10 +1907,22 @@
   fd_set fds;
   FD_ZERO(&fds);
   FD_SET(s, &fds);
-  timeval zero_timeout;
-  zero_timeout.tv_sec = 0;
-  zero_timeout.tv_usec = 0;
-  timeval* timeout = (state & user_set_non_blocking) ? &zero_timeout : 0;
+  timeval timeout_obj;
+  timeval* timeout;
+  if (state & user_set_non_blocking)
+  {
+    timeout_obj.tv_sec = 0;
+    timeout_obj.tv_usec = 0;
+    timeout = &timeout_obj;
+  }
+  else if (msec >= 0)
+  {
+    timeout_obj.tv_sec = msec / 1000;
+    timeout_obj.tv_usec = (msec % 1000) * 1000;
+    timeout = &timeout_obj;
+  }
+  else
+    timeout = 0;
   clear_last_error();
   int result = error_wrapper(::select(s + 1, 0, 0, &fds, timeout), ec);
 #else // defined(ASIO_WINDOWS)
@@ -1893,7 +1932,7 @@
   fds.fd = s;
   fds.events = POLLPRI | POLLERR | POLLHUP;
   fds.revents = 0;
-  int timeout = (state & user_set_non_blocking) ? 0 : -1;
+  int timeout = (state & user_set_non_blocking) ? 0 : msec;
   clear_last_error();
   int result = error_wrapper(::poll(&fds, 1, timeout), ec);
 #endif // defined(ASIO_WINDOWS)
@@ -1907,7 +1946,7 @@
   return result;
 }
 
-int poll_connect(socket_type s, asio::error_code& ec)
+int poll_connect(socket_type s, int msec, asio::error_code& ec)
 {
   if (s == invalid_socket)
   {
@@ -1924,9 +1963,19 @@
   fd_set except_fds;
   FD_ZERO(&except_fds);
   FD_SET(s, &except_fds);
+  timeval timeout_obj;
+  timeval* timeout;
+  if (msec >= 0)
+  {
+    timeout_obj.tv_sec = msec / 1000;
+    timeout_obj.tv_usec = (msec % 1000) * 1000;
+    timeout = &timeout_obj;
+  }
+  else
+    timeout = 0;
   clear_last_error();
   int result = error_wrapper(::select(
-        s + 1, 0, &write_fds, &except_fds, 0), ec);
+        s + 1, 0, &write_fds, &except_fds, timeout), ec);
   if (result >= 0)
     ec = asio::error_code();
   return result;
@@ -1938,7 +1987,7 @@
   fds.events = POLLOUT;
   fds.revents = 0;
   clear_last_error();
-  int result = error_wrapper(::poll(&fds, 1, -1), ec);
+  int result = error_wrapper(::poll(&fds, 1, msec), ec);
   if (result >= 0)
     ec = asio::error_code();
   return result;
diff --git a/asio/include/asio/detail/impl/socket_select_interrupter.ipp b/asio/include/asio/detail/impl/socket_select_interrupter.ipp
index 21c0fbc..2f4d377 100644
--- a/asio/include/asio/detail/impl/socket_select_interrupter.ipp
+++ b/asio/include/asio/detail/impl/socket_select_interrupter.ipp
@@ -2,7 +2,7 @@
 // detail/impl/socket_select_interrupter.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -71,7 +71,8 @@
   // Some broken firewalls on Windows will intermittently cause getsockname to
   // return 0.0.0.0 when the socket is actually bound to 127.0.0.1. We
   // explicitly specify the target address here to work around this problem.
-  addr.sin_addr.s_addr = socket_ops::host_to_network_long(INADDR_LOOPBACK);
+  if (addr.sin_addr.s_addr == socket_ops::host_to_network_long(INADDR_ANY))
+    addr.sin_addr.s_addr = socket_ops::host_to_network_long(INADDR_LOOPBACK);
 
   if (socket_ops::listen(acceptor.get(),
         SOMAXCONN, ec) == socket_error_retval)
diff --git a/asio/include/asio/detail/impl/strand_executor_service.hpp b/asio/include/asio/detail/impl/strand_executor_service.hpp
index 94d6e41..fedea1c 100644
--- a/asio/include/asio/detail/impl/strand_executor_service.hpp
+++ b/asio/include/asio/detail/impl/strand_executor_service.hpp
@@ -2,7 +2,7 @@
 // detail/impl/strand_executor_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/strand_executor_service.ipp b/asio/include/asio/detail/impl/strand_executor_service.ipp
index fc2602b..3baadcb 100644
--- a/asio/include/asio/detail/impl/strand_executor_service.ipp
+++ b/asio/include/asio/detail/impl/strand_executor_service.ipp
@@ -2,7 +2,7 @@
 // detail/impl/strand_executor_service.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/strand_service.hpp b/asio/include/asio/detail/impl/strand_service.hpp
index 2e07fac..00b88a4 100644
--- a/asio/include/asio/detail/impl/strand_service.hpp
+++ b/asio/include/asio/detail/impl/strand_service.hpp
@@ -2,7 +2,7 @@
 // detail/impl/strand_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/strand_service.ipp b/asio/include/asio/detail/impl/strand_service.ipp
index 6a5690b..16946dc 100644
--- a/asio/include/asio/detail/impl/strand_service.ipp
+++ b/asio/include/asio/detail/impl/strand_service.ipp
@@ -2,7 +2,7 @@
 // detail/impl/strand_service.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/throw_error.ipp b/asio/include/asio/detail/impl/throw_error.ipp
index 0e327d0..d59eca2 100644
--- a/asio/include/asio/detail/impl/throw_error.ipp
+++ b/asio/include/asio/detail/impl/throw_error.ipp
@@ -2,7 +2,7 @@
 // detail/impl/throw_error.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/timer_queue_ptime.ipp b/asio/include/asio/detail/impl/timer_queue_ptime.ipp
index 3a396ee..10c4295 100644
--- a/asio/include/asio/detail/impl/timer_queue_ptime.ipp
+++ b/asio/include/asio/detail/impl/timer_queue_ptime.ipp
@@ -2,7 +2,7 @@
 // detail/impl/timer_queue_ptime.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,12 +16,13 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+
 #include "asio/detail/timer_queue_ptime.hpp"
 
 #include "asio/detail/push_options.hpp"
 
-#if defined(ASIO_HAS_BOOST_DATE_TIME)
-
 namespace asio {
 namespace detail {
 
@@ -74,11 +75,17 @@
   return impl_.cancel_timer(timer, ops, max_cancelled);
 }
 
+void timer_queue<time_traits<boost::posix_time::ptime> >::move_timer(
+    per_timer_data& target, per_timer_data& source)
+{
+  impl_.move_timer(target, source);
+}
+
 } // namespace detail
 } // namespace asio
 
-#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-
 #include "asio/detail/pop_options.hpp"
 
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
 #endif // ASIO_DETAIL_IMPL_TIMER_QUEUE_PTIME_IPP
diff --git a/asio/include/asio/detail/impl/timer_queue_set.ipp b/asio/include/asio/detail/impl/timer_queue_set.ipp
index b76e238..a683182 100644
--- a/asio/include/asio/detail/impl/timer_queue_set.ipp
+++ b/asio/include/asio/detail/impl/timer_queue_set.ipp
@@ -2,7 +2,7 @@
 // detail/impl/timer_queue_set.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/win_event.ipp b/asio/include/asio/detail/impl/win_event.ipp
index d045681..e3d77e6 100644
--- a/asio/include/asio/detail/impl/win_event.ipp
+++ b/asio/include/asio/detail/impl/win_event.ipp
@@ -2,7 +2,7 @@
 // detail/win_event.ipp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/win_iocp_handle_service.ipp b/asio/include/asio/detail/impl/win_iocp_handle_service.ipp
index fbd7b94..7e6fcb9 100644
--- a/asio/include/asio/detail/impl/win_iocp_handle_service.ipp
+++ b/asio/include/asio/detail/impl/win_iocp_handle_service.ipp
@@ -2,7 +2,7 @@
 // detail/impl/win_iocp_handle_service.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -67,7 +67,8 @@
 
 win_iocp_handle_service::win_iocp_handle_service(
     asio::io_context& io_context)
-  : iocp_service_(asio::use_service<win_iocp_io_context>(io_context)),
+  : service_base<win_iocp_handle_service>(io_context),
+    iocp_service_(asio::use_service<win_iocp_io_context>(io_context)),
     mutex_(),
     impl_list_(0)
 {
diff --git a/asio/include/asio/detail/impl/win_iocp_io_context.hpp b/asio/include/asio/detail/impl/win_iocp_io_context.hpp
index f783c30..4d1d75a 100644
--- a/asio/include/asio/detail/impl/win_iocp_io_context.hpp
+++ b/asio/include/asio/detail/impl/win_iocp_io_context.hpp
@@ -2,7 +2,7 @@
 // detail/impl/win_iocp_io_context.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/win_iocp_io_context.ipp b/asio/include/asio/detail/impl/win_iocp_io_context.ipp
index 3bc1a8d..d4a1638 100644
--- a/asio/include/asio/detail/impl/win_iocp_io_context.ipp
+++ b/asio/include/asio/detail/impl/win_iocp_io_context.ipp
@@ -2,7 +2,7 @@
 // detail/impl/win_iocp_io_context.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -70,7 +70,8 @@
     stop_event_posted_(0),
     shutdown_(0),
     gqcs_timeout_(get_gqcs_timeout()),
-    dispatch_required_(0)
+    dispatch_required_(0),
+    concurrency_hint_(concurrency_hint)
 {
   ASIO_HANDLER_TRACKING_INIT;
 
@@ -158,7 +159,7 @@
   thread_call_stack::context ctx(this, this_thread);
 
   size_t n = 0;
-  while (do_one(true, ec))
+  while (do_one(INFINITE, ec))
     if (n != (std::numeric_limits<size_t>::max)())
       ++n;
   return n;
@@ -176,7 +177,22 @@
   win_iocp_thread_info this_thread;
   thread_call_stack::context ctx(this, this_thread);
 
-  return do_one(true, ec);
+  return do_one(INFINITE, ec);
+}
+
+size_t win_iocp_io_context::wait_one(long usec, asio::error_code& ec)
+{
+  if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
+  {
+    stop();
+    ec = asio::error_code();
+    return 0;
+  }
+
+  win_iocp_thread_info this_thread;
+  thread_call_stack::context ctx(this, this_thread);
+
+  return do_one(usec < 0 ? INFINITE : ((usec - 1) / 1000 + 1), ec);
 }
 
 size_t win_iocp_io_context::poll(asio::error_code& ec)
@@ -192,7 +208,7 @@
   thread_call_stack::context ctx(this, this_thread);
 
   size_t n = 0;
-  while (do_one(false, ec))
+  while (do_one(0, ec))
     if (n != (std::numeric_limits<size_t>::max)())
       ++n;
   return n;
@@ -210,7 +226,7 @@
   win_iocp_thread_info this_thread;
   thread_call_stack::context ctx(this, this_thread);
 
-  return do_one(false, ec);
+  return do_one(0, ec);
 }
 
 void win_iocp_io_context::stop()
@@ -339,7 +355,7 @@
   }
 }
 
-size_t win_iocp_io_context::do_one(bool block, asio::error_code& ec)
+size_t win_iocp_io_context::do_one(DWORD msec, asio::error_code& ec)
 {
   for (;;)
   {
@@ -361,8 +377,9 @@
     dword_ptr_t completion_key = 0;
     LPOVERLAPPED overlapped = 0;
     ::SetLastError(0);
-    BOOL ok = ::GetQueuedCompletionStatus(iocp_.handle, &bytes_transferred,
-        &completion_key, &overlapped, block ? gqcs_timeout_ : 0);
+    BOOL ok = ::GetQueuedCompletionStatus(iocp_.handle,
+        &bytes_transferred, &completion_key, &overlapped,
+        msec < gqcs_timeout_ ? msec : gqcs_timeout_);
     DWORD last_error = ::GetLastError();
 
     if (overlapped)
@@ -413,8 +430,9 @@
         return 0;
       }
 
-      // If we're not polling we need to keep going until we get a real handler.
-      if (block)
+      // If we're waiting indefinitely we need to keep going until we get a
+      // real handler.
+      if (msec == INFINITE)
         continue;
 
       ec = asio::error_code();
diff --git a/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp b/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp
index 26a8e29..d84f4b2 100644
--- a/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp
+++ b/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp
@@ -2,7 +2,7 @@
 // detail/impl/win_iocp_serial_port_service.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -30,7 +30,8 @@
 
 win_iocp_serial_port_service::win_iocp_serial_port_service(
     asio::io_context& io_context)
-  : handle_service_(io_context)
+  : service_base<win_iocp_serial_port_service>(io_context),
+    handle_service_(io_context)
 {
 }
 
diff --git a/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp b/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp
index bae9702..4230f5c 100644
--- a/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp
+++ b/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp
@@ -2,7 +2,7 @@
 // detail/impl/win_iocp_socket_service_base.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -37,7 +37,7 @@
 {
 }
 
-void win_iocp_socket_service_base::shutdown()
+void win_iocp_socket_service_base::base_shutdown()
 {
   // Close all implementations, causing all operations to complete.
   asio::detail::mutex::scoped_lock lock(mutex_);
diff --git a/asio/include/asio/detail/impl/win_mutex.ipp b/asio/include/asio/detail/impl/win_mutex.ipp
index 6a601b2..1d5d5a8 100644
--- a/asio/include/asio/detail/impl/win_mutex.ipp
+++ b/asio/include/asio/detail/impl/win_mutex.ipp
@@ -2,7 +2,7 @@
 // detail/impl/win_mutex.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/win_object_handle_service.ipp b/asio/include/asio/detail/impl/win_object_handle_service.ipp
index 2e714b4..9b3da7f 100644
--- a/asio/include/asio/detail/impl/win_object_handle_service.ipp
+++ b/asio/include/asio/detail/impl/win_object_handle_service.ipp
@@ -2,7 +2,7 @@
 // detail/impl/win_object_handle_service.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -29,7 +29,8 @@
 
 win_object_handle_service::win_object_handle_service(
     asio::io_context& io_context)
-  : io_context_(asio::use_service<io_context_impl>(io_context)),
+  : service_base<win_object_handle_service>(io_context),
+    io_context_(asio::use_service<io_context_impl>(io_context)),
     mutex_(),
     impl_list_(0),
     shutdown_(false)
diff --git a/asio/include/asio/detail/impl/win_static_mutex.ipp b/asio/include/asio/detail/impl/win_static_mutex.ipp
index 024ad49..359752d 100644
--- a/asio/include/asio/detail/impl/win_static_mutex.ipp
+++ b/asio/include/asio/detail/impl/win_static_mutex.ipp
@@ -2,7 +2,7 @@
 // detail/impl/win_static_mutex.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/win_thread.ipp b/asio/include/asio/detail/impl/win_thread.ipp
index 1db4f4e..4269e6b 100644
--- a/asio/include/asio/detail/impl/win_thread.ipp
+++ b/asio/include/asio/detail/impl/win_thread.ipp
@@ -2,7 +2,7 @@
 // detail/impl/win_thread.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/win_tss_ptr.ipp b/asio/include/asio/detail/impl/win_tss_ptr.ipp
index 74414a3..75a436c 100644
--- a/asio/include/asio/detail/impl/win_tss_ptr.ipp
+++ b/asio/include/asio/detail/impl/win_tss_ptr.ipp
@@ -2,7 +2,7 @@
 // detail/impl/win_tss_ptr.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp b/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp
index 4d75aaa..f3d74cf 100644
--- a/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp
+++ b/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp
@@ -2,7 +2,7 @@
 // detail/impl/winrt_ssocket_service_base.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -38,7 +38,7 @@
 {
 }
 
-void winrt_ssocket_service_base::shutdown()
+void winrt_ssocket_service_base::base_shutdown()
 {
   // Close all implementations, causing all operations to complete.
   asio::detail::mutex::scoped_lock lock(mutex_);
@@ -449,7 +449,7 @@
   try
   {
     buffer_sequence_adapter<asio::const_buffer,
-      asio::const_buffers_1> bufs(asio::buffer(data));
+      asio::const_buffer> bufs(asio::buffer(data));
 
     if (bufs.all_empty())
     {
@@ -490,7 +490,7 @@
   try
   {
     buffer_sequence_adapter<asio::const_buffer,
-        asio::const_buffers_1> bufs(asio::buffer(data));
+        asio::const_buffer> bufs(asio::buffer(data));
 
     if (bufs.all_empty())
     {
@@ -529,7 +529,7 @@
   try
   {
     buffer_sequence_adapter<asio::mutable_buffer,
-        asio::mutable_buffers_1> bufs(asio::buffer(data));
+        asio::mutable_buffer> bufs(asio::buffer(data));
 
     if (bufs.all_empty())
     {
@@ -581,7 +581,7 @@
   try
   {
     buffer_sequence_adapter<asio::mutable_buffer,
-        asio::mutable_buffers_1> bufs(asio::buffer(data));
+        asio::mutable_buffer> bufs(asio::buffer(data));
 
     if (bufs.all_empty())
     {
diff --git a/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp b/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp
index 1ec1ccb..e844731 100644
--- a/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp
+++ b/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp
@@ -2,7 +2,7 @@
 // detail/impl/winrt_timer_scheduler.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp b/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp
index 7c11dbb..2bc92b7 100644
--- a/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp
+++ b/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp
@@ -2,7 +2,7 @@
 // detail/impl/winrt_timer_scheduler.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/impl/winsock_init.ipp b/asio/include/asio/detail/impl/winsock_init.ipp
index 45cc9e0..094b58b 100644
--- a/asio/include/asio/detail/impl/winsock_init.ipp
+++ b/asio/include/asio/detail/impl/winsock_init.ipp
@@ -2,7 +2,7 @@
 // detail/impl/winsock_init.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/io_control.hpp b/asio/include/asio/detail/io_control.hpp
index f5dd900..81b3d49 100644
--- a/asio/include/asio/detail/io_control.hpp
+++ b/asio/include/asio/detail/io_control.hpp
@@ -2,7 +2,7 @@
 // detail/io_control.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/is_buffer_sequence.hpp b/asio/include/asio/detail/is_buffer_sequence.hpp
index e7a0cae..95f29c5 100644
--- a/asio/include/asio/detail/is_buffer_sequence.hpp
+++ b/asio/include/asio/detail/is_buffer_sequence.hpp
@@ -2,7 +2,7 @@
 // detail/is_buffer_sequence.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -21,6 +21,10 @@
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
+
+class mutable_buffer;
+class const_buffer;
+
 namespace detail {
 
 struct buffer_sequence_memfns_base
@@ -129,14 +133,26 @@
       &buffer_sequence_memfns_derived<T>::consume>*);
 
 template <typename, typename>
-char (&value_type_const_iterator_typedefs_helper(...))[2];
+char (&buffer_element_type_helper(...))[2];
+
+#if defined(ASIO_HAS_DECL_TYPE)
 
 template <typename T, typename Buffer>
-char value_type_const_iterator_typedefs_helper(
+char buffer_element_type_helper(T* t,
+    typename enable_if<is_convertible<
+      decltype(*buffer_sequence_begin(*t)),
+        Buffer>::value>::type*);
+
+#else // defined(ASIO_HAS_DECL_TYPE)
+
+template <typename T, typename Buffer>
+char buffer_element_type_helper(
     typename T::const_iterator*,
     typename enable_if<is_convertible<
       typename T::value_type, Buffer>::value>::type*);
 
+#endif // defined(ASIO_HAS_DECL_TYPE)
+
 template <typename>
 char (&const_buffers_type_typedef_helper(...))[2];
 
@@ -156,7 +172,7 @@
   : integral_constant<bool,
       sizeof(begin_memfn_helper<T>(0)) != 1 &&
       sizeof(end_memfn_helper<T>(0)) != 1 &&
-      sizeof(value_type_const_iterator_typedefs_helper<T, Buffer>(0, 0)) == 1>
+      sizeof(buffer_element_type_helper<T, Buffer>(0, 0)) == 1>
 {
 };
 
@@ -168,8 +184,32 @@
 {
 };
 
+template <>
+struct is_buffer_sequence<mutable_buffer, mutable_buffer>
+  : true_type
+{
+};
+
+template <>
+struct is_buffer_sequence<mutable_buffer, const_buffer>
+  : true_type
+{
+};
+
+template <>
+struct is_buffer_sequence<const_buffer, const_buffer>
+  : true_type
+{
+};
+
+template <>
+struct is_buffer_sequence<const_buffer, mutable_buffer>
+  : false_type
+{
+};
+
 template <typename T>
-struct is_dynamic_buffer_sequence_class
+struct is_dynamic_buffer_class
   : integral_constant<bool,
       sizeof(size_memfn_helper<T>(0)) != 1 &&
       sizeof(max_size_memfn_helper<T>(0)) != 1 &&
@@ -184,9 +224,9 @@
 };
 
 template <typename T>
-struct is_dynamic_buffer_sequence
+struct is_dynamic_buffer
   : conditional<is_class<T>::value,
-      is_dynamic_buffer_sequence_class<T>,
+      is_dynamic_buffer_class<T>,
       false_type>::type
 {
 };
diff --git a/asio/include/asio/detail/is_executor.hpp b/asio/include/asio/detail/is_executor.hpp
new file mode 100644
index 0000000..ec0ee00
--- /dev/null
+++ b/asio/include/asio/detail/is_executor.hpp
@@ -0,0 +1,126 @@
+//
+// detail/is_executor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ASIO_DETAIL_IS_EXECUTOR_HPP
+#define ASIO_DETAIL_IS_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+struct executor_memfns_base
+{
+  void context();
+  void on_work_started();
+  void on_work_finished();
+  void dispatch();
+  void post();
+  void defer();
+};
+
+template <typename T>
+struct executor_memfns_derived
+  : T, executor_memfns_base
+{
+};
+
+template <typename T, T>
+struct executor_memfns_check
+{
+};
+
+template <typename>
+char (&context_memfn_helper(...))[2];
+
+template <typename T>
+char context_memfn_helper(
+    executor_memfns_check<
+      void (executor_memfns_base::*)(),
+      &executor_memfns_derived<T>::context>*);
+
+template <typename>
+char (&on_work_started_memfn_helper(...))[2];
+
+template <typename T>
+char on_work_started_memfn_helper(
+    executor_memfns_check<
+      void (executor_memfns_base::*)(),
+      &executor_memfns_derived<T>::on_work_started>*);
+
+template <typename>
+char (&on_work_finished_memfn_helper(...))[2];
+
+template <typename T>
+char on_work_finished_memfn_helper(
+    executor_memfns_check<
+      void (executor_memfns_base::*)(),
+      &executor_memfns_derived<T>::on_work_finished>*);
+
+template <typename>
+char (&dispatch_memfn_helper(...))[2];
+
+template <typename T>
+char dispatch_memfn_helper(
+    executor_memfns_check<
+      void (executor_memfns_base::*)(),
+      &executor_memfns_derived<T>::dispatch>*);
+
+template <typename>
+char (&post_memfn_helper(...))[2];
+
+template <typename T>
+char post_memfn_helper(
+    executor_memfns_check<
+      void (executor_memfns_base::*)(),
+      &executor_memfns_derived<T>::post>*);
+
+template <typename>
+char (&defer_memfn_helper(...))[2];
+
+template <typename T>
+char defer_memfn_helper(
+    executor_memfns_check<
+      void (executor_memfns_base::*)(),
+      &executor_memfns_derived<T>::defer>*);
+
+template <typename T>
+struct is_executor_class
+  : integral_constant<bool,
+      sizeof(context_memfn_helper<T>(0)) != 1 &&
+      sizeof(on_work_started_memfn_helper<T>(0)) != 1 &&
+      sizeof(on_work_finished_memfn_helper<T>(0)) != 1 &&
+      sizeof(dispatch_memfn_helper<T>(0)) != 1 &&
+      sizeof(post_memfn_helper<T>(0)) != 1 &&
+      sizeof(defer_memfn_helper<T>(0)) != 1>
+{
+};
+
+template <typename T>
+struct is_executor
+  : conditional<is_class<T>::value,
+      is_executor_class<T>,
+      false_type>::type
+{
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_IS_EXECUTOR_HPP
diff --git a/asio/include/asio/detail/keyword_tss_ptr.hpp b/asio/include/asio/detail/keyword_tss_ptr.hpp
index c4840bf..c1f9b93 100644
--- a/asio/include/asio/detail/keyword_tss_ptr.hpp
+++ b/asio/include/asio/detail/keyword_tss_ptr.hpp
@@ -2,7 +2,7 @@
 // detail/keyword_tss_ptr.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/kqueue_reactor.hpp b/asio/include/asio/detail/kqueue_reactor.hpp
index 8eed677..8d1c667 100644
--- a/asio/include/asio/detail/kqueue_reactor.hpp
+++ b/asio/include/asio/detail/kqueue_reactor.hpp
@@ -2,7 +2,7 @@
 // detail/kqueue_reactor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -52,6 +52,10 @@
 class kqueue_reactor
   : public execution_context_service_base<kqueue_reactor>
 {
+private:
+  // The mutex type used by this reactor.
+  typedef conditionally_enabled_mutex mutex;
+
 public:
   enum op_types { read_op = 0, write_op = 1,
     connect_op = 1, except_op = 2, max_ops = 3 };
@@ -59,6 +63,8 @@
   // Per-descriptor queues.
   struct descriptor_state
   {
+    descriptor_state(bool locking) : mutex_(locking) {}
+
     friend class kqueue_reactor;
     friend class object_pool_access;
 
@@ -163,7 +169,7 @@
       typename timer_queue<Time_Traits>::per_timer_data& source);
 
   // Run the kqueue loop.
-  ASIO_DECL void run(bool block, op_queue<operation>& ops);
+  ASIO_DECL void run(long usec, op_queue<operation>& ops);
 
   // Interrupt the kqueue loop.
   ASIO_DECL void interrupt();
@@ -186,7 +192,7 @@
   ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
 
   // Get the timeout value for the kevent call.
-  ASIO_DECL timespec* get_timeout(timespec& ts);
+  ASIO_DECL timespec* get_timeout(long usec, timespec& ts);
 
   // The scheduler used to post completions.
   scheduler& scheduler_;
diff --git a/asio/include/asio/detail/local_free_on_block_exit.hpp b/asio/include/asio/detail/local_free_on_block_exit.hpp
index 05d9f9e..a0ea47c 100644
--- a/asio/include/asio/detail/local_free_on_block_exit.hpp
+++ b/asio/include/asio/detail/local_free_on_block_exit.hpp
@@ -2,7 +2,7 @@
 // detail/local_free_on_block_exit.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/macos_fenced_block.hpp b/asio/include/asio/detail/macos_fenced_block.hpp
index 4b64772..e44b900 100644
--- a/asio/include/asio/detail/macos_fenced_block.hpp
+++ b/asio/include/asio/detail/macos_fenced_block.hpp
@@ -2,7 +2,7 @@
 // detail/macos_fenced_block.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/memory.hpp b/asio/include/asio/detail/memory.hpp
index cd0b4ed..51f4532 100644
--- a/asio/include/asio/detail/memory.hpp
+++ b/asio/include/asio/detail/memory.hpp
@@ -2,7 +2,7 @@
 // detail/memory.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/mutex.hpp b/asio/include/asio/detail/mutex.hpp
index 35885ad..9821e81 100644
--- a/asio/include/asio/detail/mutex.hpp
+++ b/asio/include/asio/detail/mutex.hpp
@@ -2,7 +2,7 @@
 // detail/mutex.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/noncopyable.hpp b/asio/include/asio/detail/noncopyable.hpp
index db5ac4c..31f646a 100644
--- a/asio/include/asio/detail/noncopyable.hpp
+++ b/asio/include/asio/detail/noncopyable.hpp
@@ -2,7 +2,7 @@
 // detail/noncopyable.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/null_event.hpp b/asio/include/asio/detail/null_event.hpp
index 394bb16..465a701 100644
--- a/asio/include/asio/detail/null_event.hpp
+++ b/asio/include/asio/detail/null_event.hpp
@@ -2,7 +2,7 @@
 // detail/null_event.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,9 +16,6 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
-
-#if !defined(ASIO_HAS_THREADS)
-
 #include "asio/detail/noncopyable.hpp"
 
 #include "asio/detail/push_options.hpp"
@@ -75,7 +72,20 @@
   template <typename Lock>
   void wait(Lock&)
   {
+    do_wait();
   }
+
+  // Timed wait for the event to become signalled.
+  template <typename Lock>
+  bool wait_for_usec(Lock&, long usec)
+  {
+    do_wait_for_usec(usec);
+    return true;
+  }
+
+private:
+  ASIO_DECL static void do_wait();
+  ASIO_DECL static void do_wait_for_usec(long usec);
 };
 
 } // namespace detail
@@ -83,6 +93,8 @@
 
 #include "asio/detail/pop_options.hpp"
 
-#endif // !defined(ASIO_HAS_THREADS)
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/detail/impl/null_event.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
 
 #endif // ASIO_DETAIL_NULL_EVENT_HPP
diff --git a/asio/include/asio/detail/null_fenced_block.hpp b/asio/include/asio/detail/null_fenced_block.hpp
index 241ceb2..2ec3554 100644
--- a/asio/include/asio/detail/null_fenced_block.hpp
+++ b/asio/include/asio/detail/null_fenced_block.hpp
@@ -2,7 +2,7 @@
 // detail/null_fenced_block.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/null_global.hpp b/asio/include/asio/detail/null_global.hpp
index b8f73ac..7d3c0df 100644
--- a/asio/include/asio/detail/null_global.hpp
+++ b/asio/include/asio/detail/null_global.hpp
@@ -2,7 +2,7 @@
 // detail/null_global.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/null_mutex.hpp b/asio/include/asio/detail/null_mutex.hpp
index 4ee92e4..582ab1d 100644
--- a/asio/include/asio/detail/null_mutex.hpp
+++ b/asio/include/asio/detail/null_mutex.hpp
@@ -2,7 +2,7 @@
 // detail/null_mutex.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/null_reactor.hpp b/asio/include/asio/detail/null_reactor.hpp
index a303a0e..3b6f1d4 100644
--- a/asio/include/asio/detail/null_reactor.hpp
+++ b/asio/include/asio/detail/null_reactor.hpp
@@ -2,7 +2,7 @@
 // detail/null_reactor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -48,7 +48,7 @@
   }
 
   // No-op because should never be called.
-  void run(bool /*block*/, op_queue<scheduler_operation>& /*ops*/)
+  void run(long /*usec*/, op_queue<scheduler_operation>& /*ops*/)
   {
   }
 
diff --git a/asio/include/asio/detail/null_signal_blocker.hpp b/asio/include/asio/detail/null_signal_blocker.hpp
index 43ed011..9992bd6 100644
--- a/asio/include/asio/detail/null_signal_blocker.hpp
+++ b/asio/include/asio/detail/null_signal_blocker.hpp
@@ -2,7 +2,7 @@
 // detail/null_signal_blocker.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/null_socket_service.hpp b/asio/include/asio/detail/null_socket_service.hpp
index 0a5d945..59df013 100644
--- a/asio/include/asio/detail/null_socket_service.hpp
+++ b/asio/include/asio/detail/null_socket_service.hpp
@@ -2,7 +2,7 @@
 // detail/null_socket_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -31,7 +31,8 @@
 namespace detail {
 
 template <typename Protocol>
-class null_socket_service
+class null_socket_service :
+  public service_base<null_socket_service<Protocol> >
 {
 public:
   // The protocol type.
@@ -50,7 +51,8 @@
 
   // Constructor.
   null_socket_service(asio::io_context& io_context)
-    : io_context_(io_context)
+    : service_base<null_socket_service<Protocol> >(io_context),
+      io_context_(io_context)
   {
   }
 
diff --git a/asio/include/asio/detail/null_static_mutex.hpp b/asio/include/asio/detail/null_static_mutex.hpp
index af4dfec..ee30120 100644
--- a/asio/include/asio/detail/null_static_mutex.hpp
+++ b/asio/include/asio/detail/null_static_mutex.hpp
@@ -2,7 +2,7 @@
 // detail/null_static_mutex.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/null_thread.hpp b/asio/include/asio/detail/null_thread.hpp
index afcb403..eb1753f 100644
--- a/asio/include/asio/detail/null_thread.hpp
+++ b/asio/include/asio/detail/null_thread.hpp
@@ -2,7 +2,7 @@
 // detail/null_thread.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/null_tss_ptr.hpp b/asio/include/asio/detail/null_tss_ptr.hpp
index 2ba1c9f..5277ee5 100644
--- a/asio/include/asio/detail/null_tss_ptr.hpp
+++ b/asio/include/asio/detail/null_tss_ptr.hpp
@@ -2,7 +2,7 @@
 // detail/null_tss_ptr.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/object_pool.hpp b/asio/include/asio/detail/object_pool.hpp
index 53e22f6..82a6dd7 100644
--- a/asio/include/asio/detail/object_pool.hpp
+++ b/asio/include/asio/detail/object_pool.hpp
@@ -2,7 +2,7 @@
 // detail/object_pool.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -34,6 +34,12 @@
     return new Object;
   }
 
+  template <typename Object, typename Arg>
+  static Object* create(Arg arg)
+  {
+    return new Object(arg);
+  }
+
   template <typename Object>
   static void destroy(Object* o)
   {
@@ -96,6 +102,25 @@
     return o;
   }
 
+  // Allocate a new object with an argument.
+  template <typename Arg>
+  Object* alloc(Arg arg)
+  {
+    Object* o = free_list_;
+    if (o)
+      free_list_ = object_pool_access::next(free_list_);
+    else
+      o = object_pool_access::create<Object>(arg);
+
+    object_pool_access::next(o) = live_list_;
+    object_pool_access::prev(o) = 0;
+    if (live_list_)
+      object_pool_access::prev(live_list_) = o;
+    live_list_ = o;
+
+    return o;
+  }
+
   // Free an object. Moves it to the free list. No destructors are run.
   void free(Object* o)
   {
diff --git a/asio/include/asio/detail/old_win_sdk_compat.hpp b/asio/include/asio/detail/old_win_sdk_compat.hpp
index f168182..9b34816 100644
--- a/asio/include/asio/detail/old_win_sdk_compat.hpp
+++ b/asio/include/asio/detail/old_win_sdk_compat.hpp
@@ -2,7 +2,7 @@
 // detail/old_win_sdk_compat.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/op_queue.hpp b/asio/include/asio/detail/op_queue.hpp
index 38076be..1ab4046 100644
--- a/asio/include/asio/detail/op_queue.hpp
+++ b/asio/include/asio/detail/op_queue.hpp
@@ -2,7 +2,7 @@
 // detail/op_queue.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/operation.hpp b/asio/include/asio/detail/operation.hpp
index 23960d6..72144d6 100644
--- a/asio/include/asio/detail/operation.hpp
+++ b/asio/include/asio/detail/operation.hpp
@@ -2,7 +2,7 @@
 // detail/operation.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/pipe_select_interrupter.hpp b/asio/include/asio/detail/pipe_select_interrupter.hpp
index 57e211e..b339def 100644
--- a/asio/include/asio/detail/pipe_select_interrupter.hpp
+++ b/asio/include/asio/detail/pipe_select_interrupter.hpp
@@ -2,7 +2,7 @@
 // detail/pipe_select_interrupter.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/pop_options.hpp b/asio/include/asio/detail/pop_options.hpp
index a41c1a0..880121f 100644
--- a/asio/include/asio/detail/pop_options.hpp
+++ b/asio/include/asio/detail/pop_options.hpp
@@ -2,7 +2,7 @@
 // detail/pop_options.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/posix_event.hpp b/asio/include/asio/detail/posix_event.hpp
index 984b70f..57ddc11 100644
--- a/asio/include/asio/detail/posix_event.hpp
+++ b/asio/include/asio/detail/posix_event.hpp
@@ -2,7 +2,7 @@
 // detail/posix_event.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -107,6 +107,36 @@
     }
   }
 
+  // Timed wait for the event to become signalled.
+  template <typename Lock>
+  bool wait_for_usec(Lock& lock, long usec)
+  {
+    ASIO_ASSERT(lock.locked());
+    if ((state_ & 1) == 0)
+    {
+      state_ += 2;
+      timespec ts;
+#if (defined(__MACH__) && defined(__APPLE__))
+      ts.tv_sec = usec / 1000000;
+      ts.tv_nsec = (usec % 1000000) * 1000;
+      ::pthread_cond_timedwait_relative_np(
+          &cond_, &lock.mutex().mutex_, &ts); // Ignore EINVAL.
+#else // (defined(__MACH__) && defined(__APPLE__))
+      if (::clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
+      {
+        ts.tv_sec += usec / 1000000;
+        ts.tv_nsec = (usec % 1000000) * 1000;
+        ts.tv_sec += ts.tv_nsec / 1000000000;
+        ts.tv_nsec = ts.tv_nsec % 1000000000;
+        ::pthread_cond_timedwait(&cond_,
+            &lock.mutex().mutex_, &ts); // Ignore EINVAL.
+      }
+#endif // (defined(__MACH__) && defined(__APPLE__))
+      state_ -= 2;
+    }
+    return (state_ & 1) != 0;
+  }
+
 private:
   ::pthread_cond_t cond_;
   std::size_t state_;
diff --git a/asio/include/asio/detail/posix_fd_set_adapter.hpp b/asio/include/asio/detail/posix_fd_set_adapter.hpp
index 2ea97b6..5ab9c8e 100644
--- a/asio/include/asio/detail/posix_fd_set_adapter.hpp
+++ b/asio/include/asio/detail/posix_fd_set_adapter.hpp
@@ -2,7 +2,7 @@
 // detail/posix_fd_set_adapter.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/posix_global.hpp b/asio/include/asio/detail/posix_global.hpp
index 12f2d64..bb9373b 100644
--- a/asio/include/asio/detail/posix_global.hpp
+++ b/asio/include/asio/detail/posix_global.hpp
@@ -2,7 +2,7 @@
 // detail/posix_global.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/posix_mutex.hpp b/asio/include/asio/detail/posix_mutex.hpp
index 783bc56..08b220b 100644
--- a/asio/include/asio/detail/posix_mutex.hpp
+++ b/asio/include/asio/detail/posix_mutex.hpp
@@ -2,7 +2,7 @@
 // detail/posix_mutex.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/posix_signal_blocker.hpp b/asio/include/asio/detail/posix_signal_blocker.hpp
index d344c32..dc476fd 100644
--- a/asio/include/asio/detail/posix_signal_blocker.hpp
+++ b/asio/include/asio/detail/posix_signal_blocker.hpp
@@ -2,7 +2,7 @@
 // detail/posix_signal_blocker.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/posix_static_mutex.hpp b/asio/include/asio/detail/posix_static_mutex.hpp
index 72bd2f4..e65d09a 100644
--- a/asio/include/asio/detail/posix_static_mutex.hpp
+++ b/asio/include/asio/detail/posix_static_mutex.hpp
@@ -2,7 +2,7 @@
 // detail/posix_static_mutex.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/posix_thread.hpp b/asio/include/asio/detail/posix_thread.hpp
index 741cb63..a07d5b3 100644
--- a/asio/include/asio/detail/posix_thread.hpp
+++ b/asio/include/asio/detail/posix_thread.hpp
@@ -2,7 +2,7 @@
 // detail/posix_thread.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/posix_tss_ptr.hpp b/asio/include/asio/detail/posix_tss_ptr.hpp
index fd7e9de..a677d15 100644
--- a/asio/include/asio/detail/posix_tss_ptr.hpp
+++ b/asio/include/asio/detail/posix_tss_ptr.hpp
@@ -2,7 +2,7 @@
 // detail/posix_tss_ptr.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/push_options.hpp b/asio/include/asio/detail/push_options.hpp
index 9c57044..384bab1 100644
--- a/asio/include/asio/detail/push_options.hpp
+++ b/asio/include/asio/detail/push_options.hpp
@@ -2,7 +2,7 @@
 // detail/push_options.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/reactive_descriptor_service.hpp b/asio/include/asio/detail/reactive_descriptor_service.hpp
index 5f37e16..42bc3df 100644
--- a/asio/include/asio/detail/reactive_descriptor_service.hpp
+++ b/asio/include/asio/detail/reactive_descriptor_service.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_descriptor_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -41,7 +41,8 @@
 namespace asio {
 namespace detail {
 
-class reactive_descriptor_service
+class reactive_descriptor_service :
+  public service_base<reactive_descriptor_service>
 {
 public:
   // The native type of a descriptor.
diff --git a/asio/include/asio/detail/reactive_null_buffers_op.hpp b/asio/include/asio/detail/reactive_null_buffers_op.hpp
index b2c3c4d..504e4f6 100644
--- a/asio/include/asio/detail/reactive_null_buffers_op.hpp
+++ b/asio/include/asio/detail/reactive_null_buffers_op.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_null_buffers_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -41,9 +41,9 @@
     handler_work<Handler>::start(handler_);
   }
 
-  static bool do_perform(reactor_op*)
+  static status do_perform(reactor_op*)
   {
-    return true;
+    return done;
   }
 
   static void do_complete(void* owner, operation* base,
diff --git a/asio/include/asio/detail/reactive_serial_port_service.hpp b/asio/include/asio/detail/reactive_serial_port_service.hpp
index e30a1fc..986e87b 100644
--- a/asio/include/asio/detail/reactive_serial_port_service.hpp
+++ b/asio/include/asio/detail/reactive_serial_port_service.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_serial_port_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -34,7 +34,8 @@
 namespace detail {
 
 // Extend reactive_descriptor_service to provide serial port support.
-class reactive_serial_port_service
+class reactive_serial_port_service :
+  public service_base<reactive_serial_port_service>
 {
 public:
   // The native type of a serial port.
@@ -189,8 +190,8 @@
   static asio::error_code store_option(const void* option,
       termios& storage, asio::error_code& ec)
   {
-    return static_cast<const SettableSerialPortOption*>(option)->store(
-        storage, ec);
+    static_cast<const SettableSerialPortOption*>(option)->store(storage, ec);
+    return ec;
   }
 
   // Helper function to set a serial port option.
@@ -207,7 +208,8 @@
   static asio::error_code load_option(void* option,
       const termios& storage, asio::error_code& ec)
   {
-    return static_cast<GettableSerialPortOption*>(option)->load(storage, ec);
+    static_cast<GettableSerialPortOption*>(option)->load(storage, ec);
+    return ec;
   }
 
   // Helper function to get a serial port option.
diff --git a/asio/include/asio/detail/reactive_socket_accept_op.hpp b/asio/include/asio/detail/reactive_socket_accept_op.hpp
index fa4e8db..11b81d5 100644
--- a/asio/include/asio/detail/reactive_socket_accept_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_accept_op.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_socket_accept_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -41,42 +41,48 @@
       state_(state),
       peer_(peer),
       protocol_(protocol),
-      peer_endpoint_(peer_endpoint)
+      peer_endpoint_(peer_endpoint),
+      addrlen_(peer_endpoint ? peer_endpoint->capacity() : 0)
   {
   }
 
-  static bool do_perform(reactor_op* base)
+  static status do_perform(reactor_op* base)
   {
     reactive_socket_accept_op_base* o(
         static_cast<reactive_socket_accept_op_base*>(base));
 
-    std::size_t addrlen = o->peer_endpoint_ ? o->peer_endpoint_->capacity() : 0;
     socket_type new_socket = invalid_socket;
-    bool result = socket_ops::non_blocking_accept(o->socket_,
-          o->state_, o->peer_endpoint_ ? o->peer_endpoint_->data() : 0,
-          o->peer_endpoint_ ? &addrlen : 0, o->ec_, new_socket);
+    status result = socket_ops::non_blocking_accept(o->socket_,
+        o->state_, o->peer_endpoint_ ? o->peer_endpoint_->data() : 0,
+        o->peer_endpoint_ ? &o->addrlen_ : 0, o->ec_, new_socket)
+    ? done : not_done;
+    o->new_socket_.reset(new_socket);
 
     ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_accept", o->ec_));
 
-    // On success, assign new connection to peer socket object.
-    if (new_socket != invalid_socket)
-    {
-      socket_holder new_socket_holder(new_socket);
-      if (o->peer_endpoint_)
-        o->peer_endpoint_->resize(addrlen);
-      if (!o->peer_.assign(o->protocol_, new_socket, o->ec_))
-        new_socket_holder.release();
-    }
-
     return result;
   }
 
+  void do_assign()
+  {
+    if (new_socket_.get() != invalid_socket)
+    {
+      if (peer_endpoint_)
+        peer_endpoint_->resize(addrlen_);
+      peer_.assign(protocol_, new_socket_.get(), ec_);
+      if (!ec_)
+        new_socket_.release();
+    }
+  }
+
 private:
   socket_type socket_;
   socket_ops::state_type state_;
+  socket_holder new_socket_;
   Socket& peer_;
   Protocol protocol_;
   typename Protocol::endpoint* peer_endpoint_;
+  std::size_t addrlen_;
 };
 
 template <typename Socket, typename Protocol, typename Handler>
@@ -105,6 +111,10 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
+    // On success, assign new connection to peer socket object.
+    if (owner)
+      o->do_assign();
+
     ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
@@ -164,6 +174,10 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
+    // On success, assign new connection to peer socket object.
+    if (owner)
+      o->do_assign();
+
     ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
diff --git a/asio/include/asio/detail/reactive_socket_connect_op.hpp b/asio/include/asio/detail/reactive_socket_connect_op.hpp
index a3ef142..428db3f 100644
--- a/asio/include/asio/detail/reactive_socket_connect_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_connect_op.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_socket_connect_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -37,12 +37,13 @@
   {
   }
 
-  static bool do_perform(reactor_op* base)
+  static status do_perform(reactor_op* base)
   {
     reactive_socket_connect_op_base* o(
         static_cast<reactive_socket_connect_op_base*>(base));
 
-    bool result = socket_ops::non_blocking_connect(o->socket_, o->ec_);
+    status result = socket_ops::non_blocking_connect(
+        o->socket_, o->ec_) ? done : not_done;
 
     ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_connect", o->ec_));
 
diff --git a/asio/include/asio/detail/reactive_socket_recv_op.hpp b/asio/include/asio/detail/reactive_socket_recv_op.hpp
index 4d737cb..71f0aec 100644
--- a/asio/include/asio/detail/reactive_socket_recv_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_recv_op.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_socket_recv_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -43,7 +43,7 @@
   {
   }
 
-  static bool do_perform(reactor_op* base)
+  static status do_perform(reactor_op* base)
   {
     reactive_socket_recv_op_base* o(
         static_cast<reactive_socket_recv_op_base*>(base));
@@ -51,10 +51,15 @@
     buffer_sequence_adapter<asio::mutable_buffer,
         MutableBufferSequence> bufs(o->buffers_);
 
-    bool result = socket_ops::non_blocking_recv(o->socket_,
+    status result = socket_ops::non_blocking_recv(o->socket_,
         bufs.buffers(), bufs.count(), o->flags_,
         (o->state_ & socket_ops::stream_oriented) != 0,
-        o->ec_, o->bytes_transferred_);
+        o->ec_, o->bytes_transferred_) ? done : not_done;
+
+    if (result == done)
+      if ((o->state_ & socket_ops::stream_oriented) != 0)
+        if (o->bytes_transferred_ < bufs.total_size())
+          result = done_and_exhausted;
 
     ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_recv",
           o->ec_, o->bytes_transferred_));
diff --git a/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp b/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp
index 3f69b38..309a032 100644
--- a/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_socket_recvfrom_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -44,7 +44,7 @@
   {
   }
 
-  static bool do_perform(reactor_op* base)
+  static status do_perform(reactor_op* base)
   {
     reactive_socket_recvfrom_op_base* o(
         static_cast<reactive_socket_recvfrom_op_base*>(base));
@@ -53,10 +53,10 @@
         MutableBufferSequence> bufs(o->buffers_);
 
     std::size_t addr_len = o->sender_endpoint_.capacity();
-    bool result = socket_ops::non_blocking_recvfrom(o->socket_,
+    status result = socket_ops::non_blocking_recvfrom(o->socket_,
         bufs.buffers(), bufs.count(), o->flags_,
         o->sender_endpoint_.data(), &addr_len,
-        o->ec_, o->bytes_transferred_);
+        o->ec_, o->bytes_transferred_) ? done : not_done;
 
     if (result && !o->ec_)
       o->sender_endpoint_.resize(addr_len);
diff --git a/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp b/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp
index 8cc37ff..e0c801f 100644
--- a/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_socket_recvmsg_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -44,7 +44,7 @@
   {
   }
 
-  static bool do_perform(reactor_op* base)
+  static status do_perform(reactor_op* base)
   {
     reactive_socket_recvmsg_op_base* o(
         static_cast<reactive_socket_recvmsg_op_base*>(base));
@@ -52,10 +52,10 @@
     buffer_sequence_adapter<asio::mutable_buffer,
         MutableBufferSequence> bufs(o->buffers_);
 
-    bool result = socket_ops::non_blocking_recvmsg(o->socket_,
+    status result = socket_ops::non_blocking_recvmsg(o->socket_,
         bufs.buffers(), bufs.count(),
         o->in_flags_, o->out_flags_,
-        o->ec_, o->bytes_transferred_);
+        o->ec_, o->bytes_transferred_) ? done : not_done;
 
     ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_recvmsg",
           o->ec_, o->bytes_transferred_));
diff --git a/asio/include/asio/detail/reactive_socket_send_op.hpp b/asio/include/asio/detail/reactive_socket_send_op.hpp
index 338446d..708e8ea 100644
--- a/asio/include/asio/detail/reactive_socket_send_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_send_op.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_socket_send_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -33,16 +33,17 @@
 {
 public:
   reactive_socket_send_op_base(socket_type socket,
-      const ConstBufferSequence& buffers,
+      socket_ops::state_type state, const ConstBufferSequence& buffers,
       socket_base::message_flags flags, func_type complete_func)
     : reactor_op(&reactive_socket_send_op_base::do_perform, complete_func),
       socket_(socket),
+      state_(state),
       buffers_(buffers),
       flags_(flags)
   {
   }
 
-  static bool do_perform(reactor_op* base)
+  static status do_perform(reactor_op* base)
   {
     reactive_socket_send_op_base* o(
         static_cast<reactive_socket_send_op_base*>(base));
@@ -50,9 +51,14 @@
     buffer_sequence_adapter<asio::const_buffer,
         ConstBufferSequence> bufs(o->buffers_);
 
-    bool result = socket_ops::non_blocking_send(o->socket_,
+    status result = socket_ops::non_blocking_send(o->socket_,
           bufs.buffers(), bufs.count(), o->flags_,
-          o->ec_, o->bytes_transferred_);
+          o->ec_, o->bytes_transferred_) ? done : not_done;
+
+    if (result == done)
+      if ((o->state_ & socket_ops::stream_oriented) != 0)
+        if (o->bytes_transferred_ < bufs.total_size())
+          result = done_and_exhausted;
 
     ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_send",
           o->ec_, o->bytes_transferred_));
@@ -62,6 +68,7 @@
 
 private:
   socket_type socket_;
+  socket_ops::state_type state_;
   ConstBufferSequence buffers_;
   socket_base::message_flags flags_;
 };
@@ -74,10 +81,10 @@
   ASIO_DEFINE_HANDLER_PTR(reactive_socket_send_op);
 
   reactive_socket_send_op(socket_type socket,
-      const ConstBufferSequence& buffers,
+      socket_ops::state_type state, const ConstBufferSequence& buffers,
       socket_base::message_flags flags, Handler& handler)
     : reactive_socket_send_op_base<ConstBufferSequence>(socket,
-        buffers, flags, &reactive_socket_send_op::do_complete),
+        state, buffers, flags, &reactive_socket_send_op::do_complete),
       handler_(ASIO_MOVE_CAST(Handler)(handler))
   {
     handler_work<Handler>::start(handler_);
diff --git a/asio/include/asio/detail/reactive_socket_sendto_op.hpp b/asio/include/asio/detail/reactive_socket_sendto_op.hpp
index 48d4455..cab8f88 100644
--- a/asio/include/asio/detail/reactive_socket_sendto_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_sendto_op.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_socket_sendto_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -43,7 +43,7 @@
   {
   }
 
-  static bool do_perform(reactor_op* base)
+  static status do_perform(reactor_op* base)
   {
     reactive_socket_sendto_op_base* o(
         static_cast<reactive_socket_sendto_op_base*>(base));
@@ -51,10 +51,10 @@
     buffer_sequence_adapter<asio::const_buffer,
         ConstBufferSequence> bufs(o->buffers_);
 
-    bool result = socket_ops::non_blocking_sendto(o->socket_,
+    status result = socket_ops::non_blocking_sendto(o->socket_,
           bufs.buffers(), bufs.count(), o->flags_,
           o->destination_.data(), o->destination_.size(),
-          o->ec_, o->bytes_transferred_);
+          o->ec_, o->bytes_transferred_) ? done : not_done;
 
     ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_sendto",
           o->ec_, o->bytes_transferred_));
diff --git a/asio/include/asio/detail/reactive_socket_service.hpp b/asio/include/asio/detail/reactive_socket_service.hpp
index 7994952..4ba2556 100644
--- a/asio/include/asio/detail/reactive_socket_service.hpp
+++ b/asio/include/asio/detail/reactive_socket_service.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_socket_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -45,6 +45,7 @@
 
 template <typename Protocol>
 class reactive_socket_service :
+  public service_base<reactive_socket_service<Protocol> >,
   public reactive_socket_service_base
 {
 public:
@@ -73,10 +74,17 @@
 
   // Constructor.
   reactive_socket_service(asio::io_context& io_context)
-    : reactive_socket_service_base(io_context)
+    : service_base<reactive_socket_service<Protocol> >(io_context),
+      reactive_socket_service_base(io_context)
   {
   }
 
+  // Destroy all user-defined handler objects owned by the service.
+  void shutdown()
+  {
+    this->base_shutdown();
+  }
+
   // Move-construct a new socket implementation.
   void move_construct(implementation_type& impl,
       implementation_type& other_impl)
@@ -194,6 +202,14 @@
     return endpoint;
   }
 
+  // Disable sends or receives on the socket.
+  asio::error_code shutdown(base_implementation_type& impl,
+      socket_base::shutdown_type what, asio::error_code& ec)
+  {
+    socket_ops::shutdown(impl.socket_, what, ec);
+    return ec;
+  }
+
   // Send a datagram to the specified endpoint. Returns the number of bytes
   // sent.
   template <typename ConstBufferSequence>
@@ -215,7 +231,7 @@
       asio::error_code& ec)
   {
     // Wait for socket to become ready.
-    socket_ops::poll_write(impl.socket_, impl.state_, ec);
+    socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
 
     return 0;
   }
@@ -294,7 +310,7 @@
       asio::error_code& ec)
   {
     // Wait for socket to become ready.
-    socket_ops::poll_read(impl.socket_, impl.state_, ec);
+    socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
 
     // Reset endpoint since it can be given no sensible value at this time.
     sender_endpoint = endpoint_type();
@@ -382,7 +398,8 @@
     {
       if (peer_endpoint)
         peer_endpoint->resize(addr_len);
-      if (!peer.assign(impl.protocol_, new_socket.get(), ec))
+      peer.assign(impl.protocol_, new_socket.get(), ec);
+      if (!ec)
         new_socket.release();
     }
 
@@ -408,7 +425,8 @@
     {
       if (peer_endpoint)
         peer_endpoint->resize(addr_len);
-      if (!peer.assign(impl.protocol_, new_socket.get(), ec))
+      peer.assign(impl.protocol_, new_socket.get(), ec);
+      if (!ec)
         new_socket.release();
     }
 
diff --git a/asio/include/asio/detail/reactive_socket_service_base.hpp b/asio/include/asio/detail/reactive_socket_service_base.hpp
index a938d9d..f2de9db 100644
--- a/asio/include/asio/detail/reactive_socket_service_base.hpp
+++ b/asio/include/asio/detail/reactive_socket_service_base.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_socket_service_base.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -66,7 +66,7 @@
       asio::io_context& io_context);
 
   // Destroy all user-defined handler objects owned by the service.
-  ASIO_DECL void shutdown();
+  ASIO_DECL void base_shutdown();
 
   // Construct a new socket implementation.
   ASIO_DECL void construct(base_implementation_type& impl);
@@ -163,14 +163,6 @@
     return ec;
   }
 
-  // Disable sends or receives on the socket.
-  asio::error_code shutdown(base_implementation_type& impl,
-      socket_base::shutdown_type what, asio::error_code& ec)
-  {
-    socket_ops::shutdown(impl.socket_, what, ec);
-    return ec;
-  }
-
   // Wait for the socket to become ready to read, ready to write, or to have
   // pending error conditions.
   asio::error_code wait(base_implementation_type& impl,
@@ -179,13 +171,13 @@
     switch (w)
     {
     case socket_base::wait_read:
-      socket_ops::poll_read(impl.socket_, impl.state_, ec);
+      socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
       break;
     case socket_base::wait_write:
-      socket_ops::poll_write(impl.socket_, impl.state_, ec);
+      socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
       break;
     case socket_base::wait_error:
-      socket_ops::poll_error(impl.socket_, impl.state_, ec);
+      socket_ops::poll_error(impl.socket_, impl.state_, -1, ec);
       break;
     default:
       ec = asio::error::invalid_argument;
@@ -254,7 +246,7 @@
       socket_base::message_flags, asio::error_code& ec)
   {
     // Wait for socket to become ready.
-    socket_ops::poll_write(impl.socket_, impl.state_, ec);
+    socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
 
     return 0;
   }
@@ -273,7 +265,7 @@
     typedef reactive_socket_send_op<ConstBufferSequence, Handler> op;
     typename op::ptr p = { asio::detail::addressof(handler),
       op::ptr::allocate(handler), 0 };
-    p.p = new (p.v) op(impl.socket_, buffers, flags, handler);
+    p.p = new (p.v) op(impl.socket_, impl.state_, buffers, flags, handler);
 
     ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
           &impl, impl.socket_, "async_send"));
@@ -324,7 +316,7 @@
       socket_base::message_flags, asio::error_code& ec)
   {
     // Wait for socket to become ready.
-    socket_ops::poll_read(impl.socket_, impl.state_, ec);
+    socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
 
     return 0;
   }
@@ -404,7 +396,7 @@
       socket_base::message_flags& out_flags, asio::error_code& ec)
   {
     // Wait for socket to become ready.
-    socket_ops::poll_read(impl.socket_, impl.state_, ec);
+    socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
 
     // Clear out_flags, since we cannot give it any other sensible value when
     // performing a null_buffers operation.
diff --git a/asio/include/asio/detail/reactive_wait_op.hpp b/asio/include/asio/detail/reactive_wait_op.hpp
index 6593435..99f8811 100644
--- a/asio/include/asio/detail/reactive_wait_op.hpp
+++ b/asio/include/asio/detail/reactive_wait_op.hpp
@@ -2,7 +2,7 @@
 // detail/reactive_wait_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -41,9 +41,9 @@
     handler_work<Handler>::start(handler_);
   }
 
-  static bool do_perform(reactor_op*)
+  static status do_perform(reactor_op*)
   {
-    return true;
+    return done;
   }
 
   static void do_complete(void* owner, operation* base,
diff --git a/asio/include/asio/detail/reactor.hpp b/asio/include/asio/detail/reactor.hpp
index e701c36..1f684a2 100644
--- a/asio/include/asio/detail/reactor.hpp
+++ b/asio/include/asio/detail/reactor.hpp
@@ -2,7 +2,7 @@
 // detail/reactor.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/reactor_fwd.hpp b/asio/include/asio/detail/reactor_fwd.hpp
index 7f5e36a..1b25e69 100644
--- a/asio/include/asio/detail/reactor_fwd.hpp
+++ b/asio/include/asio/detail/reactor_fwd.hpp
@@ -2,7 +2,7 @@
 // detail/reactor_fwd.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/reactor_op.hpp b/asio/include/asio/detail/reactor_op.hpp
index b339ffd..491787b 100644
--- a/asio/include/asio/detail/reactor_op.hpp
+++ b/asio/include/asio/detail/reactor_op.hpp
@@ -2,7 +2,7 @@
 // detail/reactor_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -33,14 +33,18 @@
   // The number of bytes transferred, to be passed to the completion handler.
   std::size_t bytes_transferred_;
 
+  // Status returned by perform function. May be used to decide whether it is
+  // worth performing more operations on the descriptor immediately.
+  enum status { not_done, done, done_and_exhausted };
+
   // Perform the operation. Returns true if it is finished.
-  bool perform()
+  status perform()
   {
     return perform_func_(this);
   }
 
 protected:
-  typedef bool (*perform_func_type)(reactor_op*);
+  typedef status (*perform_func_type)(reactor_op*);
 
   reactor_op(perform_func_type perform_func, func_type complete_func)
     : operation(complete_func),
diff --git a/asio/include/asio/detail/reactor_op_queue.hpp b/asio/include/asio/detail/reactor_op_queue.hpp
index efeacf7..426adfb 100644
--- a/asio/include/asio/detail/reactor_op_queue.hpp
+++ b/asio/include/asio/detail/reactor_op_queue.hpp
@@ -2,7 +2,7 @@
 // detail/reactor_op_queue.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/recycling_allocator.hpp b/asio/include/asio/detail/recycling_allocator.hpp
index 1da9516..2abc0a2 100644
--- a/asio/include/asio/detail/recycling_allocator.hpp
+++ b/asio/include/asio/detail/recycling_allocator.hpp
@@ -2,7 +2,7 @@
 // detail/recycling_allocator.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/regex_fwd.hpp b/asio/include/asio/detail/regex_fwd.hpp
index af825c6..447c6b1 100644
--- a/asio/include/asio/detail/regex_fwd.hpp
+++ b/asio/include/asio/detail/regex_fwd.hpp
@@ -2,7 +2,7 @@
 // detail/regex_fwd.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/resolve_endpoint_op.hpp b/asio/include/asio/detail/resolve_endpoint_op.hpp
index cee29e0..234ac24 100644
--- a/asio/include/asio/detail/resolve_endpoint_op.hpp
+++ b/asio/include/asio/detail/resolve_endpoint_op.hpp
@@ -2,7 +2,7 @@
 // detail/resolve_endpoint_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -24,7 +24,7 @@
 #include "asio/detail/handler_alloc_helpers.hpp"
 #include "asio/detail/handler_invoke_helpers.hpp"
 #include "asio/detail/memory.hpp"
-#include "asio/detail/operation.hpp"
+#include "asio/detail/resolve_op.hpp"
 #include "asio/detail/socket_ops.hpp"
 
 #include "asio/detail/push_options.hpp"
@@ -33,7 +33,7 @@
 namespace detail {
 
 template <typename Protocol, typename Handler>
-class resolve_endpoint_op : public operation
+class resolve_endpoint_op : public resolve_op
 {
 public:
   ASIO_DEFINE_HANDLER_PTR(resolve_endpoint_op);
@@ -43,7 +43,7 @@
 
   resolve_endpoint_op(socket_ops::weak_cancel_token_type cancel_token,
       const endpoint_type& endpoint, io_context_impl& ioc, Handler& handler)
-    : operation(&resolve_endpoint_op::do_complete),
+    : resolve_op(&resolve_endpoint_op::do_complete),
       cancel_token_(cancel_token),
       endpoint_(endpoint),
       io_context_impl_(ioc),
@@ -111,7 +111,6 @@
   endpoint_type endpoint_;
   io_context_impl& io_context_impl_;
   Handler handler_;
-  asio::error_code ec_;
   results_type results_;
 };
 
diff --git a/asio/include/asio/detail/resolve_op.hpp b/asio/include/asio/detail/resolve_op.hpp
index 6751368..724edc5 100644
--- a/asio/include/asio/detail/resolve_op.hpp
+++ b/asio/include/asio/detail/resolve_op.hpp
@@ -2,7 +2,7 @@
 // detail/resolve_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,112 +17,24 @@
 
 #include "asio/detail/config.hpp"
 #include "asio/error.hpp"
-#include "asio/io_context.hpp"
-#include "asio/ip/basic_resolver_query.hpp"
-#include "asio/ip/basic_resolver_results.hpp"
-#include "asio/detail/bind_handler.hpp"
-#include "asio/detail/fenced_block.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
-#include "asio/detail/memory.hpp"
 #include "asio/detail/operation.hpp"
-#include "asio/detail/socket_ops.hpp"
 
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
 namespace detail {
 
-template <typename Protocol, typename Handler>
 class resolve_op : public operation
 {
 public:
-  ASIO_DEFINE_HANDLER_PTR(resolve_op);
-
-  typedef asio::ip::basic_resolver_query<Protocol> query_type;
-  typedef asio::ip::basic_resolver_results<Protocol> results_type;
-
-  resolve_op(socket_ops::weak_cancel_token_type cancel_token,
-      const query_type& query, io_context_impl& ioc, Handler& handler)
-    : operation(&resolve_op::do_complete),
-      cancel_token_(cancel_token),
-      query_(query),
-      io_context_impl_(ioc),
-      handler_(ASIO_MOVE_CAST(Handler)(handler)),
-      addrinfo_(0)
-  {
-    handler_work<Handler>::start(handler_);
-  }
-
-  ~resolve_op()
-  {
-    if (addrinfo_)
-      socket_ops::freeaddrinfo(addrinfo_);
-  }
-
-  static void do_complete(void* owner, operation* base,
-      const asio::error_code& /*ec*/,
-      std::size_t /*bytes_transferred*/)
-  {
-    // Take ownership of the operation object.
-    resolve_op* o(static_cast<resolve_op*>(base));
-    ptr p = { asio::detail::addressof(o->handler_), o, o };
-    handler_work<Handler> w(o->handler_);
-
-    if (owner && owner != &o->io_context_impl_)
-    {
-      // The operation is being run on the worker io_context. Time to perform
-      // the resolver operation.
-    
-      // Perform the blocking host resolution operation.
-      socket_ops::background_getaddrinfo(o->cancel_token_,
-          o->query_.host_name().c_str(), o->query_.service_name().c_str(),
-          o->query_.hints(), &o->addrinfo_, o->ec_);
-
-      // Pass operation back to main io_context for completion.
-      o->io_context_impl_.post_deferred_completion(o);
-      p.v = p.p = 0;
-    }
-    else
-    {
-      // The operation has been returned to the main io_context. The completion
-      // handler is ready to be delivered.
-
-      ASIO_HANDLER_COMPLETION((*o));
-
-      // Make a copy of the handler so that the memory can be deallocated
-      // before the upcall is made. Even if we're not about to make an upcall,
-      // a sub-object of the handler may be the true owner of the memory
-      // associated with the handler. Consequently, a local copy of the handler
-      // is required to ensure that any owning sub-object remains valid until
-      // after we have deallocated the memory here.
-      detail::binder2<Handler, asio::error_code, results_type>
-        handler(o->handler_, o->ec_, results_type());
-      p.h = asio::detail::addressof(handler.handler_);
-      if (o->addrinfo_)
-      {
-        handler.arg2_ = results_type::create(o->addrinfo_,
-            o->query_.host_name(), o->query_.service_name());
-      }
-      p.reset();
-
-      if (owner)
-      {
-        fenced_block b(fenced_block::half);
-        ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
-        w.complete(handler, handler.handler_);
-        ASIO_HANDLER_INVOCATION_END;
-      }
-    }
-  }
-
-private:
-  socket_ops::weak_cancel_token_type cancel_token_;
-  query_type query_;
-  io_context_impl& io_context_impl_;
-  Handler handler_;
+  // The error code to be passed to the completion handler.
   asio::error_code ec_;
-  asio::detail::addrinfo_type* addrinfo_;
+
+protected:
+  resolve_op(func_type complete_func)
+    : operation(complete_func)
+  {
+  }
 };
 
 } // namespace detail
diff --git a/asio/include/asio/detail/resolve_query_op.hpp b/asio/include/asio/detail/resolve_query_op.hpp
new file mode 100644
index 0000000..0ce450b
--- /dev/null
+++ b/asio/include/asio/detail/resolve_query_op.hpp
@@ -0,0 +1,132 @@
+//
+// detail/resolve_query_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ASIO_DETAIL_RESOLVE_QUERY_OP_HPP
+#define ASIO_DETAIL_RESOLVE_QUERY_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/error.hpp"
+#include "asio/io_context.hpp"
+#include "asio/ip/basic_resolver_query.hpp"
+#include "asio/ip/basic_resolver_results.hpp"
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/resolve_op.hpp"
+#include "asio/detail/socket_ops.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Protocol, typename Handler>
+class resolve_query_op : public resolve_op
+{
+public:
+  ASIO_DEFINE_HANDLER_PTR(resolve_query_op);
+
+  typedef asio::ip::basic_resolver_query<Protocol> query_type;
+  typedef asio::ip::basic_resolver_results<Protocol> results_type;
+
+  resolve_query_op(socket_ops::weak_cancel_token_type cancel_token,
+      const query_type& query, io_context_impl& ioc, Handler& handler)
+    : resolve_op(&resolve_query_op::do_complete),
+      cancel_token_(cancel_token),
+      query_(query),
+      io_context_impl_(ioc),
+      handler_(ASIO_MOVE_CAST(Handler)(handler)),
+      addrinfo_(0)
+  {
+    handler_work<Handler>::start(handler_);
+  }
+
+  ~resolve_query_op()
+  {
+    if (addrinfo_)
+      socket_ops::freeaddrinfo(addrinfo_);
+  }
+
+  static void do_complete(void* owner, operation* base,
+      const asio::error_code& /*ec*/,
+      std::size_t /*bytes_transferred*/)
+  {
+    // Take ownership of the operation object.
+    resolve_query_op* o(static_cast<resolve_query_op*>(base));
+    ptr p = { asio::detail::addressof(o->handler_), o, o };
+    handler_work<Handler> w(o->handler_);
+
+    if (owner && owner != &o->io_context_impl_)
+    {
+      // The operation is being run on the worker io_context. Time to perform
+      // the resolver operation.
+    
+      // Perform the blocking host resolution operation.
+      socket_ops::background_getaddrinfo(o->cancel_token_,
+          o->query_.host_name().c_str(), o->query_.service_name().c_str(),
+          o->query_.hints(), &o->addrinfo_, o->ec_);
+
+      // Pass operation back to main io_context for completion.
+      o->io_context_impl_.post_deferred_completion(o);
+      p.v = p.p = 0;
+    }
+    else
+    {
+      // The operation has been returned to the main io_context. The completion
+      // handler is ready to be delivered.
+
+      ASIO_HANDLER_COMPLETION((*o));
+
+      // Make a copy of the handler so that the memory can be deallocated
+      // before the upcall is made. Even if we're not about to make an upcall,
+      // a sub-object of the handler may be the true owner of the memory
+      // associated with the handler. Consequently, a local copy of the handler
+      // is required to ensure that any owning sub-object remains valid until
+      // after we have deallocated the memory here.
+      detail::binder2<Handler, asio::error_code, results_type>
+        handler(o->handler_, o->ec_, results_type());
+      p.h = asio::detail::addressof(handler.handler_);
+      if (o->addrinfo_)
+      {
+        handler.arg2_ = results_type::create(o->addrinfo_,
+            o->query_.host_name(), o->query_.service_name());
+      }
+      p.reset();
+
+      if (owner)
+      {
+        fenced_block b(fenced_block::half);
+        ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
+        w.complete(handler, handler.handler_);
+        ASIO_HANDLER_INVOCATION_END;
+      }
+    }
+  }
+
+private:
+  socket_ops::weak_cancel_token_type cancel_token_;
+  query_type query_;
+  io_context_impl& io_context_impl_;
+  Handler handler_;
+  asio::detail::addrinfo_type* addrinfo_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_RESOLVE_QUERY_OP_HPP
diff --git a/asio/include/asio/detail/resolver_service.hpp b/asio/include/asio/detail/resolver_service.hpp
index f1fc2b0..155e4f3 100644
--- a/asio/include/asio/detail/resolver_service.hpp
+++ b/asio/include/asio/detail/resolver_service.hpp
@@ -2,7 +2,7 @@
 // detail/resolver_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -21,9 +21,10 @@
 
 #include "asio/ip/basic_resolver_query.hpp"
 #include "asio/ip/basic_resolver_results.hpp"
+#include "asio/detail/concurrency_hint.hpp"
 #include "asio/detail/memory.hpp"
 #include "asio/detail/resolve_endpoint_op.hpp"
-#include "asio/detail/resolve_op.hpp"
+#include "asio/detail/resolve_query_op.hpp"
 #include "asio/detail/resolver_service_base.hpp"
 
 #include "asio/detail/push_options.hpp"
@@ -32,7 +33,9 @@
 namespace detail {
 
 template <typename Protocol>
-class resolver_service : public resolver_service_base
+class resolver_service :
+  public service_base<resolver_service<Protocol> >,
+  public resolver_service_base
 {
 public:
   // The implementation type of the resolver. A cancellation token is used to
@@ -50,10 +53,23 @@
 
   // Constructor.
   resolver_service(asio::io_context& io_context)
-    : resolver_service_base(io_context)
+    : service_base<resolver_service<Protocol> >(io_context),
+      resolver_service_base(io_context)
   {
   }
 
+  // Destroy all user-defined handler objects owned by the service.
+  void shutdown()
+  {
+    this->base_shutdown();
+  }
+
+  // Perform any fork-related housekeeping.
+  void notify_fork(asio::io_context::fork_event fork_ev)
+  {
+    this->base_notify_fork(fork_ev);
+  }
+
   // Resolve a query to a list of entries.
   results_type resolve(implementation_type&, const query_type& query,
       asio::error_code& ec)
@@ -74,7 +90,7 @@
       const query_type& query, Handler& handler)
   {
     // Allocate and construct an operation to wrap the handler.
-    typedef resolve_op<Protocol, Handler> op;
+    typedef resolve_query_op<Protocol, Handler> op;
     typename op::ptr p = { asio::detail::addressof(handler),
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl, query, io_context_impl_, handler);
diff --git a/asio/include/asio/detail/resolver_service_base.hpp b/asio/include/asio/detail/resolver_service_base.hpp
index fcd9bd1..e3dd4f7 100644
--- a/asio/include/asio/detail/resolver_service_base.hpp
+++ b/asio/include/asio/detail/resolver_service_base.hpp
@@ -2,7 +2,7 @@
 // detail/resolver_service_base.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,10 +17,11 @@
 
 #include "asio/detail/config.hpp"
 #include "asio/error.hpp"
+#include "asio/executor_work_guard.hpp"
 #include "asio/io_context.hpp"
 #include "asio/detail/mutex.hpp"
 #include "asio/detail/noncopyable.hpp"
-#include "asio/detail/operation.hpp"
+#include "asio/detail/resolve_op.hpp"
 #include "asio/detail/socket_ops.hpp"
 #include "asio/detail/socket_types.hpp"
 #include "asio/detail/scoped_ptr.hpp"
@@ -45,10 +46,10 @@
   ASIO_DECL ~resolver_service_base();
 
   // Destroy all user-defined handler objects owned by the service.
-  ASIO_DECL void shutdown();
+  ASIO_DECL void base_shutdown();
 
   // Perform any fork-related housekeeping.
-  ASIO_DECL void notify_fork(
+  ASIO_DECL void base_notify_fork(
       asio::io_context::fork_event fork_ev);
 
   // Construct a new resolver implementation.
@@ -57,12 +58,21 @@
   // Destroy a resolver implementation.
   ASIO_DECL void destroy(implementation_type&);
 
+  // Move-construct a new resolver implementation.
+  ASIO_DECL void move_construct(implementation_type& impl,
+      implementation_type& other_impl);
+
+  // Move-assign from another resolver implementation.
+  ASIO_DECL void move_assign(implementation_type& impl,
+      resolver_service_base& other_service,
+      implementation_type& other_impl);
+
   // Cancel pending asynchronous operations.
   ASIO_DECL void cancel(implementation_type& impl);
 
 protected:
   // Helper function to start an asynchronous resolve operation.
-  ASIO_DECL void start_resolve_op(operation* op);
+  ASIO_DECL void start_resolve_op(resolve_op* op);
 
 #if !defined(ASIO_WINDOWS_RUNTIME)
   // Helper class to perform exception-safe cleanup of addrinfo objects.
@@ -111,7 +121,8 @@
   io_context_impl& work_io_context_impl_;
 
   // Work for the private io_context to perform.
-  asio::detail::scoped_ptr<asio::io_context::work> work_;
+  asio::executor_work_guard<
+      asio::io_context::executor_type> work_;
 
   // Thread used for running the work io_context's run loop.
   asio::detail::scoped_ptr<asio::detail::thread> work_thread_;
diff --git a/asio/include/asio/detail/scheduler.hpp b/asio/include/asio/detail/scheduler.hpp
index fb86f53..3781472 100644
--- a/asio/include/asio/detail/scheduler.hpp
+++ b/asio/include/asio/detail/scheduler.hpp
@@ -2,7 +2,7 @@
 // detail/scheduler.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -20,8 +20,8 @@
 #include "asio/error_code.hpp"
 #include "asio/execution_context.hpp"
 #include "asio/detail/atomic_count.hpp"
-#include "asio/detail/event.hpp"
-#include "asio/detail/mutex.hpp"
+#include "asio/detail/conditionally_enabled_event.hpp"
+#include "asio/detail/conditionally_enabled_mutex.hpp"
 #include "asio/detail/op_queue.hpp"
 #include "asio/detail/reactor_fwd.hpp"
 #include "asio/detail/scheduler_operation.hpp"
@@ -58,6 +58,10 @@
   // Run until interrupted or one operation is performed.
   ASIO_DECL std::size_t run_one(asio::error_code& ec);
 
+  // Run until timeout, interrupted, or one operation is performed.
+  ASIO_DECL std::size_t wait_one(
+      long usec, asio::error_code& ec);
+
   // Poll for operations without blocking.
   ASIO_DECL std::size_t poll(asio::error_code& ec);
 
@@ -117,7 +121,19 @@
   // work_started() was previously called for the operations.
   ASIO_DECL void abandon_operations(op_queue<operation>& ops);
 
+  // Get the concurrency hint that was used to initialise the scheduler.
+  int concurrency_hint() const
+  {
+    return concurrency_hint_;
+  }
+
 private:
+  // The mutex type used by this scheduler.
+  typedef conditionally_enabled_mutex mutex;
+
+  // The event type used by this scheduler.
+  typedef conditionally_enabled_event event;
+
   // Structure containing thread-specific data.
   typedef scheduler_thread_info thread_info;
 
@@ -125,6 +141,10 @@
   ASIO_DECL std::size_t do_run_one(mutex::scoped_lock& lock,
       thread_info& this_thread, const asio::error_code& ec);
 
+  // Run at most one operation with a timeout. May block.
+  ASIO_DECL std::size_t do_wait_one(mutex::scoped_lock& lock,
+      thread_info& this_thread, long usec, const asio::error_code& ec);
+
   // Poll for at most one operation.
   ASIO_DECL std::size_t do_poll_one(mutex::scoped_lock& lock,
       thread_info& this_thread, const asio::error_code& ec);
@@ -176,6 +196,9 @@
 
   // Flag to indicate that the dispatcher has been shut down.
   bool shutdown_;
+
+  // The concurrency hint used to initialise the scheduler.
+  const int concurrency_hint_;
 };
 
 } // namespace detail
diff --git a/asio/include/asio/detail/scheduler_operation.hpp b/asio/include/asio/detail/scheduler_operation.hpp
index 8d3c478..112b3df 100644
--- a/asio/include/asio/detail/scheduler_operation.hpp
+++ b/asio/include/asio/detail/scheduler_operation.hpp
@@ -2,7 +2,7 @@
 // detail/scheduler_operation.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/scheduler_thread_info.hpp b/asio/include/asio/detail/scheduler_thread_info.hpp
index c46e1f1..aa8260c 100644
--- a/asio/include/asio/detail/scheduler_thread_info.hpp
+++ b/asio/include/asio/detail/scheduler_thread_info.hpp
@@ -2,7 +2,7 @@
 // detail/scheduler_thread_info.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/scoped_lock.hpp b/asio/include/asio/detail/scoped_lock.hpp
index 27d6c8f..cf52614 100644
--- a/asio/include/asio/detail/scoped_lock.hpp
+++ b/asio/include/asio/detail/scoped_lock.hpp
@@ -2,7 +2,7 @@
 // detail/scoped_lock.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/scoped_ptr.hpp b/asio/include/asio/detail/scoped_ptr.hpp
index adc215f..3bc26f1 100644
--- a/asio/include/asio/detail/scoped_ptr.hpp
+++ b/asio/include/asio/detail/scoped_ptr.hpp
@@ -2,7 +2,7 @@
 // detail/scoped_ptr.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/select_interrupter.hpp b/asio/include/asio/detail/select_interrupter.hpp
index 4db8350..ecac7db 100644
--- a/asio/include/asio/detail/select_interrupter.hpp
+++ b/asio/include/asio/detail/select_interrupter.hpp
@@ -2,7 +2,7 @@
 // detail/select_interrupter.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/select_reactor.hpp b/asio/include/asio/detail/select_reactor.hpp
index a514d38..7f9b55b 100644
--- a/asio/include/asio/detail/select_reactor.hpp
+++ b/asio/include/asio/detail/select_reactor.hpp
@@ -2,7 +2,7 @@
 // detail/select_reactor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -148,7 +148,7 @@
       typename timer_queue<Time_Traits>::per_timer_data& source);
 
   // Run select once until interrupted or events are ready to be dispatched.
-  ASIO_DECL void run(bool block, op_queue<operation>& ops);
+  ASIO_DECL void run(long usec, op_queue<operation>& ops);
 
   // Interrupt the select loop.
   ASIO_DECL void interrupt();
@@ -166,7 +166,7 @@
   ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
 
   // Get the timeout value for the select call.
-  ASIO_DECL timeval* get_timeout(timeval& tv);
+  ASIO_DECL timeval* get_timeout(long usec, timeval& tv);
 
   // Cancel all operations associated with the given descriptor. This function
   // does not acquire the select_reactor's mutex.
diff --git a/asio/include/asio/detail/service_registry.hpp b/asio/include/asio/detail/service_registry.hpp
index 77af51b..06f49de 100644
--- a/asio/include/asio/detail/service_registry.hpp
+++ b/asio/include/asio/detail/service_registry.hpp
@@ -2,7 +2,7 @@
 // detail/service_registry.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -19,6 +19,7 @@
 #include <typeinfo>
 #include "asio/detail/mutex.hpp"
 #include "asio/detail/noncopyable.hpp"
+#include "asio/detail/type_traits.hpp"
 #include "asio/execution_context.hpp"
 
 #include "asio/detail/push_options.hpp"
@@ -75,15 +76,27 @@
   bool has_service() const;
 
 private:
+  // Initalise a service's key when the key_type typedef is not available.
+  template <typename Service>
+  static void init_key(execution_context::service::key& key, ...);
+
+#if !defined(ASIO_NO_TYPEID)
+  // Initalise a service's key when the key_type typedef is available.
+  template <typename Service>
+  static void init_key(execution_context::service::key& key,
+      typename enable_if<
+        is_base_of<typename Service::key_type, Service>::value>::type*);
+#endif // !defined(ASIO_NO_TYPEID)
+
   // Initialise a service's key based on its id.
-  ASIO_DECL static void init_key(
+  ASIO_DECL static void init_key_from_id(
       execution_context::service::key& key,
       const execution_context::id& id);
 
 #if !defined(ASIO_NO_TYPEID)
   // Initialise a service's key based on its id.
   template <typename Service>
-  static void init_key(execution_context::service::key& key,
+  static void init_key_from_id(execution_context::service::key& key,
       const service_id<Service>& /*id*/);
 #endif // !defined(ASIO_NO_TYPEID)
 
diff --git a/asio/include/asio/detail/signal_blocker.hpp b/asio/include/asio/detail/signal_blocker.hpp
index ad668ad..f0fac08 100644
--- a/asio/include/asio/detail/signal_blocker.hpp
+++ b/asio/include/asio/detail/signal_blocker.hpp
@@ -2,7 +2,7 @@
 // detail/signal_blocker.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/signal_handler.hpp b/asio/include/asio/detail/signal_handler.hpp
index b68295e..19fee65 100644
--- a/asio/include/asio/detail/signal_handler.hpp
+++ b/asio/include/asio/detail/signal_handler.hpp
@@ -2,7 +2,7 @@
 // detail/signal_handler.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/signal_init.hpp b/asio/include/asio/detail/signal_init.hpp
index e9a8cac..266a3e0 100644
--- a/asio/include/asio/detail/signal_init.hpp
+++ b/asio/include/asio/detail/signal_init.hpp
@@ -2,7 +2,7 @@
 // detail/signal_init.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/signal_op.hpp b/asio/include/asio/detail/signal_op.hpp
index 2f7fd62..9921de0 100644
--- a/asio/include/asio/detail/signal_op.hpp
+++ b/asio/include/asio/detail/signal_op.hpp
@@ -2,7 +2,7 @@
 // detail/signal_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/signal_set_service.hpp b/asio/include/asio/detail/signal_set_service.hpp
index 6e498bb..58ee99b 100644
--- a/asio/include/asio/detail/signal_set_service.hpp
+++ b/asio/include/asio/detail/signal_set_service.hpp
@@ -2,7 +2,7 @@
 // detail/signal_set_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -47,7 +47,8 @@
 
 extern "C" ASIO_DECL void asio_signal_handler(int signal_number);
 
-class signal_set_service
+class signal_set_service :
+  public service_base<signal_set_service>
 {
 public:
   // Type used for tracking an individual signal registration.
diff --git a/asio/include/asio/detail/socket_holder.hpp b/asio/include/asio/detail/socket_holder.hpp
index 4fa3143..1c9e721 100644
--- a/asio/include/asio/detail/socket_holder.hpp
+++ b/asio/include/asio/detail/socket_holder.hpp
@@ -2,7 +2,7 @@
 // detail/socket_holder.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/socket_ops.hpp b/asio/include/asio/detail/socket_ops.hpp
index 2ebadac..5529a27 100644
--- a/asio/include/asio/detail/socket_ops.hpp
+++ b/asio/include/asio/detail/socket_ops.hpp
@@ -2,7 +2,7 @@
 // detail/socket_ops.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -263,15 +263,16 @@
     fd_set* exceptfds, timeval* timeout, asio::error_code& ec);
 
 ASIO_DECL int poll_read(socket_type s,
-    state_type state, asio::error_code& ec);
+    state_type state, int msec, asio::error_code& ec);
 
 ASIO_DECL int poll_write(socket_type s,
-    state_type state, asio::error_code& ec);
+    state_type state, int msec, asio::error_code& ec);
 
 ASIO_DECL int poll_error(socket_type s,
-    state_type state, asio::error_code& ec);
+    state_type state, int msec, asio::error_code& ec);
 
-ASIO_DECL int poll_connect(socket_type s, asio::error_code& ec);
+ASIO_DECL int poll_connect(socket_type s,
+    int msec, asio::error_code& ec);
 
 #endif // !defined(ASIO_WINDOWS_RUNTIME)
 
diff --git a/asio/include/asio/detail/socket_option.hpp b/asio/include/asio/detail/socket_option.hpp
index 7241ab7..02860b9 100644
--- a/asio/include/asio/detail/socket_option.hpp
+++ b/asio/include/asio/detail/socket_option.hpp
@@ -2,7 +2,7 @@
 // detail/socket_option.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/socket_select_interrupter.hpp b/asio/include/asio/detail/socket_select_interrupter.hpp
index 470ce78..7089640 100644
--- a/asio/include/asio/detail/socket_select_interrupter.hpp
+++ b/asio/include/asio/detail/socket_select_interrupter.hpp
@@ -2,7 +2,7 @@
 // detail/socket_select_interrupter.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/socket_types.hpp b/asio/include/asio/detail/socket_types.hpp
index b8ee045..436cb4f 100644
--- a/asio/include/asio/detail/socket_types.hpp
+++ b/asio/include/asio/detail/socket_types.hpp
@@ -2,7 +2,7 @@
 // detail/socket_types.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/solaris_fenced_block.hpp b/asio/include/asio/detail/solaris_fenced_block.hpp
index 7ecc042..c1b599e 100644
--- a/asio/include/asio/detail/solaris_fenced_block.hpp
+++ b/asio/include/asio/detail/solaris_fenced_block.hpp
@@ -2,7 +2,7 @@
 // detail/solaris_fenced_block.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/static_mutex.hpp b/asio/include/asio/detail/static_mutex.hpp
index bc84118..1be0a85 100644
--- a/asio/include/asio/detail/static_mutex.hpp
+++ b/asio/include/asio/detail/static_mutex.hpp
@@ -2,7 +2,7 @@
 // detail/static_mutex.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/std_event.hpp b/asio/include/asio/detail/std_event.hpp
index b7c5e20..e05fcca 100644
--- a/asio/include/asio/detail/std_event.hpp
+++ b/asio/include/asio/detail/std_event.hpp
@@ -2,7 +2,7 @@
 // detail/std_event.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/std_global.hpp b/asio/include/asio/detail/std_global.hpp
index f7f856f..416f0d3 100644
--- a/asio/include/asio/detail/std_global.hpp
+++ b/asio/include/asio/detail/std_global.hpp
@@ -2,7 +2,7 @@
 // detail/std_global.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/std_mutex.hpp b/asio/include/asio/detail/std_mutex.hpp
index 478aa1a..31af56a 100644
--- a/asio/include/asio/detail/std_mutex.hpp
+++ b/asio/include/asio/detail/std_mutex.hpp
@@ -2,7 +2,7 @@
 // detail/std_mutex.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/std_static_mutex.hpp b/asio/include/asio/detail/std_static_mutex.hpp
index b2abadf..166ede9 100644
--- a/asio/include/asio/detail/std_static_mutex.hpp
+++ b/asio/include/asio/detail/std_static_mutex.hpp
@@ -2,7 +2,7 @@
 // detail/std_static_mutex.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/std_thread.hpp b/asio/include/asio/detail/std_thread.hpp
index 858218c..f6fcec1 100644
--- a/asio/include/asio/detail/std_thread.hpp
+++ b/asio/include/asio/detail/std_thread.hpp
@@ -2,7 +2,7 @@
 // detail/std_thread.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/strand_executor_service.hpp b/asio/include/asio/detail/strand_executor_service.hpp
index 869ce97..5ca77a3 100644
--- a/asio/include/asio/detail/strand_executor_service.hpp
+++ b/asio/include/asio/detail/strand_executor_service.hpp
@@ -2,7 +2,7 @@
 // detail/strand_executor_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/strand_service.hpp b/asio/include/asio/detail/strand_service.hpp
index cb8104f..c5d95e7 100644
--- a/asio/include/asio/detail/strand_service.hpp
+++ b/asio/include/asio/detail/strand_service.hpp
@@ -2,7 +2,7 @@
 // detail/strand_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/string_view.hpp b/asio/include/asio/detail/string_view.hpp
new file mode 100644
index 0000000..6f4072d
--- /dev/null
+++ b/asio/include/asio/detail/string_view.hpp
@@ -0,0 +1,45 @@
+//
+// detail/string_view.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ASIO_DETAIL_STRING_VIEW_HPP
+#define ASIO_DETAIL_STRING_VIEW_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+# include <experimental/string_view>
+#else // defined(ASIO_HAS_EXPERIMENTAL_STRING_VIEW)
+# include <string_view>
+#endif // defined(ASIO_HAS_EXPERIMENTAL_STRING_VIEW)
+
+namespace asio {
+
+#if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+using std::experimental::basic_string_view;
+using std::experimental::string_view;
+#else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+using std::basic_string_view;
+using std::string_view;
+#endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+
+} // namespace asio
+
+# define ASIO_STRING_VIEW_PARAM asio::string_view
+#else // defined(ASIO_HAS_STD_STRING_VIEW)
+# define ASIO_STRING_VIEW_PARAM const std::string&
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+
+#endif // ASIO_DETAIL_STRING_VIEW_HPP
diff --git a/asio/include/asio/detail/thread.hpp b/asio/include/asio/detail/thread.hpp
index e1c2fa3..cfb5bad 100644
--- a/asio/include/asio/detail/thread.hpp
+++ b/asio/include/asio/detail/thread.hpp
@@ -2,7 +2,7 @@
 // detail/thread.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/thread_context.hpp b/asio/include/asio/detail/thread_context.hpp
index 9ad6034..66d20d6 100644
--- a/asio/include/asio/detail/thread_context.hpp
+++ b/asio/include/asio/detail/thread_context.hpp
@@ -2,7 +2,7 @@
 // detail/thread_context.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/thread_group.hpp b/asio/include/asio/detail/thread_group.hpp
index be035b9..312af44 100644
--- a/asio/include/asio/detail/thread_group.hpp
+++ b/asio/include/asio/detail/thread_group.hpp
@@ -2,7 +2,7 @@
 // detail/thread_group.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/thread_info_base.hpp b/asio/include/asio/detail/thread_info_base.hpp
index dd52468..5fc26c3 100644
--- a/asio/include/asio/detail/thread_info_base.hpp
+++ b/asio/include/asio/detail/thread_info_base.hpp
@@ -2,7 +2,7 @@
 // detail/thread_info_base.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/throw_error.hpp b/asio/include/asio/detail/throw_error.hpp
index 5eff60c..3c1d59c 100644
--- a/asio/include/asio/detail/throw_error.hpp
+++ b/asio/include/asio/detail/throw_error.hpp
@@ -2,7 +2,7 @@
 // detail/throw_error.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/throw_exception.hpp b/asio/include/asio/detail/throw_exception.hpp
index 3cec317..a0c3cf8 100644
--- a/asio/include/asio/detail/throw_exception.hpp
+++ b/asio/include/asio/detail/throw_exception.hpp
@@ -2,7 +2,7 @@
 // detail/throw_exception.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/timer_queue.hpp b/asio/include/asio/detail/timer_queue.hpp
index 79a72ad..1575e03 100644
--- a/asio/include/asio/detail/timer_queue.hpp
+++ b/asio/include/asio/detail/timer_queue.hpp
@@ -2,7 +2,7 @@
 // detail/timer_queue.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/timer_queue_base.hpp b/asio/include/asio/detail/timer_queue_base.hpp
index 56101fd..326d055 100644
--- a/asio/include/asio/detail/timer_queue_base.hpp
+++ b/asio/include/asio/detail/timer_queue_base.hpp
@@ -2,7 +2,7 @@
 // detail/timer_queue_base.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/timer_queue_ptime.hpp b/asio/include/asio/detail/timer_queue_ptime.hpp
index 0062fea..9d3cb7d 100644
--- a/asio/include/asio/detail/timer_queue_ptime.hpp
+++ b/asio/include/asio/detail/timer_queue_ptime.hpp
@@ -2,7 +2,7 @@
 // detail/timer_queue_ptime.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -15,13 +15,15 @@
 # pragma once
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+
 #include "asio/time_traits.hpp"
 #include "asio/detail/timer_queue.hpp"
 
 #include "asio/detail/push_options.hpp"
 
-#if defined(ASIO_HAS_BOOST_DATE_TIME)
-
 namespace asio {
 namespace detail {
 
@@ -75,6 +77,10 @@
       per_timer_data& timer, op_queue<operation>& ops,
       std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
 
+  // Move operations from one timer to another, empty timer.
+  ASIO_DECL void move_timer(per_timer_data& target,
+      per_timer_data& source);
+
 private:
   timer_queue<forwarding_posix_time_traits> impl_;
 };
@@ -82,12 +88,12 @@
 } // namespace detail
 } // namespace asio
 
-#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-
 #include "asio/detail/pop_options.hpp"
 
 #if defined(ASIO_HEADER_ONLY)
 # include "asio/detail/impl/timer_queue_ptime.ipp"
 #endif // defined(ASIO_HEADER_ONLY)
 
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
 #endif // ASIO_DETAIL_TIMER_QUEUE_PTIME_HPP
diff --git a/asio/include/asio/detail/timer_queue_set.hpp b/asio/include/asio/detail/timer_queue_set.hpp
index e8bf649..38f46d1 100644
--- a/asio/include/asio/detail/timer_queue_set.hpp
+++ b/asio/include/asio/detail/timer_queue_set.hpp
@@ -2,7 +2,7 @@
 // detail/timer_queue_set.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/timer_scheduler.hpp b/asio/include/asio/detail/timer_scheduler.hpp
index 3e6a65e..1907316 100644
--- a/asio/include/asio/detail/timer_scheduler.hpp
+++ b/asio/include/asio/detail/timer_scheduler.hpp
@@ -2,7 +2,7 @@
 // detail/timer_scheduler.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/timer_scheduler_fwd.hpp b/asio/include/asio/detail/timer_scheduler_fwd.hpp
index 897c3cf..cf27b8c 100644
--- a/asio/include/asio/detail/timer_scheduler_fwd.hpp
+++ b/asio/include/asio/detail/timer_scheduler_fwd.hpp
@@ -2,7 +2,7 @@
 // detail/timer_scheduler_fwd.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/tss_ptr.hpp b/asio/include/asio/detail/tss_ptr.hpp
index af80f28..2d03061 100644
--- a/asio/include/asio/detail/tss_ptr.hpp
+++ b/asio/include/asio/detail/tss_ptr.hpp
@@ -2,7 +2,7 @@
 // detail/tss_ptr.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/type_traits.hpp b/asio/include/asio/detail/type_traits.hpp
index e7e65a8..0866589 100644
--- a/asio/include/asio/detail/type_traits.hpp
+++ b/asio/include/asio/detail/type_traits.hpp
@@ -2,7 +2,7 @@
 // detail/type_traits.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -24,6 +24,7 @@
 # include <boost/type_traits/conditional.hpp>
 # include <boost/type_traits/decay.hpp>
 # include <boost/type_traits/integral_constant.hpp>
+# include <boost/type_traits/is_base_of.hpp>
 # include <boost/type_traits/is_class.hpp>
 # include <boost/type_traits/is_const.hpp>
 # include <boost/type_traits/is_convertible.hpp>
@@ -44,6 +45,7 @@
 using std::enable_if;
 using std::false_type;
 using std::integral_constant;
+using std::is_base_of;
 using std::is_class;
 using std::is_const;
 using std::is_convertible;
@@ -61,6 +63,7 @@
 using boost::decay;
 using boost::false_type;
 using boost::integral_constant;
+using boost::is_base_of;
 using boost::is_class;
 using boost::is_const;
 using boost::is_convertible;
diff --git a/asio/include/asio/detail/variadic_templates.hpp b/asio/include/asio/detail/variadic_templates.hpp
index 696c884..272ae28 100644
--- a/asio/include/asio/detail/variadic_templates.hpp
+++ b/asio/include/asio/detail/variadic_templates.hpp
@@ -2,7 +2,7 @@
 // detail/variadic_templates.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -94,6 +94,24 @@
   ASIO_MOVE_CAST(T3)(x3), ASIO_MOVE_CAST(T4)(x4), \
   ASIO_MOVE_CAST(T5)(x5)
 
+# define ASIO_VARIADIC_DECAY(n) \
+  ASIO_VARIADIC_DECAY_##n
+
+# define ASIO_VARIADIC_DECAY_1 \
+  typename decay<T1>::type
+# define ASIO_VARIADIC_DECAY_2 \
+  typename decay<T1>::type, typename decay<T2>::type
+# define ASIO_VARIADIC_DECAY_3 \
+  typename decay<T1>::type, typename decay<T2>::type, \
+  typename decay<T3>::type
+# define ASIO_VARIADIC_DECAY_4 \
+  typename decay<T1>::type, typename decay<T2>::type, \
+  typename decay<T3>::type, typename decay<T4>::type
+# define ASIO_VARIADIC_DECAY_5 \
+  typename decay<T1>::type, typename decay<T2>::type, \
+  typename decay<T3>::type, typename decay<T4>::type, \
+  typename decay<T5>::type
+
 # define ASIO_VARIADIC_GENERATE(m) m(1) m(2) m(3) m(4) m(5)
 
 #endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
diff --git a/asio/include/asio/detail/wait_handler.hpp b/asio/include/asio/detail/wait_handler.hpp
index 7cda774..29bcfd7 100644
--- a/asio/include/asio/detail/wait_handler.hpp
+++ b/asio/include/asio/detail/wait_handler.hpp
@@ -2,7 +2,7 @@
 // detail/wait_handler.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/wait_op.hpp b/asio/include/asio/detail/wait_op.hpp
index a03d108..68bb86f 100644
--- a/asio/include/asio/detail/wait_op.hpp
+++ b/asio/include/asio/detail/wait_op.hpp
@@ -2,7 +2,7 @@
 // detail/wait_op.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_event.hpp b/asio/include/asio/detail/win_event.hpp
index adb0c78..aa04fd5 100644
--- a/asio/include/asio/detail/win_event.hpp
+++ b/asio/include/asio/detail/win_event.hpp
@@ -2,7 +2,7 @@
 // detail/win_event.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -111,6 +111,27 @@
     }
   }
 
+  // Timed wait for the event to become signalled.
+  template <typename Lock>
+  bool wait_for_usec(Lock& lock, long usec)
+  {
+    ASIO_ASSERT(lock.locked());
+    if ((state_ & 1) == 0)
+    {
+      state_ += 2;
+      lock.unlock();
+      DWORD msec = usec > 0 ? (usec < 1000 ? 1 : usec / 1000) : 0;
+#if defined(ASIO_WINDOWS_APP)
+      ::WaitForMultipleObjectsEx(2, events_, false, msec, false);
+#else // defined(ASIO_WINDOWS_APP)
+      ::WaitForMultipleObjects(2, events_, false, msec);
+#endif // defined(ASIO_WINDOWS_APP)
+      lock.lock();
+      state_ -= 2;
+    }
+    return (state_ & 1) != 0;
+  }
+
 private:
   HANDLE events_[2];
   std::size_t state_;
diff --git a/asio/include/asio/detail/win_fd_set_adapter.hpp b/asio/include/asio/detail/win_fd_set_adapter.hpp
index 4a05ce0..7d288f6 100644
--- a/asio/include/asio/detail/win_fd_set_adapter.hpp
+++ b/asio/include/asio/detail/win_fd_set_adapter.hpp
@@ -2,7 +2,7 @@
 // detail/win_fd_set_adapter.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_fenced_block.hpp b/asio/include/asio/detail/win_fenced_block.hpp
index c0b3133..42846ca 100644
--- a/asio/include/asio/detail/win_fenced_block.hpp
+++ b/asio/include/asio/detail/win_fenced_block.hpp
@@ -2,7 +2,7 @@
 // detail/win_fenced_block.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_global.hpp b/asio/include/asio/detail/win_global.hpp
index 8dd1939..92ebdad 100644
--- a/asio/include/asio/detail/win_global.hpp
+++ b/asio/include/asio/detail/win_global.hpp
@@ -2,7 +2,7 @@
 // detail/win_global.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_iocp_handle_read_op.hpp b/asio/include/asio/detail/win_iocp_handle_read_op.hpp
index 8cf9fbc..c3ff79b 100644
--- a/asio/include/asio/detail/win_iocp_handle_read_op.hpp
+++ b/asio/include/asio/detail/win_iocp_handle_read_op.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_handle_read_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/include/asio/detail/win_iocp_handle_service.hpp b/asio/include/asio/detail/win_iocp_handle_service.hpp
index 02f84c2..a1d07bd 100644
--- a/asio/include/asio/detail/win_iocp_handle_service.hpp
+++ b/asio/include/asio/detail/win_iocp_handle_service.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_handle_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -37,7 +37,8 @@
 namespace asio {
 namespace detail {
 
-class win_iocp_handle_service
+class win_iocp_handle_service :
+  public service_base<win_iocp_handle_service>
 {
 public:
   // The native type of a stream handle.
diff --git a/asio/include/asio/detail/win_iocp_handle_write_op.hpp b/asio/include/asio/detail/win_iocp_handle_write_op.hpp
index b4380c9..36019c8 100644
--- a/asio/include/asio/detail/win_iocp_handle_write_op.hpp
+++ b/asio/include/asio/detail/win_iocp_handle_write_op.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_handle_write_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/include/asio/detail/win_iocp_io_context.hpp b/asio/include/asio/detail/win_iocp_io_context.hpp
index e6a25c4..8b6803d 100644
--- a/asio/include/asio/detail/win_iocp_io_context.hpp
+++ b/asio/include/asio/detail/win_iocp_io_context.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_io_context.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -68,6 +68,9 @@
   // Run until stopped or one operation is performed.
   ASIO_DECL size_t run_one(asio::error_code& ec);
 
+  // Run until timeout, interrupted, or one operation is performed.
+  ASIO_DECL size_t wait_one(long usec, asio::error_code& ec);
+
   // Poll for operations without blocking.
   ASIO_DECL size_t poll(asio::error_code& ec);
 
@@ -197,6 +200,12 @@
       typename timer_queue<Time_Traits>::per_timer_data& to,
       typename timer_queue<Time_Traits>::per_timer_data& from);
 
+  // Get the concurrency hint that was used to initialise the io_context.
+  int concurrency_hint() const
+  {
+    return concurrency_hint_;
+  }
+
 private:
 #if defined(WINVER) && (WINVER < 0x0500)
   typedef DWORD dword_ptr_t;
@@ -209,7 +218,7 @@
   // Dequeues at most one operation from the I/O completion port, and then
   // executes it. Returns the number of operations that were dequeued (i.e.
   // either 0 or 1).
-  ASIO_DECL size_t do_one(bool block, asio::error_code& ec);
+  ASIO_DECL size_t do_one(DWORD msec, asio::error_code& ec);
 
   // Helper to calculate the GetQueuedCompletionStatus timeout.
   ASIO_DECL static DWORD get_gqcs_timeout();
@@ -299,6 +308,9 @@
 
   // The operations that are ready to dispatch.
   op_queue<win_iocp_operation> completed_ops_;
+
+  // The concurrency hint used to initialise the io_context.
+  const int concurrency_hint_;
 };
 
 } // namespace detail
diff --git a/asio/include/asio/detail/win_iocp_null_buffers_op.hpp b/asio/include/asio/detail/win_iocp_null_buffers_op.hpp
index 4123848..f9e296d 100644
--- a/asio/include/asio/detail/win_iocp_null_buffers_op.hpp
+++ b/asio/include/asio/detail/win_iocp_null_buffers_op.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_null_buffers_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -50,9 +50,9 @@
     handler_work<Handler>::start(handler_);
   }
 
-  static bool do_perform(reactor_op*)
+  static status do_perform(reactor_op*)
   {
-    return true;
+    return done;
   }
 
   static void do_complete(void* owner, operation* base,
diff --git a/asio/include/asio/detail/win_iocp_operation.hpp b/asio/include/asio/detail/win_iocp_operation.hpp
index 8d9ffd3..9f888b1 100644
--- a/asio/include/asio/detail/win_iocp_operation.hpp
+++ b/asio/include/asio/detail/win_iocp_operation.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_operation.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_iocp_overlapped_op.hpp b/asio/include/asio/detail/win_iocp_overlapped_op.hpp
index 43a7752..fde9a92 100644
--- a/asio/include/asio/detail/win_iocp_overlapped_op.hpp
+++ b/asio/include/asio/detail/win_iocp_overlapped_op.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_overlapped_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp b/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp
index 62c3a72..22025fd 100644
--- a/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp
+++ b/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_overlapped_ptr.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_iocp_serial_port_service.hpp b/asio/include/asio/detail/win_iocp_serial_port_service.hpp
index 3fa2da5..5385646 100644
--- a/asio/include/asio/detail/win_iocp_serial_port_service.hpp
+++ b/asio/include/asio/detail/win_iocp_serial_port_service.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_serial_port_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -31,7 +31,8 @@
 namespace detail {
 
 // Extend win_iocp_handle_service to provide serial port support.
-class win_iocp_serial_port_service
+class win_iocp_serial_port_service :
+  public service_base<win_iocp_serial_port_service>
 {
 public:
   // The native type of a serial port.
@@ -184,8 +185,8 @@
   static asio::error_code store_option(const void* option,
       ::DCB& storage, asio::error_code& ec)
   {
-    return static_cast<const SettableSerialPortOption*>(option)->store(
-        storage, ec);
+    static_cast<const SettableSerialPortOption*>(option)->store(storage, ec);
+    return ec;
   }
 
   // Helper function to set a serial port option.
@@ -202,7 +203,8 @@
   static asio::error_code load_option(void* option,
       const ::DCB& storage, asio::error_code& ec)
   {
-    return static_cast<GettableSerialPortOption*>(option)->load(storage, ec);
+    static_cast<GettableSerialPortOption*>(option)->load(storage, ec);
+    return ec;
   }
 
   // Helper function to get a serial port option.
diff --git a/asio/include/asio/detail/win_iocp_socket_accept_op.hpp b/asio/include/asio/detail/win_iocp_socket_accept_op.hpp
index d8e2929..937f4c0 100644
--- a/asio/include/asio/detail/win_iocp_socket_accept_op.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_accept_op.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_socket_accept_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_iocp_socket_connect_op.hpp b/asio/include/asio/detail/win_iocp_socket_connect_op.hpp
index 38ef30e..4edd869 100644
--- a/asio/include/asio/detail/win_iocp_socket_connect_op.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_connect_op.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_socket_connect_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -43,12 +43,13 @@
   {
   }
 
-  static bool do_perform(reactor_op* base)
+  static status do_perform(reactor_op* base)
   {
     win_iocp_socket_connect_op_base* o(
         static_cast<win_iocp_socket_connect_op_base*>(base));
 
-    return socket_ops::non_blocking_connect(o->socket_, o->ec_);
+    return socket_ops::non_blocking_connect(
+        o->socket_, o->ec_) ? done : not_done;
   }
 
   socket_type socket_;
diff --git a/asio/include/asio/detail/win_iocp_socket_recv_op.hpp b/asio/include/asio/detail/win_iocp_socket_recv_op.hpp
index 3df821a..98b0005 100644
--- a/asio/include/asio/detail/win_iocp_socket_recv_op.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_recv_op.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_socket_recv_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp b/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
index c7ede4f..a7af878 100644
--- a/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_socket_recvfrom_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp b/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
index faa414f..9e5952f 100644
--- a/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_socket_recvmsg_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_iocp_socket_send_op.hpp b/asio/include/asio/detail/win_iocp_socket_send_op.hpp
index 92f4396..15c88a5 100644
--- a/asio/include/asio/detail/win_iocp_socket_send_op.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_send_op.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_socket_send_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_iocp_socket_service.hpp b/asio/include/asio/detail/win_iocp_socket_service.hpp
index 1fdd98c..9040f7c 100644
--- a/asio/include/asio/detail/win_iocp_socket_service.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_service.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_socket_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -50,7 +50,9 @@
 namespace detail {
 
 template <typename Protocol>
-class win_iocp_socket_service : public win_iocp_socket_service_base
+class win_iocp_socket_service :
+  public service_base<win_iocp_socket_service<Protocol> >,
+  public win_iocp_socket_service_base
 {
 public:
   // The protocol type.
@@ -128,10 +130,17 @@
 
   // Constructor.
   win_iocp_socket_service(asio::io_context& io_context)
-    : win_iocp_socket_service_base(io_context)
+    : service_base<win_iocp_socket_service<Protocol> >(io_context),
+      win_iocp_socket_service_base(io_context)
   {
   }
 
+  // Destroy all user-defined handler objects owned by the service.
+  void shutdown()
+  {
+    this->base_shutdown();
+  }
+
   // Move-construct a new socket implementation.
   void move_construct(implementation_type& impl,
       implementation_type& other_impl)
@@ -277,6 +286,14 @@
     return endpoint;
   }
 
+  // Disable sends or receives on the socket.
+  asio::error_code shutdown(base_implementation_type& impl,
+      socket_base::shutdown_type what, asio::error_code& ec)
+  {
+    socket_ops::shutdown(impl.socket_, what, ec);
+    return ec;
+  }
+
   // Send a datagram to the specified endpoint. Returns the number of bytes
   // sent.
   template <typename ConstBufferSequence>
@@ -298,7 +315,7 @@
       asio::error_code& ec)
   {
     // Wait for socket to become ready.
-    socket_ops::poll_write(impl.socket_, impl.state_, ec);
+    socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
 
     return 0;
   }
@@ -374,7 +391,7 @@
       socket_base::message_flags, asio::error_code& ec)
   {
     // Wait for socket to become ready.
-    socket_ops::poll_read(impl.socket_, impl.state_, ec);
+    socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
 
     // Reset endpoint since it can be given no sensible value at this time.
     sender_endpoint = endpoint_type();
@@ -452,7 +469,8 @@
     {
       if (peer_endpoint)
         peer_endpoint->resize(addr_len);
-      if (!peer.assign(impl.protocol_, new_socket.get(), ec))
+      peer.assign(impl.protocol_, new_socket.get(), ec);
+      if (!ec)
         new_socket.release();
     }
 
@@ -478,7 +496,8 @@
     {
       if (peer_endpoint)
         peer_endpoint->resize(addr_len);
-      if (!peer.assign(impl.protocol_, new_socket.get(), ec))
+      peer.assign(impl.protocol_, new_socket.get(), ec);
+      if (!ec)
         new_socket.release();
     }
 
diff --git a/asio/include/asio/detail/win_iocp_socket_service_base.hpp b/asio/include/asio/detail/win_iocp_socket_service_base.hpp
index a98e8de..9f22adc 100644
--- a/asio/include/asio/detail/win_iocp_socket_service_base.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_service_base.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_socket_service_base.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -89,7 +89,7 @@
       asio::io_context& io_context);
 
   // Destroy all user-defined handler objects owned by the service.
-  ASIO_DECL void shutdown();
+  ASIO_DECL void base_shutdown();
 
   // Construct a new socket implementation.
   ASIO_DECL void construct(base_implementation_type& impl);
@@ -180,14 +180,6 @@
     return ec;
   }
 
-  // Disable sends or receives on the socket.
-  asio::error_code shutdown(base_implementation_type& impl,
-      socket_base::shutdown_type what, asio::error_code& ec)
-  {
-    socket_ops::shutdown(impl.socket_, what, ec);
-    return ec;
-  }
-
   // Wait for the socket to become ready to read, ready to write, or to have
   // pending error conditions.
   asio::error_code wait(base_implementation_type& impl,
@@ -196,13 +188,13 @@
     switch (w)
     {
     case socket_base::wait_read:
-      socket_ops::poll_read(impl.socket_, impl.state_, ec);
+      socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
       break;
     case socket_base::wait_write:
-      socket_ops::poll_write(impl.socket_, impl.state_, ec);
+      socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
       break;
     case socket_base::wait_error:
-      socket_ops::poll_error(impl.socket_, impl.state_, ec);
+      socket_ops::poll_error(impl.socket_, impl.state_, -1, ec);
       break;
     default:
       ec = asio::error::invalid_argument;
@@ -268,7 +260,7 @@
       socket_base::message_flags, asio::error_code& ec)
   {
     // Wait for socket to become ready.
-    socket_ops::poll_write(impl.socket_, impl.state_, ec);
+    socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
 
     return 0;
   }
@@ -334,7 +326,7 @@
       socket_base::message_flags, asio::error_code& ec)
   {
     // Wait for socket to become ready.
-    socket_ops::poll_read(impl.socket_, impl.state_, ec);
+    socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
 
     return 0;
   }
@@ -403,7 +395,7 @@
       socket_base::message_flags& out_flags, asio::error_code& ec)
   {
     // Wait for socket to become ready.
-    socket_ops::poll_read(impl.socket_, impl.state_, ec);
+    socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
 
     // Clear out_flags, since we cannot give it any other sensible value when
     // performing a null_buffers operation.
diff --git a/asio/include/asio/detail/win_iocp_thread_info.hpp b/asio/include/asio/detail/win_iocp_thread_info.hpp
index 2b698d8..ae13dd4 100644
--- a/asio/include/asio/detail/win_iocp_thread_info.hpp
+++ b/asio/include/asio/detail/win_iocp_thread_info.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_thread_info.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_iocp_wait_op.hpp b/asio/include/asio/detail/win_iocp_wait_op.hpp
index d406ded..d5178d0 100644
--- a/asio/include/asio/detail/win_iocp_wait_op.hpp
+++ b/asio/include/asio/detail/win_iocp_wait_op.hpp
@@ -2,7 +2,7 @@
 // detail/win_iocp_wait_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -50,9 +50,9 @@
     handler_work<Handler>::start(handler_);
   }
 
-  static bool do_perform(reactor_op*)
+  static status do_perform(reactor_op*)
   {
-    return true;
+    return done;
   }
 
   static void do_complete(void* owner, operation* base,
diff --git a/asio/include/asio/detail/win_mutex.hpp b/asio/include/asio/detail/win_mutex.hpp
index dd393de..350a02d 100644
--- a/asio/include/asio/detail/win_mutex.hpp
+++ b/asio/include/asio/detail/win_mutex.hpp
@@ -2,7 +2,7 @@
 // detail/win_mutex.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_object_handle_service.hpp b/asio/include/asio/detail/win_object_handle_service.hpp
index 4ee0963..5960554 100644
--- a/asio/include/asio/detail/win_object_handle_service.hpp
+++ b/asio/include/asio/detail/win_object_handle_service.hpp
@@ -2,7 +2,7 @@
 // detail/win_object_handle_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -31,7 +31,8 @@
 namespace asio {
 namespace detail {
 
-class win_object_handle_service
+class win_object_handle_service :
+  public service_base<win_object_handle_service>
 {
 public:
   // The native type of an object handle.
diff --git a/asio/include/asio/detail/win_static_mutex.hpp b/asio/include/asio/detail/win_static_mutex.hpp
index b4ff6ce..6f0e75b 100644
--- a/asio/include/asio/detail/win_static_mutex.hpp
+++ b/asio/include/asio/detail/win_static_mutex.hpp
@@ -2,7 +2,7 @@
 // detail/win_static_mutex.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_thread.hpp b/asio/include/asio/detail/win_thread.hpp
index 033307d..ab2ba8d 100644
--- a/asio/include/asio/detail/win_thread.hpp
+++ b/asio/include/asio/detail/win_thread.hpp
@@ -2,7 +2,7 @@
 // detail/win_thread.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/win_tss_ptr.hpp b/asio/include/asio/detail/win_tss_ptr.hpp
index 64a9ddf..490c705 100644
--- a/asio/include/asio/detail/win_tss_ptr.hpp
+++ b/asio/include/asio/detail/win_tss_ptr.hpp
@@ -2,7 +2,7 @@
 // detail/win_tss_ptr.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/winapp_thread.hpp b/asio/include/asio/detail/winapp_thread.hpp
index e42f7af..4d13109 100644
--- a/asio/include/asio/detail/winapp_thread.hpp
+++ b/asio/include/asio/detail/winapp_thread.hpp
@@ -2,7 +2,7 @@
 // detail/winapp_thread.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/wince_thread.hpp b/asio/include/asio/detail/wince_thread.hpp
index d76fb12..5e0d4ec 100644
--- a/asio/include/asio/detail/wince_thread.hpp
+++ b/asio/include/asio/detail/wince_thread.hpp
@@ -2,7 +2,7 @@
 // detail/wince_thread.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/winrt_async_manager.hpp b/asio/include/asio/detail/winrt_async_manager.hpp
index 63e51f4..921dfdd 100644
--- a/asio/include/asio/detail/winrt_async_manager.hpp
+++ b/asio/include/asio/detail/winrt_async_manager.hpp
@@ -2,7 +2,7 @@
 // detail/winrt_async_manager.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/winrt_async_op.hpp b/asio/include/asio/detail/winrt_async_op.hpp
index 00bc0d1..2b18b43 100644
--- a/asio/include/asio/detail/winrt_async_op.hpp
+++ b/asio/include/asio/detail/winrt_async_op.hpp
@@ -2,7 +2,7 @@
 // detail/winrt_async_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/winrt_resolve_op.hpp b/asio/include/asio/detail/winrt_resolve_op.hpp
index 45a5350..a197c3d 100644
--- a/asio/include/asio/detail/winrt_resolve_op.hpp
+++ b/asio/include/asio/detail/winrt_resolve_op.hpp
@@ -2,7 +2,7 @@
 // detail/winrt_resolve_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/winrt_resolver_service.hpp b/asio/include/asio/detail/winrt_resolver_service.hpp
index de7b8e3..8e38331 100644
--- a/asio/include/asio/detail/winrt_resolver_service.hpp
+++ b/asio/include/asio/detail/winrt_resolver_service.hpp
@@ -2,7 +2,7 @@
 // detail/winrt_resolver_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -34,7 +34,8 @@
 namespace detail {
 
 template <typename Protocol>
-class winrt_resolver_service
+class winrt_resolver_service :
+  public service_base<winrt_resolver_service<Protocol> >
 {
 public:
   // The implementation type of the resolver. A cancellation token is used to
@@ -53,7 +54,8 @@
 
   // Constructor.
   winrt_resolver_service(asio::io_context& io_context)
-    : io_context_(use_service<io_context_impl>(io_context)),
+    : service_base<winrt_resolver_service<Protocol> >(io_context),
+      io_context_(use_service<io_context_impl>(io_context)),
       async_manager_(use_service<winrt_async_manager>(io_context))
   {
   }
@@ -78,6 +80,18 @@
   {
   }
 
+  // Move-construct a new resolver implementation.
+  void move_construct(implementation_type&,
+      implementation_type&)
+  {
+  }
+
+  // Move-assign from another resolver implementation.
+  void move_assign(implementation_type&,
+      winrt_resolver_service&, implementation_type&)
+  {
+  }
+
   // Destroy a resolver implementation.
   void destroy(implementation_type&)
   {
diff --git a/asio/include/asio/detail/winrt_socket_connect_op.hpp b/asio/include/asio/detail/winrt_socket_connect_op.hpp
index f2a4634..94b4048 100644
--- a/asio/include/asio/detail/winrt_socket_connect_op.hpp
+++ b/asio/include/asio/detail/winrt_socket_connect_op.hpp
@@ -2,7 +2,7 @@
 // detail/winrt_socket_connect_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/winrt_socket_recv_op.hpp b/asio/include/asio/detail/winrt_socket_recv_op.hpp
index 6bfe98f..d19f1f7 100644
--- a/asio/include/asio/detail/winrt_socket_recv_op.hpp
+++ b/asio/include/asio/detail/winrt_socket_recv_op.hpp
@@ -2,7 +2,7 @@
 // detail/winrt_socket_recv_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/winrt_socket_send_op.hpp b/asio/include/asio/detail/winrt_socket_send_op.hpp
index d602eae..6d16ef3 100644
--- a/asio/include/asio/detail/winrt_socket_send_op.hpp
+++ b/asio/include/asio/detail/winrt_socket_send_op.hpp
@@ -2,7 +2,7 @@
 // detail/winrt_socket_send_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/winrt_ssocket_service.hpp b/asio/include/asio/detail/winrt_ssocket_service.hpp
index fb97ea2..6f72bbe 100644
--- a/asio/include/asio/detail/winrt_ssocket_service.hpp
+++ b/asio/include/asio/detail/winrt_ssocket_service.hpp
@@ -2,7 +2,7 @@
 // detail/winrt_ssocket_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -33,6 +33,7 @@
 
 template <typename Protocol>
 class winrt_ssocket_service :
+  public service_base<winrt_ssocket_service<Protocol> >,
   public winrt_ssocket_service_base
 {
 public:
@@ -61,10 +62,17 @@
 
   // Constructor.
   winrt_ssocket_service(asio::io_context& io_context)
-    : winrt_ssocket_service_base(io_context)
+    : service_base<winrt_ssocket_service<Protocol> >(io_context),
+      winrt_ssocket_service_base(io_context)
   {
   }
 
+  // Destroy all user-defined handler objects owned by the service.
+  void shutdown()
+  {
+    this->base_shutdown();
+  }
+
   // Move-construct a new socket implementation.
   void move_construct(implementation_type& impl,
       implementation_type& other_impl)
diff --git a/asio/include/asio/detail/winrt_ssocket_service_base.hpp b/asio/include/asio/detail/winrt_ssocket_service_base.hpp
index 658494e..9192ffb 100644
--- a/asio/include/asio/detail/winrt_ssocket_service_base.hpp
+++ b/asio/include/asio/detail/winrt_ssocket_service_base.hpp
@@ -2,7 +2,7 @@
 // detail/winrt_ssocket_service_base.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -65,7 +65,7 @@
       asio::io_context& io_context);
 
   // Destroy all user-defined handler objects owned by the service.
-  ASIO_DECL void shutdown();
+  ASIO_DECL void base_shutdown();
 
   // Construct a new socket implementation.
   ASIO_DECL void construct(base_implementation_type&);
diff --git a/asio/include/asio/detail/winrt_timer_scheduler.hpp b/asio/include/asio/detail/winrt_timer_scheduler.hpp
index 5169914..f3ffe61 100644
--- a/asio/include/asio/detail/winrt_timer_scheduler.hpp
+++ b/asio/include/asio/detail/winrt_timer_scheduler.hpp
@@ -2,7 +2,7 @@
 // detail/winrt_timer_scheduler.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/winrt_utils.hpp b/asio/include/asio/detail/winrt_utils.hpp
index 7c0f75a..52f7143 100644
--- a/asio/include/asio/detail/winrt_utils.hpp
+++ b/asio/include/asio/detail/winrt_utils.hpp
@@ -2,7 +2,7 @@
 // detail/winrt_utils.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/winsock_init.hpp b/asio/include/asio/detail/winsock_init.hpp
index 425c9d6..b88cd51 100644
--- a/asio/include/asio/detail/winsock_init.hpp
+++ b/asio/include/asio/detail/winsock_init.hpp
@@ -2,7 +2,7 @@
 // detail/winsock_init.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/work_dispatcher.hpp b/asio/include/asio/detail/work_dispatcher.hpp
index cac2e8a..460fbd6 100644
--- a/asio/include/asio/detail/work_dispatcher.hpp
+++ b/asio/include/asio/detail/work_dispatcher.hpp
@@ -2,7 +2,7 @@
 // detail/work_dispatcher.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/detail/wrapped_handler.hpp b/asio/include/asio/detail/wrapped_handler.hpp
index 1b8edf7..aff903e 100644
--- a/asio/include/asio/detail/wrapped_handler.hpp
+++ b/asio/include/asio/detail/wrapped_handler.hpp
@@ -2,7 +2,7 @@
 // detail/wrapped_handler.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/dispatch.hpp b/asio/include/asio/dispatch.hpp
index 1ed5e7b..2addadc 100644
--- a/asio/include/asio/dispatch.hpp
+++ b/asio/include/asio/dispatch.hpp
@@ -2,7 +2,7 @@
 // dispatch.hpp
 // ~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/error.hpp b/asio/include/asio/error.hpp
index 50161eb..5d5767a 100644
--- a/asio/include/asio/error.hpp
+++ b/asio/include/asio/error.hpp
@@ -2,7 +2,7 @@
 // error.hpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/error_code.hpp b/asio/include/asio/error_code.hpp
index 01248f3..09a2acb 100644
--- a/asio/include/asio/error_code.hpp
+++ b/asio/include/asio/error_code.hpp
@@ -2,7 +2,7 @@
 // error_code.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/execution_context.hpp b/asio/include/asio/execution_context.hpp
index 2a6edb7..0d91195 100644
--- a/asio/include/asio/execution_context.hpp
+++ b/asio/include/asio/execution_context.hpp
@@ -2,7 +2,7 @@
 // execution_context.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -34,7 +34,7 @@
 template <typename Service> Service& use_service(io_context&);
 template <typename Service> void add_service(execution_context&, Service*);
 template <typename Service> bool has_service(execution_context&);
-#endif // !defined(ASIO_NO_DEPRECATED)
+#endif // !defined(GENERATING_DOCUMENTATION)
 
 namespace detail { class service_registry; }
 
diff --git a/asio/include/asio/executor.hpp b/asio/include/asio/executor.hpp
index d1d6fd3..f22b991 100644
--- a/asio/include/asio/executor.hpp
+++ b/asio/include/asio/executor.hpp
@@ -2,7 +2,7 @@
 // executor.hpp
 // ~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -21,7 +21,6 @@
 #include "asio/detail/memory.hpp"
 #include "asio/detail/throw_exception.hpp"
 #include "asio/execution_context.hpp"
-#include "asio/is_executor.hpp"
 
 #include "asio/detail/push_options.hpp"
 
@@ -328,10 +327,6 @@
 #endif // !defined(GENERATING_DOCUMENTATION)
 };
 
-#if !defined(GENERATING_DOCUMENTATION)
-template <> struct is_executor<executor> : true_type {};
-#endif // !defined(GENERATING_DOCUMENTATION)
-
 } // namespace asio
 
 ASIO_USES_ALLOCATOR(asio::executor)
diff --git a/asio/include/asio/executor_work_guard.hpp b/asio/include/asio/executor_work_guard.hpp
index 5774d21..a791dcd 100644
--- a/asio/include/asio/executor_work_guard.hpp
+++ b/asio/include/asio/executor_work_guard.hpp
@@ -2,7 +2,7 @@
 // executor_work_guard.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,6 +18,7 @@
 #include "asio/detail/config.hpp"
 #include "asio/associated_executor.hpp"
 #include "asio/detail/type_traits.hpp"
+#include "asio/is_executor.hpp"
 
 #include "asio/detail/push_options.hpp"
 
diff --git a/asio/include/asio/generic/basic_endpoint.hpp b/asio/include/asio/generic/basic_endpoint.hpp
index 9f5fbce..1faf4a1 100644
--- a/asio/include/asio/generic/basic_endpoint.hpp
+++ b/asio/include/asio/generic/basic_endpoint.hpp
@@ -2,7 +2,7 @@
 // generic/basic_endpoint.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/generic/datagram_protocol.hpp b/asio/include/asio/generic/datagram_protocol.hpp
index 1cfd4f9..21a39de 100644
--- a/asio/include/asio/generic/datagram_protocol.hpp
+++ b/asio/include/asio/generic/datagram_protocol.hpp
@@ -2,7 +2,7 @@
 // generic/datagram_protocol.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/generic/detail/endpoint.hpp b/asio/include/asio/generic/detail/endpoint.hpp
index d2eedec..8de7b2a 100644
--- a/asio/include/asio/generic/detail/endpoint.hpp
+++ b/asio/include/asio/generic/detail/endpoint.hpp
@@ -2,7 +2,7 @@
 // generic/detail/endpoint.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/generic/detail/impl/endpoint.ipp b/asio/include/asio/generic/detail/impl/endpoint.ipp
index 7261819..1a66fb9 100644
--- a/asio/include/asio/generic/detail/impl/endpoint.ipp
+++ b/asio/include/asio/generic/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
 // generic/detail/impl/endpoint.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/generic/raw_protocol.hpp b/asio/include/asio/generic/raw_protocol.hpp
index b563258..9a74073 100644
--- a/asio/include/asio/generic/raw_protocol.hpp
+++ b/asio/include/asio/generic/raw_protocol.hpp
@@ -2,7 +2,7 @@
 // generic/raw_protocol.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/generic/seq_packet_protocol.hpp b/asio/include/asio/generic/seq_packet_protocol.hpp
index ea55ce6..d01d9cb 100644
--- a/asio/include/asio/generic/seq_packet_protocol.hpp
+++ b/asio/include/asio/generic/seq_packet_protocol.hpp
@@ -2,7 +2,7 @@
 // generic/seq_packet_protocol.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/generic/stream_protocol.hpp b/asio/include/asio/generic/stream_protocol.hpp
index 7f457b3..6917c19 100644
--- a/asio/include/asio/generic/stream_protocol.hpp
+++ b/asio/include/asio/generic/stream_protocol.hpp
@@ -2,7 +2,7 @@
 // generic/stream_protocol.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/handler_alloc_hook.hpp b/asio/include/asio/handler_alloc_hook.hpp
index 8d992ca..a05ad4c 100644
--- a/asio/include/asio/handler_alloc_hook.hpp
+++ b/asio/include/asio/handler_alloc_hook.hpp
@@ -2,7 +2,7 @@
 // handler_alloc_hook.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/handler_continuation_hook.hpp b/asio/include/asio/handler_continuation_hook.hpp
index fd6051e..bea0cdc 100644
--- a/asio/include/asio/handler_continuation_hook.hpp
+++ b/asio/include/asio/handler_continuation_hook.hpp
@@ -2,7 +2,7 @@
 // handler_continuation_hook.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/handler_invoke_hook.hpp b/asio/include/asio/handler_invoke_hook.hpp
index 209c01b..65c0d08 100644
--- a/asio/include/asio/handler_invoke_hook.hpp
+++ b/asio/include/asio/handler_invoke_hook.hpp
@@ -2,7 +2,7 @@
 // handler_invoke_hook.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/handler_type.hpp b/asio/include/asio/handler_type.hpp
index 260fbcb..49e7123 100644
--- a/asio/include/asio/handler_type.hpp
+++ b/asio/include/asio/handler_type.hpp
@@ -2,7 +2,7 @@
 // handler_type.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -22,7 +22,8 @@
 
 namespace asio {
 
-/// Default handler type traits provided for all completion token types.
+/// (Deprecated: Use two-parameter version of async_result.) Default handler
+/// type traits provided for all completion token types.
 /**
  * The handler_type traits class is used for determining the concrete handler
  * type to be used for an asynchronous operation. It allows the handler type to
@@ -46,7 +47,4 @@
 
 #include "asio/detail/pop_options.hpp"
 
-#define ASIO_HANDLER_TYPE(h, sig) \
-  typename handler_type<h, sig>::type
-
 #endif // ASIO_HANDLER_TYPE_HPP
diff --git a/asio/include/asio/high_resolution_timer.hpp b/asio/include/asio/high_resolution_timer.hpp
index 133d292..dd9d485 100644
--- a/asio/include/asio/high_resolution_timer.hpp
+++ b/asio/include/asio/high_resolution_timer.hpp
@@ -2,7 +2,7 @@
 // high_resolution_timer.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/impl/buffered_read_stream.hpp b/asio/include/asio/impl/buffered_read_stream.hpp
index 77700b8..c1a2e14 100644
--- a/asio/include/asio/impl/buffered_read_stream.hpp
+++ b/asio/include/asio/impl/buffered_read_stream.hpp
@@ -2,7 +2,7 @@
 // impl/buffered_read_stream.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -191,7 +191,7 @@
         storage_.size() - previous_size),
       detail::buffered_fill_handler<ASIO_HANDLER_TYPE(
         ReadHandler, void (asio::error_code, std::size_t))>(
-        storage_, previous_size, init.handler));
+        storage_, previous_size, init.completion_handler));
 
   return init.result.get();
 }
@@ -381,18 +381,18 @@
 
   if (asio::buffer_size(buffers) == 0 || !storage_.empty())
   {
-    next_layer_.async_read_some(asio::mutable_buffers_1(0, 0),
+    next_layer_.async_read_some(ASIO_MUTABLE_BUFFER(0, 0),
         detail::buffered_read_some_handler<
           MutableBufferSequence, ASIO_HANDLER_TYPE(
             ReadHandler, void (asio::error_code, std::size_t))>(
-            storage_, buffers, init.handler));
+            storage_, buffers, init.completion_handler));
   }
   else
   {
     this->async_fill(detail::buffered_read_some_handler<
           MutableBufferSequence, ASIO_HANDLER_TYPE(
             ReadHandler, void (asio::error_code, std::size_t))>(
-            storage_, buffers, init.handler));
+            storage_, buffers, init.completion_handler));
   }
 
   return init.result.get();
diff --git a/asio/include/asio/impl/buffered_write_stream.hpp b/asio/include/asio/impl/buffered_write_stream.hpp
index 125bd31..4ce6e5e 100644
--- a/asio/include/asio/impl/buffered_write_stream.hpp
+++ b/asio/include/asio/impl/buffered_write_stream.hpp
@@ -2,7 +2,7 @@
 // impl/buffered_write_stream.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -172,7 +172,7 @@
   async_write(next_layer_, buffer(storage_.data(), storage_.size()),
       detail::buffered_flush_handler<ASIO_HANDLER_TYPE(
         WriteHandler, void (asio::error_code, std::size_t))>(
-        storage_, init.handler));
+        storage_, init.completion_handler));
 
   return init.result.get();
 }
@@ -368,18 +368,18 @@
   if (asio::buffer_size(buffers) == 0
       || storage_.size() < storage_.capacity())
   {
-    next_layer_.async_write_some(asio::const_buffers_1(0, 0),
+    next_layer_.async_write_some(ASIO_CONST_BUFFER(0, 0),
         detail::buffered_write_some_handler<
           ConstBufferSequence, ASIO_HANDLER_TYPE(
             WriteHandler, void (asio::error_code, std::size_t))>(
-            storage_, buffers, init.handler));
+            storage_, buffers, init.completion_handler));
   }
   else
   {
     this->async_flush(detail::buffered_write_some_handler<
           ConstBufferSequence, ASIO_HANDLER_TYPE(
             WriteHandler, void (asio::error_code, std::size_t))>(
-            storage_, buffers, init.handler));
+            storage_, buffers, init.completion_handler));
   }
 
   return init.result.get();
diff --git a/asio/include/asio/impl/connect.hpp b/asio/include/asio/impl/connect.hpp
index 7da886f..2ab72f6 100644
--- a/asio/include/asio/impl/connect.hpp
+++ b/asio/include/asio/impl/connect.hpp
@@ -2,7 +2,7 @@
 // impl/connect.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -19,7 +19,6 @@
 #include "asio/associated_allocator.hpp"
 #include "asio/associated_executor.hpp"
 #include "asio/detail/bind_handler.hpp"
-#include "asio/detail/consuming_buffers.hpp"
 #include "asio/detail/handler_alloc_helpers.hpp"
 #include "asio/detail/handler_cont_helpers.hpp"
 #include "asio/detail/handler_invoke_helpers.hpp"
@@ -44,8 +43,9 @@
   };
 }
 
-template <typename Protocol, typename SocketService, typename EndpointSequence>
-typename Protocol::endpoint connect(basic_socket<Protocol, SocketService>& s,
+template <typename Protocol ASIO_SVC_TPARAM, typename EndpointSequence>
+typename Protocol::endpoint connect(
+    basic_socket<Protocol ASIO_SVC_TARG>& s,
     const EndpointSequence& endpoints,
     typename enable_if<is_endpoint_sequence<
         EndpointSequence>::value>::type*)
@@ -56,8 +56,9 @@
   return result;
 }
 
-template <typename Protocol, typename SocketService, typename EndpointSequence>
-typename Protocol::endpoint connect(basic_socket<Protocol, SocketService>& s,
+template <typename Protocol ASIO_SVC_TPARAM, typename EndpointSequence>
+typename Protocol::endpoint connect(
+    basic_socket<Protocol ASIO_SVC_TARG>& s,
     const EndpointSequence& endpoints, asio::error_code& ec,
     typename enable_if<is_endpoint_sequence<
         EndpointSequence>::value>::type*)
@@ -69,8 +70,8 @@
 }
 
 #if !defined(ASIO_NO_DEPRECATED)
-template <typename Protocol, typename SocketService, typename Iterator>
-Iterator connect(basic_socket<Protocol, SocketService>& s, Iterator begin,
+template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
     typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
 {
   asio::error_code ec;
@@ -79,8 +80,8 @@
   return result;
 }
 
-template <typename Protocol, typename SocketService, typename Iterator>
-inline Iterator connect(basic_socket<Protocol, SocketService>& s,
+template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
+inline Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, asio::error_code& ec,
     typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
 {
@@ -88,8 +89,8 @@
 }
 #endif // !defined(ASIO_NO_DEPRECATED)
 
-template <typename Protocol, typename SocketService, typename Iterator>
-Iterator connect(basic_socket<Protocol, SocketService>& s,
+template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, Iterator end)
 {
   asio::error_code ec;
@@ -98,16 +99,17 @@
   return result;
 }
 
-template <typename Protocol, typename SocketService, typename Iterator>
-inline Iterator connect(basic_socket<Protocol, SocketService>& s,
+template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
+inline Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, Iterator end, asio::error_code& ec)
 {
   return connect(s, begin, end, detail::default_connect_condition(), ec);
 }
 
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename EndpointSequence, typename ConnectCondition>
-typename Protocol::endpoint connect(basic_socket<Protocol, SocketService>& s,
+typename Protocol::endpoint connect(
+    basic_socket<Protocol ASIO_SVC_TARG>& s,
     const EndpointSequence& endpoints, ConnectCondition connect_condition,
     typename enable_if<is_endpoint_sequence<
         EndpointSequence>::value>::type*)
@@ -119,9 +121,10 @@
   return result;
 }
 
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename EndpointSequence, typename ConnectCondition>
-typename Protocol::endpoint connect(basic_socket<Protocol, SocketService>& s,
+typename Protocol::endpoint connect(
+    basic_socket<Protocol ASIO_SVC_TARG>& s,
     const EndpointSequence& endpoints, ConnectCondition connect_condition,
     asio::error_code& ec,
     typename enable_if<is_endpoint_sequence<
@@ -133,9 +136,9 @@
 }
 
 #if !defined(ASIO_NO_DEPRECATED)
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol, SocketService>& s,
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, ConnectCondition connect_condition,
     typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
 {
@@ -145,9 +148,9 @@
   return result;
 }
 
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename ConnectCondition>
-inline Iterator connect(basic_socket<Protocol, SocketService>& s,
+inline Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, ConnectCondition connect_condition,
     asio::error_code& ec,
     typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
@@ -156,9 +159,9 @@
 }
 #endif // !defined(ASIO_NO_DEPRECATED)
 
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol, SocketService>& s,
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, Iterator end, ConnectCondition connect_condition)
 {
   asio::error_code ec;
@@ -167,9 +170,9 @@
   return result;
 }
 
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol, SocketService>& s,
+Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, Iterator end, ConnectCondition connect_condition,
     asio::error_code& ec)
 {
@@ -233,13 +236,13 @@
     }
   };
 
-  template <typename Protocol, typename SocketService,
+  template <typename Protocol ASIO_SVC_TPARAM,
       typename EndpointSequence, typename ConnectCondition,
       typename RangeConnectHandler>
   class range_connect_op : base_from_connect_condition<ConnectCondition>
   {
   public:
-    range_connect_op(basic_socket<Protocol, SocketService>& sock,
+    range_connect_op(basic_socket<Protocol ASIO_SVC_TARG>& sock,
         const EndpointSequence& endpoints,
         const ConnectCondition& connect_condition,
         RangeConnectHandler& handler)
@@ -331,74 +334,74 @@
     }
 
   //private:
-    basic_socket<Protocol, SocketService>& socket_;
+    basic_socket<Protocol ASIO_SVC_TARG>& socket_;
     EndpointSequence endpoints_;
     std::size_t index_;
     int start_;
     RangeConnectHandler handler_;
   };
 
-  template <typename Protocol, typename SocketService,
+  template <typename Protocol ASIO_SVC_TPARAM,
       typename EndpointSequence, typename ConnectCondition,
       typename RangeConnectHandler>
   inline void* asio_handler_allocate(std::size_t size,
-      range_connect_op<Protocol, SocketService, EndpointSequence,
+      range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
         ConnectCondition, RangeConnectHandler>* this_handler)
   {
     return asio_handler_alloc_helpers::allocate(
         size, this_handler->handler_);
   }
 
-  template <typename Protocol, typename SocketService,
+  template <typename Protocol ASIO_SVC_TPARAM,
       typename EndpointSequence, typename ConnectCondition,
       typename RangeConnectHandler>
   inline void asio_handler_deallocate(void* pointer, std::size_t size,
-      range_connect_op<Protocol, SocketService, EndpointSequence,
+      range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
         ConnectCondition, RangeConnectHandler>* this_handler)
   {
     asio_handler_alloc_helpers::deallocate(
         pointer, size, this_handler->handler_);
   }
 
-  template <typename Protocol, typename SocketService,
+  template <typename Protocol ASIO_SVC_TPARAM,
       typename EndpointSequence, typename ConnectCondition,
       typename RangeConnectHandler>
   inline bool asio_handler_is_continuation(
-      range_connect_op<Protocol, SocketService, EndpointSequence,
+      range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
         ConnectCondition, RangeConnectHandler>* this_handler)
   {
     return asio_handler_cont_helpers::is_continuation(
         this_handler->handler_);
   }
 
-  template <typename Function, typename Protocol,
-      typename SocketService, typename EndpointSequence,
+  template <typename Function, typename Protocol
+      ASIO_SVC_TPARAM, typename EndpointSequence,
       typename ConnectCondition, typename RangeConnectHandler>
   inline void asio_handler_invoke(Function& function,
-      range_connect_op<Protocol, SocketService, EndpointSequence,
+      range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
         ConnectCondition, RangeConnectHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
   }
 
-  template <typename Function, typename Protocol,
-      typename SocketService, typename EndpointSequence,
+  template <typename Function, typename Protocol
+      ASIO_SVC_TPARAM, typename EndpointSequence,
       typename ConnectCondition, typename RangeConnectHandler>
   inline void asio_handler_invoke(const Function& function,
-      range_connect_op<Protocol, SocketService, EndpointSequence,
+      range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
         ConnectCondition, RangeConnectHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
   }
 
-  template <typename Protocol, typename SocketService, typename Iterator,
+  template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
       typename ConnectCondition, typename IteratorConnectHandler>
   class iterator_connect_op : base_from_connect_condition<ConnectCondition>
   {
   public:
-    iterator_connect_op(basic_socket<Protocol, SocketService>& sock,
+    iterator_connect_op(basic_socket<Protocol ASIO_SVC_TARG>& sock,
         const Iterator& begin, const Iterator& end,
         const ConnectCondition& connect_condition,
         IteratorConnectHandler& handler)
@@ -484,59 +487,59 @@
     }
 
   //private:
-    basic_socket<Protocol, SocketService>& socket_;
+    basic_socket<Protocol ASIO_SVC_TARG>& socket_;
     Iterator iter_;
     Iterator end_;
     int start_;
     IteratorConnectHandler handler_;
   };
 
-  template <typename Protocol, typename SocketService, typename Iterator,
+  template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
       typename ConnectCondition, typename IteratorConnectHandler>
   inline void* asio_handler_allocate(std::size_t size,
-      iterator_connect_op<Protocol, SocketService, Iterator,
+      iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
         ConnectCondition, IteratorConnectHandler>* this_handler)
   {
     return asio_handler_alloc_helpers::allocate(
         size, this_handler->handler_);
   }
 
-  template <typename Protocol, typename SocketService, typename Iterator,
+  template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
       typename ConnectCondition, typename IteratorConnectHandler>
   inline void asio_handler_deallocate(void* pointer, std::size_t size,
-      iterator_connect_op<Protocol, SocketService, Iterator,
+      iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
         ConnectCondition, IteratorConnectHandler>* this_handler)
   {
     asio_handler_alloc_helpers::deallocate(
         pointer, size, this_handler->handler_);
   }
 
-  template <typename Protocol, typename SocketService, typename Iterator,
+  template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
       typename ConnectCondition, typename IteratorConnectHandler>
   inline bool asio_handler_is_continuation(
-      iterator_connect_op<Protocol, SocketService, Iterator,
+      iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
         ConnectCondition, IteratorConnectHandler>* this_handler)
   {
     return asio_handler_cont_helpers::is_continuation(
         this_handler->handler_);
   }
 
-  template <typename Function, typename Protocol,
-      typename SocketService, typename Iterator,
+  template <typename Function, typename Protocol
+      ASIO_SVC_TPARAM, typename Iterator,
       typename ConnectCondition, typename IteratorConnectHandler>
   inline void asio_handler_invoke(Function& function,
-      iterator_connect_op<Protocol, SocketService, Iterator,
+      iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
         ConnectCondition, IteratorConnectHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
   }
 
-  template <typename Function, typename Protocol,
-      typename SocketService, typename Iterator,
+  template <typename Function, typename Protocol
+      ASIO_SVC_TPARAM, typename Iterator,
       typename ConnectCondition, typename IteratorConnectHandler>
   inline void asio_handler_invoke(const Function& function,
-      iterator_connect_op<Protocol, SocketService, Iterator,
+      iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
         ConnectCondition, IteratorConnectHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
@@ -546,11 +549,11 @@
 
 #if !defined(GENERATING_DOCUMENTATION)
 
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename EndpointSequence, typename ConnectCondition,
     typename RangeConnectHandler, typename Allocator>
 struct associated_allocator<
-    detail::range_connect_op<Protocol, SocketService,
+    detail::range_connect_op<Protocol ASIO_SVC_TARG,
       EndpointSequence, ConnectCondition, RangeConnectHandler>,
     Allocator>
 {
@@ -558,7 +561,7 @@
       RangeConnectHandler, Allocator>::type type;
 
   static type get(
-      const detail::range_connect_op<Protocol, SocketService,
+      const detail::range_connect_op<Protocol ASIO_SVC_TARG,
         EndpointSequence, ConnectCondition, RangeConnectHandler>& h,
       const Allocator& a = Allocator()) ASIO_NOEXCEPT
   {
@@ -567,11 +570,11 @@
   }
 };
 
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename EndpointSequence, typename ConnectCondition,
     typename RangeConnectHandler, typename Executor>
 struct associated_executor<
-    detail::range_connect_op<Protocol, SocketService,
+    detail::range_connect_op<Protocol ASIO_SVC_TARG,
       EndpointSequence, ConnectCondition, RangeConnectHandler>,
     Executor>
 {
@@ -579,7 +582,7 @@
       RangeConnectHandler, Executor>::type type;
 
   static type get(
-      const detail::range_connect_op<Protocol, SocketService,
+      const detail::range_connect_op<Protocol ASIO_SVC_TARG,
         EndpointSequence, ConnectCondition, RangeConnectHandler>& h,
       const Executor& ex = Executor()) ASIO_NOEXCEPT
   {
@@ -588,11 +591,11 @@
   }
 };
 
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename ConnectCondition,
     typename IteratorConnectHandler, typename Allocator>
 struct associated_allocator<
-    detail::iterator_connect_op<Protocol, SocketService, Iterator,
+    detail::iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
       ConnectCondition, IteratorConnectHandler>,
     Allocator>
 {
@@ -600,7 +603,7 @@
       IteratorConnectHandler, Allocator>::type type;
 
   static type get(
-      const detail::iterator_connect_op<Protocol, SocketService,
+      const detail::iterator_connect_op<Protocol ASIO_SVC_TARG,
         Iterator, ConnectCondition, IteratorConnectHandler>& h,
       const Allocator& a = Allocator()) ASIO_NOEXCEPT
   {
@@ -609,11 +612,11 @@
   }
 };
 
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename ConnectCondition,
     typename IteratorConnectHandler, typename Executor>
 struct associated_executor<
-    detail::iterator_connect_op<Protocol, SocketService, Iterator,
+    detail::iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
       ConnectCondition, IteratorConnectHandler>,
     Executor>
 {
@@ -621,7 +624,7 @@
       IteratorConnectHandler, Executor>::type type;
 
   static type get(
-      const detail::iterator_connect_op<Protocol, SocketService,
+      const detail::iterator_connect_op<Protocol ASIO_SVC_TARG,
         Iterator, ConnectCondition, IteratorConnectHandler>& h,
       const Executor& ex = Executor()) ASIO_NOEXCEPT
   {
@@ -632,11 +635,11 @@
 
 #endif // !defined(GENERATING_DOCUMENTATION)
 
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename EndpointSequence, typename RangeConnectHandler>
 inline ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
     void (asio::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol, SocketService>& s,
+async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     const EndpointSequence& endpoints,
     ASIO_MOVE_ARG(RangeConnectHandler) handler,
     typename enable_if<is_endpoint_sequence<
@@ -651,22 +654,22 @@
     void (asio::error_code, typename Protocol::endpoint)>
       init(handler);
 
-  detail::range_connect_op<Protocol, SocketService, EndpointSequence,
+  detail::range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
     detail::default_connect_condition,
       ASIO_HANDLER_TYPE(RangeConnectHandler,
         void (asio::error_code, typename Protocol::endpoint))>(s,
-          endpoints, detail::default_connect_condition(), init.handler)(
-            asio::error_code(), 1);
+          endpoints, detail::default_connect_condition(),
+            init.completion_handler)(asio::error_code(), 1);
 
   return init.result.get();
 }
 
 #if !defined(ASIO_NO_DEPRECATED)
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename IteratorConnectHandler>
 inline ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
     void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, SocketService>& s,
+async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, ASIO_MOVE_ARG(IteratorConnectHandler) handler,
     typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
 {
@@ -678,21 +681,21 @@
   async_completion<IteratorConnectHandler,
     void (asio::error_code, Iterator)> init(handler);
 
-  detail::iterator_connect_op<Protocol, SocketService, Iterator,
+  detail::iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
     detail::default_connect_condition, ASIO_HANDLER_TYPE(
       IteratorConnectHandler, void (asio::error_code, Iterator))>(s,
-        begin, Iterator(), detail::default_connect_condition(), init.handler)(
-          asio::error_code(), 1);
+        begin, Iterator(), detail::default_connect_condition(),
+          init.completion_handler)(asio::error_code(), 1);
 
   return init.result.get();
 }
 #endif // !defined(ASIO_NO_DEPRECATED)
 
-template <typename Protocol, typename SocketService,
+template <typename Protocol ASIO_SVC_TPARAM,
     typename Iterator, typename IteratorConnectHandler>
 inline ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
     void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, SocketService>& s,
+async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, Iterator end,
     ASIO_MOVE_ARG(IteratorConnectHandler) handler)
 {
@@ -704,20 +707,20 @@
   async_completion<IteratorConnectHandler,
     void (asio::error_code, Iterator)> init(handler);
 
-  detail::iterator_connect_op<Protocol, SocketService, Iterator,
+  detail::iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
     detail::default_connect_condition, ASIO_HANDLER_TYPE(
       IteratorConnectHandler, void (asio::error_code, Iterator))>(s,
-        begin, end, detail::default_connect_condition(), init.handler)(
-          asio::error_code(), 1);
+        begin, end, detail::default_connect_condition(),
+          init.completion_handler)(asio::error_code(), 1);
 
   return init.result.get();
 }
 
-template <typename Protocol, typename SocketService, typename EndpointSequence,
+template <typename Protocol ASIO_SVC_TPARAM, typename EndpointSequence,
     typename ConnectCondition, typename RangeConnectHandler>
 inline ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
     void (asio::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol, SocketService>& s,
+async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     const EndpointSequence& endpoints, ConnectCondition connect_condition,
     ASIO_MOVE_ARG(RangeConnectHandler) handler,
     typename enable_if<is_endpoint_sequence<
@@ -732,21 +735,21 @@
     void (asio::error_code, typename Protocol::endpoint)>
       init(handler);
 
-  detail::range_connect_op<Protocol, SocketService, EndpointSequence,
+  detail::range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
     ConnectCondition, ASIO_HANDLER_TYPE(RangeConnectHandler,
       void (asio::error_code, typename Protocol::endpoint))>(s,
-        endpoints, connect_condition, init.handler)(
+        endpoints, connect_condition, init.completion_handler)(
           asio::error_code(), 1);
 
   return init.result.get();
 }
 
 #if !defined(ASIO_NO_DEPRECATED)
-template <typename Protocol, typename SocketService, typename Iterator,
+template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
     typename ConnectCondition, typename IteratorConnectHandler>
 inline ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
     void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, SocketService>& s,
+async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, ConnectCondition connect_condition,
     ASIO_MOVE_ARG(IteratorConnectHandler) handler,
     typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
@@ -759,21 +762,21 @@
   async_completion<IteratorConnectHandler,
     void (asio::error_code, Iterator)> init(handler);
 
-  detail::iterator_connect_op<Protocol, SocketService, Iterator,
+  detail::iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
     ConnectCondition, ASIO_HANDLER_TYPE(
       IteratorConnectHandler, void (asio::error_code, Iterator))>(s,
-        begin, Iterator(), connect_condition, init.handler)(
+        begin, Iterator(), connect_condition, init.completion_handler)(
           asio::error_code(), 1);
 
   return init.result.get();
 }
 #endif // !defined(ASIO_NO_DEPRECATED)
 
-template <typename Protocol, typename SocketService, typename Iterator,
+template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
     typename ConnectCondition, typename IteratorConnectHandler>
 inline ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
     void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, SocketService>& s,
+async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
     Iterator begin, Iterator end, ConnectCondition connect_condition,
     ASIO_MOVE_ARG(IteratorConnectHandler) handler)
 {
@@ -785,10 +788,10 @@
   async_completion<IteratorConnectHandler,
     void (asio::error_code, Iterator)> init(handler);
 
-  detail::iterator_connect_op<Protocol, SocketService, Iterator,
+  detail::iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
     ConnectCondition, ASIO_HANDLER_TYPE(
       IteratorConnectHandler, void (asio::error_code, Iterator))>(s,
-        begin, end, connect_condition, init.handler)(
+        begin, end, connect_condition, init.completion_handler)(
           asio::error_code(), 1);
 
   return init.result.get();
diff --git a/asio/include/asio/impl/defer.hpp b/asio/include/asio/impl/defer.hpp
index 5a12176..cf76ba5 100644
--- a/asio/include/asio/impl/defer.hpp
+++ b/asio/include/asio/impl/defer.hpp
@@ -2,7 +2,7 @@
 // impl/defer.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -28,18 +28,19 @@
 ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
     ASIO_MOVE_ARG(CompletionToken) token)
 {
-  typedef typename handler_type<CompletionToken, void()>::type handler;
-  async_completion<CompletionToken, void()> completion(token);
+  typedef ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
+
+  async_completion<CompletionToken, void()> init(token);
 
   typename associated_executor<handler>::type ex(
-      (get_associated_executor)(completion.handler));
+      (get_associated_executor)(init.completion_handler));
 
   typename associated_allocator<handler>::type alloc(
-      (get_associated_allocator)(completion.handler));
+      (get_associated_allocator)(init.completion_handler));
 
-  ex.defer(ASIO_MOVE_CAST(handler)(completion.handler), alloc);
+  ex.defer(ASIO_MOVE_CAST(handler)(init.completion_handler), alloc);
 
-  return completion.result.get();
+  return init.result.get();
 }
 
 template <typename Executor, typename CompletionToken>
@@ -47,17 +48,18 @@
     const Executor& ex, ASIO_MOVE_ARG(CompletionToken) token,
     typename enable_if<is_executor<Executor>::value>::type*)
 {
-  typedef typename handler_type<CompletionToken, void()>::type handler;
-  async_completion<CompletionToken, void()> completion(token);
+  typedef ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
+
+  async_completion<CompletionToken, void()> init(token);
 
   Executor ex1(ex);
 
   typename associated_allocator<handler>::type alloc(
-      (get_associated_allocator)(completion.handler));
+      (get_associated_allocator)(init.completion_handler));
 
-  ex1.defer(detail::work_dispatcher<handler>(completion.handler), alloc);
+  ex1.defer(detail::work_dispatcher<handler>(init.completion_handler), alloc);
 
-  return completion.result.get();
+  return init.result.get();
 }
 
 template <typename ExecutionContext, typename CompletionToken>
diff --git a/asio/include/asio/impl/dispatch.hpp b/asio/include/asio/impl/dispatch.hpp
index 42d5fa9..cfebc5c 100644
--- a/asio/include/asio/impl/dispatch.hpp
+++ b/asio/include/asio/impl/dispatch.hpp
@@ -2,7 +2,7 @@
 // impl/dispatch.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -28,18 +28,19 @@
 ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
     ASIO_MOVE_ARG(CompletionToken) token)
 {
-  typedef typename handler_type<CompletionToken, void()>::type handler;
-  async_completion<CompletionToken, void()> completion(token);
+  typedef ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
+
+  async_completion<CompletionToken, void()> init(token);
 
   typename associated_executor<handler>::type ex(
-      (get_associated_executor)(completion.handler));
+      (get_associated_executor)(init.completion_handler));
 
   typename associated_allocator<handler>::type alloc(
-      (get_associated_allocator)(completion.handler));
+      (get_associated_allocator)(init.completion_handler));
 
-  ex.dispatch(ASIO_MOVE_CAST(handler)(completion.handler), alloc);
+  ex.dispatch(ASIO_MOVE_CAST(handler)(init.completion_handler), alloc);
 
-  return completion.result.get();
+  return init.result.get();
 }
 
 template <typename Executor, typename CompletionToken>
@@ -47,17 +48,19 @@
     const Executor& ex, ASIO_MOVE_ARG(CompletionToken) token,
     typename enable_if<is_executor<Executor>::value>::type*)
 {
-  typedef typename handler_type<CompletionToken, void()>::type handler;
-  async_completion<CompletionToken, void()> completion(token);
+  typedef ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
+
+  async_completion<CompletionToken, void()> init(token);
 
   Executor ex1(ex);
 
   typename associated_allocator<handler>::type alloc(
-      (get_associated_allocator)(completion.handler));
+      (get_associated_allocator)(init.completion_handler));
 
-  ex1.dispatch(detail::work_dispatcher<handler>(completion.handler), alloc);
+  ex1.dispatch(detail::work_dispatcher<handler>(
+        init.completion_handler), alloc);
 
-  return completion.result.get();
+  return init.result.get();
 }
 
 template <typename ExecutionContext, typename CompletionToken>
diff --git a/asio/include/asio/impl/error.ipp b/asio/include/asio/impl/error.ipp
index fc59d0b..7351785 100644
--- a/asio/include/asio/impl/error.ipp
+++ b/asio/include/asio/impl/error.ipp
@@ -2,7 +2,7 @@
 // impl/error.ipp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/impl/error_code.ipp b/asio/include/asio/impl/error_code.ipp
index 21fad9f..c986812 100644
--- a/asio/include/asio/impl/error_code.ipp
+++ b/asio/include/asio/impl/error_code.ipp
@@ -2,7 +2,7 @@
 // impl/error_code.ipp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -98,17 +98,10 @@
 #if defined(__sun) || defined(__QNX__) || defined(__SYMBIAN32__)
     using namespace std;
     return strerror(value);
-#elif defined(__MACH__) && defined(__APPLE__) \
-  || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) \
-  || defined(_AIX) || defined(__hpux) || defined(__osf__) \
-  || defined(__ANDROID__) || defined(__Fuchsia__)
-    char buf[256] = "";
-    using namespace std;
-    strerror_r(value, buf, sizeof(buf));
-    return buf;
 #else
     char buf[256] = "";
-    return strerror_r(value, buf, sizeof(buf));
+    using namespace std;
+    return strerror_result(strerror_r(value, buf, sizeof(buf)), buf);
 #endif
 #endif // defined(ASIO_WINDOWS_DESKTOP) || defined(__CYGWIN__)
   }
@@ -191,6 +184,11 @@
       return std::make_error_condition(ev, *this);
   }
 #endif // defined(ASIO_HAS_STD_ERROR_CODE)
+
+private:
+  // Helper function to adapt the result from glibc's variant of strerror_r.
+  static const char* strerror_result(int, const char* s) { return s; }
+  static const char* strerror_result(const char* s, const char*) { return s; }
 };
 
 } // namespace detail
diff --git a/asio/include/asio/impl/execution_context.hpp b/asio/include/asio/impl/execution_context.hpp
index 06c64ad..2e44ec1 100644
--- a/asio/include/asio/impl/execution_context.hpp
+++ b/asio/include/asio/impl/execution_context.hpp
@@ -2,7 +2,7 @@
 // impl/execution_context.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -28,7 +28,6 @@
 {
   // Check that Service meets the necessary type requirements.
   (void)static_cast<execution_context::service*>(static_cast<Service*>(0));
-  (void)static_cast<const execution_context::id*>(&Service::id);
 
   return e.service_registry_->template use_service<Service>();
 }
@@ -83,7 +82,6 @@
 {
   // Check that Service meets the necessary type requirements.
   (void)static_cast<execution_context::service*>(static_cast<Service*>(0));
-  (void)static_cast<const execution_context::id*>(&Service::id);
 
   e.service_registry_->template add_service<Service>(svc);
 }
@@ -93,7 +91,6 @@
 {
   // Check that Service meets the necessary type requirements.
   (void)static_cast<execution_context::service*>(static_cast<Service*>(0));
-  (void)static_cast<const execution_context::id*>(&Service::id);
 
   return e.service_registry_->template has_service<Service>();
 }
diff --git a/asio/include/asio/impl/execution_context.ipp b/asio/include/asio/impl/execution_context.ipp
index 38e40e3..40bb263 100644
--- a/asio/include/asio/impl/execution_context.ipp
+++ b/asio/include/asio/impl/execution_context.ipp
@@ -2,7 +2,7 @@
 // impl/execution_context.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/impl/executor.hpp b/asio/include/asio/impl/executor.hpp
index 7c0766e..eb83e5c 100644
--- a/asio/include/asio/impl/executor.hpp
+++ b/asio/include/asio/impl/executor.hpp
@@ -2,7 +2,7 @@
 // impl/executor.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/impl/executor.ipp b/asio/include/asio/impl/executor.ipp
index 23e3f08..605333e 100644
--- a/asio/include/asio/impl/executor.ipp
+++ b/asio/include/asio/impl/executor.ipp
@@ -2,7 +2,7 @@
 // impl/executor.ipp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/impl/handler_alloc_hook.ipp b/asio/include/asio/impl/handler_alloc_hook.ipp
index e8d52ba..f4bcdf9 100644
--- a/asio/include/asio/impl/handler_alloc_hook.ipp
+++ b/asio/include/asio/impl/handler_alloc_hook.ipp
@@ -2,7 +2,7 @@
 // impl/handler_alloc_hook.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/impl/io_context.hpp b/asio/include/asio/impl/io_context.hpp
index 2e80c3c..45805ae 100644
--- a/asio/include/asio/impl/io_context.hpp
+++ b/asio/include/asio/impl/io_context.hpp
@@ -2,7 +2,7 @@
 // impl/io_context.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -21,6 +21,7 @@
 #include "asio/detail/handler_type_requirements.hpp"
 #include "asio/detail/recycling_allocator.hpp"
 #include "asio/detail/service_registry.hpp"
+#include "asio/detail/throw_error.hpp"
 #include "asio/detail/type_traits.hpp"
 
 #include "asio/detail/push_options.hpp"
@@ -64,6 +65,61 @@
   return executor_type(*this);
 }
 
+#if defined(ASIO_HAS_CHRONO)
+
+template <typename Rep, typename Period>
+std::size_t io_context::run_for(
+    const chrono::duration<Rep, Period>& rel_time)
+{
+  return this->run_until(chrono::steady_clock::now() + rel_time);
+}
+
+template <typename Clock, typename Duration>
+std::size_t io_context::run_until(
+    const chrono::time_point<Clock, Duration>& abs_time)
+{
+  std::size_t n = 0;
+  while (this->run_one_until(abs_time))
+    if (n != (std::numeric_limits<std::size_t>::max)())
+      ++n;
+  return n;
+}
+
+template <typename Rep, typename Period>
+std::size_t io_context::run_one_for(
+    const chrono::duration<Rep, Period>& rel_time)
+{
+  return this->run_one_until(chrono::steady_clock::now() + rel_time);
+}
+
+template <typename Clock, typename Duration>
+std::size_t io_context::run_one_until(
+    const chrono::time_point<Clock, Duration>& abs_time)
+{
+  typename Clock::time_point now = Clock::now();
+  while (now < abs_time)
+  {
+    typename Clock::duration rel_time = abs_time - now;
+    if (rel_time > chrono::seconds(1))
+      rel_time = chrono::seconds(1);
+
+    asio::error_code ec;
+    std::size_t s = impl_.wait_one(
+        static_cast<long>(chrono::duration_cast<
+          chrono::microseconds>(rel_time).count()), ec);
+    asio::detail::throw_error(ec);
+
+    if (s || impl_.stopped())
+      return s;
+
+    now = Clock::now();
+  }
+
+  return 0;
+}
+
+#endif // defined(ASIO_HAS_CHRONO)
+
 #if !defined(ASIO_NO_DEPRECATED)
 
 inline void io_context::reset()
@@ -84,16 +140,17 @@
   if (impl_.can_dispatch())
   {
     detail::fenced_block b(detail::fenced_block::full);
-    asio_handler_invoke_helpers::invoke(init.handler, init.handler);
+    asio_handler_invoke_helpers::invoke(
+        init.completion_handler, init.completion_handler);
   }
   else
   {
     // Allocate and construct an operation to wrap the handler.
     typedef detail::completion_handler<
       typename handler_type<CompletionHandler, void ()>::type> op;
-    typename op::ptr p = { detail::addressof(init.handler),
-      op::ptr::allocate(init.handler), 0 };
-    p.p = new (p.v) op(init.handler);
+    typename op::ptr p = { detail::addressof(init.completion_handler),
+      op::ptr::allocate(init.completion_handler), 0 };
+    p.p = new (p.v) op(init.completion_handler);
 
     ASIO_HANDLER_CREATION((*this, *p.p,
           "io_context", this, 0, "dispatch"));
@@ -116,14 +173,14 @@
   async_completion<CompletionHandler, void ()> init(handler);
 
   bool is_continuation =
-    asio_handler_cont_helpers::is_continuation(init.handler);
+    asio_handler_cont_helpers::is_continuation(init.completion_handler);
 
   // Allocate and construct an operation to wrap the handler.
   typedef detail::completion_handler<
     typename handler_type<CompletionHandler, void ()>::type> op;
-  typename op::ptr p = { detail::addressof(init.handler),
-      op::ptr::allocate(init.handler), 0 };
-  p.p = new (p.v) op(init.handler);
+  typename op::ptr p = { detail::addressof(init.completion_handler),
+      op::ptr::allocate(init.completion_handler), 0 };
+  p.p = new (p.v) op(init.completion_handler);
 
   ASIO_HANDLER_CREATION((*this, *p.p,
         "io_context", this, 0, "post"));
@@ -254,6 +311,7 @@
   return io_context_.impl_.can_dispatch();
 }
 
+#if !defined(ASIO_NO_DEPRECATED)
 inline io_context::work::work(asio::io_context& io_context)
   : io_context_impl_(io_context.impl_)
 {
@@ -276,7 +334,6 @@
   return static_cast<asio::io_context&>(io_context_impl_.context());
 }
 
-#if !defined(ASIO_NO_DEPRECATED)
 inline asio::io_context& io_context::work::get_io_service()
 {
   return static_cast<asio::io_context&>(io_context_impl_.context());
diff --git a/asio/include/asio/impl/io_context.ipp b/asio/include/asio/impl/io_context.ipp
index a1d5959..b78ec1e 100644
--- a/asio/include/asio/impl/io_context.ipp
+++ b/asio/include/asio/impl/io_context.ipp
@@ -2,7 +2,7 @@
 // impl/io_context.ipp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,7 @@
 
 #include "asio/detail/config.hpp"
 #include "asio/io_context.hpp"
+#include "asio/detail/concurrency_hint.hpp"
 #include "asio/detail/limits.hpp"
 #include "asio/detail/scoped_ptr.hpp"
 #include "asio/detail/service_registry.hpp"
@@ -33,12 +34,13 @@
 namespace asio {
 
 io_context::io_context()
-  : impl_(add_impl(new impl_type(*this)))
+  : impl_(add_impl(new impl_type(*this, ASIO_CONCURRENCY_HINT_DEFAULT)))
 {
 }
 
 io_context::io_context(int concurrency_hint)
-  : impl_(add_impl(new impl_type(*this, concurrency_hint)))
+  : impl_(add_impl(new impl_type(*this, concurrency_hint == 1
+          ? ASIO_CONCURRENCY_HINT_1 : concurrency_hint)))
 {
 }
 
@@ -53,57 +55,65 @@
 {
 }
 
-std::size_t io_context::run()
+io_context::count_type io_context::run()
 {
   asio::error_code ec;
-  std::size_t s = impl_.run(ec);
+  count_type s = impl_.run(ec);
   asio::detail::throw_error(ec);
   return s;
 }
 
-std::size_t io_context::run(asio::error_code& ec)
+#if !defined(ASIO_NO_DEPRECATED)
+io_context::count_type io_context::run(asio::error_code& ec)
 {
   return impl_.run(ec);
 }
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-std::size_t io_context::run_one()
+io_context::count_type io_context::run_one()
 {
   asio::error_code ec;
-  std::size_t s = impl_.run_one(ec);
+  count_type s = impl_.run_one(ec);
   asio::detail::throw_error(ec);
   return s;
 }
 
-std::size_t io_context::run_one(asio::error_code& ec)
+#if !defined(ASIO_NO_DEPRECATED)
+io_context::count_type io_context::run_one(asio::error_code& ec)
 {
   return impl_.run_one(ec);
 }
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-std::size_t io_context::poll()
+io_context::count_type io_context::poll()
 {
   asio::error_code ec;
-  std::size_t s = impl_.poll(ec);
+  count_type s = impl_.poll(ec);
   asio::detail::throw_error(ec);
   return s;
 }
 
-std::size_t io_context::poll(asio::error_code& ec)
+#if !defined(ASIO_NO_DEPRECATED)
+io_context::count_type io_context::poll(asio::error_code& ec)
 {
   return impl_.poll(ec);
 }
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-std::size_t io_context::poll_one()
+io_context::count_type io_context::poll_one()
 {
   asio::error_code ec;
-  std::size_t s = impl_.poll_one(ec);
+  count_type s = impl_.poll_one(ec);
   asio::detail::throw_error(ec);
   return s;
 }
 
-std::size_t io_context::poll_one(asio::error_code& ec)
+#if !defined(ASIO_NO_DEPRECATED)
+io_context::count_type io_context::poll_one(asio::error_code& ec)
 {
   return impl_.poll_one(ec);
 }
+#endif // !defined(ASIO_NO_DEPRECATED)
 
 void io_context::stop()
 {
diff --git a/asio/include/asio/impl/post.hpp b/asio/include/asio/impl/post.hpp
index 5d034d0..293b387 100644
--- a/asio/include/asio/impl/post.hpp
+++ b/asio/include/asio/impl/post.hpp
@@ -2,7 +2,7 @@
 // impl/post.hpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -28,18 +28,19 @@
 ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
     ASIO_MOVE_ARG(CompletionToken) token)
 {
-  typedef typename handler_type<CompletionToken, void()>::type handler;
-  async_completion<CompletionToken, void()> completion(token);
+  typedef ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
+
+  async_completion<CompletionToken, void()> init(token);
 
   typename associated_executor<handler>::type ex(
-      (get_associated_executor)(completion.handler));
+      (get_associated_executor)(init.completion_handler));
 
   typename associated_allocator<handler>::type alloc(
-      (get_associated_allocator)(completion.handler));
+      (get_associated_allocator)(init.completion_handler));
 
-  ex.post(ASIO_MOVE_CAST(handler)(completion.handler), alloc);
+  ex.post(ASIO_MOVE_CAST(handler)(init.completion_handler), alloc);
 
-  return completion.result.get();
+  return init.result.get();
 }
 
 template <typename Executor, typename CompletionToken>
@@ -47,17 +48,18 @@
     const Executor& ex, ASIO_MOVE_ARG(CompletionToken) token,
     typename enable_if<is_executor<Executor>::value>::type*)
 {
-  typedef typename handler_type<CompletionToken, void()>::type handler;
-  async_completion<CompletionToken, void()> completion(token);
+  typedef ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
+
+  async_completion<CompletionToken, void()> init(token);
 
   Executor ex1(ex);
 
   typename associated_allocator<handler>::type alloc(
-      (get_associated_allocator)(completion.handler));
+      (get_associated_allocator)(init.completion_handler));
 
-  ex1.post(detail::work_dispatcher<handler>(completion.handler), alloc);
+  ex1.post(detail::work_dispatcher<handler>(init.completion_handler), alloc);
 
-  return completion.result.get();
+  return init.result.get();
 }
 
 template <typename ExecutionContext, typename CompletionToken>
diff --git a/asio/include/asio/impl/read.hpp b/asio/include/asio/impl/read.hpp
index 8545732..385a552 100644
--- a/asio/include/asio/impl/read.hpp
+++ b/asio/include/asio/impl/read.hpp
@@ -2,7 +2,7 @@
 // impl/read.hpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -36,6 +36,29 @@
 
 namespace asio {
 
+namespace detail
+{
+  template <typename SyncReadStream, typename MutableBufferSequence,
+      typename MutableBufferIterator, typename CompletionCondition>
+  std::size_t read_buffer_sequence(SyncReadStream& s,
+      const MutableBufferSequence& buffers, const MutableBufferIterator&,
+      CompletionCondition completion_condition, asio::error_code& ec)
+  {
+    ec = asio::error_code();
+    asio::detail::consuming_buffers<mutable_buffer,
+        MutableBufferSequence, MutableBufferIterator> tmp(buffers);
+    while (!tmp.empty())
+    {
+      if (std::size_t max_size = detail::adapt_completion_condition_result(
+            completion_condition(ec, tmp.total_consumed())))
+        tmp.consume(s.read_some(tmp.prepare(max_size), ec));
+      else
+        break;
+    }
+    return tmp.total_consumed();;
+  }
+} // namespace detail
+
 template <typename SyncReadStream, typename MutableBufferSequence,
     typename CompletionCondition>
 std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
@@ -44,21 +67,8 @@
       is_mutable_buffer_sequence<MutableBufferSequence>::value
     >::type*)
 {
-  ec = asio::error_code();
-  asio::detail::consuming_buffers<
-    mutable_buffer, MutableBufferSequence> tmp(buffers);
-  std::size_t total_transferred = 0;
-  tmp.prepare(detail::adapt_completion_condition_result(
-        completion_condition(ec, total_transferred)));
-  while (tmp.begin() != tmp.end())
-  {
-    std::size_t bytes_transferred = s.read_some(tmp, ec);
-    tmp.consume(bytes_transferred);
-    total_transferred += bytes_transferred;
-    tmp.prepare(detail::adapt_completion_condition_result(
-          completion_condition(ec, total_transferred)));
-  }
-  return total_transferred;
+  return detail::read_buffer_sequence(s, buffers,
+      asio::buffer_sequence_begin(buffers), completion_condition, ec);
 }
 
 template <typename SyncReadStream, typename MutableBufferSequence>
@@ -97,17 +107,17 @@
   return bytes_transferred;
 }
 
-template <typename SyncReadStream, typename DynamicBufferSequence,
+template <typename SyncReadStream, typename DynamicBuffer,
     typename CompletionCondition>
 std::size_t read(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     CompletionCondition completion_condition, asio::error_code& ec,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type*)
 {
-  typename decay<DynamicBufferSequence>::type b(
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers));
+  typename decay<DynamicBuffer>::type b(
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers));
 
   ec = asio::error_code();
   std::size_t total_transferred = 0;
@@ -130,49 +140,50 @@
   return total_transferred;
 }
 
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 inline std::size_t read(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type*)
 {
   asio::error_code ec;
   std::size_t bytes_transferred = read(s,
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), transfer_all(), ec);
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers), transfer_all(), ec);
   asio::detail::throw_error(ec, "read");
   return bytes_transferred;
 }
 
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 inline std::size_t read(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     asio::error_code& ec,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type*)
 {
-  return read(s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
+  return read(s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
       transfer_all(), ec);
 }
 
-template <typename SyncReadStream, typename DynamicBufferSequence,
+template <typename SyncReadStream, typename DynamicBuffer,
     typename CompletionCondition>
 inline std::size_t read(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     CompletionCondition completion_condition,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type*)
 {
   asio::error_code ec;
   std::size_t bytes_transferred = read(s,
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers),
       completion_condition, ec);
   asio::detail::throw_error(ec, "read");
   return bytes_transferred;
 }
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 template <typename SyncReadStream, typename Allocator,
@@ -209,11 +220,13 @@
 }
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 namespace detail
 {
   template <typename AsyncReadStream, typename MutableBufferSequence,
-      typename CompletionCondition, typename ReadHandler>
+      typename MutableBufferIterator, typename CompletionCondition,
+      typename ReadHandler>
   class read_op
     : detail::base_from_completion_cond<CompletionCondition>
   {
@@ -225,7 +238,6 @@
         stream_(stream),
         buffers_(buffers),
         start_(0),
-        total_transferred_(0),
         handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
     {
     }
@@ -236,7 +248,6 @@
         stream_(other.stream_),
         buffers_(other.buffers_),
         start_(other.start_),
-        total_transferred_(other.total_transferred_),
         handler_(other.handler_)
     {
     }
@@ -246,7 +257,6 @@
         stream_(other.stream_),
         buffers_(other.buffers_),
         start_(other.start_),
-        total_transferred_(other.total_transferred_),
         handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
     {
     }
@@ -255,285 +265,39 @@
     void operator()(const asio::error_code& ec,
         std::size_t bytes_transferred, int start = 0)
     {
+      std::size_t max_size;
       switch (start_ = start)
       {
         case 1:
-        buffers_.prepare(this->check_for_completion(ec, total_transferred_));
-        for (;;)
+        max_size = this->check_for_completion(ec, buffers_.total_consumed());
+        do
         {
-          stream_.async_read_some(buffers_,
+          stream_.async_read_some(buffers_.prepare(max_size),
               ASIO_MOVE_CAST(read_op)(*this));
           return; default:
-          total_transferred_ += bytes_transferred;
           buffers_.consume(bytes_transferred);
-          buffers_.prepare(this->check_for_completion(ec, total_transferred_));
-          if ((!ec && bytes_transferred == 0)
-              || buffers_.begin() == buffers_.end())
+          if ((!ec && bytes_transferred == 0) || buffers_.empty())
             break;
-        }
+          max_size = this->check_for_completion(ec, buffers_.total_consumed());
+        } while (max_size > 0);
 
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
+        handler_(ec, buffers_.total_consumed());
       }
     }
 
   //private:
     AsyncReadStream& stream_;
-    asio::detail::consuming_buffers<
-      mutable_buffer, MutableBufferSequence> buffers_;
+    asio::detail::consuming_buffers<mutable_buffer,
+        MutableBufferSequence, MutableBufferIterator> buffers_;
     int start_;
-    std::size_t total_transferred_;
     ReadHandler handler_;
   };
 
-  template <typename AsyncReadStream,
-      typename CompletionCondition, typename ReadHandler>
-  class read_op<AsyncReadStream, asio::mutable_buffers_1,
-      CompletionCondition, ReadHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    read_op(AsyncReadStream& stream,
-        const asio::mutable_buffers_1& buffers,
-        CompletionCondition completion_condition, ReadHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        stream_(stream),
-        buffer_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    read_op(const read_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffer_(other.buffer_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    read_op(read_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffer_(other.buffer_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          stream_.async_read_some(
-              asio::buffer(buffer_ + total_transferred_, n),
-              ASIO_MOVE_CAST(read_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_.size())
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncReadStream& stream_;
-    asio::mutable_buffer buffer_;
-    int start_;
-    std::size_t total_transferred_;
-    ReadHandler handler_;
-  };
-
-  template <typename AsyncReadStream, typename Elem,
-      typename CompletionCondition, typename ReadHandler>
-  class read_op<AsyncReadStream, boost::array<Elem, 2>,
-      CompletionCondition, ReadHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    read_op(AsyncReadStream& stream, const boost::array<Elem, 2>& buffers,
-        CompletionCondition completion_condition, ReadHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        stream_(stream),
-        buffers_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    read_op(const read_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    read_op(read_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      typename asio::detail::dependent_type<Elem,
-          boost::array<asio::mutable_buffer, 2> >::type bufs = {{
-        asio::mutable_buffer(buffers_[0]),
-        asio::mutable_buffer(buffers_[1]) }};
-      std::size_t buffer_size0 = bufs[0].size();
-      std::size_t buffer_size1 = bufs[1].size();
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          bufs[0] = asio::buffer(bufs[0] + total_transferred_, n);
-          bufs[1] = asio::buffer(
-              bufs[1] + (total_transferred_ < buffer_size0
-                ? 0 : total_transferred_ - buffer_size0),
-              n - bufs[0].size());
-          stream_.async_read_some(bufs, ASIO_MOVE_CAST(read_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_size0 + buffer_size1)
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncReadStream& stream_;
-    boost::array<Elem, 2> buffers_;
-    int start_;
-    std::size_t total_transferred_;
-    ReadHandler handler_;
-  };
-
-#if defined(ASIO_HAS_STD_ARRAY)
-
-  template <typename AsyncReadStream, typename Elem,
-      typename CompletionCondition, typename ReadHandler>
-  class read_op<AsyncReadStream, std::array<Elem, 2>,
-      CompletionCondition, ReadHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    read_op(AsyncReadStream& stream, const std::array<Elem, 2>& buffers,
-        CompletionCondition completion_condition, ReadHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        stream_(stream),
-        buffers_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    read_op(const read_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    read_op(read_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      typename asio::detail::dependent_type<Elem,
-          std::array<asio::mutable_buffer, 2> >::type bufs = {{
-        asio::mutable_buffer(buffers_[0]),
-        asio::mutable_buffer(buffers_[1]) }};
-      std::size_t buffer_size0 = bufs[0].size();
-      std::size_t buffer_size1 = bufs[1].size();
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          bufs[0] = asio::buffer(bufs[0] + total_transferred_, n);
-          bufs[1] = asio::buffer(
-              bufs[1] + (total_transferred_ < buffer_size0
-                ? 0 : total_transferred_ - buffer_size0),
-              n - bufs[0].size());
-          stream_.async_read_some(bufs, ASIO_MOVE_CAST(read_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_size0 + buffer_size1)
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncReadStream& stream_;
-    std::array<Elem, 2> buffers_;
-    int start_;
-    std::size_t total_transferred_;
-    ReadHandler handler_;
-  };
-
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
   template <typename AsyncReadStream, typename MutableBufferSequence,
-      typename CompletionCondition, typename ReadHandler>
+      typename MutableBufferIterator, typename CompletionCondition,
+      typename ReadHandler>
   inline void* asio_handler_allocate(std::size_t size,
-      read_op<AsyncReadStream, MutableBufferSequence,
+      read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
         CompletionCondition, ReadHandler>* this_handler)
   {
     return asio_handler_alloc_helpers::allocate(
@@ -541,9 +305,10 @@
   }
 
   template <typename AsyncReadStream, typename MutableBufferSequence,
-      typename CompletionCondition, typename ReadHandler>
+      typename MutableBufferIterator, typename CompletionCondition,
+      typename ReadHandler>
   inline void asio_handler_deallocate(void* pointer, std::size_t size,
-      read_op<AsyncReadStream, MutableBufferSequence,
+      read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
         CompletionCondition, ReadHandler>* this_handler)
   {
     asio_handler_alloc_helpers::deallocate(
@@ -551,9 +316,10 @@
   }
 
   template <typename AsyncReadStream, typename MutableBufferSequence,
-      typename CompletionCondition, typename ReadHandler>
+      typename MutableBufferIterator, typename CompletionCondition,
+      typename ReadHandler>
   inline bool asio_handler_is_continuation(
-      read_op<AsyncReadStream, MutableBufferSequence,
+      read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
         CompletionCondition, ReadHandler>* this_handler)
   {
     return this_handler->start_ == 0 ? true
@@ -562,10 +328,10 @@
   }
 
   template <typename Function, typename AsyncReadStream,
-      typename MutableBufferSequence, typename CompletionCondition,
-      typename ReadHandler>
+      typename MutableBufferSequence, typename MutableBufferIterator,
+      typename CompletionCondition, typename ReadHandler>
   inline void asio_handler_invoke(Function& function,
-      read_op<AsyncReadStream, MutableBufferSequence,
+      read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
         CompletionCondition, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
@@ -573,31 +339,45 @@
   }
 
   template <typename Function, typename AsyncReadStream,
-      typename MutableBufferSequence, typename CompletionCondition,
-      typename ReadHandler>
+      typename MutableBufferSequence, typename MutableBufferIterator,
+      typename CompletionCondition, typename ReadHandler>
   inline void asio_handler_invoke(const Function& function,
-      read_op<AsyncReadStream, MutableBufferSequence,
+      read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
         CompletionCondition, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
   }
+
+  template <typename AsyncReadStream, typename MutableBufferSequence,
+      typename MutableBufferIterator, typename CompletionCondition,
+      typename ReadHandler>
+  inline void start_read_buffer_sequence_op(AsyncReadStream& stream,
+      const MutableBufferSequence& buffers, const MutableBufferIterator&,
+      CompletionCondition completion_condition, ReadHandler& handler)
+  {
+    detail::read_op<AsyncReadStream, MutableBufferSequence,
+      MutableBufferIterator, CompletionCondition, ReadHandler>(
+        stream, buffers, completion_condition, handler)(
+          asio::error_code(), 0, 1);
+  }
 } // namespace detail
 
 #if !defined(GENERATING_DOCUMENTATION)
 
 template <typename AsyncReadStream, typename MutableBufferSequence,
-    typename CompletionCondition, typename ReadHandler, typename Allocator>
+    typename MutableBufferIterator, typename CompletionCondition,
+    typename ReadHandler, typename Allocator>
 struct associated_allocator<
     detail::read_op<AsyncReadStream, MutableBufferSequence,
-      CompletionCondition, ReadHandler>,
+      MutableBufferIterator, CompletionCondition, ReadHandler>,
     Allocator>
 {
   typedef typename associated_allocator<ReadHandler, Allocator>::type type;
 
   static type get(
       const detail::read_op<AsyncReadStream, MutableBufferSequence,
-        CompletionCondition, ReadHandler>& h,
+        MutableBufferIterator, CompletionCondition, ReadHandler>& h,
       const Allocator& a = Allocator()) ASIO_NOEXCEPT
   {
     return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
@@ -605,17 +385,18 @@
 };
 
 template <typename AsyncReadStream, typename MutableBufferSequence,
-    typename CompletionCondition, typename ReadHandler, typename Executor>
+    typename MutableBufferIterator, typename CompletionCondition,
+    typename ReadHandler, typename Executor>
 struct associated_executor<
     detail::read_op<AsyncReadStream, MutableBufferSequence,
-      CompletionCondition, ReadHandler>,
+      MutableBufferIterator, CompletionCondition, ReadHandler>,
     Executor>
 {
   typedef typename associated_executor<ReadHandler, Executor>::type type;
 
   static type get(
       const detail::read_op<AsyncReadStream, MutableBufferSequence,
-        CompletionCondition, ReadHandler>& h,
+        MutableBufferIterator, CompletionCondition, ReadHandler>& h,
       const Executor& ex = Executor()) ASIO_NOEXCEPT
   {
     return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@@ -642,11 +423,9 @@
   async_completion<ReadHandler,
     void (asio::error_code, std::size_t)> init(handler);
 
-  detail::read_op<AsyncReadStream, MutableBufferSequence,
-    CompletionCondition, ASIO_HANDLER_TYPE(
-      ReadHandler, void (asio::error_code, std::size_t))>(
-        s, buffers, completion_condition, init.handler)(
-          asio::error_code(), 0, 1);
+  detail::start_read_buffer_sequence_op(s, buffers,
+      asio::buffer_sequence_begin(buffers), completion_condition,
+      init.completion_handler);
 
   return init.result.get();
 }
@@ -668,18 +447,16 @@
   async_completion<ReadHandler,
     void (asio::error_code, std::size_t)> init(handler);
 
-  detail::read_op<AsyncReadStream, MutableBufferSequence,
-    detail::transfer_all_t, ASIO_HANDLER_TYPE(
-      ReadHandler, void (asio::error_code, std::size_t))>(
-        s, buffers, transfer_all(), init.handler)(
-          asio::error_code(), 0, 1);
+  detail::start_read_buffer_sequence_op(s, buffers,
+      asio::buffer_sequence_begin(buffers), transfer_all(),
+      init.completion_handler);
 
   return init.result.get();
 }
 
 namespace detail
 {
-  template <typename AsyncReadStream, typename DynamicBufferSequence,
+  template <typename AsyncReadStream, typename DynamicBuffer,
       typename CompletionCondition, typename ReadHandler>
   class read_dynbuf_op
     : detail::base_from_completion_cond<CompletionCondition>
@@ -713,7 +490,7 @@
     read_dynbuf_op(read_dynbuf_op&& other)
       : detail::base_from_completion_cond<CompletionCondition>(other),
         stream_(other.stream_),
-        buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)),
+        buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
         start_(other.start_),
         total_transferred_(other.total_transferred_),
         handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
@@ -757,36 +534,36 @@
 
   //private:
     AsyncReadStream& stream_;
-    DynamicBufferSequence buffers_;
+    DynamicBuffer buffers_;
     int start_;
     std::size_t total_transferred_;
     ReadHandler handler_;
   };
 
-  template <typename AsyncReadStream, typename DynamicBufferSequence,
+  template <typename AsyncReadStream, typename DynamicBuffer,
       typename CompletionCondition, typename ReadHandler>
   inline void* asio_handler_allocate(std::size_t size,
-      read_dynbuf_op<AsyncReadStream, DynamicBufferSequence,
+      read_dynbuf_op<AsyncReadStream, DynamicBuffer,
         CompletionCondition, ReadHandler>* this_handler)
   {
     return asio_handler_alloc_helpers::allocate(
         size, this_handler->handler_);
   }
 
-  template <typename AsyncReadStream, typename DynamicBufferSequence,
+  template <typename AsyncReadStream, typename DynamicBuffer,
       typename CompletionCondition, typename ReadHandler>
   inline void asio_handler_deallocate(void* pointer, std::size_t size,
-      read_dynbuf_op<AsyncReadStream, DynamicBufferSequence,
+      read_dynbuf_op<AsyncReadStream, DynamicBuffer,
         CompletionCondition, ReadHandler>* this_handler)
   {
     asio_handler_alloc_helpers::deallocate(
         pointer, size, this_handler->handler_);
   }
 
-  template <typename AsyncReadStream, typename DynamicBufferSequence,
+  template <typename AsyncReadStream, typename DynamicBuffer,
       typename CompletionCondition, typename ReadHandler>
   inline bool asio_handler_is_continuation(
-      read_dynbuf_op<AsyncReadStream, DynamicBufferSequence,
+      read_dynbuf_op<AsyncReadStream, DynamicBuffer,
         CompletionCondition, ReadHandler>* this_handler)
   {
     return this_handler->start_ == 0 ? true
@@ -795,10 +572,10 @@
   }
 
   template <typename Function, typename AsyncReadStream,
-      typename DynamicBufferSequence, typename CompletionCondition,
+      typename DynamicBuffer, typename CompletionCondition,
       typename ReadHandler>
   inline void asio_handler_invoke(Function& function,
-      read_dynbuf_op<AsyncReadStream, DynamicBufferSequence,
+      read_dynbuf_op<AsyncReadStream, DynamicBuffer,
         CompletionCondition, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
@@ -806,10 +583,10 @@
   }
 
   template <typename Function, typename AsyncReadStream,
-      typename DynamicBufferSequence, typename CompletionCondition,
+      typename DynamicBuffer, typename CompletionCondition,
       typename ReadHandler>
   inline void asio_handler_invoke(const Function& function,
-      read_dynbuf_op<AsyncReadStream, DynamicBufferSequence,
+      read_dynbuf_op<AsyncReadStream, DynamicBuffer,
         CompletionCondition, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
@@ -819,36 +596,36 @@
 
 #if !defined(GENERATING_DOCUMENTATION)
 
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename CompletionCondition, typename ReadHandler, typename Allocator>
 struct associated_allocator<
     detail::read_dynbuf_op<AsyncReadStream,
-      DynamicBufferSequence, CompletionCondition, ReadHandler>,
+      DynamicBuffer, CompletionCondition, ReadHandler>,
     Allocator>
 {
   typedef typename associated_allocator<ReadHandler, Allocator>::type type;
 
   static type get(
       const detail::read_dynbuf_op<AsyncReadStream,
-        DynamicBufferSequence, CompletionCondition, ReadHandler>& h,
+        DynamicBuffer, CompletionCondition, ReadHandler>& h,
       const Allocator& a = Allocator()) ASIO_NOEXCEPT
   {
     return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
   }
 };
 
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename CompletionCondition, typename ReadHandler, typename Executor>
 struct associated_executor<
     detail::read_dynbuf_op<AsyncReadStream,
-      DynamicBufferSequence, CompletionCondition, ReadHandler>,
+      DynamicBuffer, CompletionCondition, ReadHandler>,
     Executor>
 {
   typedef typename associated_executor<ReadHandler, Executor>::type type;
 
   static type get(
       const detail::read_dynbuf_op<AsyncReadStream,
-        DynamicBufferSequence, CompletionCondition, ReadHandler>& h,
+        DynamicBuffer, CompletionCondition, ReadHandler>& h,
       const Executor& ex = Executor()) ASIO_NOEXCEPT
   {
     return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@@ -858,31 +635,31 @@
 #endif // !defined(GENERATING_DOCUMENTATION)
 
 template <typename AsyncReadStream,
-    typename DynamicBufferSequence, typename ReadHandler>
+    typename DynamicBuffer, typename ReadHandler>
 inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read(AsyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     ASIO_MOVE_ARG(ReadHandler) handler,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type*)
 {
   return async_read(s,
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers),
       transfer_all(), ASIO_MOVE_CAST(ReadHandler)(handler));
 }
 
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename CompletionCondition, typename ReadHandler>
 inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read(AsyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     CompletionCondition completion_condition,
     ASIO_MOVE_ARG(ReadHandler) handler,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type*)
 {
   // If you get an error on the following line it means that your handler does
@@ -893,16 +670,17 @@
     void (asio::error_code, std::size_t)> init(handler);
 
   detail::read_dynbuf_op<AsyncReadStream,
-    typename decay<DynamicBufferSequence>::type,
+    typename decay<DynamicBuffer>::type,
       CompletionCondition, ASIO_HANDLER_TYPE(
         ReadHandler, void (asio::error_code, std::size_t))>(
-          s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
-            completion_condition, init.handler)(
+          s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+            completion_condition, init.completion_handler)(
               asio::error_code(), 0, 1);
 
   return init.result.get();
 }
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
@@ -928,6 +706,7 @@
 }
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 } // namespace asio
 
diff --git a/asio/include/asio/impl/read_at.hpp b/asio/include/asio/impl/read_at.hpp
index 22882c6..273312f 100644
--- a/asio/include/asio/impl/read_at.hpp
+++ b/asio/include/asio/impl/read_at.hpp
@@ -2,7 +2,7 @@
 // impl/read_at.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -36,28 +36,41 @@
 
 namespace asio {
 
+namespace detail
+{
+  template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
+      typename MutableBufferIterator, typename CompletionCondition>
+  std::size_t read_at_buffer_sequence(SyncRandomAccessReadDevice& d,
+      uint64_t offset, const MutableBufferSequence& buffers,
+      const MutableBufferIterator&, CompletionCondition completion_condition,
+      asio::error_code& ec)
+  {
+    ec = asio::error_code();
+    asio::detail::consuming_buffers<mutable_buffer,
+        MutableBufferSequence, MutableBufferIterator> tmp(buffers);
+    while (!tmp.empty())
+    {
+      if (std::size_t max_size = detail::adapt_completion_condition_result(
+            completion_condition(ec, tmp.total_consumed())))
+      {
+        tmp.consume(d.read_some_at(offset + tmp.total_consumed(),
+              tmp.prepare(max_size), ec));
+      }
+      else
+        break;
+    }
+    return tmp.total_consumed();;
+  }
+} // namespace detail
+
 template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
     typename CompletionCondition>
 std::size_t read_at(SyncRandomAccessReadDevice& d,
     uint64_t offset, const MutableBufferSequence& buffers,
     CompletionCondition completion_condition, asio::error_code& ec)
 {
-  ec = asio::error_code();
-  asio::detail::consuming_buffers<
-    mutable_buffer, MutableBufferSequence> tmp(buffers);
-  std::size_t total_transferred = 0;
-  tmp.prepare(detail::adapt_completion_condition_result(
-        completion_condition(ec, total_transferred)));
-  while (tmp.begin() != tmp.end())
-  {
-    std::size_t bytes_transferred = d.read_some_at(
-        offset + total_transferred, tmp, ec);
-    tmp.consume(bytes_transferred);
-    total_transferred += bytes_transferred;
-    tmp.prepare(detail::adapt_completion_condition_result(
-          completion_condition(ec, total_transferred)));
-  }
-  return total_transferred;
+  return detail::read_at_buffer_sequence(d, offset, buffers,
+      asio::buffer_sequence_begin(buffers), completion_condition, ec);
 }
 
 template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
@@ -92,6 +105,7 @@
   return bytes_transferred;
 }
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 template <typename SyncRandomAccessReadDevice, typename Allocator,
@@ -151,12 +165,13 @@
 }
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 namespace detail
 {
   template <typename AsyncRandomAccessReadDevice,
-      typename MutableBufferSequence, typename CompletionCondition,
-      typename ReadHandler>
+      typename MutableBufferSequence, typename MutableBufferIterator,
+      typename CompletionCondition, typename ReadHandler>
   class read_at_op
     : detail::base_from_completion_cond<CompletionCondition>
   {
@@ -170,7 +185,6 @@
         offset_(offset),
         buffers_(buffers),
         start_(0),
-        total_transferred_(0),
         handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
     {
     }
@@ -182,7 +196,6 @@
         offset_(other.offset_),
         buffers_(other.buffers_),
         start_(other.start_),
-        total_transferred_(other.total_transferred_),
         handler_(other.handler_)
     {
     }
@@ -193,7 +206,6 @@
         offset_(other.offset_),
         buffers_(other.buffers_),
         start_(other.start_),
-        total_transferred_(other.total_transferred_),
         handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
     {
     }
@@ -202,326 +214,64 @@
     void operator()(const asio::error_code& ec,
         std::size_t bytes_transferred, int start = 0)
     {
+      std::size_t max_size;
       switch (start_ = start)
       {
         case 1:
-        buffers_.prepare(this->check_for_completion(ec, total_transferred_));
-        for (;;)
+        max_size = this->check_for_completion(ec, buffers_.total_consumed());
+        do
         {
-          device_.async_read_some_at(offset_ + total_transferred_,
-              buffers_, ASIO_MOVE_CAST(read_at_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          buffers_.consume(bytes_transferred);
-          buffers_.prepare(this->check_for_completion(ec, total_transferred_));
-          if ((!ec && bytes_transferred == 0)
-              || buffers_.begin() == buffers_.end())
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncRandomAccessReadDevice& device_;
-    uint64_t offset_;
-    asio::detail::consuming_buffers<
-      mutable_buffer, MutableBufferSequence> buffers_;
-    int start_;
-    std::size_t total_transferred_;
-    ReadHandler handler_;
-  };
-
-  template <typename AsyncRandomAccessReadDevice,
-      typename CompletionCondition, typename ReadHandler>
-  class read_at_op<AsyncRandomAccessReadDevice,
-      asio::mutable_buffers_1, CompletionCondition, ReadHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    read_at_op(AsyncRandomAccessReadDevice& device,
-        uint64_t offset, const asio::mutable_buffers_1& buffers,
-        CompletionCondition completion_condition, ReadHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        device_(device),
-        offset_(offset),
-        buffer_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    read_at_op(const read_at_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffer_(other.buffer_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    read_at_op(read_at_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffer_(other.buffer_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          device_.async_read_some_at(offset_ + total_transferred_,
-              asio::buffer(buffer_ + total_transferred_, n),
+          device_.async_read_some_at(
+              offset_ + buffers_.total_consumed(), buffers_.prepare(max_size),
               ASIO_MOVE_CAST(read_at_op)(*this));
           return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_.size())
+          buffers_.consume(bytes_transferred);
+          if ((!ec && bytes_transferred == 0) || buffers_.empty())
             break;
-        }
+          max_size = this->check_for_completion(ec, buffers_.total_consumed());
+        } while (max_size > 0);
 
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
+        handler_(ec, buffers_.total_consumed());
       }
     }
 
   //private:
     AsyncRandomAccessReadDevice& device_;
     uint64_t offset_;
-    asio::mutable_buffer buffer_;
+    asio::detail::consuming_buffers<mutable_buffer,
+        MutableBufferSequence, MutableBufferIterator> buffers_;
     int start_;
-    std::size_t total_transferred_;
     ReadHandler handler_;
   };
 
-  template <typename AsyncRandomAccessReadDevice, typename Elem,
-      typename CompletionCondition, typename ReadHandler>
-  class read_at_op<AsyncRandomAccessReadDevice, boost::array<Elem, 2>,
-      CompletionCondition, ReadHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    read_at_op(AsyncRandomAccessReadDevice& device,
-        uint64_t offset, const boost::array<Elem, 2>& buffers,
-        CompletionCondition completion_condition, ReadHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        device_(device),
-        offset_(offset),
-        buffers_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    read_at_op(const read_at_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    read_at_op(read_at_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      typename asio::detail::dependent_type<Elem,
-          boost::array<asio::mutable_buffer, 2> >::type bufs = {{
-        asio::mutable_buffer(buffers_[0]),
-        asio::mutable_buffer(buffers_[1]) }};
-      std::size_t buffer_size0 = bufs[0].size();
-      std::size_t buffer_size1 = bufs[1].size();
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          bufs[0] = asio::buffer(bufs[0] + total_transferred_, n);
-          bufs[1] = asio::buffer(
-              bufs[1] + (total_transferred_ < buffer_size0
-                ? 0 : total_transferred_ - buffer_size0),
-              n - bufs[0].size());
-          device_.async_read_some_at(offset_ + total_transferred_,
-              bufs, ASIO_MOVE_CAST(read_at_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_size0 + buffer_size1)
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncRandomAccessReadDevice& device_;
-    uint64_t offset_;
-    boost::array<Elem, 2> buffers_;
-    int start_;
-    std::size_t total_transferred_;
-    ReadHandler handler_;
-  };
-
-#if defined(ASIO_HAS_STD_ARRAY)
-
-  template <typename AsyncRandomAccessReadDevice, typename Elem,
-      typename CompletionCondition, typename ReadHandler>
-  class read_at_op<AsyncRandomAccessReadDevice, std::array<Elem, 2>,
-      CompletionCondition, ReadHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    read_at_op(AsyncRandomAccessReadDevice& device,
-        uint64_t offset, const std::array<Elem, 2>& buffers,
-        CompletionCondition completion_condition, ReadHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        device_(device),
-        offset_(offset),
-        buffers_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    read_at_op(const read_at_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    read_at_op(read_at_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      typename asio::detail::dependent_type<Elem,
-          std::array<asio::mutable_buffer, 2> >::type bufs = {{
-        asio::mutable_buffer(buffers_[0]),
-        asio::mutable_buffer(buffers_[1]) }};
-      std::size_t buffer_size0 = bufs[0].size();
-      std::size_t buffer_size1 = bufs[1].size();
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          bufs[0] = asio::buffer(bufs[0] + total_transferred_, n);
-          bufs[1] = asio::buffer(
-              bufs[1] + (total_transferred_ < buffer_size0
-                ? 0 : total_transferred_ - buffer_size0),
-              n - bufs[0].size());
-          device_.async_read_some_at(offset_ + total_transferred_,
-              bufs, ASIO_MOVE_CAST(read_at_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_size0 + buffer_size1)
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncRandomAccessReadDevice& device_;
-    uint64_t offset_;
-    std::array<Elem, 2> buffers_;
-    int start_;
-    std::size_t total_transferred_;
-    ReadHandler handler_;
-  };
-
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
   template <typename AsyncRandomAccessReadDevice,
-      typename MutableBufferSequence, typename CompletionCondition,
-      typename ReadHandler>
+      typename MutableBufferSequence, typename MutableBufferIterator,
+      typename CompletionCondition, typename ReadHandler>
   inline void* asio_handler_allocate(std::size_t size,
       read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
-        CompletionCondition, ReadHandler>* this_handler)
+        MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
   {
     return asio_handler_alloc_helpers::allocate(
         size, this_handler->handler_);
   }
 
   template <typename AsyncRandomAccessReadDevice,
-      typename MutableBufferSequence, typename CompletionCondition,
-      typename ReadHandler>
+      typename MutableBufferSequence, typename MutableBufferIterator,
+      typename CompletionCondition, typename ReadHandler>
   inline void asio_handler_deallocate(void* pointer, std::size_t size,
       read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
-        CompletionCondition, ReadHandler>* this_handler)
+        MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
   {
     asio_handler_alloc_helpers::deallocate(
         pointer, size, this_handler->handler_);
   }
 
   template <typename AsyncRandomAccessReadDevice,
-      typename MutableBufferSequence, typename CompletionCondition,
-      typename ReadHandler>
+      typename MutableBufferSequence, typename MutableBufferIterator,
+      typename CompletionCondition, typename ReadHandler>
   inline bool asio_handler_is_continuation(
       read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
-        CompletionCondition, ReadHandler>* this_handler)
+        MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
   {
     return this_handler->start_ == 0 ? true
       : asio_handler_cont_helpers::is_continuation(
@@ -529,74 +279,78 @@
   }
 
   template <typename Function, typename AsyncRandomAccessReadDevice,
-      typename MutableBufferSequence, typename CompletionCondition,
-      typename ReadHandler>
+      typename MutableBufferSequence, typename MutableBufferIterator,
+      typename CompletionCondition, typename ReadHandler>
   inline void asio_handler_invoke(Function& function,
       read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
-        CompletionCondition, ReadHandler>* this_handler)
+        MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncRandomAccessReadDevice,
-      typename MutableBufferSequence, typename CompletionCondition,
-      typename ReadHandler>
+      typename MutableBufferSequence, typename MutableBufferIterator,
+      typename CompletionCondition, typename ReadHandler>
   inline void asio_handler_invoke(const Function& function,
       read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
-        CompletionCondition, ReadHandler>* this_handler)
+        MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
   }
 
   template <typename AsyncRandomAccessReadDevice,
-      typename MutableBufferSequence, typename CompletionCondition,
-      typename ReadHandler>
-  inline read_at_op<AsyncRandomAccessReadDevice,
-      MutableBufferSequence, CompletionCondition, ReadHandler>
-  make_read_at_op(AsyncRandomAccessReadDevice& d,
+      typename MutableBufferSequence, typename MutableBufferIterator,
+      typename CompletionCondition, typename ReadHandler>
+  inline void start_read_at_buffer_sequence_op(AsyncRandomAccessReadDevice& d,
       uint64_t offset, const MutableBufferSequence& buffers,
-      CompletionCondition completion_condition, ReadHandler handler)
+      const MutableBufferIterator&, CompletionCondition completion_condition,
+      ReadHandler& handler)
   {
-    return read_at_op<AsyncRandomAccessReadDevice,
-      MutableBufferSequence, CompletionCondition, ReadHandler>(
-        d, offset, buffers, completion_condition, handler);
+    detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
+      MutableBufferIterator, CompletionCondition, ReadHandler>(
+        d, offset, buffers, completion_condition, handler)(
+          asio::error_code(), 0, 1);
   }
 } // namespace detail
 
 #if !defined(GENERATING_DOCUMENTATION)
 
-template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
+template <typename AsyncRandomAccessReadDevice,
+    typename MutableBufferSequence, typename MutableBufferIterator,
     typename CompletionCondition, typename ReadHandler, typename Allocator>
 struct associated_allocator<
-    detail::read_at_op<AsyncRandomAccessReadDevice,
-      MutableBufferSequence, CompletionCondition, ReadHandler>,
+    detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
+    MutableBufferIterator, CompletionCondition, ReadHandler>,
     Allocator>
 {
   typedef typename associated_allocator<ReadHandler, Allocator>::type type;
 
   static type get(
       const detail::read_at_op<AsyncRandomAccessReadDevice,
-        MutableBufferSequence, CompletionCondition, ReadHandler>& h,
+      MutableBufferSequence, MutableBufferIterator,
+      CompletionCondition, ReadHandler>& h,
       const Allocator& a = Allocator()) ASIO_NOEXCEPT
   {
     return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
   }
 };
 
-template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
+template <typename AsyncRandomAccessReadDevice,
+    typename MutableBufferSequence, typename MutableBufferIterator,
     typename CompletionCondition, typename ReadHandler, typename Executor>
 struct associated_executor<
-    detail::read_at_op<AsyncRandomAccessReadDevice,
-      MutableBufferSequence, CompletionCondition, ReadHandler>,
+    detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
+    MutableBufferIterator, CompletionCondition, ReadHandler>,
     Executor>
 {
   typedef typename associated_executor<ReadHandler, Executor>::type type;
 
   static type get(
       const detail::read_at_op<AsyncRandomAccessReadDevice,
-        MutableBufferSequence, CompletionCondition, ReadHandler>& h,
+      MutableBufferSequence, MutableBufferIterator,
+      CompletionCondition, ReadHandler>& h,
       const Executor& ex = Executor()) ASIO_NOEXCEPT
   {
     return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@@ -621,11 +375,9 @@
   async_completion<ReadHandler,
     void (asio::error_code, std::size_t)> init(handler);
 
-  detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
-    CompletionCondition, ASIO_HANDLER_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))>(
-        d, offset, buffers, completion_condition, init.handler)(
-          asio::error_code(), 0, 1);
+  detail::start_read_at_buffer_sequence_op(d, offset, buffers,
+      asio::buffer_sequence_begin(buffers), completion_condition,
+      init.completion_handler);
 
   return init.result.get();
 }
@@ -645,15 +397,14 @@
   async_completion<ReadHandler,
     void (asio::error_code, std::size_t)> init(handler);
 
-  detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
-    detail::transfer_all_t, ASIO_HANDLER_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))>(
-        d, offset, buffers, transfer_all(), init.handler)(
-          asio::error_code(), 0, 1);
+  detail::start_read_at_buffer_sequence_op(d, offset, buffers,
+      asio::buffer_sequence_begin(buffers), transfer_all(),
+      init.completion_handler);
 
   return init.result.get();
 }
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 namespace detail
@@ -849,7 +600,7 @@
   detail::read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
     CompletionCondition, ASIO_HANDLER_TYPE(ReadHandler,
       void (asio::error_code, std::size_t))>(
-        d, offset, b, completion_condition, init.handler)(
+        d, offset, b, completion_condition, init.completion_handler)(
           asio::error_code(), 0, 1);
 
   return init.result.get();
@@ -873,13 +624,14 @@
   detail::read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
     detail::transfer_all_t, ASIO_HANDLER_TYPE(ReadHandler,
       void (asio::error_code, std::size_t))>(
-        d, offset, b, transfer_all(), init.handler)(
+        d, offset, b, transfer_all(), init.completion_handler)(
           asio::error_code(), 0, 1);
 
   return init.result.get();
 }
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 } // namespace asio
 
diff --git a/asio/include/asio/impl/read_until.hpp b/asio/include/asio/impl/read_until.hpp
index de0569b..c0a435e 100644
--- a/asio/include/asio/impl/read_until.hpp
+++ b/asio/include/asio/impl/read_until.hpp
@@ -2,7 +2,7 @@
 // impl/read_until.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -35,30 +35,30 @@
 
 namespace asio {
 
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 inline std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers, char delim)
+    ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim)
 {
   asio::error_code ec;
   std::size_t bytes_transferred = read_until(s,
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), delim, ec);
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec);
   asio::detail::throw_error(ec, "read_until");
   return bytes_transferred;
 }
 
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     char delim, asio::error_code& ec)
 {
-  typename decay<DynamicBufferSequence>::type b(
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers));
+  typename decay<DynamicBuffer>::type b(
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers));
 
   std::size_t search_position = 0;
   for (;;)
   {
     // Determine the range of the data to be searched.
-    typedef typename DynamicBufferSequence::const_buffers_type buffers_type;
+    typedef typename DynamicBuffer::const_buffers_type buffers_type;
     typedef buffers_iterator<buffers_type> iterator;
     buffers_type data_buffers = b.data();
     iterator begin = iterator::begin(data_buffers);
@@ -96,14 +96,14 @@
   }
 }
 
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 inline std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
-    const std::string& delim)
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
+    ASIO_STRING_VIEW_PARAM delim)
 {
   asio::error_code ec;
   std::size_t bytes_transferred = read_until(s,
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), delim, ec);
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec);
   asio::detail::throw_error(ec, "read_until");
   return bytes_transferred;
 }
@@ -143,19 +143,19 @@
   }
 } // namespace detail
 
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
-    const std::string& delim, asio::error_code& ec)
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
+    ASIO_STRING_VIEW_PARAM delim, asio::error_code& ec)
 {
-  typename decay<DynamicBufferSequence>::type b(
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers));
+  typename decay<DynamicBuffer>::type b(
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers));
 
   std::size_t search_position = 0;
   for (;;)
   {
     // Determine the range of the data to be searched.
-    typedef typename DynamicBufferSequence::const_buffers_type buffers_type;
+    typedef typename DynamicBuffer::const_buffers_type buffers_type;
     typedef buffers_iterator<buffers_type> iterator;
     buffers_type data_buffers = b.data();
     iterator begin = iterator::begin(data_buffers);
@@ -202,33 +202,34 @@
   }
 }
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if defined(ASIO_HAS_BOOST_REGEX)
 
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 inline std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     const boost::regex& expr)
 {
   asio::error_code ec;
   std::size_t bytes_transferred = read_until(s,
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), expr, ec);
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers), expr, ec);
   asio::detail::throw_error(ec, "read_until");
   return bytes_transferred;
 }
 
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     const boost::regex& expr, asio::error_code& ec)
 {
-  typename decay<DynamicBufferSequence>::type b(
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers));
+  typename decay<DynamicBuffer>::type b(
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers));
 
   std::size_t search_position = 0;
   for (;;)
   {
     // Determine the range of the data to be searched.
-    typedef typename DynamicBufferSequence::const_buffers_type buffers_type;
+    typedef typename DynamicBuffer::const_buffers_type buffers_type;
     typedef buffers_iterator<buffers_type> iterator;
     buffers_type data_buffers = b.data();
     iterator begin = iterator::begin(data_buffers);
@@ -278,35 +279,35 @@
 #endif // defined(ASIO_HAS_BOOST_REGEX)
 
 template <typename SyncReadStream,
-    typename DynamicBufferSequence, typename MatchCondition>
+    typename DynamicBuffer, typename MatchCondition>
 inline std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     MatchCondition match_condition,
     typename enable_if<is_match_condition<MatchCondition>::value>::type*)
 {
   asio::error_code ec;
   std::size_t bytes_transferred = read_until(s,
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers),
       match_condition, ec);
   asio::detail::throw_error(ec, "read_until");
   return bytes_transferred;
 }
 
 template <typename SyncReadStream,
-    typename DynamicBufferSequence, typename MatchCondition>
+    typename DynamicBuffer, typename MatchCondition>
 std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     MatchCondition match_condition, asio::error_code& ec,
     typename enable_if<is_match_condition<MatchCondition>::value>::type*)
 {
-  typename decay<DynamicBufferSequence>::type b(
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers));
+  typename decay<DynamicBuffer>::type b(
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers));
 
   std::size_t search_position = 0;
   for (;;)
   {
     // Determine the range of the data to be searched.
-    typedef typename DynamicBufferSequence::const_buffers_type buffers_type;
+    typedef typename DynamicBuffer::const_buffers_type buffers_type;
     typedef buffers_iterator<buffers_type> iterator;
     buffers_type data_buffers = b.data();
     iterator begin = iterator::begin(data_buffers);
@@ -368,15 +369,16 @@
 
 template <typename SyncReadStream, typename Allocator>
 inline std::size_t read_until(SyncReadStream& s,
-    asio::basic_streambuf<Allocator>& b, const std::string& delim)
+    asio::basic_streambuf<Allocator>& b,
+    ASIO_STRING_VIEW_PARAM delim)
 {
   return read_until(s, basic_streambuf_ref<Allocator>(b), delim);
 }
 
 template <typename SyncReadStream, typename Allocator>
 inline std::size_t read_until(SyncReadStream& s,
-    asio::basic_streambuf<Allocator>& b, const std::string& delim,
-    asio::error_code& ec)
+    asio::basic_streambuf<Allocator>& b,
+    ASIO_STRING_VIEW_PARAM delim, asio::error_code& ec)
 {
   return read_until(s, basic_streambuf_ref<Allocator>(b), delim, ec);
 }
@@ -418,11 +420,12 @@
 }
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 namespace detail
 {
   template <typename AsyncReadStream,
-      typename DynamicBufferSequence, typename ReadHandler>
+      typename DynamicBuffer, typename ReadHandler>
   class read_until_delim_op
   {
   public:
@@ -452,7 +455,7 @@
 
     read_until_delim_op(read_until_delim_op&& other)
       : stream_(other.stream_),
-        buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)),
+        buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
         delim_(other.delim_),
         start_(other.start_),
         search_position_(other.search_position_),
@@ -473,7 +476,7 @@
         {
           {
             // Determine the range of the data to be searched.
-            typedef typename DynamicBufferSequence::const_buffers_type
+            typedef typename DynamicBuffer::const_buffers_type
               buffers_type;
             typedef buffers_iterator<buffers_type> iterator;
             buffers_type data_buffers = buffers_.data();
@@ -537,7 +540,7 @@
 
   //private:
     AsyncReadStream& stream_;
-    DynamicBufferSequence buffers_;
+    DynamicBuffer buffers_;
     char delim_;
     int start_;
     std::size_t search_position_;
@@ -545,30 +548,30 @@
   };
 
   template <typename AsyncReadStream,
-      typename DynamicBufferSequence, typename ReadHandler>
+      typename DynamicBuffer, typename ReadHandler>
   inline void* asio_handler_allocate(std::size_t size,
       read_until_delim_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>* this_handler)
+        DynamicBuffer, ReadHandler>* this_handler)
   {
     return asio_handler_alloc_helpers::allocate(
         size, this_handler->handler_);
   }
 
   template <typename AsyncReadStream,
-      typename DynamicBufferSequence, typename ReadHandler>
+      typename DynamicBuffer, typename ReadHandler>
   inline void asio_handler_deallocate(void* pointer, std::size_t size,
       read_until_delim_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>* this_handler)
+        DynamicBuffer, ReadHandler>* this_handler)
   {
     asio_handler_alloc_helpers::deallocate(
         pointer, size, this_handler->handler_);
   }
 
   template <typename AsyncReadStream,
-      typename DynamicBufferSequence, typename ReadHandler>
+      typename DynamicBuffer, typename ReadHandler>
   inline bool asio_handler_is_continuation(
       read_until_delim_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>* this_handler)
+        DynamicBuffer, ReadHandler>* this_handler)
   {
     return this_handler->start_ == 0 ? true
       : asio_handler_cont_helpers::is_continuation(
@@ -576,20 +579,20 @@
   }
 
   template <typename Function, typename AsyncReadStream,
-      typename DynamicBufferSequence, typename ReadHandler>
+      typename DynamicBuffer, typename ReadHandler>
   inline void asio_handler_invoke(Function& function,
       read_until_delim_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>* this_handler)
+        DynamicBuffer, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncReadStream,
-      typename DynamicBufferSequence, typename ReadHandler>
+      typename DynamicBuffer, typename ReadHandler>
   inline void asio_handler_invoke(const Function& function,
       read_until_delim_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>* this_handler)
+        DynamicBuffer, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
@@ -598,36 +601,36 @@
 
 #if !defined(GENERATING_DOCUMENTATION)
 
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename ReadHandler, typename Allocator>
 struct associated_allocator<
     detail::read_until_delim_op<AsyncReadStream,
-      DynamicBufferSequence, ReadHandler>,
+      DynamicBuffer, ReadHandler>,
     Allocator>
 {
   typedef typename associated_allocator<ReadHandler, Allocator>::type type;
 
   static type get(
       const detail::read_until_delim_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>& h,
+        DynamicBuffer, ReadHandler>& h,
       const Allocator& a = Allocator()) ASIO_NOEXCEPT
   {
     return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
   }
 };
 
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename ReadHandler, typename Executor>
 struct associated_executor<
     detail::read_until_delim_op<AsyncReadStream,
-      DynamicBufferSequence, ReadHandler>,
+      DynamicBuffer, ReadHandler>,
     Executor>
 {
   typedef typename associated_executor<ReadHandler, Executor>::type type;
 
   static type get(
       const detail::read_until_delim_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>& h,
+        DynamicBuffer, ReadHandler>& h,
       const Executor& ex = Executor()) ASIO_NOEXCEPT
   {
     return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@@ -637,11 +640,11 @@
 #endif // !defined(GENERATING_DOCUMENTATION)
 
 template <typename AsyncReadStream,
-    typename DynamicBufferSequence, typename ReadHandler>
+    typename DynamicBuffer, typename ReadHandler>
 ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read_until(AsyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     char delim, ASIO_MOVE_ARG(ReadHandler) handler)
 {
   // If you get an error on the following line it means that your handler does
@@ -652,11 +655,11 @@
     void (asio::error_code, std::size_t)> init(handler);
 
   detail::read_until_delim_op<AsyncReadStream,
-    typename decay<DynamicBufferSequence>::type,
+    typename decay<DynamicBuffer>::type,
       ASIO_HANDLER_TYPE(ReadHandler,
         void (asio::error_code, std::size_t))>(
-          s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
-            delim, init.handler)(asio::error_code(), 0, 1);
+          s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+            delim, init.completion_handler)(asio::error_code(), 0, 1);
 
   return init.result.get();
 }
@@ -664,7 +667,7 @@
 namespace detail
 {
   template <typename AsyncReadStream,
-      typename DynamicBufferSequence, typename ReadHandler>
+      typename DynamicBuffer, typename ReadHandler>
   class read_until_delim_string_op
   {
   public:
@@ -694,7 +697,7 @@
 
     read_until_delim_string_op(read_until_delim_string_op&& other)
       : stream_(other.stream_),
-        buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)),
+        buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
         delim_(ASIO_MOVE_CAST(std::string)(other.delim_)),
         start_(other.start_),
         search_position_(other.search_position_),
@@ -715,7 +718,7 @@
         {
           {
             // Determine the range of the data to be searched.
-            typedef typename DynamicBufferSequence::const_buffers_type
+            typedef typename DynamicBuffer::const_buffers_type
               buffers_type;
             typedef buffers_iterator<buffers_type> iterator;
             buffers_type data_buffers = buffers_.data();
@@ -790,7 +793,7 @@
 
   //private:
     AsyncReadStream& stream_;
-    DynamicBufferSequence buffers_;
+    DynamicBuffer buffers_;
     std::string delim_;
     int start_;
     std::size_t search_position_;
@@ -798,30 +801,30 @@
   };
 
   template <typename AsyncReadStream,
-      typename DynamicBufferSequence, typename ReadHandler>
+      typename DynamicBuffer, typename ReadHandler>
   inline void* asio_handler_allocate(std::size_t size,
       read_until_delim_string_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>* this_handler)
+        DynamicBuffer, ReadHandler>* this_handler)
   {
     return asio_handler_alloc_helpers::allocate(
         size, this_handler->handler_);
   }
 
   template <typename AsyncReadStream,
-      typename DynamicBufferSequence, typename ReadHandler>
+      typename DynamicBuffer, typename ReadHandler>
   inline void asio_handler_deallocate(void* pointer, std::size_t size,
       read_until_delim_string_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>* this_handler)
+        DynamicBuffer, ReadHandler>* this_handler)
   {
     asio_handler_alloc_helpers::deallocate(
         pointer, size, this_handler->handler_);
   }
 
   template <typename AsyncReadStream,
-      typename DynamicBufferSequence, typename ReadHandler>
+      typename DynamicBuffer, typename ReadHandler>
   inline bool asio_handler_is_continuation(
       read_until_delim_string_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>* this_handler)
+        DynamicBuffer, ReadHandler>* this_handler)
   {
     return this_handler->start_ == 0 ? true
       : asio_handler_cont_helpers::is_continuation(
@@ -829,20 +832,20 @@
   }
 
   template <typename Function, typename AsyncReadStream,
-      typename DynamicBufferSequence, typename ReadHandler>
+      typename DynamicBuffer, typename ReadHandler>
   inline void asio_handler_invoke(Function& function,
       read_until_delim_string_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>* this_handler)
+        DynamicBuffer, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncReadStream,
-      typename DynamicBufferSequence, typename ReadHandler>
+      typename DynamicBuffer, typename ReadHandler>
   inline void asio_handler_invoke(const Function& function,
       read_until_delim_string_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>* this_handler)
+        DynamicBuffer, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
@@ -851,36 +854,36 @@
 
 #if !defined(GENERATING_DOCUMENTATION)
 
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename ReadHandler, typename Allocator>
 struct associated_allocator<
     detail::read_until_delim_string_op<AsyncReadStream,
-      DynamicBufferSequence, ReadHandler>,
+      DynamicBuffer, ReadHandler>,
     Allocator>
 {
   typedef typename associated_allocator<ReadHandler, Allocator>::type type;
 
   static type get(
       const detail::read_until_delim_string_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>& h,
+        DynamicBuffer, ReadHandler>& h,
       const Allocator& a = Allocator()) ASIO_NOEXCEPT
   {
     return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
   }
 };
 
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename ReadHandler, typename Executor>
 struct associated_executor<
     detail::read_until_delim_string_op<AsyncReadStream,
-      DynamicBufferSequence, ReadHandler>,
+      DynamicBuffer, ReadHandler>,
     Executor>
 {
   typedef typename associated_executor<ReadHandler, Executor>::type type;
 
   static type get(
       const detail::read_until_delim_string_op<AsyncReadStream,
-        DynamicBufferSequence, ReadHandler>& h,
+        DynamicBuffer, ReadHandler>& h,
       const Executor& ex = Executor()) ASIO_NOEXCEPT
   {
     return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@@ -890,12 +893,13 @@
 #endif // !defined(GENERATING_DOCUMENTATION)
 
 template <typename AsyncReadStream,
-    typename DynamicBufferSequence, typename ReadHandler>
+    typename DynamicBuffer, typename ReadHandler>
 ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read_until(AsyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
-    const std::string& delim, ASIO_MOVE_ARG(ReadHandler) handler)
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
+    ASIO_STRING_VIEW_PARAM delim,
+    ASIO_MOVE_ARG(ReadHandler) handler)
 {
   // If you get an error on the following line it means that your handler does
   // not meet the documented type requirements for a ReadHandler.
@@ -905,20 +909,22 @@
     void (asio::error_code, std::size_t)> init(handler);
 
   detail::read_until_delim_string_op<AsyncReadStream,
-    typename decay<DynamicBufferSequence>::type,
+    typename decay<DynamicBuffer>::type,
       ASIO_HANDLER_TYPE(ReadHandler,
         void (asio::error_code, std::size_t))>(
-          s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
-            delim, init.handler)(asio::error_code(), 0, 1);
+          s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+            static_cast<std::string>(delim),
+              init.completion_handler)(asio::error_code(), 0, 1);
 
   return init.result.get();
 }
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if defined(ASIO_HAS_BOOST_REGEX)
 
 namespace detail
 {
-  template <typename AsyncReadStream, typename DynamicBufferSequence,
+  template <typename AsyncReadStream, typename DynamicBuffer,
       typename RegEx, typename ReadHandler>
   class read_until_expr_op
   {
@@ -949,7 +955,7 @@
 
     read_until_expr_op(read_until_expr_op&& other)
       : stream_(other.stream_),
-        buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)),
+        buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
         expr_(other.expr_),
         start_(other.start_),
         search_position_(other.search_position_),
@@ -970,7 +976,7 @@
         {
           {
             // Determine the range of the data to be searched.
-            typedef typename DynamicBufferSequence::const_buffers_type
+            typedef typename DynamicBuffer::const_buffers_type
               buffers_type;
             typedef buffers_iterator<buffers_type> iterator;
             buffers_type data_buffers = buffers_.data();
@@ -1048,38 +1054,38 @@
 
   //private:
     AsyncReadStream& stream_;
-    DynamicBufferSequence buffers_;
+    DynamicBuffer buffers_;
     RegEx expr_;
     int start_;
     std::size_t search_position_;
     ReadHandler handler_;
   };
 
-  template <typename AsyncReadStream, typename DynamicBufferSequence,
+  template <typename AsyncReadStream, typename DynamicBuffer,
       typename RegEx, typename ReadHandler>
   inline void* asio_handler_allocate(std::size_t size,
       read_until_expr_op<AsyncReadStream,
-        DynamicBufferSequence, RegEx, ReadHandler>* this_handler)
+        DynamicBuffer, RegEx, ReadHandler>* this_handler)
   {
     return asio_handler_alloc_helpers::allocate(
         size, this_handler->handler_);
   }
 
-  template <typename AsyncReadStream, typename DynamicBufferSequence,
+  template <typename AsyncReadStream, typename DynamicBuffer,
       typename RegEx, typename ReadHandler>
   inline void asio_handler_deallocate(void* pointer, std::size_t size,
       read_until_expr_op<AsyncReadStream,
-        DynamicBufferSequence, RegEx, ReadHandler>* this_handler)
+        DynamicBuffer, RegEx, ReadHandler>* this_handler)
   {
     asio_handler_alloc_helpers::deallocate(
         pointer, size, this_handler->handler_);
   }
 
-  template <typename AsyncReadStream, typename DynamicBufferSequence,
+  template <typename AsyncReadStream, typename DynamicBuffer,
       typename RegEx, typename ReadHandler>
   inline bool asio_handler_is_continuation(
       read_until_expr_op<AsyncReadStream,
-        DynamicBufferSequence, RegEx, ReadHandler>* this_handler)
+        DynamicBuffer, RegEx, ReadHandler>* this_handler)
   {
     return this_handler->start_ == 0 ? true
       : asio_handler_cont_helpers::is_continuation(
@@ -1087,20 +1093,20 @@
   }
 
   template <typename Function, typename AsyncReadStream,
-      typename DynamicBufferSequence, typename RegEx, typename ReadHandler>
+      typename DynamicBuffer, typename RegEx, typename ReadHandler>
   inline void asio_handler_invoke(Function& function,
       read_until_expr_op<AsyncReadStream,
-        DynamicBufferSequence, RegEx, ReadHandler>* this_handler)
+        DynamicBuffer, RegEx, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncReadStream,
-      typename DynamicBufferSequence, typename RegEx, typename ReadHandler>
+      typename DynamicBuffer, typename RegEx, typename ReadHandler>
   inline void asio_handler_invoke(const Function& function,
       read_until_expr_op<AsyncReadStream,
-        DynamicBufferSequence, RegEx, ReadHandler>* this_handler)
+        DynamicBuffer, RegEx, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
@@ -1109,36 +1115,36 @@
 
 #if !defined(GENERATING_DOCUMENTATION)
 
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename RegEx, typename ReadHandler, typename Allocator>
 struct associated_allocator<
     detail::read_until_expr_op<AsyncReadStream,
-      DynamicBufferSequence, RegEx, ReadHandler>,
+      DynamicBuffer, RegEx, ReadHandler>,
     Allocator>
 {
   typedef typename associated_allocator<ReadHandler, Allocator>::type type;
 
   static type get(
       const detail::read_until_expr_op<AsyncReadStream,
-        DynamicBufferSequence, RegEx, ReadHandler>& h,
+        DynamicBuffer, RegEx, ReadHandler>& h,
       const Allocator& a = Allocator()) ASIO_NOEXCEPT
   {
     return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
   }
 };
 
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename RegEx, typename ReadHandler, typename Executor>
 struct associated_executor<
     detail::read_until_expr_op<AsyncReadStream,
-      DynamicBufferSequence, RegEx, ReadHandler>,
+      DynamicBuffer, RegEx, ReadHandler>,
     Executor>
 {
   typedef typename associated_executor<ReadHandler, Executor>::type type;
 
   static type get(
       const detail::read_until_expr_op<AsyncReadStream,
-        DynamicBufferSequence, RegEx, ReadHandler>& h,
+        DynamicBuffer, RegEx, ReadHandler>& h,
       const Executor& ex = Executor()) ASIO_NOEXCEPT
   {
     return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@@ -1148,11 +1154,11 @@
 #endif // !defined(GENERATING_DOCUMENTATION)
 
 template <typename AsyncReadStream,
-    typename DynamicBufferSequence, typename ReadHandler>
+    typename DynamicBuffer, typename ReadHandler>
 ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read_until(AsyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     const boost::regex& expr,
     ASIO_MOVE_ARG(ReadHandler) handler)
 {
@@ -1164,11 +1170,11 @@
     void (asio::error_code, std::size_t)> init(handler);
 
   detail::read_until_expr_op<AsyncReadStream,
-    typename decay<DynamicBufferSequence>::type,
+    typename decay<DynamicBuffer>::type,
       boost::regex, ASIO_HANDLER_TYPE(ReadHandler,
         void (asio::error_code, std::size_t))>(
-          s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
-            expr, init.handler)(asio::error_code(), 0, 1);
+          s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+            expr, init.completion_handler)(asio::error_code(), 0, 1);
 
   return init.result.get();
 }
@@ -1177,7 +1183,7 @@
 
 namespace detail
 {
-  template <typename AsyncReadStream, typename DynamicBufferSequence,
+  template <typename AsyncReadStream, typename DynamicBuffer,
       typename MatchCondition, typename ReadHandler>
   class read_until_match_op
   {
@@ -1208,7 +1214,7 @@
 
     read_until_match_op(read_until_match_op&& other)
       : stream_(other.stream_),
-        buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)),
+        buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
         match_condition_(other.match_condition_),
         start_(other.start_),
         search_position_(other.search_position_),
@@ -1229,7 +1235,7 @@
         {
           {
             // Determine the range of the data to be searched.
-            typedef typename DynamicBufferSequence::const_buffers_type
+            typedef typename DynamicBuffer::const_buffers_type
               buffers_type;
             typedef buffers_iterator<buffers_type> iterator;
             buffers_type data_buffers = buffers_.data();
@@ -1303,37 +1309,37 @@
 
   //private:
     AsyncReadStream& stream_;
-    DynamicBufferSequence buffers_;
+    DynamicBuffer buffers_;
     MatchCondition match_condition_;
     int start_;
     std::size_t search_position_;
     ReadHandler handler_;
   };
 
-  template <typename AsyncReadStream, typename DynamicBufferSequence,
+  template <typename AsyncReadStream, typename DynamicBuffer,
       typename MatchCondition, typename ReadHandler>
   inline void* asio_handler_allocate(std::size_t size,
-      read_until_match_op<AsyncReadStream, DynamicBufferSequence,
+      read_until_match_op<AsyncReadStream, DynamicBuffer,
         MatchCondition, ReadHandler>* this_handler)
   {
     return asio_handler_alloc_helpers::allocate(
         size, this_handler->handler_);
   }
 
-  template <typename AsyncReadStream, typename DynamicBufferSequence,
+  template <typename AsyncReadStream, typename DynamicBuffer,
       typename MatchCondition, typename ReadHandler>
   inline void asio_handler_deallocate(void* pointer, std::size_t size,
-      read_until_match_op<AsyncReadStream, DynamicBufferSequence,
+      read_until_match_op<AsyncReadStream, DynamicBuffer,
         MatchCondition, ReadHandler>* this_handler)
   {
     asio_handler_alloc_helpers::deallocate(
         pointer, size, this_handler->handler_);
   }
 
-  template <typename AsyncReadStream, typename DynamicBufferSequence,
+  template <typename AsyncReadStream, typename DynamicBuffer,
       typename MatchCondition, typename ReadHandler>
   inline bool asio_handler_is_continuation(
-      read_until_match_op<AsyncReadStream, DynamicBufferSequence,
+      read_until_match_op<AsyncReadStream, DynamicBuffer,
         MatchCondition, ReadHandler>* this_handler)
   {
     return this_handler->start_ == 0 ? true
@@ -1342,10 +1348,10 @@
   }
 
   template <typename Function, typename AsyncReadStream,
-      typename DynamicBufferSequence, typename MatchCondition,
+      typename DynamicBuffer, typename MatchCondition,
       typename ReadHandler>
   inline void asio_handler_invoke(Function& function,
-      read_until_match_op<AsyncReadStream, DynamicBufferSequence,
+      read_until_match_op<AsyncReadStream, DynamicBuffer,
         MatchCondition, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
@@ -1353,10 +1359,10 @@
   }
 
   template <typename Function, typename AsyncReadStream,
-      typename DynamicBufferSequence, typename MatchCondition,
+      typename DynamicBuffer, typename MatchCondition,
       typename ReadHandler>
   inline void asio_handler_invoke(const Function& function,
-      read_until_match_op<AsyncReadStream, DynamicBufferSequence,
+      read_until_match_op<AsyncReadStream, DynamicBuffer,
       MatchCondition, ReadHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
@@ -1366,36 +1372,36 @@
 
 #if !defined(GENERATING_DOCUMENTATION)
 
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename MatchCondition, typename ReadHandler, typename Allocator>
 struct associated_allocator<
     detail::read_until_match_op<AsyncReadStream,
-      DynamicBufferSequence, MatchCondition, ReadHandler>,
+      DynamicBuffer, MatchCondition, ReadHandler>,
     Allocator>
 {
   typedef typename associated_allocator<ReadHandler, Allocator>::type type;
 
   static type get(
       const detail::read_until_match_op<AsyncReadStream,
-        DynamicBufferSequence, MatchCondition, ReadHandler>& h,
+        DynamicBuffer, MatchCondition, ReadHandler>& h,
       const Allocator& a = Allocator()) ASIO_NOEXCEPT
   {
     return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
   }
 };
 
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename MatchCondition, typename ReadHandler, typename Executor>
 struct associated_executor<
     detail::read_until_match_op<AsyncReadStream,
-      DynamicBufferSequence, MatchCondition, ReadHandler>,
+      DynamicBuffer, MatchCondition, ReadHandler>,
     Executor>
 {
   typedef typename associated_executor<ReadHandler, Executor>::type type;
 
   static type get(
       const detail::read_until_match_op<AsyncReadStream,
-        DynamicBufferSequence, MatchCondition, ReadHandler>& h,
+        DynamicBuffer, MatchCondition, ReadHandler>& h,
       const Executor& ex = Executor()) ASIO_NOEXCEPT
   {
     return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@@ -1404,12 +1410,12 @@
 
 #endif // !defined(GENERATING_DOCUMENTATION)
 
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename MatchCondition, typename ReadHandler>
 ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read_until(AsyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler,
     typename enable_if<is_match_condition<MatchCondition>::value>::type*)
 {
@@ -1421,11 +1427,12 @@
     void (asio::error_code, std::size_t)> init(handler);
 
   detail::read_until_match_op<AsyncReadStream,
-    typename decay<DynamicBufferSequence>::type,
+    typename decay<DynamicBuffer>::type,
       MatchCondition, ASIO_HANDLER_TYPE(ReadHandler,
         void (asio::error_code, std::size_t))>(
-          s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
-            match_condition, init.handler)(asio::error_code(), 0, 1);
+          s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+            match_condition, init.completion_handler)(
+              asio::error_code(), 0, 1);
 
   return init.result.get();
 }
@@ -1447,7 +1454,8 @@
 inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read_until(AsyncReadStream& s,
-    asio::basic_streambuf<Allocator>& b, const std::string& delim,
+    asio::basic_streambuf<Allocator>& b,
+    ASIO_STRING_VIEW_PARAM delim,
     ASIO_MOVE_ARG(ReadHandler) handler)
 {
   return async_read_until(s, basic_streambuf_ref<Allocator>(b),
@@ -1483,6 +1491,7 @@
 }
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 } // namespace asio
 
diff --git a/asio/include/asio/impl/serial_port_base.hpp b/asio/include/asio/impl/serial_port_base.hpp
index abb8cde..c118d93 100644
--- a/asio/include/asio/impl/serial_port_base.hpp
+++ b/asio/include/asio/impl/serial_port_base.hpp
@@ -2,7 +2,7 @@
 // impl/serial_port_base.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/include/asio/impl/serial_port_base.ipp b/asio/include/asio/impl/serial_port_base.ipp
index 57306d9..748c8ca 100644
--- a/asio/include/asio/impl/serial_port_base.ipp
+++ b/asio/include/asio/impl/serial_port_base.ipp
@@ -2,7 +2,7 @@
 // impl/serial_port_base.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -37,7 +37,7 @@
 
 namespace asio {
 
-asio::error_code serial_port_base::baud_rate::store(
+ASIO_SYNC_OP_VOID serial_port_base::baud_rate::store(
     ASIO_OPTION_STORAGE& storage, asio::error_code& ec) const
 {
 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -111,7 +111,7 @@
 # endif
   default:
     ec = asio::error::invalid_argument;
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 # if defined(_BSD_SOURCE)
   ::cfsetspeed(&storage, baud);
@@ -121,10 +121,10 @@
 # endif
 #endif
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
-asio::error_code serial_port_base::baud_rate::load(
+ASIO_SYNC_OP_VOID serial_port_base::baud_rate::load(
     const ASIO_OPTION_STORAGE& storage, asio::error_code& ec)
 {
 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -199,11 +199,11 @@
   default:
     value_ = 0;
     ec = asio::error::invalid_argument;
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 #endif
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 serial_port_base::flow_control::flow_control(
@@ -217,7 +217,7 @@
   }
 }
 
-asio::error_code serial_port_base::flow_control::store(
+ASIO_SYNC_OP_VOID serial_port_base::flow_control::store(
     ASIO_OPTION_STORAGE& storage, asio::error_code& ec) const
 {
 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -274,17 +274,17 @@
     break;
 # else
     ec = asio::error::operation_not_supported;
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
 # endif
   default:
     break;
   }
 #endif
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
-asio::error_code serial_port_base::flow_control::load(
+ASIO_SYNC_OP_VOID serial_port_base::flow_control::load(
     const ASIO_OPTION_STORAGE& storage, asio::error_code& ec)
 {
 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -322,7 +322,7 @@
   }
 #endif
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 serial_port_base::parity::parity(serial_port_base::parity::type t)
@@ -335,7 +335,7 @@
   }
 }
 
-asio::error_code serial_port_base::parity::store(
+ASIO_SYNC_OP_VOID serial_port_base::parity::store(
     ASIO_OPTION_STORAGE& storage, asio::error_code& ec) const
 {
 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -379,10 +379,10 @@
   }
 #endif
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
-asio::error_code serial_port_base::parity::load(
+ASIO_SYNC_OP_VOID serial_port_base::parity::load(
     const ASIO_OPTION_STORAGE& storage, asio::error_code& ec)
 {
 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -416,7 +416,7 @@
   }
 #endif
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 serial_port_base::stop_bits::stop_bits(
@@ -430,7 +430,7 @@
   }
 }
 
-asio::error_code serial_port_base::stop_bits::store(
+ASIO_SYNC_OP_VOID serial_port_base::stop_bits::store(
     ASIO_OPTION_STORAGE& storage, asio::error_code& ec) const
 {
 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -459,14 +459,14 @@
     break;
   default:
     ec = asio::error::operation_not_supported;
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 #endif
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
-asio::error_code serial_port_base::stop_bits::load(
+ASIO_SYNC_OP_VOID serial_port_base::stop_bits::load(
     const ASIO_OPTION_STORAGE& storage, asio::error_code& ec)
 {
 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -490,7 +490,7 @@
   value_ = (storage.c_cflag & CSTOPB) ? two : one;
 #endif
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 serial_port_base::character_size::character_size(unsigned int t)
@@ -503,7 +503,7 @@
   }
 }
 
-asio::error_code serial_port_base::character_size::store(
+ASIO_SYNC_OP_VOID serial_port_base::character_size::store(
     ASIO_OPTION_STORAGE& storage, asio::error_code& ec) const
 {
 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -520,10 +520,10 @@
   }
 #endif
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
-asio::error_code serial_port_base::character_size::load(
+ASIO_SYNC_OP_VOID serial_port_base::character_size::load(
     const ASIO_OPTION_STORAGE& storage, asio::error_code& ec)
 {
 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -540,7 +540,7 @@
   }
 #endif
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 } // namespace asio
diff --git a/asio/include/asio/impl/spawn.hpp b/asio/include/asio/impl/spawn.hpp
index a69df96..82a05f0 100644
--- a/asio/include/asio/impl/spawn.hpp
+++ b/asio/include/asio/impl/spawn.hpp
@@ -2,7 +2,7 @@
 // impl/spawn.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -26,7 +26,7 @@
 #include "asio/detail/handler_invoke_helpers.hpp"
 #include "asio/detail/memory.hpp"
 #include "asio/detail/noncopyable.hpp"
-#include "asio/handler_type.hpp"
+#include "asio/detail/type_traits.hpp"
 #include "asio/system_error.hpp"
 
 #include "asio/detail/push_options.hpp"
@@ -146,11 +146,140 @@
         function, this_handler->handler_);
   }
 
+  template <typename Handler, typename T>
+  class coro_async_result
+  {
+  public:
+    typedef coro_handler<Handler, T> completion_handler_type;
+    typedef T return_type;
+
+    explicit coro_async_result(completion_handler_type& h)
+      : handler_(h),
+        ca_(h.ca_),
+        ready_(2)
+    {
+      h.ready_ = &ready_;
+      out_ec_ = h.ec_;
+      if (!out_ec_) h.ec_ = &ec_;
+      h.value_ = &value_;
+    }
+
+    return_type get()
+    {
+      // Must not hold shared_ptr to coro while suspended.
+      handler_.coro_.reset();
+
+      if (--ready_ != 0)
+        ca_();
+      if (!out_ec_ && ec_) throw asio::system_error(ec_);
+      return ASIO_MOVE_CAST(return_type)(value_);
+    }
+
+  private:
+    completion_handler_type& handler_;
+    typename basic_yield_context<Handler>::caller_type& ca_;
+    atomic_count ready_;
+    asio::error_code* out_ec_;
+    asio::error_code ec_;
+    return_type value_;
+  };
+
+  template <typename Handler>
+  class coro_async_result<Handler, void>
+  {
+  public:
+    typedef coro_handler<Handler, void> completion_handler_type;
+    typedef void return_type;
+
+    explicit coro_async_result(completion_handler_type& h)
+      : handler_(h),
+        ca_(h.ca_),
+        ready_(2)
+    {
+      h.ready_ = &ready_;
+      out_ec_ = h.ec_;
+      if (!out_ec_) h.ec_ = &ec_;
+    }
+
+    void get()
+    {
+      // Must not hold shared_ptr to coro while suspended.
+      handler_.coro_.reset();
+
+      if (--ready_ != 0)
+        ca_();
+      if (!out_ec_ && ec_) throw asio::system_error(ec_);
+    }
+
+  private:
+    completion_handler_type& handler_;
+    typename basic_yield_context<Handler>::caller_type& ca_;
+    atomic_count ready_;
+    asio::error_code* out_ec_;
+    asio::error_code ec_;
+  };
+
 } // namespace detail
 
 #if !defined(GENERATING_DOCUMENTATION)
 
 template <typename Handler, typename ReturnType>
+class async_result<basic_yield_context<Handler>, ReturnType()>
+  : public detail::coro_async_result<Handler, void>
+{
+public:
+  explicit async_result(
+    typename detail::coro_async_result<Handler,
+      void>::completion_handler_type& h)
+    : detail::coro_async_result<Handler, void>(h)
+  {
+  }
+};
+
+template <typename Handler, typename ReturnType, typename Arg1>
+class async_result<basic_yield_context<Handler>, ReturnType(Arg1)>
+  : public detail::coro_async_result<Handler, typename decay<Arg1>::type>
+{
+public:
+  explicit async_result(
+    typename detail::coro_async_result<Handler,
+      typename decay<Arg1>::type>::completion_handler_type& h)
+    : detail::coro_async_result<Handler, Arg1>(h)
+  {
+  }
+};
+
+template <typename Handler, typename ReturnType>
+class async_result<basic_yield_context<Handler>,
+    ReturnType(asio::error_code)>
+  : public detail::coro_async_result<Handler, void>
+{
+public:
+  explicit async_result(
+    typename detail::coro_async_result<Handler,
+      void>::completion_handler_type& h)
+    : detail::coro_async_result<Handler, void>(h)
+  {
+  }
+};
+
+template <typename Handler, typename ReturnType, typename Arg2>
+class async_result<basic_yield_context<Handler>,
+    ReturnType(asio::error_code, Arg2)>
+  : public detail::coro_async_result<Handler, typename decay<Arg2>::type>
+{
+public:
+  explicit async_result(
+    typename detail::coro_async_result<Handler,
+      typename decay<Arg2>::type>::completion_handler_type& h)
+    : detail::coro_async_result<Handler, Arg2>(h)
+  {
+  }
+};
+
+#if !defined(ASIO_NO_DEPRECATED)
+
+template <typename Handler, typename ReturnType>
 struct handler_type<basic_yield_context<Handler>, ReturnType()>
 {
   typedef detail::coro_handler<Handler, void> type;
@@ -159,7 +288,7 @@
 template <typename Handler, typename ReturnType, typename Arg1>
 struct handler_type<basic_yield_context<Handler>, ReturnType(Arg1)>
 {
-  typedef detail::coro_handler<Handler, Arg1> type;
+  typedef detail::coro_handler<Handler, typename decay<Arg1>::type> type;
 };
 
 template <typename Handler, typename ReturnType>
@@ -173,75 +302,25 @@
 struct handler_type<basic_yield_context<Handler>,
     ReturnType(asio::error_code, Arg2)>
 {
-  typedef detail::coro_handler<Handler, Arg2> type;
+  typedef detail::coro_handler<Handler, typename decay<Arg2>::type> type;
 };
 
 template <typename Handler, typename T>
 class async_result<detail::coro_handler<Handler, T> >
+  : public detail::coro_async_result<Handler, T>
 {
 public:
-  typedef T type;
+  typedef typename detail::coro_async_result<Handler, T>::return_type type;
 
-  explicit async_result(detail::coro_handler<Handler, T>& h)
-    : handler_(h),
-      ca_(h.ca_),
-      ready_(2)
+  explicit async_result(
+    typename detail::coro_async_result<Handler,
+      void>::completion_handler_type& h)
+    : detail::coro_async_result<Handler, T>(h)
   {
-    h.ready_ = &ready_;
-    out_ec_ = h.ec_;
-    if (!out_ec_) h.ec_ = &ec_;
-    h.value_ = &value_;
   }
-
-  type get()
-  {
-    handler_.coro_.reset(); // Must not hold shared_ptr to coro while suspended.
-    if (--ready_ != 0)
-      ca_();
-    if (!out_ec_ && ec_) throw asio::system_error(ec_);
-    return ASIO_MOVE_CAST(type)(value_);
-  }
-
-private:
-  detail::coro_handler<Handler, T>& handler_;
-  typename basic_yield_context<Handler>::caller_type& ca_;
-  detail::atomic_count ready_;
-  asio::error_code* out_ec_;
-  asio::error_code ec_;
-  type value_;
 };
 
-template <typename Handler>
-class async_result<detail::coro_handler<Handler, void> >
-{
-public:
-  typedef void type;
-
-  explicit async_result(detail::coro_handler<Handler, void>& h)
-    : handler_(h),
-      ca_(h.ca_),
-      ready_(2)
-  {
-    h.ready_ = &ready_;
-    out_ec_ = h.ec_;
-    if (!out_ec_) h.ec_ = &ec_;
-  }
-
-  void get()
-  {
-    handler_.coro_.reset(); // Must not hold shared_ptr to coro while suspended.
-    if (--ready_ != 0)
-      ca_();
-    if (!out_ec_ && ec_) throw asio::system_error(ec_);
-  }
-
-private:
-  detail::coro_handler<Handler, void>& handler_;
-  typename basic_yield_context<Handler>::caller_type& ca_;
-  detail::atomic_count ready_;
-  asio::error_code* out_ec_;
-  asio::error_code ec_;
-};
+#endif // !defined(ASIO_NO_DEPRECATED)
 
 template <typename Handler, typename T, typename Allocator>
 struct associated_allocator<detail::coro_handler<Handler, T>, Allocator>
diff --git a/asio/include/asio/impl/src.cpp b/asio/include/asio/impl/src.cpp
index bcd882f..fe56a79 100644
--- a/asio/include/asio/impl/src.cpp
+++ b/asio/include/asio/impl/src.cpp
@@ -2,7 +2,7 @@
 // impl/src.cpp
 // ~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/impl/src.hpp b/asio/include/asio/impl/src.hpp
index 06a2551..a22b1fb 100644
--- a/asio/include/asio/impl/src.hpp
+++ b/asio/include/asio/impl/src.hpp
@@ -2,7 +2,7 @@
 // impl/src.hpp
 // ~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -35,6 +35,7 @@
 #include "asio/detail/impl/eventfd_select_interrupter.ipp"
 #include "asio/detail/impl/handler_tracking.ipp"
 #include "asio/detail/impl/kqueue_reactor.ipp"
+#include "asio/detail/impl/null_event.ipp"
 #include "asio/detail/impl/pipe_select_interrupter.ipp"
 #include "asio/detail/impl/posix_event.ipp"
 #include "asio/detail/impl/posix_mutex.ipp"
diff --git a/asio/include/asio/impl/system_executor.hpp b/asio/include/asio/impl/system_executor.hpp
index 40c79a3..12ca9b9 100644
--- a/asio/include/asio/impl/system_executor.hpp
+++ b/asio/include/asio/impl/system_executor.hpp
@@ -2,7 +2,7 @@
 // impl/system_executor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/impl/system_executor.ipp b/asio/include/asio/impl/system_executor.ipp
index a9951a3..6e5b16e 100644
--- a/asio/include/asio/impl/system_executor.ipp
+++ b/asio/include/asio/impl/system_executor.ipp
@@ -2,7 +2,7 @@
 // impl/system_executor.ipp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/impl/thread_pool.hpp b/asio/include/asio/impl/thread_pool.hpp
index 1f43672..db7d5c0 100644
--- a/asio/include/asio/impl/thread_pool.hpp
+++ b/asio/include/asio/impl/thread_pool.hpp
@@ -2,7 +2,7 @@
 // impl/thread_pool.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/impl/thread_pool.ipp b/asio/include/asio/impl/thread_pool.ipp
index c60fd46..f56b94a 100644
--- a/asio/include/asio/impl/thread_pool.ipp
+++ b/asio/include/asio/impl/thread_pool.ipp
@@ -2,7 +2,7 @@
 // impl/thread_pool.ipp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/impl/use_future.hpp b/asio/include/asio/impl/use_future.hpp
index fd3857f..e06c400 100644
--- a/asio/include/asio/impl/use_future.hpp
+++ b/asio/include/asio/impl/use_future.hpp
@@ -2,7 +2,7 @@
 // impl/use_future.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,152 +17,892 @@
 
 #include "asio/detail/config.hpp"
 #include <future>
+#include <tuple>
 #include "asio/async_result.hpp"
+#include "asio/detail/memory.hpp"
 #include "asio/error_code.hpp"
-#include "asio/handler_type.hpp"
+#include "asio/packaged_task.hpp"
 #include "asio/system_error.hpp"
+#include "asio/system_executor.hpp"
 
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
 namespace detail {
 
-  // Completion handler to adapt a promise as a completion handler.
-  template <typename T>
-  class promise_handler
+#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename T, typename F, typename... Args>
+inline void promise_invoke_and_set(std::promise<T>& p,
+    F& f, ASIO_MOVE_ARG(Args)... args)
+{
+#if !defined(ASIO_NO_EXCEPTIONS)
+  try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
   {
-  public:
-    // Construct from use_future special value.
-    template <typename Allocator>
-    promise_handler(use_future_t<Allocator> uf)
-      : promise_(std::allocate_shared<std::promise<T> >(
-            uf.get_allocator(), std::allocator_arg, uf.get_allocator()))
-    {
-    }
-
-    void operator()(T t)
-    {
-      promise_->set_value(t);
-    }
-
-    void operator()(const asio::error_code& ec, T t)
-    {
-      if (ec)
-        promise_->set_exception(
-            std::make_exception_ptr(
-              asio::system_error(ec)));
-      else
-        promise_->set_value(t);
-    }
-
-  //private:
-    std::shared_ptr<std::promise<T> > promise_;
-  };
-
-  // Completion handler to adapt a void promise as a completion handler.
-  template <>
-  class promise_handler<void>
+    p.set_value(f(ASIO_MOVE_CAST(Args)(args)...));
+  }
+#if !defined(ASIO_NO_EXCEPTIONS)
+  catch (...)
   {
-  public:
-    // Construct from use_future special value. Used during rebinding.
-    template <typename Allocator>
-    promise_handler(use_future_t<Allocator> uf)
-      : promise_(std::allocate_shared<std::promise<void> >(
-            uf.get_allocator(), std::allocator_arg, uf.get_allocator()))
-    {
-    }
+    p.set_exception(std::current_exception());
+  }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+}
 
-    void operator()()
-    {
-      promise_->set_value();
-    }
-
-    void operator()(const asio::error_code& ec)
-    {
-      if (ec)
-        promise_->set_exception(
-            std::make_exception_ptr(
-              asio::system_error(ec)));
-      else
-        promise_->set_value();
-    }
-
-  //private:
-    std::shared_ptr<std::promise<void> > promise_;
-  };
-
-  // Ensure any exceptions thrown from the handler are propagated back to the
-  // caller via the future.
-  template <typename Function, typename T>
-  void asio_handler_invoke(Function f, promise_handler<T>* h)
+template <typename F, typename... Args>
+inline void promise_invoke_and_set(std::promise<void>& p,
+    F& f, ASIO_MOVE_ARG(Args)... args)
+{
+#if !defined(ASIO_NO_EXCEPTIONS)
+  try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
   {
-    std::shared_ptr<std::promise<T> > p(h->promise_);
+    f(ASIO_MOVE_CAST(Args)(args)...);
+    p.set_value();
+  }
+#if !defined(ASIO_NO_EXCEPTIONS)
+  catch (...)
+  {
+    p.set_exception(std::current_exception());
+  }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+}
+
+#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename T, typename F>
+inline void promise_invoke_and_set(std::promise<T>& p, F& f)
+{
+#if !defined(ASIO_NO_EXCEPTIONS)
+  try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+  {
+    p.set_value(f());
+  }
+#if !defined(ASIO_NO_EXCEPTIONS)
+  catch (...)
+  {
+    p.set_exception(std::current_exception());
+  }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+}
+
+template <typename F, typename Args>
+inline void promise_invoke_and_set(std::promise<void>& p, F& f)
+{
+#if !defined(ASIO_NO_EXCEPTIONS)
+  try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+  {
+    f();
+    p.set_value();
+#if !defined(ASIO_NO_EXCEPTIONS)
+  }
+  catch (...)
+  {
+    p.set_exception(std::current_exception());
+  }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+}
+
+#if defined(ASIO_NO_EXCEPTIONS)
+
+#define ASIO_PRIVATE_PROMISE_INVOKE_DEF(n) \
+  template <typename T, typename F, ASIO_VARIADIC_TPARAMS(n)> \
+  inline void promise_invoke_and_set(std::promise<T>& p, \
+      F& f, ASIO_VARIADIC_MOVE_PARAMS(n)) \
+  { \
+    p.set_value(f(ASIO_VARIADIC_MOVE_ARGS(n))); \
+  } \
+  \
+  template <typename F, ASIO_VARIADIC_TPARAMS(n)> \
+  inline void promise_invoke_and_set(std::promise<void>& p, \
+      F& f, ASIO_VARIADIC_MOVE_PARAMS(n)) \
+  { \
+    f(ASIO_VARIADIC_MOVE_ARGS(n)); \
+    p.set_value(); \
+  } \
+  /**/
+  ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_PROMISE_INVOKE_DEF)
+#undef ASIO_PRIVATE_PROMISE_INVOKE_DEF
+
+#else // defined(ASIO_NO_EXCEPTIONS)
+
+#define ASIO_PRIVATE_PROMISE_INVOKE_DEF(n) \
+  template <typename T, typename F, ASIO_VARIADIC_TPARAMS(n)> \
+  inline void promise_invoke_and_set(std::promise<T>& p, \
+      F& f, ASIO_VARIADIC_MOVE_PARAMS(n)) \
+  { \
+    try \
+    { \
+      p.set_value(f(ASIO_VARIADIC_MOVE_ARGS(n))); \
+    } \
+    catch (...) \
+    { \
+      p.set_exception(std::current_exception()); \
+    } \
+  } \
+  \
+  template <typename F, ASIO_VARIADIC_TPARAMS(n)> \
+  inline void promise_invoke_and_set(std::promise<void>& p, \
+      F& f, ASIO_VARIADIC_MOVE_PARAMS(n)) \
+  { \
+    try \
+    { \
+      f(ASIO_VARIADIC_MOVE_ARGS(n)); \
+      p.set_value(); \
+    } \
+    catch (...) \
+    { \
+      p.set_exception(std::current_exception()); \
+    } \
+  } \
+  /**/
+  ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_PROMISE_INVOKE_DEF)
+#undef ASIO_PRIVATE_PROMISE_INVOKE_DEF
+
+#endif // defined(ASIO_NO_EXCEPTIONS)
+
+#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+// A function object adapter to invoke a nullary function object and capture
+// any exception thrown into a promise.
+template <typename T, typename F>
+class promise_invoker
+{
+public:
+  promise_invoker(const shared_ptr<std::promise<T> >& p,
+      ASIO_MOVE_ARG(F) f)
+    : p_(p), f_(f)
+  {
+  }
+
+  void operator()()
+  {
+#if !defined(ASIO_NO_EXCEPTIONS)
     try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
     {
-      f();
+      f_();
     }
+#if !defined(ASIO_NO_EXCEPTIONS)
     catch (...)
     {
-      p->set_exception(std::current_exception());
+      p_->set_exception(std::current_exception());
+    }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+  }
+
+private:
+  shared_ptr<std::promise<T> > p_;
+  typename decay<F>::type f_;
+};
+
+// An executor that adapts the system_executor to capture any exeption thrown
+// by a submitted function object and save it into a promise.
+template <typename T>
+class promise_executor
+{
+public:
+  explicit promise_executor(const shared_ptr<std::promise<T> >& p)
+    : p_(p)
+  {
+  }
+
+  execution_context& context() const ASIO_NOEXCEPT
+  {
+    return system_executor().context();
+  }
+
+  void on_work_started() const ASIO_NOEXCEPT {}
+  void on_work_finished() const ASIO_NOEXCEPT {}
+
+  template <typename F, typename A>
+  void dispatch(ASIO_MOVE_ARG(F) f, const A&) const
+  {
+    promise_invoker<T, F>(p_, ASIO_MOVE_CAST(F)(f))();
+  }
+
+  template <typename F, typename A>
+  void post(ASIO_MOVE_ARG(F) f, const A& a) const
+  {
+    system_executor().post(
+        promise_invoker<T, F>(p_, ASIO_MOVE_CAST(F)(f)), a);
+  }
+
+  template <typename F, typename A>
+  void defer(ASIO_MOVE_ARG(F) f, const A& a) const
+  {
+    system_executor().defer(
+        promise_invoker<T, F>(p_, ASIO_MOVE_CAST(F)(f)), a);
+  }
+
+  friend bool operator==(const promise_executor& a,
+      const promise_executor& b) ASIO_NOEXCEPT
+  {
+    return a.p_ == b.p_;
+  }
+
+  friend bool operator!=(const promise_executor& a,
+      const promise_executor& b) ASIO_NOEXCEPT
+  {
+    return a.p_ != b.p_;
+  }
+
+private:
+  shared_ptr<std::promise<T> > p_;
+};
+
+// The base class for all completion handlers that create promises.
+template <typename T>
+class promise_creator
+{
+public:
+  typedef promise_executor<T> executor_type;
+
+  executor_type get_executor() const ASIO_NOEXCEPT
+  {
+    return executor_type(p_);
+  }
+
+  typedef std::future<T> future_type;
+
+  future_type get_future()
+  {
+    return p_->get_future();
+  }
+
+protected:
+  template <typename Allocator>
+  void create_promise(const Allocator& a)
+  {
+    p_ = std::allocate_shared<std::promise<T>>(
+        typename Allocator::template rebind<char>::other(a),
+        std::allocator_arg,
+        typename Allocator::template rebind<char>::other(a));
+  }
+
+  shared_ptr<std::promise<T> > p_;
+};
+
+// For completion signature void().
+class promise_handler_0
+  : public promise_creator<void>
+{
+public:
+  void operator()()
+  {
+    this->p_->set_value();
+  }
+};
+
+// For completion signature void(error_code).
+class promise_handler_ec_0
+  : public promise_creator<void>
+{
+public:
+  void operator()(const asio::error_code& ec)
+  {
+    if (ec)
+    {
+      this->p_->set_exception(
+          std::make_exception_ptr(
+            asio::system_error(ec)));
+    }
+    else
+    {
+      this->p_->set_value();
     }
   }
+};
+
+// For completion signature void(exception_ptr).
+class promise_handler_ex_0
+  : public promise_creator<void>
+{
+public:
+  void operator()(const std::exception_ptr& ex)
+  {
+    if (ex)
+    {
+      this->p_->set_exception(ex);
+    }
+    else
+    {
+      this->p_->set_value();
+    }
+  }
+};
+
+// For completion signature void(T).
+template <typename T>
+class promise_handler_1
+  : public promise_creator<T>
+{
+public:
+  template <typename Arg>
+  void operator()(ASIO_MOVE_ARG(Arg) arg)
+  {
+    this->p_->set_value(ASIO_MOVE_CAST(Arg)(arg));
+  }
+};
+
+// For completion signature void(error_code, T).
+template <typename T>
+class promise_handler_ec_1
+  : public promise_creator<T>
+{
+public:
+  template <typename Arg>
+  void operator()(const asio::error_code& ec,
+      ASIO_MOVE_ARG(Arg) arg)
+  {
+    if (ec)
+    {
+      this->p_->set_exception(
+          std::make_exception_ptr(
+            asio::system_error(ec)));
+    }
+    else
+      this->p_->set_value(ASIO_MOVE_CAST(Arg)(arg));
+  }
+};
+
+// For completion signature void(exception_ptr, T).
+template <typename T>
+class promise_handler_ex_1
+  : public promise_creator<T>
+{
+public:
+  template <typename Arg>
+  void operator()(const std::exception_ptr& ex,
+      ASIO_MOVE_ARG(Arg) arg)
+  {
+    if (ex)
+      this->p_->set_exception(ex);
+    else
+      this->p_->set_value(ASIO_MOVE_CAST(Arg)(arg));
+  }
+};
+
+// For completion signature void(T1, ..., Tn);
+template <typename T>
+class promise_handler_n
+  : public promise_creator<T>
+{
+public:
+#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+  template <typename... Args>
+  void operator()(ASIO_MOVE_ARG(Args)... args)
+  {
+    this->p_->set_value(
+        std::forward_as_tuple(
+          ASIO_MOVE_CAST(Args)(args)...));
+  }
+
+#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+#define ASIO_PRIVATE_CALL_OP_DEF(n) \
+  template <ASIO_VARIADIC_TPARAMS(n)> \
+  void operator()(ASIO_VARIADIC_MOVE_PARAMS(n)) \
+  {\
+    this->p_->set_value( \
+        std::forward_as_tuple( \
+          ASIO_VARIADIC_MOVE_ARGS(n))); \
+  } \
+  /**/
+  ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CALL_OP_DEF)
+#undef ASIO_PRIVATE_CALL_OP_DEF
+
+#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+};
+
+// For completion signature void(error_code, T1, ..., Tn);
+template <typename T>
+class promise_handler_ec_n
+  : public promise_creator<T>
+{
+public:
+#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+  template <typename... Args>
+  void operator()(const asio::error_code& ec,
+      ASIO_MOVE_ARG(Args)... args)
+  {
+    if (ec)
+    {
+      this->p_->set_exception(
+          std::make_exception_ptr(
+            asio::system_error(ec)));
+    }
+    else
+    {
+      this->p_->set_value(
+          std::forward_as_tuple(
+            ASIO_MOVE_CAST(Args)(args)...));
+    }
+  }
+
+#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+#define ASIO_PRIVATE_CALL_OP_DEF(n) \
+  template <ASIO_VARIADIC_TPARAMS(n)> \
+  void operator()(const asio::error_code& ec, \
+      ASIO_VARIADIC_MOVE_PARAMS(n)) \
+  {\
+    if (ec) \
+    { \
+      this->p_->set_exception( \
+          std::make_exception_ptr( \
+            asio::system_error(ec))); \
+    } \
+    else \
+    { \
+      this->p_->set_value( \
+          std::forward_as_tuple( \
+            ASIO_VARIADIC_MOVE_ARGS(n))); \
+    } \
+  } \
+  /**/
+  ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CALL_OP_DEF)
+#undef ASIO_PRIVATE_CALL_OP_DEF
+
+#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+};
+
+// For completion signature void(exception_ptr, T1, ..., Tn);
+template <typename T>
+class promise_handler_ex_n
+  : public promise_creator<T>
+{
+public:
+#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+  template <typename... Args>
+  void operator()(const std::exception_ptr& ex,
+      ASIO_MOVE_ARG(Args)... args)
+  {
+    if (ex)
+      this->p_->set_exception(ex);
+    else
+    {
+      this->p_->set_value(
+          std::forward_as_tuple(
+            ASIO_MOVE_CAST(Args)(args)...));
+    }
+  }
+
+#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+#define ASIO_PRIVATE_CALL_OP_DEF(n) \
+  template <ASIO_VARIADIC_TPARAMS(n)> \
+  void operator()(const std::exception_ptr& ex, \
+      ASIO_VARIADIC_MOVE_PARAMS(n)) \
+  {\
+    if (ex) \
+      this->p_->set_exception(ex); \
+    else \
+    { \
+      this->p_->set_value( \
+          std::forward_as_tuple( \
+            ASIO_VARIADIC_MOVE_ARGS(n))); \
+    } \
+  } \
+  /**/
+  ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CALL_OP_DEF)
+#undef ASIO_PRIVATE_CALL_OP_DEF
+
+#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+};
+
+// Helper template to choose the appropriate concrete promise handler
+// implementation based on the supplied completion signature.
+template <typename> class promise_handler_selector;
+
+template <>
+class promise_handler_selector<void()>
+  : public promise_handler_0 {};
+
+template <>
+class promise_handler_selector<void(asio::error_code)>
+  : public promise_handler_ec_0 {};
+
+template <>
+class promise_handler_selector<void(std::exception_ptr)>
+  : public promise_handler_ex_0 {};
+
+template <typename Arg>
+class promise_handler_selector<void(Arg)>
+  : public promise_handler_1<Arg> {};
+
+template <typename Arg>
+class promise_handler_selector<void(asio::error_code, Arg)>
+  : public promise_handler_ec_1<Arg> {};
+
+template <typename Arg>
+class promise_handler_selector<void(std::exception_ptr, Arg)>
+  : public promise_handler_ex_1<Arg> {};
+
+template <typename... Arg>
+class promise_handler_selector<void(Arg...)>
+  : public promise_handler_n<std::tuple<Arg...> > {};
+
+template <typename... Arg>
+class promise_handler_selector<void(asio::error_code, Arg...)>
+  : public promise_handler_ec_n<std::tuple<Arg...> > {};
+
+template <typename... Arg>
+class promise_handler_selector<void(std::exception_ptr, Arg...)>
+  : public promise_handler_ex_n<std::tuple<Arg...> > {};
+
+// Completion handlers produced from the use_future completion token, when not
+// using use_future::operator().
+template <typename Signature, typename Allocator>
+class promise_handler
+  : public promise_handler_selector<Signature>
+{
+public:
+  typedef Allocator allocator_type;
+  typedef void result_type;
+
+  promise_handler(use_future_t<Allocator> u)
+    : allocator_(u.get_allocator())
+  {
+    this->create_promise(allocator_);
+  }
+
+  allocator_type get_allocator() const ASIO_NOEXCEPT
+  {
+    return allocator_;
+  }
+
+private:
+  Allocator allocator_;
+};
+
+template <typename Function, typename Signature, typename Allocator>
+inline void asio_handler_invoke(Function& f,
+    promise_handler<Signature, Allocator>* h)
+{
+  typename promise_handler<Signature, Allocator>::executor_type
+    ex(h->get_executor());
+  ex.dispatch(ASIO_MOVE_CAST(Function)(f), std::allocator<void>());
+}
+
+template <typename Function, typename Signature, typename Allocator>
+inline void asio_handler_invoke(const Function& f,
+    promise_handler<Signature, Allocator>* h)
+{
+  typename promise_handler<Signature, Allocator>::executor_type
+    ex(h->get_executor());
+  ex.dispatch(f, std::allocator<void>());
+}
+
+// Helper base class for async_result specialisation.
+template <typename Signature, typename Allocator>
+class promise_async_result
+{
+public:
+  typedef promise_handler<Signature, Allocator> completion_handler_type;
+  typedef typename completion_handler_type::future_type return_type;
+
+  explicit promise_async_result(completion_handler_type& h)
+    : future_(h.get_future())
+  {
+  }
+
+  return_type get()
+  {
+    return ASIO_MOVE_CAST(return_type)(future_);
+  }
+
+private:
+  return_type future_;
+};
+
+// Return value from use_future::operator().
+template <typename Function, typename Allocator>
+class packaged_token
+{
+public:
+  packaged_token(Function f, const Allocator& a)
+    : function_(ASIO_MOVE_CAST(Function)(f)),
+      allocator_(a)
+  {
+  }
+
+//private:
+  Function function_;
+  Allocator allocator_;
+};
+
+// Completion handlers produced from the use_future completion token, when
+// using use_future::operator().
+template <typename Function, typename Allocator, typename Result>
+class packaged_handler
+  : public promise_creator<Result>
+{
+public:
+  typedef Allocator allocator_type;
+  typedef void result_type;
+
+  packaged_handler(packaged_token<Function, Allocator> t)
+    : function_(ASIO_MOVE_CAST(Function)(t.function_)),
+      allocator_(t.allocator_)
+  {
+    this->create_promise(allocator_);
+  }
+
+  allocator_type get_allocator() const ASIO_NOEXCEPT
+  {
+    return allocator_;
+  }
+
+#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+  template <typename... Args>
+  void operator()(ASIO_MOVE_ARG(Args)... args)
+  {
+    (promise_invoke_and_set)(*this->p_,
+        function_, ASIO_MOVE_CAST(Args)(args)...);
+  }
+
+#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+  void operator()()
+  {
+    (promise_invoke_and_set)(*this->p_, function_);
+  }
+
+#define ASIO_PRIVATE_CALL_OP_DEF(n) \
+  template <ASIO_VARIADIC_TPARAMS(n)> \
+  void operator()(ASIO_VARIADIC_MOVE_PARAMS(n)) \
+  {\
+    (promise_invoke_and_set)(*this->p_, \
+        function_, ASIO_VARIADIC_MOVE_ARGS(n)); \
+  } \
+  /**/
+  ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CALL_OP_DEF)
+#undef ASIO_PRIVATE_CALL_OP_DEF
+
+#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+private:
+  Function function_;
+  Allocator allocator_;
+};
+
+template <typename Function,
+    typename Function1, typename Allocator, typename Result>
+inline void asio_handler_invoke(Function& f,
+    packaged_handler<Function1, Allocator, Result>* h)
+{
+  typename packaged_handler<Function1, Allocator, Result>::executor_type
+    ex(h->get_executor());
+  ex.dispatch(ASIO_MOVE_CAST(Function)(f), std::allocator<void>());
+}
+
+template <typename Function,
+    typename Function1, typename Allocator, typename Result>
+inline void asio_handler_invoke(const Function& f,
+    packaged_handler<Function1, Allocator, Result>* h)
+{
+  typename packaged_handler<Function1, Allocator, Result>::executor_type
+    ex(h->get_executor());
+  ex.dispatch(f, std::allocator<void>());
+}
+
+// Helper base class for async_result specialisation.
+template <typename Function, typename Allocator, typename Result>
+class packaged_async_result
+{
+public:
+  typedef packaged_handler<Function, Allocator, Result> completion_handler_type;
+  typedef typename completion_handler_type::future_type return_type;
+
+  explicit packaged_async_result(completion_handler_type& h)
+    : future_(h.get_future())
+  {
+  }
+
+  return_type get()
+  {
+    return ASIO_MOVE_CAST(return_type)(future_);
+  }
+
+private:
+  return_type future_;
+};
 
 } // namespace detail
 
+template <typename Allocator> template <typename Function>
+inline detail::packaged_token<typename decay<Function>::type, Allocator>
+use_future_t<Allocator>::operator()(ASIO_MOVE_ARG(Function) f) const
+{
+  return detail::packaged_token<typename decay<Function>::type, Allocator>(
+      ASIO_MOVE_CAST(Function)(f), allocator_);
+}
+
 #if !defined(GENERATING_DOCUMENTATION)
 
-// Handler traits specialisation for promise_handler.
-template <typename T>
-class async_result<detail::promise_handler<T> >
+#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename Allocator, typename Result, typename... Args>
+class async_result<use_future_t<Allocator>, Result(Args...)>
+  : public detail::promise_async_result<
+      void(typename decay<Args>::type...), Allocator>
 {
 public:
-  // The initiating function will return a future.
-  typedef std::future<T> type;
-
-  // Constructor creates a new promise for the async operation, and obtains the
-  // corresponding future.
-  explicit async_result(detail::promise_handler<T>& h)
+  explicit async_result(
+    typename detail::promise_async_result<void(typename decay<Args>::type...),
+      Allocator>::completion_handler_type& h)
+    : detail::promise_async_result<
+        void(typename decay<Args>::type...), Allocator>(h)
   {
-    value_ = h.promise_->get_future();
   }
-
-  // Obtain the future to be returned from the initiating function.
-  type get() { return std::move(value_); }
-
-private:
-  type value_;
 };
 
-// Handler type specialisation for use_future.
-template <typename Allocator, typename ReturnType>
-struct handler_type<use_future_t<Allocator>, ReturnType()>
+template <typename Function, typename Allocator,
+    typename Result, typename... Args>
+class async_result<detail::packaged_token<Function, Allocator>, Result(Args...)>
+  : public detail::packaged_async_result<Function, Allocator,
+      typename result_of<Function(Args...)>::type>
 {
-  typedef detail::promise_handler<void> type;
+public:
+  explicit async_result(
+    typename detail::packaged_async_result<Function, Allocator,
+      typename result_of<Function(Args...)>::type>::completion_handler_type& h)
+    : detail::packaged_async_result<Function, Allocator,
+        typename result_of<Function(Args...)>::type>(h)
+  {
+  }
 };
 
-// Handler type specialisation for use_future.
-template <typename Allocator, typename ReturnType, typename Arg1>
-struct handler_type<use_future_t<Allocator>, ReturnType(Arg1)>
+#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename Allocator, typename Result>
+class async_result<use_future_t<Allocator>, Result()>
+  : public detail::promise_async_result<void(), Allocator>
 {
-  typedef detail::promise_handler<Arg1> type;
+public:
+  explicit async_result(
+    typename detail::promise_async_result<
+      void(), Allocator>::completion_handler_type& h)
+    : detail::promise_async_result<void(), Allocator>(h)
+  {
+  }
 };
 
-// Handler type specialisation for use_future.
-template <typename Allocator, typename ReturnType>
-struct handler_type<use_future_t<Allocator>,
-    ReturnType(asio::error_code)>
+template <typename Function, typename Allocator, typename Result>
+class async_result<detail::packaged_token<Function, Allocator>, Result()>
+  : public detail::packaged_async_result<Function, Allocator,
+      typename result_of<Function()>::type>
 {
-  typedef detail::promise_handler<void> type;
+public:
+  explicit async_result(
+    typename detail::packaged_async_result<Function, Allocator,
+      typename result_of<Function()>::type>::completion_handler_type& h)
+    : detail::packaged_async_result<Function, Allocator,
+        typename result_of<Function()>::type>(h)
+  {
+  }
 };
 
-// Handler type specialisation for use_future.
-template <typename Allocator, typename ReturnType, typename Arg2>
-struct handler_type<use_future_t<Allocator>,
-    ReturnType(asio::error_code, Arg2)>
+#define ASIO_PRIVATE_ASYNC_RESULT_DEF(n) \
+  template <typename Allocator, \
+      typename Result, ASIO_VARIADIC_TPARAMS(n)> \
+  class async_result<use_future_t<Allocator>, \
+      Result(ASIO_VARIADIC_TARGS(n))> \
+    : public detail::promise_async_result< \
+        void(ASIO_VARIADIC_DECAY(n)), Allocator> \
+  { \
+  public: \
+    explicit async_result( \
+      typename detail::promise_async_result< \
+        void(ASIO_VARIADIC_DECAY(n)), \
+        Allocator>::completion_handler_type& h) \
+      : detail::promise_async_result< \
+          void(ASIO_VARIADIC_DECAY(n)), Allocator>(h) \
+    { \
+    } \
+  }; \
+  \
+  template <typename Function, typename Allocator, \
+      typename Result, ASIO_VARIADIC_TPARAMS(n)> \
+  class async_result<detail::packaged_token<Function, Allocator>, \
+      Result(ASIO_VARIADIC_TARGS(n))> \
+    : public detail::packaged_async_result<Function, Allocator, \
+        typename result_of<Function(ASIO_VARIADIC_TARGS(n))>::type> \
+  { \
+  public: \
+    explicit async_result( \
+      typename detail::packaged_async_result<Function, Allocator, \
+        typename result_of<Function(ASIO_VARIADIC_TARGS(n))>::type \
+        >::completion_handler_type& h) \
+      : detail::packaged_async_result<Function, Allocator, \
+          typename result_of<Function(ASIO_VARIADIC_TARGS(n))>::type>(h) \
+    { \
+    } \
+  }; \
+  /**/
+  ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ASYNC_RESULT_DEF)
+#undef ASIO_PRIVATE_ASYNC_RESULT_DEF
+
+#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+
+#if !defined(ASIO_NO_DEPRECATED)
+
+template <typename Allocator, typename Signature>
+struct handler_type<use_future_t<Allocator>, Signature>
 {
-  typedef detail::promise_handler<Arg2> type;
+  typedef typename async_result<use_future_t<Allocator>,
+    Signature>::completion_handler_type type;
 };
 
+template <typename Signature, typename Allocator>
+class async_result<detail::promise_handler<Signature, Allocator> >
+  : public detail::promise_async_result<Signature, Allocator>
+{
+public:
+  typedef typename detail::promise_async_result<
+    Signature, Allocator>::return_type type;
+
+  explicit async_result(
+    typename detail::promise_async_result<
+      Signature, Allocator>::completion_handler_type& h)
+    : detail::promise_async_result<Signature, Allocator>(h)
+  {
+  }
+};
+
+template <typename Function, typename Allocator, typename Signature>
+struct handler_type<detail::packaged_token<Function, Allocator>, Signature>
+{
+  typedef typename async_result<detail::packaged_token<Function, Allocator>,
+    Signature>::completion_handler_type type;
+};
+
+template <typename Function, typename Allocator, typename Result>
+class async_result<detail::packaged_handler<Function, Allocator, Result> >
+  : public detail::packaged_async_result<Function, Allocator, Result>
+{
+public:
+  typedef typename detail::packaged_async_result<
+    Function, Allocator, Result>::return_type type;
+
+  explicit async_result(
+    typename detail::packaged_async_result<
+      Function, Allocator, Result>::completion_handler_type& h)
+    : detail::packaged_async_result<Function, Allocator, Result>(h)
+  {
+  }
+};
+
+#endif // !defined(ASIO_NO_DEPRECATED)
+
 #endif // !defined(GENERATING_DOCUMENTATION)
 
 } // namespace asio
diff --git a/asio/include/asio/impl/write.hpp b/asio/include/asio/impl/write.hpp
index 4fbfc44..8250aa3 100644
--- a/asio/include/asio/impl/write.hpp
+++ b/asio/include/asio/impl/write.hpp
@@ -2,7 +2,7 @@
 // impl/write.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -34,29 +34,39 @@
 
 namespace asio {
 
+namespace detail
+{
+  template <typename SyncWriteStream, typename ConstBufferSequence,
+      typename ConstBufferIterator, typename CompletionCondition>
+  std::size_t write_buffer_sequence(SyncWriteStream& s,
+      const ConstBufferSequence& buffers, const ConstBufferIterator&,
+      CompletionCondition completion_condition, asio::error_code& ec)
+  {
+    ec = asio::error_code();
+    asio::detail::consuming_buffers<const_buffer,
+        ConstBufferSequence, ConstBufferIterator> tmp(buffers);
+    while (!tmp.empty())
+    {
+      if (std::size_t max_size = detail::adapt_completion_condition_result(
+            completion_condition(ec, tmp.total_consumed())))
+        tmp.consume(s.write_some(tmp.prepare(max_size), ec));
+      else
+        break;
+    }
+    return tmp.total_consumed();;
+  }
+} // namespace detail
+
 template <typename SyncWriteStream, typename ConstBufferSequence,
     typename CompletionCondition>
-std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
+inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
     CompletionCondition completion_condition, asio::error_code& ec,
     typename enable_if<
       is_const_buffer_sequence<ConstBufferSequence>::value
     >::type*)
 {
-  ec = asio::error_code();
-  asio::detail::consuming_buffers<
-    const_buffer, ConstBufferSequence> tmp(buffers);
-  std::size_t total_transferred = 0;
-  tmp.prepare(detail::adapt_completion_condition_result(
-        completion_condition(ec, total_transferred)));
-  while (tmp.begin() != tmp.end())
-  {
-    std::size_t bytes_transferred = s.write_some(tmp, ec);
-    tmp.consume(bytes_transferred);
-    total_transferred += bytes_transferred;
-    tmp.prepare(detail::adapt_completion_condition_result(
-          completion_condition(ec, total_transferred)));
-  }
-  return total_transferred;
+  return detail::write_buffer_sequence(s, buffers,
+      asio::buffer_sequence_begin(buffers), completion_condition, ec);
 }
 
 template <typename SyncWriteStream, typename ConstBufferSequence>
@@ -95,67 +105,68 @@
   return bytes_transferred;
 }
 
-template <typename SyncWriteStream, typename DynamicBufferSequence,
+template <typename SyncWriteStream, typename DynamicBuffer,
     typename CompletionCondition>
 std::size_t write(SyncWriteStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     CompletionCondition completion_condition, asio::error_code& ec,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type*)
 {
-  typename decay<DynamicBufferSequence>::type b(
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers));
+  typename decay<DynamicBuffer>::type b(
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers));
 
   std::size_t bytes_transferred = write(s, b.data(), completion_condition, ec);
   b.consume(bytes_transferred);
   return bytes_transferred;
 }
 
-template <typename SyncWriteStream, typename DynamicBufferSequence>
+template <typename SyncWriteStream, typename DynamicBuffer>
 inline std::size_t write(SyncWriteStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type*)
 {
   asio::error_code ec;
   std::size_t bytes_transferred = write(s,
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers),
       transfer_all(), ec);
   asio::detail::throw_error(ec, "write");
   return bytes_transferred;
 }
 
-template <typename SyncWriteStream, typename DynamicBufferSequence>
+template <typename SyncWriteStream, typename DynamicBuffer>
 inline std::size_t write(SyncWriteStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     asio::error_code& ec,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type*)
 {
-  return write(s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
+  return write(s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
       transfer_all(), ec);
 }
 
-template <typename SyncWriteStream, typename DynamicBufferSequence,
+template <typename SyncWriteStream, typename DynamicBuffer,
     typename CompletionCondition>
 inline std::size_t write(SyncWriteStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     CompletionCondition completion_condition,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type*)
 {
   asio::error_code ec;
   std::size_t bytes_transferred = write(s,
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers),
       completion_condition, ec);
   asio::detail::throw_error(ec, "write");
   return bytes_transferred;
 }
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 template <typename SyncWriteStream, typename Allocator,
@@ -192,11 +203,13 @@
 }
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 namespace detail
 {
   template <typename AsyncWriteStream, typename ConstBufferSequence,
-      typename CompletionCondition, typename WriteHandler>
+      typename ConstBufferIterator, typename CompletionCondition,
+      typename WriteHandler>
   class write_op
     : detail::base_from_completion_cond<CompletionCondition>
   {
@@ -208,7 +221,6 @@
         stream_(stream),
         buffers_(buffers),
         start_(0),
-        total_transferred_(0),
         handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
     {
     }
@@ -219,7 +231,6 @@
         stream_(other.stream_),
         buffers_(other.buffers_),
         start_(other.start_),
-        total_transferred_(other.total_transferred_),
         handler_(other.handler_)
     {
     }
@@ -229,7 +240,6 @@
         stream_(other.stream_),
         buffers_(other.buffers_),
         start_(other.start_),
-        total_transferred_(other.total_transferred_),
         handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
     {
     }
@@ -238,362 +248,39 @@
     void operator()(const asio::error_code& ec,
         std::size_t bytes_transferred, int start = 0)
     {
+      std::size_t max_size;
       switch (start_ = start)
       {
         case 1:
-        buffers_.prepare(this->check_for_completion(ec, total_transferred_));
-        for (;;)
+        max_size = this->check_for_completion(ec, buffers_.total_consumed());
+        do
         {
-          stream_.async_write_some(buffers_,
+          stream_.async_write_some(buffers_.prepare(max_size),
               ASIO_MOVE_CAST(write_op)(*this));
           return; default:
-          total_transferred_ += bytes_transferred;
           buffers_.consume(bytes_transferred);
-          buffers_.prepare(this->check_for_completion(ec, total_transferred_));
-          if ((!ec && bytes_transferred == 0)
-              || buffers_.begin() == buffers_.end())
+          if ((!ec && bytes_transferred == 0) || buffers_.empty())
             break;
-        }
+          max_size = this->check_for_completion(ec, buffers_.total_consumed());
+        } while (max_size > 0);
 
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
+        handler_(ec, buffers_.total_consumed());
       }
     }
 
   //private:
     AsyncWriteStream& stream_;
-    asio::detail::consuming_buffers<
-      const_buffer, ConstBufferSequence> buffers_;
+    asio::detail::consuming_buffers<const_buffer,
+        ConstBufferSequence, ConstBufferIterator> buffers_;
     int start_;
-    std::size_t total_transferred_;
     WriteHandler handler_;
   };
 
-  template <typename AsyncWriteStream,
-      typename CompletionCondition, typename WriteHandler>
-  class write_op<AsyncWriteStream, asio::mutable_buffers_1,
-      CompletionCondition, WriteHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    write_op(AsyncWriteStream& stream,
-        const asio::mutable_buffers_1& buffers,
-        CompletionCondition completion_condition,
-        WriteHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        stream_(stream),
-        buffer_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    write_op(const write_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffer_(other.buffer_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    write_op(write_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffer_(other.buffer_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          stream_.async_write_some(
-              asio::buffer(buffer_ + total_transferred_, n),
-              ASIO_MOVE_CAST(write_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_.size())
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncWriteStream& stream_;
-    asio::mutable_buffer buffer_;
-    int start_;
-    std::size_t total_transferred_;
-    WriteHandler handler_;
-  };
-
-  template <typename AsyncWriteStream,
-      typename CompletionCondition, typename WriteHandler>
-  class write_op<AsyncWriteStream, asio::const_buffers_1,
-      CompletionCondition, WriteHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    write_op(AsyncWriteStream& stream,
-        const asio::const_buffers_1& buffers,
-        CompletionCondition completion_condition,
-        WriteHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        stream_(stream),
-        buffer_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    write_op(const write_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffer_(other.buffer_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    write_op(write_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffer_(other.buffer_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          stream_.async_write_some(
-              asio::buffer(buffer_ + total_transferred_, n),
-              ASIO_MOVE_CAST(write_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_.size())
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncWriteStream& stream_;
-    asio::const_buffer buffer_;
-    int start_;
-    std::size_t total_transferred_;
-    WriteHandler handler_;
-  };
-
-  template <typename AsyncWriteStream, typename Elem,
-      typename CompletionCondition, typename WriteHandler>
-  class write_op<AsyncWriteStream, boost::array<Elem, 2>,
-      CompletionCondition, WriteHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    write_op(AsyncWriteStream& stream, const boost::array<Elem, 2>& buffers,
-        CompletionCondition completion_condition, WriteHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        stream_(stream),
-        buffers_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    write_op(const write_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    write_op(write_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      typename asio::detail::dependent_type<Elem,
-          boost::array<asio::const_buffer, 2> >::type bufs = {{
-        asio::const_buffer(buffers_[0]),
-        asio::const_buffer(buffers_[1]) }};
-      std::size_t buffer_size0 = bufs[0].size();
-      std::size_t buffer_size1 = bufs[1].size();
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          bufs[0] = asio::buffer(bufs[0] + total_transferred_, n);
-          bufs[1] = asio::buffer(
-              bufs[1] + (total_transferred_ < buffer_size0
-                ? 0 : total_transferred_ - buffer_size0),
-              n - bufs[0].size());
-          stream_.async_write_some(bufs, ASIO_MOVE_CAST(write_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_size0 + buffer_size1)
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncWriteStream& stream_;
-    boost::array<Elem, 2> buffers_;
-    int start_;
-    std::size_t total_transferred_;
-    WriteHandler handler_;
-  };
-
-#if defined(ASIO_HAS_STD_ARRAY)
-
-  template <typename AsyncWriteStream, typename Elem,
-      typename CompletionCondition, typename WriteHandler>
-  class write_op<AsyncWriteStream, std::array<Elem, 2>,
-      CompletionCondition, WriteHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    write_op(AsyncWriteStream& stream, const std::array<Elem, 2>& buffers,
-        CompletionCondition completion_condition, WriteHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        stream_(stream),
-        buffers_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    write_op(const write_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    write_op(write_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        stream_(other.stream_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      typename asio::detail::dependent_type<Elem,
-          std::array<asio::const_buffer, 2> >::type bufs = {{
-        asio::const_buffer(buffers_[0]),
-        asio::const_buffer(buffers_[1]) }};
-      std::size_t buffer_size0 = bufs[0].size();
-      std::size_t buffer_size1 = bufs[1].size();
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          bufs[0] = asio::buffer(bufs[0] + total_transferred_, n);
-          bufs[1] = asio::buffer(
-              bufs[1] + (total_transferred_ < buffer_size0
-                ? 0 : total_transferred_ - buffer_size0),
-              n - bufs[0].size());
-          stream_.async_write_some(bufs, ASIO_MOVE_CAST(write_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_size0 + buffer_size1)
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncWriteStream& stream_;
-    std::array<Elem, 2> buffers_;
-    int start_;
-    std::size_t total_transferred_;
-    WriteHandler handler_;
-  };
-
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
   template <typename AsyncWriteStream, typename ConstBufferSequence,
-      typename CompletionCondition, typename WriteHandler>
+      typename ConstBufferIterator, typename CompletionCondition,
+      typename WriteHandler>
   inline void* asio_handler_allocate(std::size_t size,
-      write_op<AsyncWriteStream, ConstBufferSequence,
+      write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
         CompletionCondition, WriteHandler>* this_handler)
   {
     return asio_handler_alloc_helpers::allocate(
@@ -601,9 +288,10 @@
   }
 
   template <typename AsyncWriteStream, typename ConstBufferSequence,
-      typename CompletionCondition, typename WriteHandler>
+      typename ConstBufferIterator, typename CompletionCondition,
+      typename WriteHandler>
   inline void asio_handler_deallocate(void* pointer, std::size_t size,
-      write_op<AsyncWriteStream, ConstBufferSequence,
+      write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
         CompletionCondition, WriteHandler>* this_handler)
   {
     asio_handler_alloc_helpers::deallocate(
@@ -611,9 +299,10 @@
   }
 
   template <typename AsyncWriteStream, typename ConstBufferSequence,
-      typename CompletionCondition, typename WriteHandler>
+      typename ConstBufferIterator, typename CompletionCondition,
+      typename WriteHandler>
   inline bool asio_handler_is_continuation(
-      write_op<AsyncWriteStream, ConstBufferSequence,
+      write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
         CompletionCondition, WriteHandler>* this_handler)
   {
     return this_handler->start_ == 0 ? true
@@ -622,10 +311,10 @@
   }
 
   template <typename Function, typename AsyncWriteStream,
-      typename ConstBufferSequence, typename CompletionCondition,
-      typename WriteHandler>
+      typename ConstBufferSequence, typename ConstBufferIterator,
+      typename CompletionCondition, typename WriteHandler>
   inline void asio_handler_invoke(Function& function,
-      write_op<AsyncWriteStream, ConstBufferSequence,
+      write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
         CompletionCondition, WriteHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
@@ -633,31 +322,46 @@
   }
 
   template <typename Function, typename AsyncWriteStream,
-      typename ConstBufferSequence, typename CompletionCondition,
-      typename WriteHandler>
+      typename ConstBufferSequence, typename ConstBufferIterator,
+      typename CompletionCondition, typename WriteHandler>
   inline void asio_handler_invoke(const Function& function,
-      write_op<AsyncWriteStream, ConstBufferSequence,
+      write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
         CompletionCondition, WriteHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
   }
+
+  template <typename AsyncWriteStream, typename ConstBufferSequence,
+      typename ConstBufferIterator, typename CompletionCondition,
+      typename WriteHandler>
+  inline void start_write_buffer_sequence_op(AsyncWriteStream& stream,
+      const ConstBufferSequence& buffers, const ConstBufferIterator&,
+      CompletionCondition completion_condition, WriteHandler& handler)
+  {
+    detail::write_op<AsyncWriteStream, ConstBufferSequence,
+      ConstBufferIterator, CompletionCondition, WriteHandler>(
+        stream, buffers, completion_condition, handler)(
+          asio::error_code(), 0, 1);
+  }
+
 } // namespace detail
 
 #if !defined(GENERATING_DOCUMENTATION)
 
 template <typename AsyncWriteStream, typename ConstBufferSequence,
-    typename CompletionCondition, typename WriteHandler, typename Allocator>
+    typename ConstBufferIterator, typename CompletionCondition,
+    typename WriteHandler, typename Allocator>
 struct associated_allocator<
     detail::write_op<AsyncWriteStream, ConstBufferSequence,
-      CompletionCondition, WriteHandler>,
+      ConstBufferIterator, CompletionCondition, WriteHandler>,
     Allocator>
 {
   typedef typename associated_allocator<WriteHandler, Allocator>::type type;
 
   static type get(
       const detail::write_op<AsyncWriteStream, ConstBufferSequence,
-        CompletionCondition, WriteHandler>& h,
+        ConstBufferIterator, CompletionCondition, WriteHandler>& h,
       const Allocator& a = Allocator()) ASIO_NOEXCEPT
   {
     return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
@@ -665,17 +369,18 @@
 };
 
 template <typename AsyncWriteStream, typename ConstBufferSequence,
-    typename CompletionCondition, typename WriteHandler, typename Executor>
+    typename ConstBufferIterator, typename CompletionCondition,
+    typename WriteHandler, typename Executor>
 struct associated_executor<
     detail::write_op<AsyncWriteStream, ConstBufferSequence,
-      CompletionCondition, WriteHandler>,
+      ConstBufferIterator, CompletionCondition, WriteHandler>,
     Executor>
 {
   typedef typename associated_executor<WriteHandler, Executor>::type type;
 
   static type get(
       const detail::write_op<AsyncWriteStream, ConstBufferSequence,
-        CompletionCondition, WriteHandler>& h,
+        ConstBufferIterator, CompletionCondition, WriteHandler>& h,
       const Executor& ex = Executor()) ASIO_NOEXCEPT
   {
     return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
@@ -702,11 +407,9 @@
   async_completion<WriteHandler,
     void (asio::error_code, std::size_t)> init(handler);
 
-  detail::write_op<AsyncWriteStream, ConstBufferSequence,
-    CompletionCondition, ASIO_HANDLER_TYPE(
-      WriteHandler, void (asio::error_code, std::size_t))>(
-        s, buffers, completion_condition, init.handler)(
-          asio::error_code(), 0, 1);
+  detail::start_write_buffer_sequence_op(s, buffers,
+      asio::buffer_sequence_begin(buffers), completion_condition,
+      init.completion_handler);
 
   return init.result.get();
 }
@@ -728,18 +431,16 @@
   async_completion<WriteHandler,
     void (asio::error_code, std::size_t)> init(handler);
 
-  detail::write_op<AsyncWriteStream, ConstBufferSequence,
-    detail::transfer_all_t, ASIO_HANDLER_TYPE(
-      WriteHandler, void (asio::error_code, std::size_t))>(
-        s, buffers, transfer_all(), init.handler)(
-          asio::error_code(), 0, 1);
+  detail::start_write_buffer_sequence_op(s, buffers,
+      asio::buffer_sequence_begin(buffers), transfer_all(),
+      init.completion_handler);
 
   return init.result.get();
 }
 
 namespace detail
 {
-  template <typename AsyncWriteStream, typename DynamicBufferSequence,
+  template <typename AsyncWriteStream, typename DynamicBuffer,
       typename CompletionCondition, typename WriteHandler>
   class write_dynbuf_op
   {
@@ -767,7 +468,7 @@
 
     write_dynbuf_op(write_dynbuf_op&& other)
       : stream_(other.stream_),
-        buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)),
+        buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
         completion_condition_(
           ASIO_MOVE_CAST(CompletionCondition)(
             other.completion_condition_)),
@@ -792,35 +493,35 @@
 
   //private:
     AsyncWriteStream& stream_;
-    DynamicBufferSequence buffers_;
+    DynamicBuffer buffers_;
     CompletionCondition completion_condition_;
     WriteHandler handler_;
   };
 
-  template <typename AsyncWriteStream, typename DynamicBufferSequence,
+  template <typename AsyncWriteStream, typename DynamicBuffer,
       typename CompletionCondition, typename WriteHandler>
   inline void* asio_handler_allocate(std::size_t size,
-      write_dynbuf_op<AsyncWriteStream, DynamicBufferSequence,
+      write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
         CompletionCondition, WriteHandler>* this_handler)
   {
     return asio_handler_alloc_helpers::allocate(
         size, this_handler->handler_);
   }
 
-  template <typename AsyncWriteStream, typename DynamicBufferSequence,
+  template <typename AsyncWriteStream, typename DynamicBuffer,
       typename CompletionCondition, typename WriteHandler>
   inline void asio_handler_deallocate(void* pointer, std::size_t size,
-      write_dynbuf_op<AsyncWriteStream, DynamicBufferSequence,
+      write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
         CompletionCondition, WriteHandler>* this_handler)
   {
     asio_handler_alloc_helpers::deallocate(
         pointer, size, this_handler->handler_);
   }
 
-  template <typename AsyncWriteStream, typename DynamicBufferSequence,
+  template <typename AsyncWriteStream, typename DynamicBuffer,
       typename CompletionCondition, typename WriteHandler>
   inline bool asio_handler_is_continuation(
-      write_dynbuf_op<AsyncWriteStream, DynamicBufferSequence,
+      write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
         CompletionCondition, WriteHandler>* this_handler)
   {
     return asio_handler_cont_helpers::is_continuation(
@@ -828,10 +529,10 @@
   }
 
   template <typename Function, typename AsyncWriteStream,
-      typename DynamicBufferSequence, typename CompletionCondition,
+      typename DynamicBuffer, typename CompletionCondition,
       typename WriteHandler>
   inline void asio_handler_invoke(Function& function,
-      write_dynbuf_op<AsyncWriteStream, DynamicBufferSequence,
+      write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
         CompletionCondition, WriteHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
@@ -839,10 +540,10 @@
   }
 
   template <typename Function, typename AsyncWriteStream,
-      typename DynamicBufferSequence, typename CompletionCondition,
+      typename DynamicBuffer, typename CompletionCondition,
       typename WriteHandler>
   inline void asio_handler_invoke(const Function& function,
-      write_dynbuf_op<AsyncWriteStream, DynamicBufferSequence,
+      write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
         CompletionCondition, WriteHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
@@ -852,36 +553,36 @@
 
 #if !defined(GENERATING_DOCUMENTATION)
 
-template <typename AsyncWriteStream, typename DynamicBufferSequence,
+template <typename AsyncWriteStream, typename DynamicBuffer,
     typename CompletionCondition, typename WriteHandler, typename Allocator>
 struct associated_allocator<
     detail::write_dynbuf_op<AsyncWriteStream,
-      DynamicBufferSequence, CompletionCondition, WriteHandler>,
+      DynamicBuffer, CompletionCondition, WriteHandler>,
     Allocator>
 {
   typedef typename associated_allocator<WriteHandler, Allocator>::type type;
 
   static type get(
       const detail::write_dynbuf_op<AsyncWriteStream,
-        DynamicBufferSequence, CompletionCondition, WriteHandler>& h,
+        DynamicBuffer, CompletionCondition, WriteHandler>& h,
       const Allocator& a = Allocator()) ASIO_NOEXCEPT
   {
     return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
   }
 };
 
-template <typename AsyncWriteStream, typename DynamicBufferSequence,
+template <typename AsyncWriteStream, typename DynamicBuffer,
     typename CompletionCondition, typename WriteHandler, typename Executor>
 struct associated_executor<
     detail::write_dynbuf_op<AsyncWriteStream,
-      DynamicBufferSequence, CompletionCondition, WriteHandler>,
+      DynamicBuffer, CompletionCondition, WriteHandler>,
     Executor>
 {
   typedef typename associated_executor<WriteHandler, Executor>::type type;
 
   static type get(
       const detail::write_dynbuf_op<AsyncWriteStream,
-        DynamicBufferSequence, CompletionCondition, WriteHandler>& h,
+        DynamicBuffer, CompletionCondition, WriteHandler>& h,
       const Executor& ex = Executor()) ASIO_NOEXCEPT
   {
     return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
@@ -891,31 +592,31 @@
 #endif // !defined(GENERATING_DOCUMENTATION)
 
 template <typename AsyncWriteStream,
-    typename DynamicBufferSequence, typename WriteHandler>
+    typename DynamicBuffer, typename WriteHandler>
 inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
     void (asio::error_code, std::size_t))
 async_write(AsyncWriteStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     ASIO_MOVE_ARG(WriteHandler) handler,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type*)
 {
   return async_write(s,
-      ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
+      ASIO_MOVE_CAST(DynamicBuffer)(buffers),
       transfer_all(), ASIO_MOVE_CAST(WriteHandler)(handler));
 }
 
-template <typename AsyncWriteStream, typename DynamicBufferSequence,
+template <typename AsyncWriteStream, typename DynamicBuffer,
     typename CompletionCondition, typename WriteHandler>
 inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
     void (asio::error_code, std::size_t))
 async_write(AsyncWriteStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     CompletionCondition completion_condition,
     ASIO_MOVE_ARG(WriteHandler) handler,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type*)
 {
   // If you get an error on the following line it means that your handler does
@@ -926,16 +627,17 @@
     void (asio::error_code, std::size_t)> init(handler);
 
   detail::write_dynbuf_op<AsyncWriteStream,
-    typename decay<DynamicBufferSequence>::type,
+    typename decay<DynamicBuffer>::type,
       CompletionCondition, ASIO_HANDLER_TYPE(
         WriteHandler, void (asio::error_code, std::size_t))>(
-          s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
-            completion_condition, init.handler)(
+          s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+            completion_condition, init.completion_handler)(
               asio::error_code(), 0, 1);
 
   return init.result.get();
 }
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 template <typename AsyncWriteStream, typename Allocator, typename WriteHandler>
@@ -963,6 +665,7 @@
 }
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 } // namespace asio
 
diff --git a/asio/include/asio/impl/write_at.hpp b/asio/include/asio/impl/write_at.hpp
index 9303c5c..9e06bd2 100644
--- a/asio/include/asio/impl/write_at.hpp
+++ b/asio/include/asio/impl/write_at.hpp
@@ -2,7 +2,7 @@
 // impl/write_at.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -34,28 +34,41 @@
 
 namespace asio {
 
+namespace detail
+{
+  template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
+      typename ConstBufferIterator, typename CompletionCondition>
+  std::size_t write_at_buffer_sequence(SyncRandomAccessWriteDevice& d,
+      uint64_t offset, const ConstBufferSequence& buffers,
+      const ConstBufferIterator&, CompletionCondition completion_condition,
+      asio::error_code& ec)
+  {
+    ec = asio::error_code();
+    asio::detail::consuming_buffers<const_buffer,
+        ConstBufferSequence, ConstBufferIterator> tmp(buffers);
+    while (!tmp.empty())
+    {
+      if (std::size_t max_size = detail::adapt_completion_condition_result(
+            completion_condition(ec, tmp.total_consumed())))
+      {
+        tmp.consume(d.write_some_at(offset + tmp.total_consumed(),
+              tmp.prepare(max_size), ec));
+      }
+      else
+        break;
+    }
+    return tmp.total_consumed();;
+  }
+} // namespace detail
+
 template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
     typename CompletionCondition>
 std::size_t write_at(SyncRandomAccessWriteDevice& d,
     uint64_t offset, const ConstBufferSequence& buffers,
     CompletionCondition completion_condition, asio::error_code& ec)
 {
-  ec = asio::error_code();
-  asio::detail::consuming_buffers<
-    const_buffer, ConstBufferSequence> tmp(buffers);
-  std::size_t total_transferred = 0;
-  tmp.prepare(detail::adapt_completion_condition_result(
-        completion_condition(ec, total_transferred)));
-  while (tmp.begin() != tmp.end())
-  {
-    std::size_t bytes_transferred = d.write_some_at(
-        offset + total_transferred, tmp, ec);
-    tmp.consume(bytes_transferred);
-    total_transferred += bytes_transferred;
-    tmp.prepare(detail::adapt_completion_condition_result(
-          completion_condition(ec, total_transferred)));
-  }
-  return total_transferred;
+  return detail::write_at_buffer_sequence(d, offset, buffers,
+      asio::buffer_sequence_begin(buffers), completion_condition, ec);
 }
 
 template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence>
@@ -90,6 +103,7 @@
   return bytes_transferred;
 }
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 template <typename SyncRandomAccessWriteDevice, typename Allocator,
@@ -136,10 +150,12 @@
 }
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 namespace detail
 {
-  template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+  template <typename AsyncRandomAccessWriteDevice,
+      typename ConstBufferSequence, typename ConstBufferIterator,
       typename CompletionCondition, typename WriteHandler>
   class write_at_op
     : detail::base_from_completion_cond<CompletionCondition>
@@ -154,7 +170,6 @@
         offset_(offset),
         buffers_(buffers),
         start_(0),
-        total_transferred_(0),
         handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
     {
     }
@@ -166,7 +181,6 @@
         offset_(other.offset_),
         buffers_(other.buffers_),
         start_(other.start_),
-        total_transferred_(other.total_transferred_),
         handler_(other.handler_)
     {
     }
@@ -177,7 +191,6 @@
         offset_(other.offset_),
         buffers_(other.buffers_),
         start_(other.start_),
-        total_transferred_(other.total_transferred_),
         handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
     {
     }
@@ -186,405 +199,64 @@
     void operator()(const asio::error_code& ec,
         std::size_t bytes_transferred, int start = 0)
     {
+      std::size_t max_size;
       switch (start_ = start)
       {
         case 1:
-        buffers_.prepare(this->check_for_completion(ec, total_transferred_));
-        for (;;)
+        max_size = this->check_for_completion(ec, buffers_.total_consumed());
+        do
         {
           device_.async_write_some_at(
-              offset_ + total_transferred_, buffers_,
+              offset_ + buffers_.total_consumed(), buffers_.prepare(max_size),
               ASIO_MOVE_CAST(write_at_op)(*this));
           return; default:
-          total_transferred_ += bytes_transferred;
           buffers_.consume(bytes_transferred);
-          buffers_.prepare(this->check_for_completion(ec, total_transferred_));
-          if ((!ec && bytes_transferred == 0)
-              || buffers_.begin() == buffers_.end())
+          if ((!ec && bytes_transferred == 0) || buffers_.empty())
             break;
-        }
+          max_size = this->check_for_completion(ec, buffers_.total_consumed());
+        } while (max_size > 0);
 
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
+        handler_(ec, buffers_.total_consumed());
       }
     }
 
   //private:
     AsyncRandomAccessWriteDevice& device_;
     uint64_t offset_;
-    asio::detail::consuming_buffers<
-      const_buffer, ConstBufferSequence> buffers_;
+    asio::detail::consuming_buffers<const_buffer,
+        ConstBufferSequence, ConstBufferIterator> buffers_;
     int start_;
-    std::size_t total_transferred_;
     WriteHandler handler_;
   };
 
   template <typename AsyncRandomAccessWriteDevice,
-      typename CompletionCondition, typename WriteHandler>
-  class write_at_op<AsyncRandomAccessWriteDevice,
-      asio::mutable_buffers_1, CompletionCondition, WriteHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    write_at_op(AsyncRandomAccessWriteDevice& device,
-        uint64_t offset, const asio::mutable_buffers_1& buffers,
-        CompletionCondition completion_condition,
-        WriteHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        device_(device),
-        offset_(offset),
-        buffer_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    write_at_op(const write_at_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffer_(other.buffer_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    write_at_op(write_at_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffer_(other.buffer_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          device_.async_write_some_at(offset_ + total_transferred_,
-              asio::buffer(buffer_ + total_transferred_, n),
-              ASIO_MOVE_CAST(write_at_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_.size())
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncRandomAccessWriteDevice& device_;
-    uint64_t offset_;
-    asio::mutable_buffer buffer_;
-    int start_;
-    std::size_t total_transferred_;
-    WriteHandler handler_;
-  };
-
-  template <typename AsyncRandomAccessWriteDevice,
-      typename CompletionCondition, typename WriteHandler>
-  class write_at_op<AsyncRandomAccessWriteDevice, asio::const_buffers_1,
-      CompletionCondition, WriteHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    write_at_op(AsyncRandomAccessWriteDevice& device,
-        uint64_t offset, const asio::const_buffers_1& buffers,
-        CompletionCondition completion_condition,
-        WriteHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        device_(device),
-        offset_(offset),
-        buffer_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    write_at_op(const write_at_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffer_(other.buffer_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    write_at_op(write_at_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffer_(other.buffer_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          device_.async_write_some_at(offset_ + total_transferred_,
-              asio::buffer(buffer_ + total_transferred_, n),
-              ASIO_MOVE_CAST(write_at_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_.size())
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncRandomAccessWriteDevice& device_;
-    uint64_t offset_;
-    asio::const_buffer buffer_;
-    int start_;
-    std::size_t total_transferred_;
-    WriteHandler handler_;
-  };
-
-  template <typename AsyncRandomAccessWriteDevice, typename Elem,
-      typename CompletionCondition, typename WriteHandler>
-  class write_at_op<AsyncRandomAccessWriteDevice, boost::array<Elem, 2>,
-      CompletionCondition, WriteHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    write_at_op(AsyncRandomAccessWriteDevice& device,
-        uint64_t offset, const boost::array<Elem, 2>& buffers,
-        CompletionCondition completion_condition, WriteHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        device_(device),
-        offset_(offset),
-        buffers_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    write_at_op(const write_at_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    write_at_op(write_at_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      typename asio::detail::dependent_type<Elem,
-          boost::array<asio::const_buffer, 2> >::type bufs = {{
-        asio::const_buffer(buffers_[0]),
-        asio::const_buffer(buffers_[1]) }};
-      std::size_t buffer_size0 = bufs[0].size();
-      std::size_t buffer_size1 = bufs[1].size();
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          bufs[0] = asio::buffer(bufs[0] + total_transferred_, n);
-          bufs[1] = asio::buffer(
-              bufs[1] + (total_transferred_ < buffer_size0
-                ? 0 : total_transferred_ - buffer_size0),
-              n - bufs[0].size());
-          device_.async_write_some_at(offset_ + total_transferred_,
-              bufs, ASIO_MOVE_CAST(write_at_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_size0 + buffer_size1)
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncRandomAccessWriteDevice& device_;
-    uint64_t offset_;
-    boost::array<Elem, 2> buffers_;
-    int start_;
-    std::size_t total_transferred_;
-    WriteHandler handler_;
-  };
-
-#if defined(ASIO_HAS_STD_ARRAY)
-
-  template <typename AsyncRandomAccessWriteDevice, typename Elem,
-      typename CompletionCondition, typename WriteHandler>
-  class write_at_op<AsyncRandomAccessWriteDevice, std::array<Elem, 2>,
-      CompletionCondition, WriteHandler>
-    : detail::base_from_completion_cond<CompletionCondition>
-  {
-  public:
-    write_at_op(AsyncRandomAccessWriteDevice& device,
-        uint64_t offset, const std::array<Elem, 2>& buffers,
-        CompletionCondition completion_condition, WriteHandler& handler)
-      : detail::base_from_completion_cond<
-          CompletionCondition>(completion_condition),
-        device_(device),
-        offset_(offset),
-        buffers_(buffers),
-        start_(0),
-        total_transferred_(0),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
-    {
-    }
-
-#if defined(ASIO_HAS_MOVE)
-    write_at_op(const write_at_op& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(other.handler_)
-    {
-    }
-
-    write_at_op(write_at_op&& other)
-      : detail::base_from_completion_cond<CompletionCondition>(other),
-        device_(other.device_),
-        offset_(other.offset_),
-        buffers_(other.buffers_),
-        start_(other.start_),
-        total_transferred_(other.total_transferred_),
-        handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
-    {
-    }
-#endif // defined(ASIO_HAS_MOVE)
-
-    void operator()(const asio::error_code& ec,
-        std::size_t bytes_transferred, int start = 0)
-    {
-      typename asio::detail::dependent_type<Elem,
-          std::array<asio::const_buffer, 2> >::type bufs = {{
-        asio::const_buffer(buffers_[0]),
-        asio::const_buffer(buffers_[1]) }};
-      std::size_t buffer_size0 = bufs[0].size();
-      std::size_t buffer_size1 = bufs[1].size();
-      std::size_t n = 0;
-      switch (start_ = start)
-      {
-        case 1:
-        n = this->check_for_completion(ec, total_transferred_);
-        for (;;)
-        {
-          bufs[0] = asio::buffer(bufs[0] + total_transferred_, n);
-          bufs[1] = asio::buffer(
-              bufs[1] + (total_transferred_ < buffer_size0
-                ? 0 : total_transferred_ - buffer_size0),
-              n - bufs[0].size());
-          device_.async_write_some_at(offset_ + total_transferred_,
-              bufs, ASIO_MOVE_CAST(write_at_op)(*this));
-          return; default:
-          total_transferred_ += bytes_transferred;
-          if ((!ec && bytes_transferred == 0)
-              || (n = this->check_for_completion(ec, total_transferred_)) == 0
-              || total_transferred_ == buffer_size0 + buffer_size1)
-            break;
-        }
-
-        handler_(ec, static_cast<const std::size_t&>(total_transferred_));
-      }
-    }
-
-  //private:
-    AsyncRandomAccessWriteDevice& device_;
-    uint64_t offset_;
-    std::array<Elem, 2> buffers_;
-    int start_;
-    std::size_t total_transferred_;
-    WriteHandler handler_;
-  };
-
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
-  template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+      typename ConstBufferSequence, typename ConstBufferIterator,
       typename CompletionCondition, typename WriteHandler>
   inline void* asio_handler_allocate(std::size_t size,
       write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
-        CompletionCondition, WriteHandler>* this_handler)
+        ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
   {
     return asio_handler_alloc_helpers::allocate(
         size, this_handler->handler_);
   }
 
-  template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+  template <typename AsyncRandomAccessWriteDevice,
+      typename ConstBufferSequence, typename ConstBufferIterator,
       typename CompletionCondition, typename WriteHandler>
   inline void asio_handler_deallocate(void* pointer, std::size_t size,
       write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
-        CompletionCondition, WriteHandler>* this_handler)
+        ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
   {
     asio_handler_alloc_helpers::deallocate(
         pointer, size, this_handler->handler_);
   }
 
-  template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+  template <typename AsyncRandomAccessWriteDevice,
+      typename ConstBufferSequence, typename ConstBufferIterator,
       typename CompletionCondition, typename WriteHandler>
   inline bool asio_handler_is_continuation(
       write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
-        CompletionCondition, WriteHandler>* this_handler)
+        ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
   {
     return this_handler->start_ == 0 ? true
       : asio_handler_cont_helpers::is_continuation(
@@ -592,73 +264,78 @@
   }
 
   template <typename Function, typename AsyncRandomAccessWriteDevice,
-      typename ConstBufferSequence, typename CompletionCondition,
-      typename WriteHandler>
+      typename ConstBufferSequence, typename ConstBufferIterator,
+      typename CompletionCondition, typename WriteHandler>
   inline void asio_handler_invoke(Function& function,
       write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
-        CompletionCondition, WriteHandler>* this_handler)
+        ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncRandomAccessWriteDevice,
-      typename ConstBufferSequence, typename CompletionCondition,
-      typename WriteHandler>
+      typename ConstBufferSequence, typename ConstBufferIterator,
+      typename CompletionCondition, typename WriteHandler>
   inline void asio_handler_invoke(const Function& function,
       write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
-        CompletionCondition, WriteHandler>* this_handler)
+        ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
   {
     asio_handler_invoke_helpers::invoke(
         function, this_handler->handler_);
   }
 
-  template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+  template <typename AsyncRandomAccessWriteDevice,
+      typename ConstBufferSequence, typename ConstBufferIterator,
       typename CompletionCondition, typename WriteHandler>
-  inline write_at_op<AsyncRandomAccessWriteDevice,
-      ConstBufferSequence, CompletionCondition, WriteHandler>
-  make_write_at_op(AsyncRandomAccessWriteDevice& d,
+  inline void start_write_at_buffer_sequence_op(AsyncRandomAccessWriteDevice& d,
       uint64_t offset, const ConstBufferSequence& buffers,
-      CompletionCondition completion_condition, WriteHandler handler)
+      const ConstBufferIterator&, CompletionCondition completion_condition,
+      WriteHandler& handler)
   {
-    return write_at_op<AsyncRandomAccessWriteDevice,
-      ConstBufferSequence, CompletionCondition, WriteHandler>(
-        d, offset, buffers, completion_condition, handler);
+    detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
+      ConstBufferIterator, CompletionCondition, WriteHandler>(
+        d, offset, buffers, completion_condition, handler)(
+          asio::error_code(), 0, 1);
   }
 } // namespace detail
 
 #if !defined(GENERATING_DOCUMENTATION)
 
-template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+template <typename AsyncRandomAccessWriteDevice,
+    typename ConstBufferSequence, typename ConstBufferIterator,
     typename CompletionCondition, typename WriteHandler, typename Allocator>
 struct associated_allocator<
-    detail::write_at_op<AsyncRandomAccessWriteDevice,
-      ConstBufferSequence, CompletionCondition, WriteHandler>,
+    detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
+      ConstBufferIterator, CompletionCondition, WriteHandler>,
     Allocator>
 {
   typedef typename associated_allocator<WriteHandler, Allocator>::type type;
 
   static type get(
       const detail::write_at_op<AsyncRandomAccessWriteDevice,
-        ConstBufferSequence, CompletionCondition, WriteHandler>& h,
+        ConstBufferSequence, ConstBufferIterator,
+        CompletionCondition, WriteHandler>& h,
       const Allocator& a = Allocator()) ASIO_NOEXCEPT
   {
     return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
   }
 };
 
-template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+template <typename AsyncRandomAccessWriteDevice,
+    typename ConstBufferSequence, typename ConstBufferIterator,
     typename CompletionCondition, typename WriteHandler, typename Executor>
 struct associated_executor<
-    detail::write_at_op<AsyncRandomAccessWriteDevice,
-      ConstBufferSequence, CompletionCondition, WriteHandler>,
+    detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
+      ConstBufferIterator, CompletionCondition, WriteHandler>,
     Executor>
 {
   typedef typename associated_executor<WriteHandler, Executor>::type type;
 
   static type get(
       const detail::write_at_op<AsyncRandomAccessWriteDevice,
-        ConstBufferSequence, CompletionCondition, WriteHandler>& h,
+        ConstBufferSequence, ConstBufferIterator,
+        CompletionCondition, WriteHandler>& h,
       const Executor& ex = Executor()) ASIO_NOEXCEPT
   {
     return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
@@ -683,11 +360,9 @@
   async_completion<WriteHandler,
     void (asio::error_code, std::size_t)> init(handler);
 
-  detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
-    CompletionCondition, ASIO_HANDLER_TYPE(
-      WriteHandler, void (asio::error_code, std::size_t))>(
-        d, offset, buffers, completion_condition, init.handler)(
-          asio::error_code(), 0, 1);
+  detail::start_write_at_buffer_sequence_op(d, offset, buffers,
+      asio::buffer_sequence_begin(buffers), completion_condition,
+      init.completion_handler);
 
   return init.result.get();
 }
@@ -707,15 +382,14 @@
   async_completion<WriteHandler,
     void (asio::error_code, std::size_t)> init(handler);
 
-  detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
-    detail::transfer_all_t, ASIO_HANDLER_TYPE(
-      WriteHandler, void (asio::error_code, std::size_t))>(
-        d, offset, buffers, transfer_all(), init.handler)(
-          asio::error_code(), 0, 1);
+  detail::start_write_at_buffer_sequence_op(d, offset, buffers,
+      asio::buffer_sequence_begin(buffers), transfer_all(),
+      init.completion_handler);
 
   return init.result.get();
 }
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 namespace detail
@@ -860,7 +534,7 @@
   async_write_at(d, offset, b.data(), completion_condition,
     detail::write_at_streambuf_op<Allocator, ASIO_HANDLER_TYPE(
       WriteHandler, void (asio::error_code, std::size_t))>(
-        b, init.handler));
+        b, init.completion_handler));
 
   return init.result.get();
 }
@@ -883,12 +557,13 @@
   async_write_at(d, offset, b.data(), transfer_all(),
     detail::write_at_streambuf_op<Allocator, ASIO_HANDLER_TYPE(
       WriteHandler, void (asio::error_code, std::size_t))>(
-        b, init.handler));
+        b, init.completion_handler));
 
   return init.result.get();
 }
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 } // namespace asio
 
diff --git a/asio/include/asio/io_context.hpp b/asio/include/asio/io_context.hpp
index 96a0a33..44fe432 100644
--- a/asio/include/asio/io_context.hpp
+++ b/asio/include/asio/io_context.hpp
@@ -2,7 +2,7 @@
 // io_context.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -24,7 +24,10 @@
 #include "asio/detail/wrapped_handler.hpp"
 #include "asio/error_code.hpp"
 #include "asio/execution_context.hpp"
-#include "asio/is_executor.hpp"
+
+#if defined(ASIO_HAS_CHRONO)
+# include "asio/detail/chrono.hpp"
+#endif // defined(ASIO_HAS_CHRONO)
 
 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
 # include "asio/detail/winsock_init.hpp"
@@ -120,10 +123,12 @@
  * returning when there is no more work to do. For example, the io_context may
  * be being run in a background thread that is launched prior to the
  * application's asynchronous operations. The run() call may be kept running by
- * creating an object of type asio::io_context::work:
+ * creating an object of type
+ * asio::executor_work_guard<io_context::executor_type>:
  *
  * @code asio::io_context io_context;
- * asio::io_context::work work(io_context);
+ * asio::executor_work_guard<asio::io_context::executor_type>
+ *   = asio::make_work_guard(io_context);
  * ... @endcode
  *
  * To effect a shutdown, the application will then need to call the io_context
@@ -132,11 +137,11 @@
  * permitting ready handlers to be dispatched.
  *
  * Alternatively, if the application requires that all operations and handlers
- * be allowed to finish normally, the work object may be explicitly destroyed.
+ * be allowed to finish normally, the work object may be explicitly reset.
  *
  * @code asio::io_context io_context;
- * auto_ptr<asio::io_context::work> work(
- *     new asio::io_context::work(io_context));
+ * asio::executor_work_guard<asio::io_context::executor_type>
+ *   = asio::make_work_guard(io_context);
  * ...
  * work.reset(); // Allow run() to exit. @endcode
  */
@@ -153,12 +158,19 @@
   class executor_type;
   friend class executor_type;
 
+#if !defined(ASIO_NO_DEPRECATED)
   class work;
   friend class work;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
   class service;
 
+#if !defined(ASIO_NO_EXTENSIONS)
   class strand;
+#endif // !defined(ASIO_NO_EXTENSIONS)
+
+  /// The type used to count the number of handlers executed by the context.
+  typedef std::size_t count_type;
 
   /// Constructor.
   ASIO_DECL io_context();
@@ -226,8 +238,6 @@
    *
    * @return The number of handlers that were executed.
    *
-   * @throws asio::system_error Thrown on failure.
-   *
    * @note The run() function must not be called from a thread that is currently
    * calling one of run(), run_one(), poll() or poll_one() on the same
    * io_context object.
@@ -235,9 +245,11 @@
    * The poll() function may also be used to dispatch ready handlers, but
    * without blocking.
    */
-  ASIO_DECL std::size_t run();
+  ASIO_DECL count_type run();
 
-  /// Run the io_context object's event processing loop.
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use non-error_code overload.) Run the io_context object's
+  /// event processing loop.
   /**
    * The run() function blocks until all work has finished and there are no
    * more handlers to be dispatched, or until the io_context has been stopped.
@@ -263,7 +275,37 @@
    * The poll() function may also be used to dispatch ready handlers, but
    * without blocking.
    */
-  ASIO_DECL std::size_t run(asio::error_code& ec);
+  ASIO_DECL count_type run(asio::error_code& ec);
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+#if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
+  /// Run the io_context object's event processing loop for a specified
+  /// duration.
+  /**
+   * The run_for() function blocks until all work has finished and there are no
+   * more handlers to be dispatched, until the io_context has been stopped, or
+   * until the specified duration has elapsed.
+   *
+   * @param rel_time The duration for which the call may block.
+   *
+   * @return The number of handlers that were executed.
+   */
+  template <typename Rep, typename Period>
+  std::size_t run_for(const chrono::duration<Rep, Period>& rel_time);
+
+  /// Run the io_context object's event processing loop until a specified time.
+  /**
+   * The run_until() function blocks until all work has finished and there are
+   * no more handlers to be dispatched, until the io_context has been stopped,
+   * or until the specified time has been reached.
+   *
+   * @param abs_time The time point until which the call may block.
+   *
+   * @return The number of handlers that were executed.
+   */
+  template <typename Clock, typename Duration>
+  std::size_t run_until(const chrono::time_point<Clock, Duration>& abs_time);
+#endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
 
   /// Run the io_context object's event processing loop to execute at most one
   /// handler.
@@ -276,13 +318,12 @@
    * returns @c true). Subsequent calls to run(), run_one(), poll() or
    * poll_one() will return immediately unless there is a prior call to
    * restart().
-   *
-   * @throws asio::system_error Thrown on failure.
    */
-  ASIO_DECL std::size_t run_one();
+  ASIO_DECL count_type run_one();
 
-  /// Run the io_context object's event processing loop to execute at most one
-  /// handler.
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use non-error_code overlaod.) Run the io_context object's
+  /// event processing loop to execute at most one handler.
   /**
    * The run_one() function blocks until one handler has been dispatched, or
    * until the io_context has been stopped.
@@ -295,7 +336,39 @@
    *
    * @return The number of handlers that were executed.
    */
-  ASIO_DECL std::size_t run_one(asio::error_code& ec);
+  ASIO_DECL count_type run_one(asio::error_code& ec);
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+#if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
+  /// Run the io_context object's event processing loop for a specified duration
+  /// to execute at most one handler.
+  /**
+   * The run_one_for() function blocks until one handler has been dispatched,
+   * until the io_context has been stopped, or until the specified duration has
+   * elapsed.
+   *
+   * @param rel_time The duration for which the call may block.
+   *
+   * @return The number of handlers that were executed.
+   */
+  template <typename Rep, typename Period>
+  std::size_t run_one_for(const chrono::duration<Rep, Period>& rel_time);
+
+  /// Run the io_context object's event processing loop until a specified time
+  /// to execute at most one handler.
+  /**
+   * The run_one_until() function blocks until one handler has been dispatched,
+   * until the io_context has been stopped, or until the specified time has
+   * been reached.
+   *
+   * @param abs_time The time point until which the call may block.
+   *
+   * @return The number of handlers that were executed.
+   */
+  template <typename Clock, typename Duration>
+  std::size_t run_one_until(
+      const chrono::time_point<Clock, Duration>& abs_time);
+#endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
 
   /// Run the io_context object's event processing loop to execute ready
   /// handlers.
@@ -304,13 +377,12 @@
    * until the io_context has been stopped or there are no more ready handlers.
    *
    * @return The number of handlers that were executed.
-   *
-   * @throws asio::system_error Thrown on failure.
    */
-  ASIO_DECL std::size_t poll();
+  ASIO_DECL count_type poll();
 
-  /// Run the io_context object's event processing loop to execute ready
-  /// handlers.
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use non-error_code overload.) Run the io_context object's
+  /// event processing loop to execute ready handlers.
   /**
    * The poll() function runs handlers that are ready to run, without blocking,
    * until the io_context has been stopped or there are no more ready handlers.
@@ -319,7 +391,8 @@
    *
    * @return The number of handlers that were executed.
    */
-  ASIO_DECL std::size_t poll(asio::error_code& ec);
+  ASIO_DECL count_type poll(asio::error_code& ec);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
   /// Run the io_context object's event processing loop to execute one ready
   /// handler.
@@ -328,13 +401,12 @@
    * without blocking.
    *
    * @return The number of handlers that were executed.
-   *
-   * @throws asio::system_error Thrown on failure.
    */
-  ASIO_DECL std::size_t poll_one();
+  ASIO_DECL count_type poll_one();
 
-  /// Run the io_context object's event processing loop to execute one ready
-  /// handler.
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use non-error_code overload.) Run the io_context object's
+  /// event processing loop to execute one ready handler.
   /**
    * The poll_one() function runs at most one handler that is ready to run,
    * without blocking.
@@ -343,7 +415,8 @@
    *
    * @return The number of handlers that were executed.
    */
-  ASIO_DECL std::size_t poll_one(asio::error_code& ec);
+  ASIO_DECL count_type poll_one(asio::error_code& ec);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
   /// Stop the io_context object's event processing loop.
   /**
@@ -611,11 +684,7 @@
   io_context& io_context_;
 };
 
-#if !defined(GENERATING_DOCUMENTATION)
-template <> struct is_executor<io_context::executor_type> : true_type {};
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-
+#if !defined(ASIO_NO_DEPRECATED)
 /// (Deprecated: Use executor_work_guard.) Class to inform the io_context when
 /// it has work to do.
 /**
@@ -657,11 +726,9 @@
   /// Get the io_context associated with the work.
   asio::io_context& get_io_context();
 
-#if !defined(ASIO_NO_DEPRECATED)
   /// (Deprecated: Use get_io_context().) Get the io_context associated with the
   /// work.
   asio::io_context& get_io_service();
-#endif // !defined(ASIO_NO_DEPRECATED)
 
 private:
   // Prevent assignment.
@@ -670,6 +737,7 @@
   // The io_context implementation.
   detail::io_context_impl& io_context_impl_;
 };
+#endif // !defined(ASIO_NO_DEPRECATED)
 
 /// Base class for all io_context services.
 class io_context::service
@@ -757,8 +825,10 @@
 
 // If both io_context.hpp and strand.hpp have been included, automatically
 // include the header file needed for the io_context::strand class.
-#if defined(ASIO_STRAND_HPP)
-# include "asio/io_context_strand.hpp"
-#endif // defined(ASIO_STRAND_HPP)
+#if !defined(ASIO_NO_EXTENSIONS)
+# if defined(ASIO_STRAND_HPP)
+#  include "asio/io_context_strand.hpp"
+# endif // defined(ASIO_STRAND_HPP)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 #endif // ASIO_IO_CONTEXT_HPP
diff --git a/asio/include/asio/io_context_strand.hpp b/asio/include/asio/io_context_strand.hpp
index 8fe6c14..53a6c46 100644
--- a/asio/include/asio/io_context_strand.hpp
+++ b/asio/include/asio/io_context_strand.hpp
@@ -2,7 +2,7 @@
 // io_context_strand.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,6 +16,9 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+
+#if !defined(ASIO_NO_EXTENSIONS)
+
 #include "asio/async_result.hpp"
 #include "asio/detail/handler_type_requirements.hpp"
 #include "asio/detail/strand_service.hpp"
@@ -218,7 +221,7 @@
 
     async_completion<CompletionHandler, void ()> init(handler);
 
-    service_.dispatch(impl_, init.handler);
+    service_.dispatch(impl_, init.completion_handler);
 
     return init.result.get();
   }
@@ -272,7 +275,7 @@
 
     async_completion<CompletionHandler, void ()> init(handler);
 
-    service_.post(impl_, init.handler);
+    service_.post(impl_, init.completion_handler);
 
     return init.result.get();
   }
@@ -370,13 +373,10 @@
   asio::detail::strand_service::implementation_type impl_;
 };
 
-#if !defined(GENERATING_DOCUMENTATION)
-template <>
-struct is_executor<io_context::strand> : true_type {};
-#endif // !defined(GENERATING_DOCUMENTATION)
-
 } // namespace asio
 
 #include "asio/detail/pop_options.hpp"
 
+#endif // !defined(ASIO_NO_EXTENSIONS)
+
 #endif // ASIO_IO_CONTEXT_STRAND_HPP
diff --git a/asio/include/asio/io_service.hpp b/asio/include/asio/io_service.hpp
index 3cb7448..73772a0 100644
--- a/asio/include/asio/io_service.hpp
+++ b/asio/include/asio/io_service.hpp
@@ -2,7 +2,7 @@
 // io_service.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/io_service_strand.hpp b/asio/include/asio/io_service_strand.hpp
index c1ad927..49f6f3b 100644
--- a/asio/include/asio/io_service_strand.hpp
+++ b/asio/include/asio/io_service_strand.hpp
@@ -2,7 +2,7 @@
 // io_service_strand.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/address.hpp b/asio/include/asio/ip/address.hpp
index b18eb2e..351a815 100644
--- a/asio/include/asio/ip/address.hpp
+++ b/asio/include/asio/ip/address.hpp
@@ -2,7 +2,7 @@
 // ip/address.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,6 +18,7 @@
 #include "asio/detail/config.hpp"
 #include <string>
 #include "asio/detail/throw_exception.hpp"
+#include "asio/detail/string_view.hpp"
 #include "asio/detail/type_traits.hpp"
 #include "asio/error_code.hpp"
 #include "asio/ip/address_v4.hpp"
@@ -205,6 +206,27 @@
 ASIO_DECL address make_address(
     const std::string& str, asio::error_code& ec);
 
+#if defined(ASIO_HAS_STD_STRING_VIEW) \
+  || defined(GENERATING_DOCUMENTATION)
+
+/// Create an address from an IPv4 address string in dotted decimal form,
+/// or from an IPv6 address in hexadecimal notation.
+/**
+ * @relates address
+ */
+ASIO_DECL address make_address(string_view str);
+
+/// Create an address from an IPv4 address string in dotted decimal form,
+/// or from an IPv6 address in hexadecimal notation.
+/**
+ * @relates address
+ */
+ASIO_DECL address make_address(
+    string_view str, asio::error_code& ec);
+
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+       //  || defined(GENERATING_DOCUMENTATION)
+
 #if !defined(ASIO_NO_IOSTREAM)
 
 /// Output an address as a string.
diff --git a/asio/include/asio/ip/address_v4.hpp b/asio/include/asio/ip/address_v4.hpp
index 71aafc4..6e16313 100644
--- a/asio/include/asio/ip/address_v4.hpp
+++ b/asio/include/asio/ip/address_v4.hpp
@@ -2,7 +2,7 @@
 // ip/address_v4.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -20,6 +20,7 @@
 #include "asio/detail/array.hpp"
 #include "asio/detail/cstdint.hpp"
 #include "asio/detail/socket_types.hpp"
+#include "asio/detail/string_view.hpp"
 #include "asio/detail/winsock_init.hpp"
 #include "asio/error_code.hpp"
 
@@ -276,6 +277,25 @@
 ASIO_DECL address_v4 make_address_v4(
     const std::string& str, asio::error_code& ec);
 
+#if defined(ASIO_HAS_STD_STRING_VIEW) \
+  || defined(GENERATING_DOCUMENTATION)
+
+/// Create an IPv4 address from an IP address string in dotted decimal form.
+/**
+ * @relates address_v4
+ */
+ASIO_DECL address_v4 make_address_v4(string_view str);
+
+/// Create an IPv4 address from an IP address string in dotted decimal form.
+/**
+ * @relates address_v4
+ */
+ASIO_DECL address_v4 make_address_v4(
+    string_view str, asio::error_code& ec);
+
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+       //  || defined(GENERATING_DOCUMENTATION)
+
 #if !defined(ASIO_NO_IOSTREAM)
 
 /// Output an address as a string.
diff --git a/asio/include/asio/ip/address_v4_iterator.hpp b/asio/include/asio/ip/address_v4_iterator.hpp
index a7bbf88..ad0889c 100644
--- a/asio/include/asio/ip/address_v4_iterator.hpp
+++ b/asio/include/asio/ip/address_v4_iterator.hpp
@@ -2,7 +2,7 @@
 // ip/address_v4_iterator.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/address_v4_range.hpp b/asio/include/asio/ip/address_v4_range.hpp
index 7f172cb..06f3bd1 100644
--- a/asio/include/asio/ip/address_v4_range.hpp
+++ b/asio/include/asio/ip/address_v4_range.hpp
@@ -2,7 +2,7 @@
 // ip/address_v4_range.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/address_v6.hpp b/asio/include/asio/ip/address_v6.hpp
index 4054fc1..663601d 100644
--- a/asio/include/asio/ip/address_v6.hpp
+++ b/asio/include/asio/ip/address_v6.hpp
@@ -2,7 +2,7 @@
 // ip/address_v6.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -19,6 +19,7 @@
 #include <string>
 #include "asio/detail/array.hpp"
 #include "asio/detail/socket_types.hpp"
+#include "asio/detail/string_view.hpp"
 #include "asio/detail/winsock_init.hpp"
 #include "asio/error_code.hpp"
 #include "asio/ip/address_v4.hpp"
@@ -265,6 +266,25 @@
 ASIO_DECL address_v6 make_address_v6(
     const std::string& str, asio::error_code& ec);
 
+#if defined(ASIO_HAS_STD_STRING_VIEW) \
+  || defined(GENERATING_DOCUMENTATION)
+
+/// Create an IPv6 address from an IP address string.
+/**
+ * @relates address_v6
+ */
+ASIO_DECL address_v6 make_address_v6(string_view str);
+
+/// Create an IPv6 address from an IP address string.
+/**
+ * @relates address_v6
+ */
+ASIO_DECL address_v6 make_address_v6(
+    string_view str, asio::error_code& ec);
+
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+       //  || defined(GENERATING_DOCUMENTATION)
+
 /// Tag type used for distinguishing overloads that deal in IPv4-mapped IPv6
 /// addresses.
 enum v4_mapped_t { v4_mapped };
diff --git a/asio/include/asio/ip/address_v6_iterator.hpp b/asio/include/asio/ip/address_v6_iterator.hpp
index 36ba64d..947af07 100644
--- a/asio/include/asio/ip/address_v6_iterator.hpp
+++ b/asio/include/asio/ip/address_v6_iterator.hpp
@@ -2,7 +2,7 @@
 // ip/address_v6_iterator.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //                         Oliver Kowalke (oliver dot kowalke at gmail dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/include/asio/ip/address_v6_range.hpp b/asio/include/asio/ip/address_v6_range.hpp
index 5f58f0f..4dc7a30 100644
--- a/asio/include/asio/ip/address_v6_range.hpp
+++ b/asio/include/asio/ip/address_v6_range.hpp
@@ -2,7 +2,7 @@
 // ip/address_v6_range.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //                         Oliver Kowalke (oliver dot kowalke at gmail dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/include/asio/ip/bad_address_cast.hpp b/asio/include/asio/ip/bad_address_cast.hpp
index f32a143..6c47914 100644
--- a/asio/include/asio/ip/bad_address_cast.hpp
+++ b/asio/include/asio/ip/bad_address_cast.hpp
@@ -2,7 +2,7 @@
 // ip/bad_address_cast.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/basic_endpoint.hpp b/asio/include/asio/ip/basic_endpoint.hpp
index 61926c0..d48f644 100644
--- a/asio/include/asio/ip/basic_endpoint.hpp
+++ b/asio/include/asio/ip/basic_endpoint.hpp
@@ -2,7 +2,7 @@
 // ip/basic_endpoint.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/basic_resolver.hpp b/asio/include/asio/ip/basic_resolver.hpp
index 75e93df..3aa61fb 100644
--- a/asio/include/asio/ip/basic_resolver.hpp
+++ b/asio/include/asio/ip/basic_resolver.hpp
@@ -2,7 +2,7 @@
 // ip/basic_resolver.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,15 +17,35 @@
 
 #include "asio/detail/config.hpp"
 #include <string>
+#include "asio/async_result.hpp"
 #include "asio/basic_io_object.hpp"
 #include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/string_view.hpp"
 #include "asio/detail/throw_error.hpp"
 #include "asio/error.hpp"
+#include "asio/io_context.hpp"
 #include "asio/ip/basic_resolver_iterator.hpp"
 #include "asio/ip/basic_resolver_query.hpp"
 #include "asio/ip/basic_resolver_results.hpp"
 #include "asio/ip/resolver_base.hpp"
-#include "asio/ip/resolver_service.hpp"
+
+#if defined(ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(ASIO_HAS_MOVE)
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/ip/resolver_service.hpp"
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+# if defined(ASIO_WINDOWS_RUNTIME)
+#  include "asio/detail/winrt_resolver_service.hpp"
+#  define ASIO_SVC_T \
+    asio::detail::winrt_resolver_service<InternetProtocol>
+# else
+#  include "asio/detail/resolver_service.hpp"
+#  define ASIO_SVC_T \
+    asio::detail::resolver_service<InternetProtocol>
+# endif
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 #include "asio/detail/push_options.hpp"
 
@@ -41,13 +61,16 @@
  * @e Distinct @e objects: Safe.@n
  * @e Shared @e objects: Unsafe.
  */
-template <typename InternetProtocol,
-    typename ResolverService = resolver_service<InternetProtocol> >
+template <typename InternetProtocol
+    ASIO_SVC_TPARAM_DEF1(= resolver_service<InternetProtocol>)>
 class basic_resolver
-  : public basic_io_object<ResolverService>,
+  : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>,
     public resolver_base
 {
 public:
+  /// The type of the executor associated with the object.
+  typedef io_context::executor_type executor_type;
+
   /// The protocol type.
   typedef InternetProtocol protocol_type;
 
@@ -70,13 +93,99 @@
    * This constructor creates a basic_resolver.
    *
    * @param io_context The io_context object that the resolver will use to
-   * dispatch handlers for any asynchronous operations performed on the timer.
+   * dispatch handlers for any asynchronous operations performed on the
+   * resolver.
    */
   explicit basic_resolver(asio::io_context& io_context)
-    : basic_io_object<ResolverService>(io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
   {
   }
 
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+  /// Move-construct a basic_resolver from another.
+  /**
+   * This constructor moves a resolver from one object to another.
+   *
+   * @param other The other basic_resolver object from which the move will
+   * occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c basic_resolver(io_context&) constructor.
+   */
+  basic_resolver(basic_resolver&& other)
+    : basic_io_object<ASIO_SVC_T>(std::move(other))
+  {
+  }
+
+  /// Move-assign a basic_resolver from another.
+  /**
+   * This assignment operator moves a resolver from one object to another.
+   * Cancels any outstanding asynchronous operations associated with the target
+   * object.
+   *
+   * @param other The other basic_resolver object from which the move will
+   * occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c basic_resolver(io_context&) constructor.
+   */
+  basic_resolver& operator=(basic_resolver&& other)
+  {
+    basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+  /// Destroys the resolver.
+  /**
+   * This function destroys the resolver, cancelling any outstanding
+   * asynchronous wait operations associated with the resolver as if by calling
+   * @c cancel.
+   */
+  ~basic_resolver()
+  {
+  }
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+  // These functions are provided by basic_io_object<>.
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_context()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_context();
+  }
+
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_service()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_service();
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+  /// Get the executor associated with the object.
+  executor_type get_executor() ASIO_NOEXCEPT
+  {
+    return basic_io_object<ASIO_SVC_T>::get_executor();
+  }
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
   /// Cancel any asynchronous operations that are waiting on the resolver.
   /**
    * This function forces the completion of any pending asynchronous
@@ -161,7 +270,8 @@
    * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
    * may use additional locations when resolving service names.
    */
-  results_type resolve(const std::string& host, const std::string& service)
+  results_type resolve(ASIO_STRING_VIEW_PARAM host,
+      ASIO_STRING_VIEW_PARAM service)
   {
     return resolve(host, service, resolver_base::flags());
   }
@@ -199,8 +309,8 @@
    * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
    * may use additional locations when resolving service names.
    */
-  results_type resolve(const std::string& host, const std::string& service,
-      asio::error_code& ec)
+  results_type resolve(ASIO_STRING_VIEW_PARAM host,
+      ASIO_STRING_VIEW_PARAM service, asio::error_code& ec)
   {
     return resolve(host, service, resolver_base::flags(), ec);
   }
@@ -242,11 +352,12 @@
    * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
    * may use additional locations when resolving service names.
    */
-  results_type resolve(const std::string& host, const std::string& service,
-      resolver_base::flags resolve_flags)
+  results_type resolve(ASIO_STRING_VIEW_PARAM host,
+      ASIO_STRING_VIEW_PARAM service, resolver_base::flags resolve_flags)
   {
     asio::error_code ec;
-    basic_resolver_query<protocol_type> q(host, service, resolve_flags);
+    basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
+        static_cast<std::string>(service), resolve_flags);
     results_type r = this->get_service().resolve(
         this->get_implementation(), q, ec);
     asio::detail::throw_error(ec, "resolve");
@@ -290,10 +401,12 @@
    * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
    * may use additional locations when resolving service names.
    */
-  results_type resolve(const std::string& host, const std::string& service,
-      resolver_base::flags resolve_flags, asio::error_code& ec)
+  results_type resolve(ASIO_STRING_VIEW_PARAM host,
+      ASIO_STRING_VIEW_PARAM service, resolver_base::flags resolve_flags,
+      asio::error_code& ec)
   {
-    basic_resolver_query<protocol_type> q(host, service, resolve_flags);
+    basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
+        static_cast<std::string>(service), resolve_flags);
     return this->get_service().resolve(this->get_implementation(), q, ec);
   }
 
@@ -333,8 +446,8 @@
    * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
    * may use additional locations when resolving service names.
    */
-  results_type resolve(const protocol_type& protocol, const std::string& host,
-      const std::string& service)
+  results_type resolve(const protocol_type& protocol,
+      ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service)
   {
     return resolve(protocol, host, service, resolver_base::flags());
   }
@@ -375,8 +488,9 @@
    * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
    * may use additional locations when resolving service names.
    */
-  results_type resolve(const protocol_type& protocol, const std::string& host,
-      const std::string& service, asio::error_code& ec)
+  results_type resolve(const protocol_type& protocol,
+      ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service,
+      asio::error_code& ec)
   {
     return resolve(protocol, host, service, resolver_base::flags(), ec);
   }
@@ -421,12 +535,14 @@
    * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
    * may use additional locations when resolving service names.
    */
-  results_type resolve(const protocol_type& protocol, const std::string& host,
-      const std::string& service, resolver_base::flags resolve_flags)
+  results_type resolve(const protocol_type& protocol,
+      ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service,
+      resolver_base::flags resolve_flags)
   {
     asio::error_code ec;
     basic_resolver_query<protocol_type> q(
-        protocol, host, service, resolve_flags);
+        protocol, static_cast<std::string>(host),
+        static_cast<std::string>(service), resolve_flags);
     results_type r = this->get_service().resolve(
         this->get_implementation(), q, ec);
     asio::detail::throw_error(ec, "resolve");
@@ -473,12 +589,13 @@
    * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
    * may use additional locations when resolving service names.
    */
-  results_type resolve(const protocol_type& protocol, const std::string& host,
-      const std::string& service, resolver_base::flags resolve_flags,
-      asio::error_code& ec)
+  results_type resolve(const protocol_type& protocol,
+      ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service,
+      resolver_base::flags resolve_flags, asio::error_code& ec)
   {
     basic_resolver_query<protocol_type> q(
-        protocol, host, service, resolve_flags);
+        protocol, static_cast<std::string>(host),
+        static_cast<std::string>(service), resolve_flags);
     return this->get_service().resolve(this->get_implementation(), q, ec);
   }
 
@@ -517,8 +634,18 @@
     ASIO_RESOLVE_HANDLER_CHECK(
         ResolveHandler, handler, results_type) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_resolve(this->get_implementation(), q,
         ASIO_MOVE_CAST(ResolveHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    asio::async_completion<ResolveHandler,
+      void (asio::error_code, results_type)> init(handler);
+
+    this->get_service().async_resolve(
+        this->get_implementation(), q, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 #endif // !defined(ASIO_NO_DEPRECATED)
 
@@ -567,7 +694,8 @@
   template <typename ResolveHandler>
   ASIO_INITFN_RESULT_TYPE(ResolveHandler,
       void (asio::error_code, results_type))
-  async_resolve(const std::string& host, const std::string& service,
+  async_resolve(ASIO_STRING_VIEW_PARAM host,
+      ASIO_STRING_VIEW_PARAM service,
       ASIO_MOVE_ARG(ResolveHandler) handler)
   {
     return async_resolve(host, service, resolver_base::flags(),
@@ -623,7 +751,8 @@
   template <typename ResolveHandler>
   ASIO_INITFN_RESULT_TYPE(ResolveHandler,
       void (asio::error_code, results_type))
-  async_resolve(const std::string& host, const std::string& service,
+  async_resolve(ASIO_STRING_VIEW_PARAM host,
+      ASIO_STRING_VIEW_PARAM service,
       resolver_base::flags resolve_flags,
       ASIO_MOVE_ARG(ResolveHandler) handler)
   {
@@ -632,9 +761,21 @@
     ASIO_RESOLVE_HANDLER_CHECK(
         ResolveHandler, handler, results_type) type_check;
 
-    basic_resolver_query<protocol_type> q(host, service, resolve_flags);
+    basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
+        static_cast<std::string>(service), resolve_flags);
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_resolve(this->get_implementation(), q,
         ASIO_MOVE_CAST(ResolveHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    asio::async_completion<ResolveHandler,
+      void (asio::error_code, results_type)> init(handler);
+
+    this->get_service().async_resolve(
+        this->get_implementation(), q, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Asynchronously perform forward resolution of a query to a list of entries.
@@ -685,8 +826,9 @@
   template <typename ResolveHandler>
   ASIO_INITFN_RESULT_TYPE(ResolveHandler,
       void (asio::error_code, results_type))
-  async_resolve(const protocol_type& protocol, const std::string& host,
-      const std::string& service, ASIO_MOVE_ARG(ResolveHandler) handler)
+  async_resolve(const protocol_type& protocol,
+      ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service,
+      ASIO_MOVE_ARG(ResolveHandler) handler)
   {
     return async_resolve(protocol, host, service, resolver_base::flags(),
         ASIO_MOVE_CAST(ResolveHandler)(handler));
@@ -744,8 +886,9 @@
   template <typename ResolveHandler>
   ASIO_INITFN_RESULT_TYPE(ResolveHandler,
       void (asio::error_code, results_type))
-  async_resolve(const protocol_type& protocol, const std::string& host,
-      const std::string& service, resolver_base::flags resolve_flags,
+  async_resolve(const protocol_type& protocol,
+      ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service,
+      resolver_base::flags resolve_flags,
       ASIO_MOVE_ARG(ResolveHandler) handler)
   {
     // If you get an error on the following line it means that your handler does
@@ -754,9 +897,21 @@
         ResolveHandler, handler, results_type) type_check;
 
     basic_resolver_query<protocol_type> q(
-        protocol, host, service, resolve_flags);
+        protocol, static_cast<std::string>(host),
+        static_cast<std::string>(service), resolve_flags);
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_resolve(this->get_implementation(), q,
         ASIO_MOVE_CAST(ResolveHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    asio::async_completion<ResolveHandler,
+      void (asio::error_code, results_type)> init(handler);
+
+    this->get_service().async_resolve(
+        this->get_implementation(), q, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
   /// Perform reverse resolution of an endpoint to a list of entries.
@@ -836,8 +991,18 @@
     ASIO_RESOLVE_HANDLER_CHECK(
         ResolveHandler, handler, results_type) type_check;
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
     return this->get_service().async_resolve(this->get_implementation(), e,
         ASIO_MOVE_CAST(ResolveHandler)(handler));
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+    asio::async_completion<ResolveHandler,
+      void (asio::error_code, results_type)> init(handler);
+
+    this->get_service().async_resolve(
+        this->get_implementation(), e, init.completion_handler);
+
+    return init.result.get();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 };
 
@@ -846,4 +1011,8 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#if !defined(ASIO_ENABLE_OLD_SERVICES)
+# undef ASIO_SVC_T
+#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_IP_BASIC_RESOLVER_HPP
diff --git a/asio/include/asio/ip/basic_resolver_entry.hpp b/asio/include/asio/ip/basic_resolver_entry.hpp
index 77da9e1..ce689aa 100644
--- a/asio/include/asio/ip/basic_resolver_entry.hpp
+++ b/asio/include/asio/ip/basic_resolver_entry.hpp
@@ -2,7 +2,7 @@
 // ip/basic_resolver_entry.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,7 @@
 
 #include "asio/detail/config.hpp"
 #include <string>
+#include "asio/detail/string_view.hpp"
 
 #include "asio/detail/push_options.hpp"
 
@@ -49,10 +50,10 @@
 
   /// Construct with specified endpoint, host name and service name.
   basic_resolver_entry(const endpoint_type& ep,
-      const std::string& host, const std::string& service)
+      ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service)
     : endpoint_(ep),
-      host_name_(host),
-      service_name_(service)
+      host_name_(static_cast<std::string>(host)),
+      service_name_(static_cast<std::string>(service))
   {
   }
 
diff --git a/asio/include/asio/ip/basic_resolver_iterator.hpp b/asio/include/asio/ip/basic_resolver_iterator.hpp
index a0b40c7..8cab75d 100644
--- a/asio/include/asio/ip/basic_resolver_iterator.hpp
+++ b/asio/include/asio/ip/basic_resolver_iterator.hpp
@@ -2,7 +2,7 @@
 // ip/basic_resolver_iterator.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/basic_resolver_query.hpp b/asio/include/asio/ip/basic_resolver_query.hpp
index ced5724..9bde9fe 100644
--- a/asio/include/asio/ip/basic_resolver_query.hpp
+++ b/asio/include/asio/ip/basic_resolver_query.hpp
@@ -2,7 +2,7 @@
 // ip/basic_resolver_query.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/basic_resolver_results.hpp b/asio/include/asio/ip/basic_resolver_results.hpp
index bb4601a..dec2c7e 100644
--- a/asio/include/asio/ip/basic_resolver_results.hpp
+++ b/asio/include/asio/ip/basic_resolver_results.hpp
@@ -2,7 +2,7 @@
 // ip/basic_resolver_results.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/detail/endpoint.hpp b/asio/include/asio/ip/detail/endpoint.hpp
index 2b985f4..82875a4 100644
--- a/asio/include/asio/ip/detail/endpoint.hpp
+++ b/asio/include/asio/ip/detail/endpoint.hpp
@@ -2,7 +2,7 @@
 // ip/detail/endpoint.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/detail/impl/endpoint.ipp b/asio/include/asio/ip/detail/impl/endpoint.ipp
index 2a5e335..2f76137 100644
--- a/asio/include/asio/ip/detail/impl/endpoint.ipp
+++ b/asio/include/asio/ip/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
 // ip/detail/impl/endpoint.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/detail/socket_option.hpp b/asio/include/asio/ip/detail/socket_option.hpp
index c3912b7..d555a40 100644
--- a/asio/include/asio/ip/detail/socket_option.hpp
+++ b/asio/include/asio/ip/detail/socket_option.hpp
@@ -2,7 +2,7 @@
 // detail/socket_option.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/host_name.hpp b/asio/include/asio/ip/host_name.hpp
index a5d6e59..6e556c6 100644
--- a/asio/include/asio/ip/host_name.hpp
+++ b/asio/include/asio/ip/host_name.hpp
@@ -2,7 +2,7 @@
 // ip/host_name.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/icmp.hpp b/asio/include/asio/ip/icmp.hpp
index 26766e6..752a82c 100644
--- a/asio/include/asio/ip/icmp.hpp
+++ b/asio/include/asio/ip/icmp.hpp
@@ -2,7 +2,7 @@
 // ip/icmp.hpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/impl/address.hpp b/asio/include/asio/ip/impl/address.hpp
index 0914413..c64fb02 100644
--- a/asio/include/asio/ip/impl/address.hpp
+++ b/asio/include/asio/ip/impl/address.hpp
@@ -2,7 +2,7 @@
 // ip/impl/address.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/impl/address.ipp b/asio/include/asio/ip/impl/address.ipp
index 22b4424..c558d9a 100644
--- a/asio/include/asio/ip/impl/address.ipp
+++ b/asio/include/asio/ip/impl/address.ipp
@@ -2,7 +2,7 @@
 // ip/impl/address.ipp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -134,6 +134,21 @@
   return make_address(str.c_str(), ec);
 }
 
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+
+address make_address(string_view str)
+{
+  return make_address(static_cast<std::string>(str));
+}
+
+address make_address(string_view str,
+    asio::error_code& ec)
+{
+  return make_address(static_cast<std::string>(str), ec);
+}
+
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+
 asio::ip::address_v4 address::to_v4() const
 {
   if (type_ != ipv4)
diff --git a/asio/include/asio/ip/impl/address_v4.hpp b/asio/include/asio/ip/impl/address_v4.hpp
index 78f1ab0..1897fd2 100644
--- a/asio/include/asio/ip/impl/address_v4.hpp
+++ b/asio/include/asio/ip/impl/address_v4.hpp
@@ -2,7 +2,7 @@
 // ip/impl/address_v4.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/impl/address_v4.ipp b/asio/include/asio/ip/impl/address_v4.ipp
index c6ee4c9..09439eb 100644
--- a/asio/include/asio/ip/impl/address_v4.ipp
+++ b/asio/include/asio/ip/impl/address_v4.ipp
@@ -2,7 +2,7 @@
 // ip/impl/address_v4.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -187,6 +187,21 @@
   return make_address_v4(str.c_str(), ec);
 }
 
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+
+address_v4 make_address_v4(string_view str)
+{
+  return make_address_v4(static_cast<std::string>(str));
+}
+
+address_v4 make_address_v4(string_view str,
+    asio::error_code& ec)
+{
+  return make_address_v4(static_cast<std::string>(str), ec);
+}
+
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+
 } // namespace ip
 } // namespace asio
 
diff --git a/asio/include/asio/ip/impl/address_v6.hpp b/asio/include/asio/ip/impl/address_v6.hpp
index d4c5439..407d9c1 100644
--- a/asio/include/asio/ip/impl/address_v6.hpp
+++ b/asio/include/asio/ip/impl/address_v6.hpp
@@ -2,7 +2,7 @@
 // ip/impl/address_v6.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/impl/address_v6.ipp b/asio/include/asio/ip/impl/address_v6.ipp
index 49f2418..79025ae 100644
--- a/asio/include/asio/ip/impl/address_v6.ipp
+++ b/asio/include/asio/ip/impl/address_v6.ipp
@@ -2,7 +2,7 @@
 // ip/impl/address_v6.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -303,6 +303,21 @@
   return make_address_v6(str.c_str(), ec);
 }
 
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+
+address_v6 make_address_v6(string_view str)
+{
+  return make_address_v6(static_cast<std::string>(str));
+}
+
+address_v6 make_address_v6(string_view str,
+    asio::error_code& ec)
+{
+  return make_address_v6(static_cast<std::string>(str), ec);
+}
+
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+
 address_v4 make_address_v4(
     v4_mapped_t, const address_v6& v6_addr)
 {
diff --git a/asio/include/asio/ip/impl/basic_endpoint.hpp b/asio/include/asio/ip/impl/basic_endpoint.hpp
index 8c8949c..c1a29a8 100644
--- a/asio/include/asio/ip/impl/basic_endpoint.hpp
+++ b/asio/include/asio/ip/impl/basic_endpoint.hpp
@@ -2,7 +2,7 @@
 // ip/impl/basic_endpoint.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/impl/host_name.ipp b/asio/include/asio/ip/impl/host_name.ipp
index b1dc38e..a1f8a0d 100644
--- a/asio/include/asio/ip/impl/host_name.ipp
+++ b/asio/include/asio/ip/impl/host_name.ipp
@@ -2,7 +2,7 @@
 // ip/impl/host_name.ipp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/impl/network_v4.hpp b/asio/include/asio/ip/impl/network_v4.hpp
index e48baeb..34c03fd 100644
--- a/asio/include/asio/ip/impl/network_v4.hpp
+++ b/asio/include/asio/ip/impl/network_v4.hpp
@@ -2,7 +2,7 @@
 // ip/impl/network_v4.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/include/asio/ip/impl/network_v4.ipp b/asio/include/asio/ip/impl/network_v4.ipp
index 079d13f..ec39aae 100644
--- a/asio/include/asio/ip/impl/network_v4.ipp
+++ b/asio/include/asio/ip/impl/network_v4.ipp
@@ -2,7 +2,7 @@
 // ip/impl/network_v4.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -182,6 +182,21 @@
       std::atoi(str.substr(pos + 1).c_str()));
 }
 
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+
+network_v4 make_network_v4(string_view str)
+{
+  return make_network_v4(static_cast<std::string>(str));
+}
+
+network_v4 make_network_v4(string_view str,
+    asio::error_code& ec)
+{
+  return make_network_v4(static_cast<std::string>(str), ec);
+}
+
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+
 } // namespace ip
 } // namespace asio
 
diff --git a/asio/include/asio/ip/impl/network_v6.hpp b/asio/include/asio/ip/impl/network_v6.hpp
index 88c8462..03b9ed8 100644
--- a/asio/include/asio/ip/impl/network_v6.hpp
+++ b/asio/include/asio/ip/impl/network_v6.hpp
@@ -2,7 +2,7 @@
 // ip/impl/network_v6.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/impl/network_v6.ipp b/asio/include/asio/ip/impl/network_v6.ipp
index 59c17cb..c2418e3 100644
--- a/asio/include/asio/ip/impl/network_v6.ipp
+++ b/asio/include/asio/ip/impl/network_v6.ipp
@@ -2,7 +2,7 @@
 // ip/impl/network_v6.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -151,6 +151,21 @@
       std::atoi(str.substr(pos + 1).c_str()));
 }
 
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+
+network_v6 make_network_v6(string_view str)
+{
+  return make_network_v6(static_cast<std::string>(str));
+}
+
+network_v6 make_network_v6(string_view str,
+    asio::error_code& ec)
+{
+  return make_network_v6(static_cast<std::string>(str), ec);
+}
+
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+
 } // namespace ip
 } // namespace asio
 
diff --git a/asio/include/asio/ip/multicast.hpp b/asio/include/asio/ip/multicast.hpp
index 3d3b8f0..16fbf4c 100644
--- a/asio/include/asio/ip/multicast.hpp
+++ b/asio/include/asio/ip/multicast.hpp
@@ -2,7 +2,7 @@
 // ip/multicast.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/network_v4.hpp b/asio/include/asio/ip/network_v4.hpp
index ec45548..5980b8e 100644
--- a/asio/include/asio/ip/network_v4.hpp
+++ b/asio/include/asio/ip/network_v4.hpp
@@ -2,7 +2,7 @@
 // ip/network_v4.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -18,6 +18,7 @@
 
 #include "asio/detail/config.hpp"
 #include <string>
+#include "asio/detail/string_view.hpp"
 #include "asio/error_code.hpp"
 #include "asio/ip/address_v4_range.hpp"
 
@@ -183,26 +184,50 @@
  */
 ASIO_DECL network_v4 make_network_v4(const char* str);
 
-/// Create an IPv4 address from an IP address string in dotted decimal form.
+/// Create an IPv4 network from a string containing IP address and prefix
+/// length.
 /**
  * @relates network_v4
  */
 ASIO_DECL network_v4 make_network_v4(
     const char* str, asio::error_code& ec);
 
-/// Create an IPv4 address from an IP address string in dotted decimal form.
+/// Create an IPv4 network from a string containing IP address and prefix
+/// length.
 /**
  * @relates network_v4
  */
 ASIO_DECL network_v4 make_network_v4(const std::string& str);
 
-/// Create an IPv4 address from an IP address string in dotted decimal form.
+/// Create an IPv4 network from a string containing IP address and prefix
+/// length.
 /**
  * @relates network_v4
  */
 ASIO_DECL network_v4 make_network_v4(
     const std::string& str, asio::error_code& ec);
 
+#if defined(ASIO_HAS_STD_STRING_VIEW) \
+  || defined(GENERATING_DOCUMENTATION)
+
+/// Create an IPv4 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v4
+ */
+ASIO_DECL network_v4 make_network_v4(string_view str);
+
+/// Create an IPv4 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v4
+ */
+ASIO_DECL network_v4 make_network_v4(
+    string_view str, asio::error_code& ec);
+
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+       //  || defined(GENERATING_DOCUMENTATION)
+
 #if !defined(ASIO_NO_IOSTREAM)
 
 /// Output a network as a string.
diff --git a/asio/include/asio/ip/network_v6.hpp b/asio/include/asio/ip/network_v6.hpp
index b75b9ba..4e07dbb 100644
--- a/asio/include/asio/ip/network_v6.hpp
+++ b/asio/include/asio/ip/network_v6.hpp
@@ -2,7 +2,7 @@
 // ip/network_v6.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -18,6 +18,7 @@
 
 #include "asio/detail/config.hpp"
 #include <string>
+#include "asio/detail/string_view.hpp"
 #include "asio/error_code.hpp"
 #include "asio/ip/address_v6_range.hpp"
 
@@ -157,26 +158,50 @@
  */
 ASIO_DECL network_v6 make_network_v6(const char* str);
 
-/// Create an IPv6 address from an IP address string in dotted decimal form.
+/// Create an IPv6 network from a string containing IP address and prefix
+/// length.
 /**
  * @relates network_v6
  */
 ASIO_DECL network_v6 make_network_v6(
     const char* str, asio::error_code& ec);
 
-/// Create an IPv6 address from an IP address string in dotted decimal form.
+/// Create an IPv6 network from a string containing IP address and prefix
+/// length.
 /**
  * @relates network_v6
  */
 ASIO_DECL network_v6 make_network_v6(const std::string& str);
 
-/// Create an IPv6 address from an IP address string in dotted decimal form.
+/// Create an IPv6 network from a string containing IP address and prefix
+/// length.
 /**
  * @relates network_v6
  */
 ASIO_DECL network_v6 make_network_v6(
     const std::string& str, asio::error_code& ec);
 
+#if defined(ASIO_HAS_STD_STRING_VIEW) \
+  || defined(GENERATING_DOCUMENTATION)
+
+/// Create an IPv6 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v6
+ */
+ASIO_DECL network_v6 make_network_v6(string_view str);
+
+/// Create an IPv6 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v6
+ */
+ASIO_DECL network_v6 make_network_v6(
+    string_view str, asio::error_code& ec);
+
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+       //  || defined(GENERATING_DOCUMENTATION)
+
 #if !defined(ASIO_NO_IOSTREAM)
 
 /// Output a network as a string.
diff --git a/asio/include/asio/ip/resolver_base.hpp b/asio/include/asio/ip/resolver_base.hpp
index f7e0a85..a8a94d5 100644
--- a/asio/include/asio/ip/resolver_base.hpp
+++ b/asio/include/asio/ip/resolver_base.hpp
@@ -2,7 +2,7 @@
 // ip/resolver_base.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/resolver_query_base.hpp b/asio/include/asio/ip/resolver_query_base.hpp
index 60bc005..297c9c9 100644
--- a/asio/include/asio/ip/resolver_query_base.hpp
+++ b/asio/include/asio/ip/resolver_query_base.hpp
@@ -2,7 +2,7 @@
 // ip/resolver_query_base.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/resolver_service.hpp b/asio/include/asio/ip/resolver_service.hpp
index c310851..18e2dc1 100644
--- a/asio/include/asio/ip/resolver_service.hpp
+++ b/asio/include/asio/ip/resolver_service.hpp
@@ -2,7 +2,7 @@
 // ip/resolver_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,6 +16,9 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include "asio/async_result.hpp"
 #include "asio/error_code.hpp"
 #include "asio/io_context.hpp"
@@ -97,6 +100,23 @@
     service_impl_.construct(impl);
   }
 
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+  /// Move-construct a new resolver implementation.
+  void move_construct(implementation_type& impl,
+      implementation_type& other_impl)
+  {
+    service_impl_.move_construct(impl, other_impl);
+  }
+
+  /// Move-assign from another resolver implementation.
+  void move_assign(implementation_type& impl,
+      resolver_service& other_service,
+      implementation_type& other_impl)
+  {
+    service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
+  }
+#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
   /// Destroy a resolver implementation.
   void destroy(implementation_type& impl)
   {
@@ -126,7 +146,7 @@
     asio::async_completion<ResolveHandler,
       void (asio::error_code, results_type)> init(handler);
 
-    service_impl_.async_resolve(impl, query, init.handler);
+    service_impl_.async_resolve(impl, query, init.completion_handler);
 
     return init.result.get();
   }
@@ -148,7 +168,7 @@
     asio::async_completion<ResolveHandler,
       void (asio::error_code, results_type)> init(handler);
 
-    service_impl_.async_resolve(impl, endpoint, init.handler);
+    service_impl_.async_resolve(impl, endpoint, init.completion_handler);
 
     return init.result.get();
   }
@@ -175,4 +195,6 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_IP_RESOLVER_SERVICE_HPP
diff --git a/asio/include/asio/ip/tcp.hpp b/asio/include/asio/ip/tcp.hpp
index 8768962..40e5470 100644
--- a/asio/include/asio/ip/tcp.hpp
+++ b/asio/include/asio/ip/tcp.hpp
@@ -2,7 +2,7 @@
 // ip/tcp.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/udp.hpp b/asio/include/asio/ip/udp.hpp
index 35c3f95..a011acc 100644
--- a/asio/include/asio/ip/udp.hpp
+++ b/asio/include/asio/ip/udp.hpp
@@ -2,7 +2,7 @@
 // ip/udp.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/unicast.hpp b/asio/include/asio/ip/unicast.hpp
index 2f4c0d8..8b768c2 100644
--- a/asio/include/asio/ip/unicast.hpp
+++ b/asio/include/asio/ip/unicast.hpp
@@ -2,7 +2,7 @@
 // ip/unicast.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ip/v6_only.hpp b/asio/include/asio/ip/v6_only.hpp
index 9d89f8c..9106b25 100644
--- a/asio/include/asio/ip/v6_only.hpp
+++ b/asio/include/asio/ip/v6_only.hpp
@@ -2,7 +2,7 @@
 // ip/v6_only.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/is_executor.hpp b/asio/include/asio/is_executor.hpp
index 59981ad..d5abf7b 100644
--- a/asio/include/asio/is_executor.hpp
+++ b/asio/include/asio/is_executor.hpp
@@ -2,7 +2,7 @@
 // is_executor.hpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,7 +16,7 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
+#include "asio/detail/is_executor.hpp"
 
 #include "asio/detail/push_options.hpp"
 
@@ -25,13 +25,19 @@
 /// The is_executor trait detects whether a type T meets the Executor type
 /// requirements.
 /**
- * Meets the UnaryTypeTrait requirements. The asio library implementation
- * provides a definition that is derived from false_type. A program may
- * specialise this template to derive from true_type for a user-defined type T
- * that meets the Executor requirements.
+ * Class template @c is_executor is a UnaryTypeTrait that is derived from @c
+ * true_type if the type @c T meets the syntactic requirements for Executor,
+ * otherwise @c false_type.
  */
 template <typename T>
-struct is_executor : false_type {};
+struct is_executor
+#if defined(GENERATING_DOCUMENTATION)
+  : integral_constant<bool, automatically_determined>
+#else // defined(GENERATING_DOCUMENTATION)
+  : asio::detail::is_executor<T>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+};
 
 } // namespace asio
 
diff --git a/asio/include/asio/is_read_buffered.hpp b/asio/include/asio/is_read_buffered.hpp
index 5fcfa94..10483b1 100644
--- a/asio/include/asio/is_read_buffered.hpp
+++ b/asio/include/asio/is_read_buffered.hpp
@@ -2,7 +2,7 @@
 // is_read_buffered.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/is_write_buffered.hpp b/asio/include/asio/is_write_buffered.hpp
index 2f71b1d..b0efbbb 100644
--- a/asio/include/asio/is_write_buffered.hpp
+++ b/asio/include/asio/is_write_buffered.hpp
@@ -2,7 +2,7 @@
 // is_write_buffered.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/local/basic_endpoint.hpp b/asio/include/asio/local/basic_endpoint.hpp
index 9a19ab0..ae30100 100644
--- a/asio/include/asio/local/basic_endpoint.hpp
+++ b/asio/include/asio/local/basic_endpoint.hpp
@@ -2,7 +2,7 @@
 // local/basic_endpoint.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Derived from a public domain implementation written by Daniel Casimiro.
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/include/asio/local/connect_pair.hpp b/asio/include/asio/local/connect_pair.hpp
index 2d785d5..3542d9b 100644
--- a/asio/include/asio/local/connect_pair.hpp
+++ b/asio/include/asio/local/connect_pair.hpp
@@ -2,7 +2,7 @@
 // local/connect_pair.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -32,32 +32,32 @@
 namespace local {
 
 /// Create a pair of connected sockets.
-template <typename Protocol, typename SocketService1, typename SocketService2>
+template <typename Protocol ASIO_SVC_TPARAM ASIO_SVC_TPARAM1>
 void connect_pair(
-    basic_socket<Protocol, SocketService1>& socket1,
-    basic_socket<Protocol, SocketService2>& socket2);
+    basic_socket<Protocol ASIO_SVC_TARG>& socket1,
+    basic_socket<Protocol ASIO_SVC_TARG1>& socket2);
 
 /// Create a pair of connected sockets.
-template <typename Protocol, typename SocketService1, typename SocketService2>
-asio::error_code connect_pair(
-    basic_socket<Protocol, SocketService1>& socket1,
-    basic_socket<Protocol, SocketService2>& socket2,
+template <typename Protocol ASIO_SVC_TPARAM ASIO_SVC_TPARAM1>
+ASIO_SYNC_OP_VOID connect_pair(
+    basic_socket<Protocol ASIO_SVC_TARG>& socket1,
+    basic_socket<Protocol ASIO_SVC_TARG1>& socket2,
     asio::error_code& ec);
 
-template <typename Protocol, typename SocketService1, typename SocketService2>
+template <typename Protocol ASIO_SVC_TPARAM ASIO_SVC_TPARAM1>
 inline void connect_pair(
-    basic_socket<Protocol, SocketService1>& socket1,
-    basic_socket<Protocol, SocketService2>& socket2)
+    basic_socket<Protocol ASIO_SVC_TARG>& socket1,
+    basic_socket<Protocol ASIO_SVC_TARG1>& socket2)
 {
   asio::error_code ec;
   connect_pair(socket1, socket2, ec);
   asio::detail::throw_error(ec, "connect_pair");
 }
 
-template <typename Protocol, typename SocketService1, typename SocketService2>
-inline asio::error_code connect_pair(
-    basic_socket<Protocol, SocketService1>& socket1,
-    basic_socket<Protocol, SocketService2>& socket2,
+template <typename Protocol ASIO_SVC_TPARAM ASIO_SVC_TPARAM1>
+inline ASIO_SYNC_OP_VOID connect_pair(
+    basic_socket<Protocol ASIO_SVC_TARG>& socket1,
+    basic_socket<Protocol ASIO_SVC_TARG1>& socket2,
     asio::error_code& ec)
 {
   // Check that this function is only being used with a UNIX domain socket.
@@ -70,27 +70,29 @@
   if (asio::detail::socket_ops::socketpair(protocol.family(),
         protocol.type(), protocol.protocol(), sv, ec)
       == asio::detail::socket_error_retval)
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
 
-  if (socket1.assign(protocol, sv[0], ec))
+  socket1.assign(protocol, sv[0], ec);
+  if (ec)
   {
     asio::error_code temp_ec;
     asio::detail::socket_ops::state_type state[2] = { 0, 0 };
     asio::detail::socket_ops::close(sv[0], state[0], true, temp_ec);
     asio::detail::socket_ops::close(sv[1], state[1], true, temp_ec);
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
-  if (socket2.assign(protocol, sv[1], ec))
+  socket2.assign(protocol, sv[1], ec);
+  if (ec)
   {
     asio::error_code temp_ec;
     socket1.close(temp_ec);
     asio::detail::socket_ops::state_type state = 0;
     asio::detail::socket_ops::close(sv[1], state, true, temp_ec);
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 } // namespace local
diff --git a/asio/include/asio/local/datagram_protocol.hpp b/asio/include/asio/local/datagram_protocol.hpp
index 3fa062c..17773d7 100644
--- a/asio/include/asio/local/datagram_protocol.hpp
+++ b/asio/include/asio/local/datagram_protocol.hpp
@@ -2,7 +2,7 @@
 // local/datagram_protocol.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/local/detail/endpoint.hpp b/asio/include/asio/local/detail/endpoint.hpp
index 43c6673..6125e97 100644
--- a/asio/include/asio/local/detail/endpoint.hpp
+++ b/asio/include/asio/local/detail/endpoint.hpp
@@ -2,7 +2,7 @@
 // local/detail/endpoint.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Derived from a public domain implementation written by Daniel Casimiro.
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/include/asio/local/detail/impl/endpoint.ipp b/asio/include/asio/local/detail/impl/endpoint.ipp
index aad7556..adda630 100644
--- a/asio/include/asio/local/detail/impl/endpoint.ipp
+++ b/asio/include/asio/local/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
 // local/detail/impl/endpoint.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Derived from a public domain implementation written by Daniel Casimiro.
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/include/asio/local/stream_protocol.hpp b/asio/include/asio/local/stream_protocol.hpp
index 7fe9772..e8094cc 100644
--- a/asio/include/asio/local/stream_protocol.hpp
+++ b/asio/include/asio/local/stream_protocol.hpp
@@ -2,7 +2,7 @@
 // local/stream_protocol.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/package.hpp b/asio/include/asio/package.hpp
deleted file mode 100644
index b8158b4..0000000
--- a/asio/include/asio/package.hpp
+++ /dev/null
@@ -1,294 +0,0 @@
-//
-// package.hpp
-// ~~~~~~~~~~~
-//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_USE_PACKAGE_HPP
-#define ASIO_USE_PACKAGE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include <future>
-#include <memory>
-#include "asio/async_result.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
-#include "asio/handler_type.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Class to enable lazy construction of a packaged_task from a completion
-/// token.
-/**
- * The packaged_token class is used to adapt a function object as a packaged
- * task. When this adapter is passed as a completion token to an asynchronous
- * operation, the result of the function object is retuned via a std::future.
- *
- * Use the @ref package function rather than using this class directly.
- */
-template <typename Function, typename Allocator = std::allocator<void> >
-class packaged_token
-{
-public:
-  /// The allocator type. The allocator is used when constructing the
-  /// @c std::promise object for a given asynchronous operation.
-  typedef Allocator allocator_type;
-
-  /// Construct using specified allocator.
-  explicit packaged_token(Function f)
-    : func_(std::move(f))
-  {
-  }
-
-  /// Construct using specified allocator.
-  packaged_token(Function f, const Allocator& allocator)
-    : func_(std::move(f)),
-      allocator_(allocator)
-  {
-  }
-
-  /// Obtain allocator.
-  allocator_type get_allocator() const ASIO_NOEXCEPT
-  {
-    return allocator_;
-  }
-
-private:
-  template <class, class> friend class packaged_handler;
-  Function func_;
-  Allocator allocator_;
-};
-
-/// A packaged_task with an associated allocator.
-template <typename Signature, typename Allocator>
-class packaged_handler : public std::packaged_task<Signature>
-{
-public:
-  /// The allocator type. The allocator is used when constructing the
-  /// @c std::promise object for a given asynchronous operation.
-  typedef Allocator allocator_type;
-
-  /// Construct from a packaged token.
-  template <typename Function>
-  packaged_handler(
-      packaged_token<Function, Allocator>&& token)
-#if defined(_MSC_VER)
-    : std::packaged_task<Signature>(std::move(token.func_)),
-#elif defined(ASIO_HAS_CLANG_LIBCXX)
-    : std::packaged_task<Signature>(std::allocator_arg,
-        typename std::allocator_traits<
-          Allocator>::template rebind_alloc<char>(token.allocator_),
-        std::move(token.func_)),
-#else
-    : std::packaged_task<Signature>(std::allocator_arg,
-        token.allocator_, std::move(token.func_)),
-#endif
-      allocator_(token.allocator_)
-  {
-  }
-
-  /// Move construct from another packaged handler.
-  packaged_handler(packaged_handler&& other)
-    : std::packaged_task<Signature>(
-        static_cast<std::packaged_task<Signature>&&>(other)),
-      allocator_(other.allocator_)
-  {
-  }
-
-  /// Obtain allocator.
-  allocator_type get_allocator() const ASIO_NOEXCEPT
-  {
-    return allocator_;
-  }
-
-private:
-  Allocator allocator_;
-};
-
-/// Wrap a function object in a packaged task.
-/**
- * The @c package function is used to adapt a function object as a packaged
- * task. When this adapter is passed as a completion token to an asynchronous
- * operation, the result of the function object is retuned via a std::future.
- *
- * @par Example
- *
- * @code std::future<std::size_t> fut =
- *   my_socket.async_read_some(buffer,
- *     package([](asio::error_code ec, std::size_t n)
- *       {
- *         return ec ? 0 : n;
- *       }));
- * ...
- * std::size_t n = fut.get(); @endcode
- */
-template <typename Function>
-inline packaged_token<typename decay<Function>::type, std::allocator<void> >
-package(ASIO_MOVE_ARG(Function) function)
-{
-  return packaged_token<typename decay<Function>::type, std::allocator<void> >(
-      ASIO_MOVE_CAST(Function)(function), std::allocator<void>());
-}
-
-/// Wrap a function object in a packaged task.
-/**
- * The @c package function is used to adapt a function object as a packaged
- * task. When this adapter is passed as a completion token to an asynchronous
- * operation, the result of the function object is retuned via a std::future.
- *
- * @par Example
- *
- * @code std::future<std::size_t> fut =
- *   my_socket.async_read_some(buffer,
- *     package([](asio::error_code ec, std::size_t n)
- *       {
- *         return ec ? 0 : n;
- *       }));
- * ...
- * std::size_t n = fut.get(); @endcode
- */
-template <typename Function, typename Allocator>
-inline packaged_token<typename decay<Function>::type, Allocator> package(
-    ASIO_MOVE_ARG(Function) function, const Allocator& a)
-{
-  return packaged_token<typename decay<Function>::type, Allocator>(
-      ASIO_MOVE_CAST(Function)(function), a);
-}
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename Function, typename Allocator, typename R, typename... Args>
-struct handler_type<packaged_token<Function, Allocator>, R(Args...)>
-{
-  typedef packaged_handler<
-    typename result_of<Function(Args...)>::type(Args...),
-      Allocator> type;
-};
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename Function, typename Allocator, typename R>
-struct handler_type<packaged_token<Function, Allocator>, R()>
-{
-  typedef packaged_handler<
-    typename result_of<Function()>::type(),
-      Allocator> type;
-};
-
-#define ASIO_PRIVATE_HANDLER_TYPE_DEF(n) \
-  template <typename Function, typename Allocator, \
-    typename R, ASIO_VARIADIC_TPARAMS(n)> \
-  struct handler_type< \
-    packaged_token<Function, Allocator>, R(ASIO_VARIADIC_TARGS(n))> \
-  { \
-    typedef packaged_handler< \
-      typename result_of< \
-        Function(ASIO_VARIADIC_TARGS(n))>::type( \
-          ASIO_VARIADIC_TARGS(n)), \
-            Allocator> type; \
-  }; \
-  /**/
-  ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_HANDLER_TYPE_DEF)
-#undef ASIO_PRIVATE_HANDLER_TYPE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename R, typename... Args>
-class async_result<std::packaged_task<R(Args...)> >
-{
-public:
-  typedef std::future<R> type;
-
-  explicit async_result(std::packaged_task<R(Args...)>& h)
-    : future_(h.get_future())
-  {
-  }
-
-  type get()
-  {
-    return std::move(future_);
-  }
-
-private:
-  type future_;
-};
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename R>
-class async_result<std::packaged_task<R()> >
-{
-public:
-  typedef std::future<R> type;
-
-  explicit async_result(std::packaged_task<R()>& h)
-    : future_(h.get_future())
-  {
-  }
-
-  type get()
-  {
-    return std::move(future_);
-  }
-
-private:
-  type future_;
-};
-
-#define ASIO_PRIVATE_ASYNC_RESULT_DEF(n) \
-  template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
-  class async_result<std::packaged_task<R(ASIO_VARIADIC_TARGS(n))> > \
-  { \
-  public: \
-    typedef std::future<R> type; \
-  \
-    explicit async_result( \
-        std::packaged_task<R(ASIO_VARIADIC_TARGS(n))>& h) \
-      : future_(h.get_future()) \
-    { \
-    } \
-  \
-    type get() \
-    { \
-      return std::move(future_); \
-    } \
-  \
-  private: \
-    type future_; \
-  }; \
-  /**/
-  ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ASYNC_RESULT_DEF)
-#undef ASIO_PRIVATE_ASYNC_RESULT_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename Signature, typename Allocator>
-class async_result<packaged_handler<Signature, Allocator>>
-  : public async_result<std::packaged_task<Signature>>
-{
-public:
-  explicit async_result(packaged_handler<Signature, Allocator>& h)
-    : async_result<std::packaged_task<Signature>>(h) {}
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_USE_PACKAGE_HPP
diff --git a/asio/include/asio/packaged_task.hpp b/asio/include/asio/packaged_task.hpp
new file mode 100644
index 0000000..af8d689
--- /dev/null
+++ b/asio/include/asio/packaged_task.hpp
@@ -0,0 +1,126 @@
+//
+// packaged_task.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ASIO_PACKAGED_TASK_HPP
+#define ASIO_PACKAGED_TASK_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_STD_FUTURE) \
+  || defined(GENERATING_DOCUMENTATION)
+
+#include <future>
+#include "asio/async_result.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/variadic_templates.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(ASIO_HAS_VARIADIC_TEMPLATES) \
+  || defined(GENERATING_DOCUMENTATION)
+
+/// Partial specialisation of @c async_result for @c std::packaged_task.
+template <typename Result, typename... Args, typename Signature>
+class async_result<std::packaged_task<Result(Args...)>, Signature>
+{
+public:
+  /// The packaged task is the concrete completion handler type.
+  typedef std::packaged_task<Result(Args...)> completion_handler_type;
+
+  /// The return type of the initiating function is the future obtained from
+  /// the packaged task.
+  typedef std::future<Result> return_type;
+
+  /// The constructor extracts the future from the packaged task.
+  explicit async_result(completion_handler_type& h)
+    : future_(h.get_future())
+  {
+  }
+
+  /// Returns the packaged task's future.
+  return_type get()
+  {
+    return std::move(future_);
+  }
+
+private:
+  return_type future_;
+};
+
+#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+      //   || defined(GENERATING_DOCUMENTATION)
+
+template <typename Result, typename Signature>
+struct async_result<std::packaged_task<Result()>, Signature>
+{
+  typedef std::packaged_task<Result()> completion_handler_type;
+  typedef std::future<Result> return_type;
+
+  explicit async_result(completion_handler_type& h)
+    : future_(h.get_future())
+  {
+  }
+
+  return_type get()
+  {
+    return std::move(future_);
+  }
+
+private:
+  return_type future_;
+};
+
+#define ASIO_PRIVATE_ASYNC_RESULT_DEF(n) \
+  template <typename Result, \
+    ASIO_VARIADIC_TPARAMS(n), typename Signature> \
+  class async_result< \
+    std::packaged_task<Result(ASIO_VARIADIC_TARGS(n))>, Signature> \
+  { \
+  public: \
+    typedef std::packaged_task< \
+      Result(ASIO_VARIADIC_TARGS(n))> \
+        completion_handler_type; \
+  \
+    typedef std::future<Result> return_type; \
+  \
+    explicit async_result(completion_handler_type& h) \
+      : future_(h.get_future()) \
+    { \
+    } \
+  \
+    return_type get() \
+    { \
+      return std::move(future_); \
+    } \
+  \
+  private: \
+    return_type future_; \
+  }; \
+  /**/
+  ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ASYNC_RESULT_DEF)
+#undef ASIO_PRIVATE_ASYNC_RESULT_DEF
+
+#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+       //   || defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_STD_FUTURE)
+       //   || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_PACKAGED_TASK_HPP
diff --git a/asio/include/asio/placeholders.hpp b/asio/include/asio/placeholders.hpp
index 8c7a4e5..8e6e2e5 100644
--- a/asio/include/asio/placeholders.hpp
+++ b/asio/include/asio/placeholders.hpp
@@ -2,7 +2,7 @@
 // placeholders.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/posix/basic_descriptor.hpp b/asio/include/asio/posix/basic_descriptor.hpp
index c471747..27db872 100644
--- a/asio/include/asio/posix/basic_descriptor.hpp
+++ b/asio/include/asio/posix/basic_descriptor.hpp
@@ -2,7 +2,7 @@
 // posix/basic_descriptor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -174,11 +176,12 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code assign(const native_handle_type& native_descriptor,
+  ASIO_SYNC_OP_VOID assign(const native_handle_type& native_descriptor,
       asio::error_code& ec)
   {
-    return this->get_service().assign(
+    this->get_service().assign(
         this->get_implementation(), native_descriptor, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the descriptor is open.
@@ -212,9 +215,10 @@
    * @param ec Set to indicate what error occurred, if any. Note that, even if
    * the function indicates an error, the underlying descriptor is closed.
    */
-  asio::error_code close(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID close(asio::error_code& ec)
   {
-    return this->get_service().close(this->get_implementation(), ec);
+    this->get_service().close(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native descriptor representation.
@@ -266,9 +270,10 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code cancel(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
   {
-    return this->get_service().cancel(this->get_implementation(), ec);
+    this->get_service().cancel(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Perform an IO control command on the descriptor.
@@ -329,11 +334,11 @@
    * @endcode
    */
   template <typename IoControlCommand>
-  asio::error_code io_control(IoControlCommand& command,
+  ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
       asio::error_code& ec)
   {
-    return this->get_service().io_control(
-        this->get_implementation(), command, ec);
+    this->get_service().io_control(this->get_implementation(), command, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the descriptor.
@@ -385,11 +390,11 @@
    * operations. Asynchronous operations will never fail with the error
    * asio::error::would_block.
    */
-  asio::error_code non_blocking(
+  ASIO_SYNC_OP_VOID non_blocking(
       bool mode, asio::error_code& ec)
   {
-    return this->get_service().non_blocking(
-        this->get_implementation(), mode, ec);
+    this->get_service().non_blocking(this->get_implementation(), mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the native descriptor implementation.
@@ -450,11 +455,12 @@
    * function fails with asio::error::invalid_argument, as the
    * combination does not make sense.
    */
-  asio::error_code native_non_blocking(
+  ASIO_SYNC_OP_VOID native_non_blocking(
       bool mode, asio::error_code& ec)
   {
-    return this->get_service().native_non_blocking(
+    this->get_service().native_non_blocking(
         this->get_implementation(), mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Wait for the descriptor to become ready to read, ready to write, or to
@@ -499,9 +505,10 @@
    * descriptor.wait(asio::posix::stream_descriptor::wait_read, ec);
    * @endcode
    */
-  asio::error_code wait(wait_type w, asio::error_code& ec)
+  ASIO_SYNC_OP_VOID wait(wait_type w, asio::error_code& ec)
   {
-    return this->get_service().wait(this->get_implementation(), w, ec);
+    this->get_service().wait(this->get_implementation(), w, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Asynchronously wait for the descriptor to become ready to read, ready to
@@ -570,4 +577,6 @@
 #endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
        //   || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_POSIX_BASIC_DESCRIPTOR_HPP
diff --git a/asio/include/asio/posix/basic_stream_descriptor.hpp b/asio/include/asio/posix/basic_stream_descriptor.hpp
index b81f7ee..eb7bc8b 100644
--- a/asio/include/asio/posix/basic_stream_descriptor.hpp
+++ b/asio/include/asio/posix/basic_stream_descriptor.hpp
@@ -2,7 +2,7 @@
 // posix/basic_stream_descriptor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -355,4 +357,6 @@
 #endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
        //   || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_POSIX_BASIC_STREAM_DESCRIPTOR_HPP
diff --git a/asio/include/asio/posix/descriptor.hpp b/asio/include/asio/posix/descriptor.hpp
new file mode 100644
index 0000000..9ab46a5
--- /dev/null
+++ b/asio/include/asio/posix/descriptor.hpp
@@ -0,0 +1,644 @@
+//
+// posix/descriptor.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ASIO_POSIX_DESCRIPTOR_HPP
+#define ASIO_POSIX_DESCRIPTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if !defined(ASIO_ENABLE_OLD_SERVICES)
+
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
+  || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/async_result.hpp"
+#include "asio/basic_io_object.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/reactive_descriptor_service.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/error.hpp"
+#include "asio/io_context.hpp"
+#include "asio/posix/descriptor_base.hpp"
+
+#if defined(ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(ASIO_HAS_MOVE)
+
+#define ASIO_SVC_T asio::detail::reactive_descriptor_service
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace posix {
+
+/// Provides POSIX descriptor functionality.
+/**
+ * The posix::descriptor class template provides the ability to wrap a
+ * POSIX descriptor.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class descriptor
+  : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>,
+    public descriptor_base
+{
+public:
+  /// The type of the executor associated with the object.
+  typedef io_context::executor_type executor_type;
+
+  /// The native representation of a descriptor.
+#if defined(GENERATING_DOCUMENTATION)
+  typedef implementation_defined native_handle_type;
+#else
+  typedef ASIO_SVC_T::native_handle_type native_handle_type;
+#endif
+
+  /// A descriptor is always the lowest layer.
+  typedef descriptor lowest_layer_type;
+
+  /// Construct a descriptor without opening it.
+  /**
+   * This constructor creates a descriptor without opening it.
+   *
+   * @param io_context The io_context object that the descriptor will use to
+   * dispatch handlers for any asynchronous operations performed on the
+   * descriptor.
+   */
+  explicit descriptor(asio::io_context& io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
+  {
+  }
+
+  /// Construct a descriptor on an existing native descriptor.
+  /**
+   * This constructor creates a descriptor object to hold an existing native
+   * descriptor.
+   *
+   * @param io_context The io_context object that the descriptor will use to
+   * dispatch handlers for any asynchronous operations performed on the
+   * descriptor.
+   *
+   * @param native_descriptor A native descriptor.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  descriptor(asio::io_context& io_context,
+      const native_handle_type& native_descriptor)
+    : basic_io_object<ASIO_SVC_T>(io_context)
+  {
+    asio::error_code ec;
+    this->get_service().assign(this->get_implementation(),
+        native_descriptor, ec);
+    asio::detail::throw_error(ec, "assign");
+  }
+
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+  /// Move-construct a descriptor from another.
+  /**
+   * This constructor moves a descriptor from one object to another.
+   *
+   * @param other The other descriptor object from which the move will
+   * occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c descriptor(io_context&) constructor.
+   */
+  descriptor(descriptor&& other)
+    : basic_io_object<ASIO_SVC_T>(std::move(other))
+  {
+  }
+
+  /// Move-assign a descriptor from another.
+  /**
+   * This assignment operator moves a descriptor from one object to another.
+   *
+   * @param other The other descriptor object from which the move will
+   * occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c descriptor(io_context&) constructor.
+   */
+  descriptor& operator=(descriptor&& other)
+  {
+    basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_context()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_context();
+  }
+
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_service()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_service();
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+  /// Get the executor associated with the object.
+  executor_type get_executor() ASIO_NOEXCEPT
+  {
+    return basic_io_object<ASIO_SVC_T>::get_executor();
+  }
+
+  /// Get a reference to the lowest layer.
+  /**
+   * This function returns a reference to the lowest layer in a stack of
+   * layers. Since a descriptor cannot contain any further layers, it
+   * simply returns a reference to itself.
+   *
+   * @return A reference to the lowest layer in the stack of layers. Ownership
+   * is not transferred to the caller.
+   */
+  lowest_layer_type& lowest_layer()
+  {
+    return *this;
+  }
+
+  /// Get a const reference to the lowest layer.
+  /**
+   * This function returns a const reference to the lowest layer in a stack of
+   * layers. Since a descriptor cannot contain any further layers, it
+   * simply returns a reference to itself.
+   *
+   * @return A const reference to the lowest layer in the stack of layers.
+   * Ownership is not transferred to the caller.
+   */
+  const lowest_layer_type& lowest_layer() const
+  {
+    return *this;
+  }
+
+  /// Assign an existing native descriptor to the descriptor.
+  /*
+   * This function opens the descriptor to hold an existing native descriptor.
+   *
+   * @param native_descriptor A native descriptor.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void assign(const native_handle_type& native_descriptor)
+  {
+    asio::error_code ec;
+    this->get_service().assign(this->get_implementation(),
+        native_descriptor, ec);
+    asio::detail::throw_error(ec, "assign");
+  }
+
+  /// Assign an existing native descriptor to the descriptor.
+  /*
+   * This function opens the descriptor to hold an existing native descriptor.
+   *
+   * @param native_descriptor A native descriptor.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID assign(const native_handle_type& native_descriptor,
+      asio::error_code& ec)
+  {
+    this->get_service().assign(
+        this->get_implementation(), native_descriptor, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Determine whether the descriptor is open.
+  bool is_open() const
+  {
+    return this->get_service().is_open(this->get_implementation());
+  }
+
+  /// Close the descriptor.
+  /**
+   * This function is used to close the descriptor. Any asynchronous read or
+   * write operations will be cancelled immediately, and will complete with the
+   * asio::error::operation_aborted error.
+   *
+   * @throws asio::system_error Thrown on failure. Note that, even if
+   * the function indicates an error, the underlying descriptor is closed.
+   */
+  void close()
+  {
+    asio::error_code ec;
+    this->get_service().close(this->get_implementation(), ec);
+    asio::detail::throw_error(ec, "close");
+  }
+
+  /// Close the descriptor.
+  /**
+   * This function is used to close the descriptor. Any asynchronous read or
+   * write operations will be cancelled immediately, and will complete with the
+   * asio::error::operation_aborted error.
+   *
+   * @param ec Set to indicate what error occurred, if any. Note that, even if
+   * the function indicates an error, the underlying descriptor is closed.
+   */
+  ASIO_SYNC_OP_VOID close(asio::error_code& ec)
+  {
+    this->get_service().close(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Get the native descriptor representation.
+  /**
+   * This function may be used to obtain the underlying representation of the
+   * descriptor. This is intended to allow access to native descriptor
+   * functionality that is not otherwise provided.
+   */
+  native_handle_type native_handle()
+  {
+    return this->get_service().native_handle(this->get_implementation());
+  }
+
+  /// Release ownership of the native descriptor implementation.
+  /**
+   * This function may be used to obtain the underlying representation of the
+   * descriptor. After calling this function, @c is_open() returns false. The
+   * caller is responsible for closing the descriptor.
+   *
+   * All outstanding asynchronous read or write operations will finish
+   * immediately, and the handlers for cancelled operations will be passed the
+   * asio::error::operation_aborted error.
+   */
+  native_handle_type release()
+  {
+    return this->get_service().release(this->get_implementation());
+  }
+
+  /// Cancel all asynchronous operations associated with the descriptor.
+  /**
+   * This function causes all outstanding asynchronous read or write operations
+   * to finish immediately, and the handlers for cancelled operations will be
+   * passed the asio::error::operation_aborted error.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void cancel()
+  {
+    asio::error_code ec;
+    this->get_service().cancel(this->get_implementation(), ec);
+    asio::detail::throw_error(ec, "cancel");
+  }
+
+  /// Cancel all asynchronous operations associated with the descriptor.
+  /**
+   * This function causes all outstanding asynchronous read or write operations
+   * to finish immediately, and the handlers for cancelled operations will be
+   * passed the asio::error::operation_aborted error.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+  {
+    this->get_service().cancel(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Perform an IO control command on the descriptor.
+  /**
+   * This function is used to execute an IO control command on the descriptor.
+   *
+   * @param command The IO control command to be performed on the descriptor.
+   *
+   * @throws asio::system_error Thrown on failure.
+   *
+   * @sa IoControlCommand @n
+   * asio::posix::descriptor_base::bytes_readable @n
+   * asio::posix::descriptor_base::non_blocking_io
+   *
+   * @par Example
+   * Getting the number of bytes ready to read:
+   * @code
+   * asio::posix::stream_descriptor descriptor(io_context);
+   * ...
+   * asio::posix::stream_descriptor::bytes_readable command;
+   * descriptor.io_control(command);
+   * std::size_t bytes_readable = command.get();
+   * @endcode
+   */
+  template <typename IoControlCommand>
+  void io_control(IoControlCommand& command)
+  {
+    asio::error_code ec;
+    this->get_service().io_control(this->get_implementation(), command, ec);
+    asio::detail::throw_error(ec, "io_control");
+  }
+
+  /// Perform an IO control command on the descriptor.
+  /**
+   * This function is used to execute an IO control command on the descriptor.
+   *
+   * @param command The IO control command to be performed on the descriptor.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @sa IoControlCommand @n
+   * asio::posix::descriptor_base::bytes_readable @n
+   * asio::posix::descriptor_base::non_blocking_io
+   *
+   * @par Example
+   * Getting the number of bytes ready to read:
+   * @code
+   * asio::posix::stream_descriptor descriptor(io_context);
+   * ...
+   * asio::posix::stream_descriptor::bytes_readable command;
+   * asio::error_code ec;
+   * descriptor.io_control(command, ec);
+   * if (ec)
+   * {
+   *   // An error occurred.
+   * }
+   * std::size_t bytes_readable = command.get();
+   * @endcode
+   */
+  template <typename IoControlCommand>
+  ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
+      asio::error_code& ec)
+  {
+    this->get_service().io_control(this->get_implementation(), command, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Gets the non-blocking mode of the descriptor.
+  /**
+   * @returns @c true if the descriptor's synchronous operations will fail with
+   * asio::error::would_block if they are unable to perform the requested
+   * operation immediately. If @c false, synchronous operations will block
+   * until complete.
+   *
+   * @note The non-blocking mode has no effect on the behaviour of asynchronous
+   * operations. Asynchronous operations will never fail with the error
+   * asio::error::would_block.
+   */
+  bool non_blocking() const
+  {
+    return this->get_service().non_blocking(this->get_implementation());
+  }
+
+  /// Sets the non-blocking mode of the descriptor.
+  /**
+   * @param mode If @c true, the descriptor's synchronous operations will fail
+   * with asio::error::would_block if they are unable to perform the
+   * requested operation immediately. If @c false, synchronous operations will
+   * block until complete.
+   *
+   * @throws asio::system_error Thrown on failure.
+   *
+   * @note The non-blocking mode has no effect on the behaviour of asynchronous
+   * operations. Asynchronous operations will never fail with the error
+   * asio::error::would_block.
+   */
+  void non_blocking(bool mode)
+  {
+    asio::error_code ec;
+    this->get_service().non_blocking(this->get_implementation(), mode, ec);
+    asio::detail::throw_error(ec, "non_blocking");
+  }
+
+  /// Sets the non-blocking mode of the descriptor.
+  /**
+   * @param mode If @c true, the descriptor's synchronous operations will fail
+   * with asio::error::would_block if they are unable to perform the
+   * requested operation immediately. If @c false, synchronous operations will
+   * block until complete.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @note The non-blocking mode has no effect on the behaviour of asynchronous
+   * operations. Asynchronous operations will never fail with the error
+   * asio::error::would_block.
+   */
+  ASIO_SYNC_OP_VOID non_blocking(
+      bool mode, asio::error_code& ec)
+  {
+    this->get_service().non_blocking(this->get_implementation(), mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Gets the non-blocking mode of the native descriptor implementation.
+  /**
+   * This function is used to retrieve the non-blocking mode of the underlying
+   * native descriptor. This mode has no effect on the behaviour of the
+   * descriptor object's synchronous operations.
+   *
+   * @returns @c true if the underlying descriptor is in non-blocking mode and
+   * direct system calls may fail with asio::error::would_block (or the
+   * equivalent system error).
+   *
+   * @note The current non-blocking mode is cached by the descriptor object.
+   * Consequently, the return value may be incorrect if the non-blocking mode
+   * was set directly on the native descriptor.
+   */
+  bool native_non_blocking() const
+  {
+    return this->get_service().native_non_blocking(
+        this->get_implementation());
+  }
+
+  /// Sets the non-blocking mode of the native descriptor implementation.
+  /**
+   * This function is used to modify the non-blocking mode of the underlying
+   * native descriptor. It has no effect on the behaviour of the descriptor
+   * object's synchronous operations.
+   *
+   * @param mode If @c true, the underlying descriptor is put into non-blocking
+   * mode and direct system calls may fail with asio::error::would_block
+   * (or the equivalent system error).
+   *
+   * @throws asio::system_error Thrown on failure. If the @c mode is
+   * @c false, but the current value of @c non_blocking() is @c true, this
+   * function fails with asio::error::invalid_argument, as the
+   * combination does not make sense.
+   */
+  void native_non_blocking(bool mode)
+  {
+    asio::error_code ec;
+    this->get_service().native_non_blocking(
+        this->get_implementation(), mode, ec);
+    asio::detail::throw_error(ec, "native_non_blocking");
+  }
+
+  /// Sets the non-blocking mode of the native descriptor implementation.
+  /**
+   * This function is used to modify the non-blocking mode of the underlying
+   * native descriptor. It has no effect on the behaviour of the descriptor
+   * object's synchronous operations.
+   *
+   * @param mode If @c true, the underlying descriptor is put into non-blocking
+   * mode and direct system calls may fail with asio::error::would_block
+   * (or the equivalent system error).
+   *
+   * @param ec Set to indicate what error occurred, if any. If the @c mode is
+   * @c false, but the current value of @c non_blocking() is @c true, this
+   * function fails with asio::error::invalid_argument, as the
+   * combination does not make sense.
+   */
+  ASIO_SYNC_OP_VOID native_non_blocking(
+      bool mode, asio::error_code& ec)
+  {
+    this->get_service().native_non_blocking(
+        this->get_implementation(), mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Wait for the descriptor to become ready to read, ready to write, or to
+  /// have pending error conditions.
+  /**
+   * This function is used to perform a blocking wait for a descriptor to enter
+   * a ready to read, write or error condition state.
+   *
+   * @param w Specifies the desired descriptor state.
+   *
+   * @par Example
+   * Waiting for a descriptor to become readable.
+   * @code
+   * asio::posix::stream_descriptor descriptor(io_context);
+   * ...
+   * descriptor.wait(asio::posix::stream_descriptor::wait_read);
+   * @endcode
+   */
+  void wait(wait_type w)
+  {
+    asio::error_code ec;
+    this->get_service().wait(this->get_implementation(), w, ec);
+    asio::detail::throw_error(ec, "wait");
+  }
+
+  /// Wait for the descriptor to become ready to read, ready to write, or to
+  /// have pending error conditions.
+  /**
+   * This function is used to perform a blocking wait for a descriptor to enter
+   * a ready to read, write or error condition state.
+   *
+   * @param w Specifies the desired descriptor state.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @par Example
+   * Waiting for a descriptor to become readable.
+   * @code
+   * asio::posix::stream_descriptor descriptor(io_context);
+   * ...
+   * asio::error_code ec;
+   * descriptor.wait(asio::posix::stream_descriptor::wait_read, ec);
+   * @endcode
+   */
+  ASIO_SYNC_OP_VOID wait(wait_type w, asio::error_code& ec)
+  {
+    this->get_service().wait(this->get_implementation(), w, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Asynchronously wait for the descriptor to become ready to read, ready to
+  /// write, or to have pending error conditions.
+  /**
+   * This function is used to perform an asynchronous wait for a descriptor to
+   * enter a ready to read, write or error condition state.
+   *
+   * @param w Specifies the desired descriptor state.
+   *
+   * @param handler The handler to be called when the wait operation completes.
+   * Copies will be made of the handler as required. The function signature of
+   * the handler must be:
+   * @code void handler(
+   *   const asio::error_code& error // Result of operation
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_context::post().
+   *
+   * @par Example
+   * @code
+   * void wait_handler(const asio::error_code& error)
+   * {
+   *   if (!error)
+   *   {
+   *     // Wait succeeded.
+   *   }
+   * }
+   *
+   * ...
+   *
+   * asio::posix::stream_descriptor descriptor(io_context);
+   * ...
+   * descriptor.async_wait(
+   *     asio::posix::stream_descriptor::wait_read,
+   *     wait_handler);
+   * @endcode
+   */
+  template <typename WaitHandler>
+  ASIO_INITFN_RESULT_TYPE(WaitHandler,
+      void (asio::error_code))
+  async_wait(wait_type w, ASIO_MOVE_ARG(WaitHandler) handler)
+  {
+    // If you get an error on the following line it means that your handler does
+    // not meet the documented type requirements for a WaitHandler.
+    ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
+
+    async_completion<WaitHandler,
+      void (asio::error_code)> init(handler);
+
+    this->get_service().async_wait(
+        this->get_implementation(), w, init.completion_handler);
+
+    return init.result.get();
+  }
+
+protected:
+  /// Protected destructor to prevent deletion through this type.
+  /**
+   * This function destroys the descriptor, cancelling any outstanding
+   * asynchronous wait operations associated with the descriptor as if by
+   * calling @c cancel.
+   */
+  ~descriptor()
+  {
+  }
+};
+
+} // namespace posix
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#undef ASIO_SVC_T
+
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+       //   || defined(GENERATING_DOCUMENTATION)
+
+#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+
+#endif // ASIO_POSIX_DESCRIPTOR_HPP
diff --git a/asio/include/asio/posix/descriptor_base.hpp b/asio/include/asio/posix/descriptor_base.hpp
index 0f7802f..b77d49d 100644
--- a/asio/include/asio/posix/descriptor_base.hpp
+++ b/asio/include/asio/posix/descriptor_base.hpp
@@ -2,7 +2,7 @@
 // posix/descriptor_base.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -28,15 +28,14 @@
 namespace asio {
 namespace posix {
 
-/// The descriptor_base class is used as a base for the basic_stream_descriptor
-/// class template so that we have a common place to define the associated
-/// IO control commands.
+/// The descriptor_base class is used as a base for the descriptor class as a
+/// place to define the associated IO control commands.
 class descriptor_base
 {
 public:
   /// Wait types.
   /**
-   * For use with basic_descriptor::wait() and basic_descriptor::async_wait().
+   * For use with descriptor::wait() and descriptor::async_wait().
    */
   enum wait_type
   {
diff --git a/asio/include/asio/posix/stream_descriptor.hpp b/asio/include/asio/posix/stream_descriptor.hpp
index 25c62e8..29e1572 100644
--- a/asio/include/asio/posix/stream_descriptor.hpp
+++ b/asio/include/asio/posix/stream_descriptor.hpp
@@ -2,7 +2,7 @@
 // posix/stream_descriptor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,17 +16,340 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+#include "asio/posix/descriptor.hpp"
 
 #if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
   || defined(GENERATING_DOCUMENTATION)
 
-#include "asio/posix/basic_stream_descriptor.hpp"
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/posix/basic_stream_descriptor.hpp"
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 namespace asio {
 namespace posix {
 
-/// Typedef for the typical usage of a stream-oriented descriptor.
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+// Typedef for the typical usage of a stream-oriented descriptor.
 typedef basic_stream_descriptor<> stream_descriptor;
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+/// Provides stream-oriented descriptor functionality.
+/**
+ * The posix::stream_descriptor class template provides asynchronous and
+ * blocking stream-oriented descriptor functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
+ */
+class stream_descriptor
+  : public descriptor
+{
+public:
+  /// Construct a stream_descriptor without opening it.
+  /**
+   * This constructor creates a stream descriptor without opening it. The
+   * descriptor needs to be opened and then connected or accepted before data
+   * can be sent or received on it.
+   *
+   * @param io_context The io_context object that the stream descriptor will
+   * use to dispatch handlers for any asynchronous operations performed on the
+   * descriptor.
+   */
+  explicit stream_descriptor(asio::io_context& io_context)
+    : descriptor(io_context)
+  {
+  }
+
+  /// Construct a stream_descriptor on an existing native descriptor.
+  /**
+   * This constructor creates a stream descriptor object to hold an existing
+   * native descriptor.
+   *
+   * @param io_context The io_context object that the stream descriptor will
+   * use to dispatch handlers for any asynchronous operations performed on the
+   * descriptor.
+   *
+   * @param native_descriptor The new underlying descriptor implementation.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  stream_descriptor(asio::io_context& io_context,
+      const native_handle_type& native_descriptor)
+    : descriptor(io_context, native_descriptor)
+  {
+  }
+
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+  /// Move-construct a stream_descriptor from another.
+  /**
+   * This constructor moves a stream descriptor from one object to another.
+   *
+   * @param other The other stream_descriptor object from which the move
+   * will occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c stream_descriptor(io_context&) constructor.
+   */
+  stream_descriptor(stream_descriptor&& other)
+    : descriptor(std::move(other))
+  {
+  }
+
+  /// Move-assign a stream_descriptor from another.
+  /**
+   * This assignment operator moves a stream descriptor from one object to
+   * another.
+   *
+   * @param other The other stream_descriptor object from which the move
+   * will occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c stream_descriptor(io_context&) constructor.
+   */
+  stream_descriptor& operator=(stream_descriptor&& other)
+  {
+    descriptor::operator=(std::move(other));
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+  /// Write some data to the descriptor.
+  /**
+   * This function is used to write data to the stream descriptor. The function
+   * call will block until one or more bytes of the data has been written
+   * successfully, or until an error occurs.
+   *
+   * @param buffers One or more data buffers to be written to the descriptor.
+   *
+   * @returns The number of bytes written.
+   *
+   * @throws asio::system_error Thrown on failure. An error code of
+   * asio::error::eof indicates that the connection was closed by the
+   * peer.
+   *
+   * @note The write_some operation may not transmit all of the data to the
+   * peer. Consider using the @ref write function if you need to ensure that
+   * all data is written before the blocking operation completes.
+   *
+   * @par Example
+   * To write a single data buffer use the @ref buffer function as follows:
+   * @code
+   * descriptor.write_some(asio::buffer(data, size));
+   * @endcode
+   * See the @ref buffer documentation for information on writing multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename ConstBufferSequence>
+  std::size_t write_some(const ConstBufferSequence& buffers)
+  {
+    asio::error_code ec;
+    std::size_t s = this->get_service().write_some(
+        this->get_implementation(), buffers, ec);
+    asio::detail::throw_error(ec, "write_some");
+    return s;
+  }
+
+  /// Write some data to the descriptor.
+  /**
+   * This function is used to write data to the stream descriptor. The function
+   * call will block until one or more bytes of the data has been written
+   * successfully, or until an error occurs.
+   *
+   * @param buffers One or more data buffers to be written to the descriptor.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @returns The number of bytes written. Returns 0 if an error occurred.
+   *
+   * @note The write_some operation may not transmit all of the data to the
+   * peer. Consider using the @ref write function if you need to ensure that
+   * all data is written before the blocking operation completes.
+   */
+  template <typename ConstBufferSequence>
+  std::size_t write_some(const ConstBufferSequence& buffers,
+      asio::error_code& ec)
+  {
+    return this->get_service().write_some(
+        this->get_implementation(), buffers, ec);
+  }
+
+  /// Start an asynchronous write.
+  /**
+   * This function is used to asynchronously write data to the stream
+   * descriptor. The function call always returns immediately.
+   *
+   * @param buffers One or more data buffers to be written to the descriptor.
+   * Although the buffers object may be copied as necessary, ownership of the
+   * underlying memory blocks is retained by the caller, which must guarantee
+   * that they remain valid until the handler is called.
+   *
+   * @param handler The handler to be called when the write operation completes.
+   * Copies will be made of the handler as required. The function signature of
+   * the handler must be:
+   * @code void handler(
+   *   const asio::error_code& error, // Result of operation.
+   *   std::size_t bytes_transferred           // Number of bytes written.
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_context::post().
+   *
+   * @note The write operation may not transmit all of the data to the peer.
+   * Consider using the @ref async_write function if you need to ensure that all
+   * data is written before the asynchronous operation completes.
+   *
+   * @par Example
+   * To write a single data buffer use the @ref buffer function as follows:
+   * @code
+   * descriptor.async_write_some(asio::buffer(data, size), handler);
+   * @endcode
+   * See the @ref buffer documentation for information on writing multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename ConstBufferSequence, typename WriteHandler>
+  ASIO_INITFN_RESULT_TYPE(WriteHandler,
+      void (asio::error_code, std::size_t))
+  async_write_some(const ConstBufferSequence& buffers,
+      ASIO_MOVE_ARG(WriteHandler) handler)
+  {
+    // If you get an error on the following line it means that your handler does
+    // not meet the documented type requirements for a WriteHandler.
+    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+    asio::async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_write_some(
+        this->get_implementation(), buffers, init.completion_handler);
+
+    return init.result.get();
+  }
+
+  /// Read some data from the descriptor.
+  /**
+   * This function is used to read data from the stream descriptor. The function
+   * call will block until one or more bytes of data has been read successfully,
+   * or until an error occurs.
+   *
+   * @param buffers One or more buffers into which the data will be read.
+   *
+   * @returns The number of bytes read.
+   *
+   * @throws asio::system_error Thrown on failure. An error code of
+   * asio::error::eof indicates that the connection was closed by the
+   * peer.
+   *
+   * @note The read_some operation may not read all of the requested number of
+   * bytes. Consider using the @ref read function if you need to ensure that
+   * the requested amount of data is read before the blocking operation
+   * completes.
+   *
+   * @par Example
+   * To read into a single data buffer use the @ref buffer function as follows:
+   * @code
+   * descriptor.read_some(asio::buffer(data, size));
+   * @endcode
+   * See the @ref buffer documentation for information on reading into multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename MutableBufferSequence>
+  std::size_t read_some(const MutableBufferSequence& buffers)
+  {
+    asio::error_code ec;
+    std::size_t s = this->get_service().read_some(
+        this->get_implementation(), buffers, ec);
+    asio::detail::throw_error(ec, "read_some");
+    return s;
+  }
+
+  /// Read some data from the descriptor.
+  /**
+   * This function is used to read data from the stream descriptor. The function
+   * call will block until one or more bytes of data has been read successfully,
+   * or until an error occurs.
+   *
+   * @param buffers One or more buffers into which the data will be read.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @returns The number of bytes read. Returns 0 if an error occurred.
+   *
+   * @note The read_some operation may not read all of the requested number of
+   * bytes. Consider using the @ref read function if you need to ensure that
+   * the requested amount of data is read before the blocking operation
+   * completes.
+   */
+  template <typename MutableBufferSequence>
+  std::size_t read_some(const MutableBufferSequence& buffers,
+      asio::error_code& ec)
+  {
+    return this->get_service().read_some(
+        this->get_implementation(), buffers, ec);
+  }
+
+  /// Start an asynchronous read.
+  /**
+   * This function is used to asynchronously read data from the stream
+   * descriptor. The function call always returns immediately.
+   *
+   * @param buffers One or more buffers into which the data will be read.
+   * Although the buffers object may be copied as necessary, ownership of the
+   * underlying memory blocks is retained by the caller, which must guarantee
+   * that they remain valid until the handler is called.
+   *
+   * @param handler The handler to be called when the read operation completes.
+   * Copies will be made of the handler as required. The function signature of
+   * the handler must be:
+   * @code void handler(
+   *   const asio::error_code& error, // Result of operation.
+   *   std::size_t bytes_transferred           // Number of bytes read.
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_context::post().
+   *
+   * @note The read operation may not read all of the requested number of bytes.
+   * Consider using the @ref async_read function if you need to ensure that the
+   * requested amount of data is read before the asynchronous operation
+   * completes.
+   *
+   * @par Example
+   * To read into a single data buffer use the @ref buffer function as follows:
+   * @code
+   * descriptor.async_read_some(asio::buffer(data, size), handler);
+   * @endcode
+   * See the @ref buffer documentation for information on reading into multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename MutableBufferSequence, typename ReadHandler>
+  ASIO_INITFN_RESULT_TYPE(ReadHandler,
+      void (asio::error_code, std::size_t))
+  async_read_some(const MutableBufferSequence& buffers,
+      ASIO_MOVE_ARG(ReadHandler) handler)
+  {
+    // If you get an error on the following line it means that your handler does
+    // not meet the documented type requirements for a ReadHandler.
+    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+    asio::async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_read_some(
+        this->get_implementation(), buffers, init.completion_handler);
+
+    return init.result.get();
+  }
+};
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 } // namespace posix
 } // namespace asio
diff --git a/asio/include/asio/posix/stream_descriptor_service.hpp b/asio/include/asio/posix/stream_descriptor_service.hpp
index 63d01b5..e7a1b32 100644
--- a/asio/include/asio/posix/stream_descriptor_service.hpp
+++ b/asio/include/asio/posix/stream_descriptor_service.hpp
@@ -2,7 +2,7 @@
 // posix/stream_descriptor_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -101,11 +103,12 @@
   }
 
   /// Assign an existing native descriptor to a stream descriptor.
-  asio::error_code assign(implementation_type& impl,
+  ASIO_SYNC_OP_VOID assign(implementation_type& impl,
       const native_handle_type& native_descriptor,
       asio::error_code& ec)
   {
-    return service_impl_.assign(impl, native_descriptor, ec);
+    service_impl_.assign(impl, native_descriptor, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the descriptor is open.
@@ -115,10 +118,11 @@
   }
 
   /// Close a stream descriptor implementation.
-  asio::error_code close(implementation_type& impl,
+  ASIO_SYNC_OP_VOID close(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.close(impl, ec);
+    service_impl_.close(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native descriptor implementation.
@@ -134,18 +138,20 @@
   }
 
   /// Cancel all asynchronous operations associated with the descriptor.
-  asio::error_code cancel(implementation_type& impl,
+  ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.cancel(impl, ec);
+    service_impl_.cancel(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Perform an IO control command on the descriptor.
   template <typename IoControlCommand>
-  asio::error_code io_control(implementation_type& impl,
+  ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
       IoControlCommand& command, asio::error_code& ec)
   {
-    return service_impl_.io_control(impl, command, ec);
+    service_impl_.io_control(impl, command, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the descriptor.
@@ -155,10 +161,11 @@
   }
 
   /// Sets the non-blocking mode of the descriptor.
-  asio::error_code non_blocking(implementation_type& impl,
+  ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
       bool mode, asio::error_code& ec)
   {
-    return service_impl_.non_blocking(impl, mode, ec);
+    service_impl_.non_blocking(impl, mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the native descriptor implementation.
@@ -168,18 +175,20 @@
   }
 
   /// Sets the non-blocking mode of the native descriptor implementation.
-  asio::error_code native_non_blocking(implementation_type& impl,
+  ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
       bool mode, asio::error_code& ec)
   {
-    return service_impl_.native_non_blocking(impl, mode, ec);
+    service_impl_.native_non_blocking(impl, mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Wait for the descriptor to become ready to read, ready to write, or to
   /// have pending error conditions.
-  asio::error_code wait(implementation_type& impl,
+  ASIO_SYNC_OP_VOID wait(implementation_type& impl,
       descriptor_base::wait_type w, asio::error_code& ec)
   {
-    return service_impl_.wait(impl, w, ec);
+    service_impl_.wait(impl, w, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Asynchronously wait for the descriptor to become ready to read, ready to
@@ -193,7 +202,7 @@
     async_completion<WaitHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_wait(impl, w, init.handler);
+    service_impl_.async_wait(impl, w, init.completion_handler);
 
     return init.result.get();
   }
@@ -217,7 +226,7 @@
     asio::async_completion<WriteHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_write_some(impl, buffers, init.handler);
+    service_impl_.async_write_some(impl, buffers, init.completion_handler);
 
     return init.result.get();
   }
@@ -241,7 +250,7 @@
     asio::async_completion<ReadHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_read_some(impl, buffers, init.handler);
+    service_impl_.async_read_some(impl, buffers, init.completion_handler);
 
     return init.result.get();
   }
@@ -265,4 +274,6 @@
 #endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
        //   || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_POSIX_STREAM_DESCRIPTOR_SERVICE_HPP
diff --git a/asio/include/asio/post.hpp b/asio/include/asio/post.hpp
index bce879e..17625cb 100644
--- a/asio/include/asio/post.hpp
+++ b/asio/include/asio/post.hpp
@@ -2,7 +2,7 @@
 // post.hpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/raw_socket_service.hpp b/asio/include/asio/raw_socket_service.hpp
index d095e84..f8b183d 100644
--- a/asio/include/asio/raw_socket_service.hpp
+++ b/asio/include/asio/raw_socket_service.hpp
@@ -2,7 +2,7 @@
 // raw_socket_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,6 +16,9 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include <cstddef>
 #include "asio/async_result.hpp"
 #include "asio/detail/type_traits.hpp"
@@ -131,22 +134,23 @@
   }
 
   // Open a new raw socket implementation.
-  asio::error_code open(implementation_type& impl,
+  ASIO_SYNC_OP_VOID open(implementation_type& impl,
       const protocol_type& protocol, asio::error_code& ec)
   {
     if (protocol.type() == ASIO_OS_DEF(SOCK_RAW))
       service_impl_.open(impl, protocol, ec);
     else
       ec = asio::error::invalid_argument;
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Assign an existing native socket to a raw socket.
-  asio::error_code assign(implementation_type& impl,
+  ASIO_SYNC_OP_VOID assign(implementation_type& impl,
       const protocol_type& protocol, const native_handle_type& native_socket,
       asio::error_code& ec)
   {
-    return service_impl_.assign(impl, protocol, native_socket, ec);
+    service_impl_.assign(impl, protocol, native_socket, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the socket is open.
@@ -156,10 +160,11 @@
   }
 
   /// Close a raw socket implementation.
-  asio::error_code close(implementation_type& impl,
+  ASIO_SYNC_OP_VOID close(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.close(impl, ec);
+    service_impl_.close(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native socket implementation.
@@ -169,10 +174,11 @@
   }
 
   /// Cancel all asynchronous operations associated with the socket.
-  asio::error_code cancel(implementation_type& impl,
+  ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.cancel(impl, ec);
+    service_impl_.cancel(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the socket is at the out-of-band data mark.
@@ -190,17 +196,19 @@
   }
 
   // Bind the raw socket to the specified local endpoint.
-  asio::error_code bind(implementation_type& impl,
+  ASIO_SYNC_OP_VOID bind(implementation_type& impl,
       const endpoint_type& endpoint, asio::error_code& ec)
   {
-    return service_impl_.bind(impl, endpoint, ec);
+    service_impl_.bind(impl, endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Connect the raw socket to the specified endpoint.
-  asio::error_code connect(implementation_type& impl,
+  ASIO_SYNC_OP_VOID connect(implementation_type& impl,
       const endpoint_type& peer_endpoint, asio::error_code& ec)
   {
-    return service_impl_.connect(impl, peer_endpoint, ec);
+    service_impl_.connect(impl, peer_endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Start an asynchronous connect.
@@ -214,33 +222,36 @@
     async_completion<ConnectHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_connect(impl, peer_endpoint, init.handler);
+    service_impl_.async_connect(impl, peer_endpoint, init.completion_handler);
 
     return init.result.get();
   }
 
   /// Set a socket option.
   template <typename SettableSocketOption>
-  asio::error_code set_option(implementation_type& impl,
+  ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
       const SettableSocketOption& option, asio::error_code& ec)
   {
-    return service_impl_.set_option(impl, option, ec);
+    service_impl_.set_option(impl, option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get a socket option.
   template <typename GettableSocketOption>
-  asio::error_code get_option(const implementation_type& impl,
+  ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
       GettableSocketOption& option, asio::error_code& ec) const
   {
-    return service_impl_.get_option(impl, option, ec);
+    service_impl_.get_option(impl, option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Perform an IO control command on the socket.
   template <typename IoControlCommand>
-  asio::error_code io_control(implementation_type& impl,
+  ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
       IoControlCommand& command, asio::error_code& ec)
   {
-    return service_impl_.io_control(impl, command, ec);
+    service_impl_.io_control(impl, command, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the socket.
@@ -250,10 +261,11 @@
   }
 
   /// Sets the non-blocking mode of the socket.
-  asio::error_code non_blocking(implementation_type& impl,
+  ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
       bool mode, asio::error_code& ec)
   {
-    return service_impl_.non_blocking(impl, mode, ec);
+    service_impl_.non_blocking(impl, mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the native socket implementation.
@@ -263,10 +275,11 @@
   }
 
   /// Sets the non-blocking mode of the native socket implementation.
-  asio::error_code native_non_blocking(implementation_type& impl,
+  ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
       bool mode, asio::error_code& ec)
   {
-    return service_impl_.native_non_blocking(impl, mode, ec);
+    service_impl_.native_non_blocking(impl, mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the local endpoint.
@@ -284,18 +297,20 @@
   }
 
   /// Disable sends or receives on the socket.
-  asio::error_code shutdown(implementation_type& impl,
+  ASIO_SYNC_OP_VOID shutdown(implementation_type& impl,
       socket_base::shutdown_type what, asio::error_code& ec)
   {
-    return service_impl_.shutdown(impl, what, ec);
+    service_impl_.shutdown(impl, what, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Wait for the socket to become ready to read, ready to write, or to have
   /// pending error conditions.
-  asio::error_code wait(implementation_type& impl,
+  ASIO_SYNC_OP_VOID wait(implementation_type& impl,
       socket_base::wait_type w, asio::error_code& ec)
   {
-    return service_impl_.wait(impl, w, ec);
+    service_impl_.wait(impl, w, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Asynchronously wait for the socket to become ready to read, ready to
@@ -309,7 +324,7 @@
     async_completion<WaitHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_wait(impl, w, init.handler);
+    service_impl_.async_wait(impl, w, init.completion_handler);
 
     return init.result.get();
   }
@@ -334,7 +349,7 @@
     async_completion<WriteHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_send(impl, buffers, flags, init.handler);
+    service_impl_.async_send(impl, buffers, flags, init.completion_handler);
 
     return init.result.get();
   }
@@ -361,7 +376,7 @@
       void (asio::error_code, std::size_t)> init(handler);
 
     service_impl_.async_send_to(impl, buffers,
-        destination, flags, init.handler);
+        destination, flags, init.completion_handler);
 
     return init.result.get();
   }
@@ -387,7 +402,7 @@
     async_completion<ReadHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_receive(impl, buffers, flags, init.handler);
+    service_impl_.async_receive(impl, buffers, flags, init.completion_handler);
 
     return init.result.get();
   }
@@ -415,7 +430,7 @@
       void (asio::error_code, std::size_t)> init(handler);
 
     service_impl_.async_receive_from(impl, buffers,
-        sender_endpoint, flags, init.handler);
+        sender_endpoint, flags, init.completion_handler);
 
     return init.result.get();
   }
@@ -435,4 +450,6 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_RAW_SOCKET_SERVICE_HPP
diff --git a/asio/include/asio/read.hpp b/asio/include/asio/read.hpp
index 5ee26d3..4839934 100644
--- a/asio/include/asio/read.hpp
+++ b/asio/include/asio/read.hpp
@@ -2,7 +2,7 @@
 // read.hpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,10 +18,13 @@
 #include "asio/detail/config.hpp"
 #include <cstddef>
 #include "asio/async_result.hpp"
-#include "asio/basic_streambuf_fwd.hpp"
 #include "asio/buffer.hpp"
 #include "asio/error.hpp"
 
+#if !defined(ASIO_NO_EXTENSIONS)
+# include "asio/basic_streambuf_fwd.hpp"
+#endif // !defined(ASIO_NO_EXTENSIONS)
+
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
@@ -247,11 +250,11 @@
  *     s, buffers,
  *     asio::transfer_all()); @endcode
  */
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 std::size_t read(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type* = 0);
 
 /// Attempt to read a certain amount of data from a stream before returning.
@@ -280,12 +283,12 @@
  *     s, buffers,
  *     asio::transfer_all(), ec); @endcode
  */
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 std::size_t read(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     asio::error_code& ec,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type* = 0);
 
 /// Attempt to read a certain amount of data from a stream before returning.
@@ -324,13 +327,13 @@
  *
  * @throws asio::system_error Thrown on failure.
  */
-template <typename SyncReadStream, typename DynamicBufferSequence,
+template <typename SyncReadStream, typename DynamicBuffer,
     typename CompletionCondition>
 std::size_t read(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     CompletionCondition completion_condition,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type* = 0);
 
 /// Attempt to read a certain amount of data from a stream before returning.
@@ -370,15 +373,16 @@
  * @returns The number of bytes read. If an error occurs, returns the total
  * number of bytes successfully transferred prior to the error.
  */
-template <typename SyncReadStream, typename DynamicBufferSequence,
+template <typename SyncReadStream, typename DynamicBuffer,
     typename CompletionCondition>
 std::size_t read(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     CompletionCondition completion_condition, asio::error_code& ec,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type* = 0);
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 /// Attempt to read a certain amount of data from a stream before returning.
@@ -522,6 +526,7 @@
     CompletionCondition completion_condition, asio::error_code& ec);
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 /*@}*/
 /**
@@ -727,14 +732,14 @@
  *     handler); @endcode
  */
 template <typename AsyncReadStream,
-    typename DynamicBufferSequence, typename ReadHandler>
+    typename DynamicBuffer, typename ReadHandler>
 ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read(AsyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     ASIO_MOVE_ARG(ReadHandler) handler,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type* = 0);
 
 /// Start an asynchronous operation to read a certain amount of data from a
@@ -795,18 +800,19 @@
  * the handler will be performed in a manner equivalent to using
  * asio::io_context::post().
  */
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename CompletionCondition, typename ReadHandler>
 ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read(AsyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     CompletionCondition completion_condition,
     ASIO_MOVE_ARG(ReadHandler) handler,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type* = 0);
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 /// Start an asynchronous operation to read a certain amount of data from a
@@ -928,6 +934,7 @@
     ASIO_MOVE_ARG(ReadHandler) handler);
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 /*@}*/
 
diff --git a/asio/include/asio/read_at.hpp b/asio/include/asio/read_at.hpp
index 694c034..16e6af1 100644
--- a/asio/include/asio/read_at.hpp
+++ b/asio/include/asio/read_at.hpp
@@ -2,7 +2,7 @@
 // read_at.hpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,10 +18,13 @@
 #include "asio/detail/config.hpp"
 #include <cstddef>
 #include "asio/async_result.hpp"
-#include "asio/basic_streambuf_fwd.hpp"
 #include "asio/detail/cstdint.hpp"
 #include "asio/error.hpp"
 
+#if !defined(ASIO_NO_EXTENSIONS)
+# include "asio/basic_streambuf_fwd.hpp"
+#endif // !defined(ASIO_NO_EXTENSIONS)
+
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
@@ -229,6 +232,7 @@
     uint64_t offset, const MutableBufferSequence& buffers,
     CompletionCondition completion_condition, asio::error_code& ec);
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 /// Attempt to read a certain amount of data at the specified offset before
@@ -384,6 +388,7 @@
     CompletionCondition completion_condition, asio::error_code& ec);
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 /*@}*/
 /**
@@ -535,6 +540,7 @@
     CompletionCondition completion_condition,
     ASIO_MOVE_ARG(ReadHandler) handler);
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 /// Start an asynchronous operation to read a certain amount of data at the
@@ -652,6 +658,7 @@
     ASIO_MOVE_ARG(ReadHandler) handler);
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 /*@}*/
 
diff --git a/asio/include/asio/read_until.hpp b/asio/include/asio/read_until.hpp
index c3b07ce..93bf96b 100644
--- a/asio/include/asio/read_until.hpp
+++ b/asio/include/asio/read_until.hpp
@@ -2,7 +2,7 @@
 // read_until.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,15 +16,18 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
-
 #include <cstddef>
 #include <string>
 #include "asio/async_result.hpp"
-#include "asio/basic_streambuf_fwd.hpp"
 #include "asio/detail/regex_fwd.hpp"
+#include "asio/detail/string_view.hpp"
 #include "asio/detail/type_traits.hpp"
 #include "asio/error.hpp"
 
+#if !defined(ASIO_NO_EXTENSIONS)
+# include "asio/basic_streambuf_fwd.hpp"
+#endif // !defined(ASIO_NO_EXTENSIONS)
+
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
@@ -123,9 +126,9 @@
  * This data may be the start of a new line, to be extracted by a subsequent
  * @c read_until operation.
  */
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers, char delim);
+    ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim);
 
 /// Read data into a dynamic buffer sequence until it contains a specified
 /// delimiter.
@@ -161,9 +164,9 @@
  * typically leave that data in the dynamic buffer sequence for a subsequent
  * read_until operation to examine.
  */
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     char delim, asio::error_code& ec);
 
 /// Read data into a dynamic buffer sequence until it contains a specified
@@ -217,11 +220,10 @@
  * This data may be the start of a new line, to be extracted by a subsequent
  * @c read_until operation.
  */
-template <typename SyncReadStream,
-    typename DynamicBufferSequence, typename Allocator>
+template <typename SyncReadStream, typename DynamicBuffer>
 std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
-    const std::basic_string<char, std::char_traits<char>, Allocator>& delim);
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
+    ASIO_STRING_VIEW_PARAM delim);
 
 /// Read data into a dynamic buffer sequence until it contains a specified
 /// delimiter.
@@ -257,13 +259,13 @@
  * typically leave that data in the dynamic buffer sequence for a subsequent
  * read_until operation to examine.
  */
-template <typename SyncReadStream,
-    typename DynamicBufferSequence, typename Allocator>
+template <typename SyncReadStream, typename DynamicBuffer>
 std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
-    const std::basic_string<char, std::char_traits<char>, Allocator>& delim,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
+    ASIO_STRING_VIEW_PARAM delim,
     asio::error_code& ec);
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if defined(ASIO_HAS_BOOST_REGEX) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -321,9 +323,9 @@
  * This data may be the start of a new line, to be extracted by a subsequent
  * @c read_until operation.
  */
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     const boost::regex& expr);
 
 /// Read data into a dynamic buffer sequence until some part of the data it
@@ -362,9 +364,9 @@
  * expression. An application will typically leave that data in the dynamic
  * buffer sequence for a subsequent read_until operation to examine.
  */
-template <typename SyncReadStream, typename DynamicBufferSequence>
+template <typename SyncReadStream, typename DynamicBuffer>
 std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     const boost::regex& expr, asio::error_code& ec);
 
 #endif // defined(ASIO_HAS_BOOST_REGEX)
@@ -398,7 +400,7 @@
  * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
  * @endcode
  * where @c iterator represents the type:
- * @code buffers_iterator<typename DynamicBufferSequence::const_buffers_type>
+ * @code buffers_iterator<typename DynamicBuffer::const_buffers_type>
  * @endcode
  * The iterator parameters @c begin and @c end define the range of bytes to be
  * scanned to determine whether there is a match. The @c first member of the
@@ -408,7 +410,7 @@
  * @c second member of the return value is true if a match has been found, false
  * otherwise.
  *
- * @returns The number of bytes in the dynamic_buffer_sequence's get area that
+ * @returns The number of bytes in the dynamic_buffer's get area that
  * have been fully consumed by the match function.
  *
  * @throws asio::system_error Thrown on failure.
@@ -473,9 +475,9 @@
  * @endcode
  */
 template <typename SyncReadStream,
-    typename DynamicBufferSequence, typename MatchCondition>
+    typename DynamicBuffer, typename MatchCondition>
 std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     MatchCondition match_condition,
     typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
 
@@ -506,7 +508,7 @@
  * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
  * @endcode
  * where @c iterator represents the type:
- * @code buffers_iterator<DynamicBufferSequence::const_buffers_type>
+ * @code buffers_iterator<DynamicBuffer::const_buffers_type>
  * @endcode
  * The iterator parameters @c begin and @c end define the range of bytes to be
  * scanned to determine whether there is a match. The @c first member of the
@@ -533,9 +535,9 @@
  * function objects.
  */
 template <typename SyncReadStream,
-    typename DynamicBufferSequence, typename MatchCondition>
+    typename DynamicBuffer, typename MatchCondition>
 std::size_t read_until(SyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     MatchCondition match_condition, asio::error_code& ec,
     typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
 
@@ -678,7 +680,8 @@
  */
 template <typename SyncReadStream, typename Allocator>
 std::size_t read_until(SyncReadStream& s,
-    asio::basic_streambuf<Allocator>& b, const std::string& delim);
+    asio::basic_streambuf<Allocator>& b,
+    ASIO_STRING_VIEW_PARAM delim);
 
 /// Read data into a streambuf until it contains a specified delimiter.
 /**
@@ -712,8 +715,8 @@
  */
 template <typename SyncReadStream, typename Allocator>
 std::size_t read_until(SyncReadStream& s,
-    asio::basic_streambuf<Allocator>& b, const std::string& delim,
-    asio::error_code& ec);
+    asio::basic_streambuf<Allocator>& b,
+    ASIO_STRING_VIEW_PARAM delim, asio::error_code& ec);
 
 #if defined(ASIO_HAS_BOOST_REGEX) \
   || defined(GENERATING_DOCUMENTATION)
@@ -976,6 +979,7 @@
     typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 /*@}*/
 /**
@@ -1070,11 +1074,11 @@
  * @c async_read_until operation.
  */
 template <typename AsyncReadStream,
-    typename DynamicBufferSequence, typename ReadHandler>
+    typename DynamicBuffer, typename ReadHandler>
 ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read_until(AsyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     char delim, ASIO_MOVE_ARG(ReadHandler) handler);
 
 /// Start an asynchronous operation to read data into a dynamic buffer sequence
@@ -1160,14 +1164,15 @@
  * @c async_read_until operation.
  */
 template <typename AsyncReadStream,
-    typename DynamicBufferSequence, typename ReadHandler>
+    typename DynamicBuffer, typename ReadHandler>
 ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read_until(AsyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
-    const std::string& delim,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
+    ASIO_STRING_VIEW_PARAM delim,
     ASIO_MOVE_ARG(ReadHandler) handler);
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if defined(ASIO_HAS_BOOST_REGEX) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -1257,11 +1262,11 @@
  * @c async_read_until operation.
  */
 template <typename AsyncReadStream,
-    typename DynamicBufferSequence, typename ReadHandler>
+    typename DynamicBuffer, typename ReadHandler>
 ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read_until(AsyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     const boost::regex& expr,
     ASIO_MOVE_ARG(ReadHandler) handler);
 
@@ -1304,7 +1309,7 @@
  * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
  * @endcode
  * where @c iterator represents the type:
- * @code buffers_iterator<typename DynamicBufferSequence::const_buffers_type>
+ * @code buffers_iterator<typename DynamicBuffer::const_buffers_type>
  * @endcode
  * The iterator parameters @c begin and @c end define the range of bytes to be
  * scanned to determine whether there is a match. The @c first member of the
@@ -1396,12 +1401,12 @@
  * asio::async_read_until(s, data, match_char('a'), handler);
  * @endcode
  */
-template <typename AsyncReadStream, typename DynamicBufferSequence,
+template <typename AsyncReadStream, typename DynamicBuffer,
     typename MatchCondition, typename ReadHandler>
 ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read_until(AsyncReadStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler,
     typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
 
@@ -1574,7 +1579,8 @@
 ASIO_INITFN_RESULT_TYPE(ReadHandler,
     void (asio::error_code, std::size_t))
 async_read_until(AsyncReadStream& s,
-    asio::basic_streambuf<Allocator>& b, const std::string& delim,
+    asio::basic_streambuf<Allocator>& b,
+    ASIO_STRING_VIEW_PARAM delim,
     ASIO_MOVE_ARG(ReadHandler) handler);
 
 #if defined(ASIO_HAS_BOOST_REGEX) \
@@ -1805,6 +1811,7 @@
     typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 /*@}*/
 
diff --git a/asio/include/asio/seq_packet_socket_service.hpp b/asio/include/asio/seq_packet_socket_service.hpp
index 7b9ff4f..d517eeb 100644
--- a/asio/include/asio/seq_packet_socket_service.hpp
+++ b/asio/include/asio/seq_packet_socket_service.hpp
@@ -2,7 +2,7 @@
 // seq_packet_socket_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,6 +16,9 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include <cstddef>
 #include "asio/async_result.hpp"
 #include "asio/detail/type_traits.hpp"
@@ -133,22 +136,23 @@
   }
 
   /// Open a sequenced packet socket.
-  asio::error_code open(implementation_type& impl,
+  ASIO_SYNC_OP_VOID open(implementation_type& impl,
       const protocol_type& protocol, asio::error_code& ec)
   {
     if (protocol.type() == ASIO_OS_DEF(SOCK_SEQPACKET))
       service_impl_.open(impl, protocol, ec);
     else
       ec = asio::error::invalid_argument;
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Assign an existing native socket to a sequenced packet socket.
-  asio::error_code assign(implementation_type& impl,
+  ASIO_SYNC_OP_VOID assign(implementation_type& impl,
       const protocol_type& protocol, const native_handle_type& native_socket,
       asio::error_code& ec)
   {
-    return service_impl_.assign(impl, protocol, native_socket, ec);
+    service_impl_.assign(impl, protocol, native_socket, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the socket is open.
@@ -158,10 +162,11 @@
   }
 
   /// Close a sequenced packet socket implementation.
-  asio::error_code close(implementation_type& impl,
+  ASIO_SYNC_OP_VOID close(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.close(impl, ec);
+    service_impl_.close(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native socket implementation.
@@ -171,10 +176,11 @@
   }
 
   /// Cancel all asynchronous operations associated with the socket.
-  asio::error_code cancel(implementation_type& impl,
+  ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.cancel(impl, ec);
+    service_impl_.cancel(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the socket is at the out-of-band data mark.
@@ -192,17 +198,19 @@
   }
 
   /// Bind the sequenced packet socket to the specified local endpoint.
-  asio::error_code bind(implementation_type& impl,
+  ASIO_SYNC_OP_VOID bind(implementation_type& impl,
       const endpoint_type& endpoint, asio::error_code& ec)
   {
-    return service_impl_.bind(impl, endpoint, ec);
+    service_impl_.bind(impl, endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Connect the sequenced packet socket to the specified endpoint.
-  asio::error_code connect(implementation_type& impl,
+  ASIO_SYNC_OP_VOID connect(implementation_type& impl,
       const endpoint_type& peer_endpoint, asio::error_code& ec)
   {
-    return service_impl_.connect(impl, peer_endpoint, ec);
+    service_impl_.connect(impl, peer_endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Start an asynchronous connect.
@@ -216,33 +224,36 @@
     async_completion<ConnectHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_connect(impl, peer_endpoint, init.handler);
+    service_impl_.async_connect(impl, peer_endpoint, init.completion_handler);
 
     return init.result.get();
   }
 
   /// Set a socket option.
   template <typename SettableSocketOption>
-  asio::error_code set_option(implementation_type& impl,
+  ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
       const SettableSocketOption& option, asio::error_code& ec)
   {
-    return service_impl_.set_option(impl, option, ec);
+    service_impl_.set_option(impl, option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get a socket option.
   template <typename GettableSocketOption>
-  asio::error_code get_option(const implementation_type& impl,
+  ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
       GettableSocketOption& option, asio::error_code& ec) const
   {
-    return service_impl_.get_option(impl, option, ec);
+    service_impl_.get_option(impl, option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Perform an IO control command on the socket.
   template <typename IoControlCommand>
-  asio::error_code io_control(implementation_type& impl,
+  ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
       IoControlCommand& command, asio::error_code& ec)
   {
-    return service_impl_.io_control(impl, command, ec);
+    service_impl_.io_control(impl, command, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the socket.
@@ -252,10 +263,11 @@
   }
 
   /// Sets the non-blocking mode of the socket.
-  asio::error_code non_blocking(implementation_type& impl,
+  ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
       bool mode, asio::error_code& ec)
   {
-    return service_impl_.non_blocking(impl, mode, ec);
+    service_impl_.non_blocking(impl, mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the native socket implementation.
@@ -265,10 +277,11 @@
   }
 
   /// Sets the non-blocking mode of the native socket implementation.
-  asio::error_code native_non_blocking(implementation_type& impl,
+  ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
       bool mode, asio::error_code& ec)
   {
-    return service_impl_.native_non_blocking(impl, mode, ec);
+    service_impl_.native_non_blocking(impl, mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the local endpoint.
@@ -286,18 +299,20 @@
   }
 
   /// Disable sends or receives on the socket.
-  asio::error_code shutdown(implementation_type& impl,
+  ASIO_SYNC_OP_VOID shutdown(implementation_type& impl,
       socket_base::shutdown_type what, asio::error_code& ec)
   {
-    return service_impl_.shutdown(impl, what, ec);
+    service_impl_.shutdown(impl, what, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Wait for the socket to become ready to read, ready to write, or to have
   /// pending error conditions.
-  asio::error_code wait(implementation_type& impl,
+  ASIO_SYNC_OP_VOID wait(implementation_type& impl,
       socket_base::wait_type w, asio::error_code& ec)
   {
-    return service_impl_.wait(impl, w, ec);
+    service_impl_.wait(impl, w, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Asynchronously wait for the socket to become ready to read, ready to
@@ -311,7 +326,7 @@
     async_completion<WaitHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_wait(impl, w, init.handler);
+    service_impl_.async_wait(impl, w, init.completion_handler);
 
     return init.result.get();
   }
@@ -337,7 +352,7 @@
     async_completion<WriteHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_send(impl, buffers, flags, init.handler);
+    service_impl_.async_send(impl, buffers, flags, init.completion_handler);
 
     return init.result.get();
   }
@@ -365,7 +380,7 @@
       void (asio::error_code, std::size_t)> init(handler);
 
     service_impl_.async_receive_with_flags(impl,
-        buffers, in_flags, out_flags, init.handler);
+        buffers, in_flags, out_flags, init.completion_handler);
 
     return init.result.get();
   }
@@ -385,4 +400,6 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_SEQ_PACKET_SOCKET_SERVICE_HPP
diff --git a/asio/include/asio/serial_port.hpp b/asio/include/asio/serial_port.hpp
index f5ac715..4455a0a 100644
--- a/asio/include/asio/serial_port.hpp
+++ b/asio/include/asio/serial_port.hpp
@@ -2,7 +2,7 @@
 // serial_port.hpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -21,15 +21,748 @@
 #if defined(ASIO_HAS_SERIAL_PORT) \
   || defined(GENERATING_DOCUMENTATION)
 
-#include "asio/basic_serial_port.hpp"
+#include <string>
+#include "asio/async_result.hpp"
+#include "asio/basic_io_object.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/error.hpp"
+#include "asio/io_context.hpp"
+#include "asio/serial_port_base.hpp"
+
+#if defined(ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(ASIO_HAS_MOVE)
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/basic_serial_port.hpp"
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+# if defined(ASIO_HAS_IOCP)
+#  include "asio/detail/win_iocp_serial_port_service.hpp"
+#  define ASIO_SVC_T detail::win_iocp_serial_port_service
+# else
+#  include "asio/detail/reactive_serial_port_service.hpp"
+#  define ASIO_SVC_T detail::reactive_serial_port_service
+# endif
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
+#include "asio/detail/push_options.hpp"
 
 namespace asio {
 
-/// Typedef for the typical usage of a serial port.
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+// Typedef for the typical usage of a serial port.
 typedef basic_serial_port<> serial_port;
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+/// Provides serial port functionality.
+/**
+ * The serial_port class provides a wrapper over serial port functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class serial_port
+  : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>,
+    public serial_port_base
+{
+public:
+  /// The type of the executor associated with the object.
+  typedef io_context::executor_type executor_type;
+
+  /// The native representation of a serial port.
+#if defined(GENERATING_DOCUMENTATION)
+  typedef implementation_defined native_handle_type;
+#else
+  typedef ASIO_SVC_T::native_handle_type native_handle_type;
+#endif
+
+  /// A basic_serial_port is always the lowest layer.
+  typedef serial_port lowest_layer_type;
+
+  /// Construct a serial_port without opening it.
+  /**
+   * This constructor creates a serial port without opening it.
+   *
+   * @param io_context The io_context object that the serial port will use to
+   * dispatch handlers for any asynchronous operations performed on the port.
+   */
+  explicit serial_port(asio::io_context& io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
+  {
+  }
+
+  /// Construct and open a serial_port.
+  /**
+   * This constructor creates and opens a serial port for the specified device
+   * name.
+   *
+   * @param io_context The io_context object that the serial port will use to
+   * dispatch handlers for any asynchronous operations performed on the port.
+   *
+   * @param device The platform-specific device name for this serial
+   * port.
+   */
+  explicit serial_port(asio::io_context& io_context,
+      const char* device)
+    : basic_io_object<ASIO_SVC_T>(io_context)
+  {
+    asio::error_code ec;
+    this->get_service().open(this->get_implementation(), device, ec);
+    asio::detail::throw_error(ec, "open");
+  }
+
+  /// Construct and open a serial_port.
+  /**
+   * This constructor creates and opens a serial port for the specified device
+   * name.
+   *
+   * @param io_context The io_context object that the serial port will use to
+   * dispatch handlers for any asynchronous operations performed on the port.
+   *
+   * @param device The platform-specific device name for this serial
+   * port.
+   */
+  explicit serial_port(asio::io_context& io_context,
+      const std::string& device)
+    : basic_io_object<ASIO_SVC_T>(io_context)
+  {
+    asio::error_code ec;
+    this->get_service().open(this->get_implementation(), device, ec);
+    asio::detail::throw_error(ec, "open");
+  }
+
+  /// Construct a serial_port on an existing native serial port.
+  /**
+   * This constructor creates a serial port object to hold an existing native
+   * serial port.
+   *
+   * @param io_context The io_context object that the serial port will use to
+   * dispatch handlers for any asynchronous operations performed on the port.
+   *
+   * @param native_serial_port A native serial port.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  serial_port(asio::io_context& io_context,
+      const native_handle_type& native_serial_port)
+    : basic_io_object<ASIO_SVC_T>(io_context)
+  {
+    asio::error_code ec;
+    this->get_service().assign(this->get_implementation(),
+        native_serial_port, ec);
+    asio::detail::throw_error(ec, "assign");
+  }
+
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+  /// Move-construct a serial_port from another.
+  /**
+   * This constructor moves a serial port from one object to another.
+   *
+   * @param other The other serial_port object from which the move will
+   * occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c serial_port(io_context&) constructor.
+   */
+  serial_port(serial_port&& other)
+    : basic_io_object<ASIO_SVC_T>(std::move(other))
+  {
+  }
+
+  /// Move-assign a serial_port from another.
+  /**
+   * This assignment operator moves a serial port from one object to another.
+   *
+   * @param other The other serial_port object from which the move will
+   * occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c serial_port(io_context&) constructor.
+   */
+  serial_port& operator=(serial_port&& other)
+  {
+    basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+  /// Destroys the serial port.
+  /**
+   * This function destroys the serial port, cancelling any outstanding
+   * asynchronous wait operations associated with the serial port as if by
+   * calling @c cancel.
+   */
+  ~serial_port()
+  {
+  }
+
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_context()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_context();
+  }
+
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_service()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_service();
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+  /// Get the executor associated with the object.
+  executor_type get_executor() ASIO_NOEXCEPT
+  {
+    return basic_io_object<ASIO_SVC_T>::get_executor();
+  }
+
+  /// Get a reference to the lowest layer.
+  /**
+   * This function returns a reference to the lowest layer in a stack of
+   * layers. Since a serial_port cannot contain any further layers, it simply
+   * returns a reference to itself.
+   *
+   * @return A reference to the lowest layer in the stack of layers. Ownership
+   * is not transferred to the caller.
+   */
+  lowest_layer_type& lowest_layer()
+  {
+    return *this;
+  }
+
+  /// Get a const reference to the lowest layer.
+  /**
+   * This function returns a const reference to the lowest layer in a stack of
+   * layers. Since a serial_port cannot contain any further layers, it simply
+   * returns a reference to itself.
+   *
+   * @return A const reference to the lowest layer in the stack of layers.
+   * Ownership is not transferred to the caller.
+   */
+  const lowest_layer_type& lowest_layer() const
+  {
+    return *this;
+  }
+
+  /// Open the serial port using the specified device name.
+  /**
+   * This function opens the serial port for the specified device name.
+   *
+   * @param device The platform-specific device name.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void open(const std::string& device)
+  {
+    asio::error_code ec;
+    this->get_service().open(this->get_implementation(), device, ec);
+    asio::detail::throw_error(ec, "open");
+  }
+
+  /// Open the serial port using the specified device name.
+  /**
+   * This function opens the serial port using the given platform-specific
+   * device name.
+   *
+   * @param device The platform-specific device name.
+   *
+   * @param ec Set the indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID open(const std::string& device,
+      asio::error_code& ec)
+  {
+    this->get_service().open(this->get_implementation(), device, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Assign an existing native serial port to the serial port.
+  /*
+   * This function opens the serial port to hold an existing native serial port.
+   *
+   * @param native_serial_port A native serial port.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void assign(const native_handle_type& native_serial_port)
+  {
+    asio::error_code ec;
+    this->get_service().assign(this->get_implementation(),
+        native_serial_port, ec);
+    asio::detail::throw_error(ec, "assign");
+  }
+
+  /// Assign an existing native serial port to the serial port.
+  /*
+   * This function opens the serial port to hold an existing native serial port.
+   *
+   * @param native_serial_port A native serial port.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID assign(const native_handle_type& native_serial_port,
+      asio::error_code& ec)
+  {
+    this->get_service().assign(this->get_implementation(),
+        native_serial_port, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Determine whether the serial port is open.
+  bool is_open() const
+  {
+    return this->get_service().is_open(this->get_implementation());
+  }
+
+  /// Close the serial port.
+  /**
+   * This function is used to close the serial port. Any asynchronous read or
+   * write operations will be cancelled immediately, and will complete with the
+   * asio::error::operation_aborted error.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void close()
+  {
+    asio::error_code ec;
+    this->get_service().close(this->get_implementation(), ec);
+    asio::detail::throw_error(ec, "close");
+  }
+
+  /// Close the serial port.
+  /**
+   * This function is used to close the serial port. Any asynchronous read or
+   * write operations will be cancelled immediately, and will complete with the
+   * asio::error::operation_aborted error.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID close(asio::error_code& ec)
+  {
+    this->get_service().close(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Get the native serial port representation.
+  /**
+   * This function may be used to obtain the underlying representation of the
+   * serial port. This is intended to allow access to native serial port
+   * functionality that is not otherwise provided.
+   */
+  native_handle_type native_handle()
+  {
+    return this->get_service().native_handle(this->get_implementation());
+  }
+
+  /// Cancel all asynchronous operations associated with the serial port.
+  /**
+   * This function causes all outstanding asynchronous read or write operations
+   * to finish immediately, and the handlers for cancelled operations will be
+   * passed the asio::error::operation_aborted error.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void cancel()
+  {
+    asio::error_code ec;
+    this->get_service().cancel(this->get_implementation(), ec);
+    asio::detail::throw_error(ec, "cancel");
+  }
+
+  /// Cancel all asynchronous operations associated with the serial port.
+  /**
+   * This function causes all outstanding asynchronous read or write operations
+   * to finish immediately, and the handlers for cancelled operations will be
+   * passed the asio::error::operation_aborted error.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+  {
+    this->get_service().cancel(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Send a break sequence to the serial port.
+  /**
+   * This function causes a break sequence of platform-specific duration to be
+   * sent out the serial port.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void send_break()
+  {
+    asio::error_code ec;
+    this->get_service().send_break(this->get_implementation(), ec);
+    asio::detail::throw_error(ec, "send_break");
+  }
+
+  /// Send a break sequence to the serial port.
+  /**
+   * This function causes a break sequence of platform-specific duration to be
+   * sent out the serial port.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID send_break(asio::error_code& ec)
+  {
+    this->get_service().send_break(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Set an option on the serial port.
+  /**
+   * This function is used to set an option on the serial port.
+   *
+   * @param option The option value to be set on the serial port.
+   *
+   * @throws asio::system_error Thrown on failure.
+   *
+   * @sa SettableSerialPortOption @n
+   * asio::serial_port_base::baud_rate @n
+   * asio::serial_port_base::flow_control @n
+   * asio::serial_port_base::parity @n
+   * asio::serial_port_base::stop_bits @n
+   * asio::serial_port_base::character_size
+   */
+  template <typename SettableSerialPortOption>
+  void set_option(const SettableSerialPortOption& option)
+  {
+    asio::error_code ec;
+    this->get_service().set_option(this->get_implementation(), option, ec);
+    asio::detail::throw_error(ec, "set_option");
+  }
+
+  /// Set an option on the serial port.
+  /**
+   * This function is used to set an option on the serial port.
+   *
+   * @param option The option value to be set on the serial port.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @sa SettableSerialPortOption @n
+   * asio::serial_port_base::baud_rate @n
+   * asio::serial_port_base::flow_control @n
+   * asio::serial_port_base::parity @n
+   * asio::serial_port_base::stop_bits @n
+   * asio::serial_port_base::character_size
+   */
+  template <typename SettableSerialPortOption>
+  ASIO_SYNC_OP_VOID set_option(const SettableSerialPortOption& option,
+      asio::error_code& ec)
+  {
+    this->get_service().set_option(this->get_implementation(), option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Get an option from the serial port.
+  /**
+   * This function is used to get the current value of an option on the serial
+   * port.
+   *
+   * @param option The option value to be obtained from the serial port.
+   *
+   * @throws asio::system_error Thrown on failure.
+   *
+   * @sa GettableSerialPortOption @n
+   * asio::serial_port_base::baud_rate @n
+   * asio::serial_port_base::flow_control @n
+   * asio::serial_port_base::parity @n
+   * asio::serial_port_base::stop_bits @n
+   * asio::serial_port_base::character_size
+   */
+  template <typename GettableSerialPortOption>
+  void get_option(GettableSerialPortOption& option)
+  {
+    asio::error_code ec;
+    this->get_service().get_option(this->get_implementation(), option, ec);
+    asio::detail::throw_error(ec, "get_option");
+  }
+
+  /// Get an option from the serial port.
+  /**
+   * This function is used to get the current value of an option on the serial
+   * port.
+   *
+   * @param option The option value to be obtained from the serial port.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @sa GettableSerialPortOption @n
+   * asio::serial_port_base::baud_rate @n
+   * asio::serial_port_base::flow_control @n
+   * asio::serial_port_base::parity @n
+   * asio::serial_port_base::stop_bits @n
+   * asio::serial_port_base::character_size
+   */
+  template <typename GettableSerialPortOption>
+  ASIO_SYNC_OP_VOID get_option(GettableSerialPortOption& option,
+      asio::error_code& ec)
+  {
+    this->get_service().get_option(this->get_implementation(), option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Write some data to the serial port.
+  /**
+   * This function is used to write data to the serial port. The function call
+   * will block until one or more bytes of the data has been written
+   * successfully, or until an error occurs.
+   *
+   * @param buffers One or more data buffers to be written to the serial port.
+   *
+   * @returns The number of bytes written.
+   *
+   * @throws asio::system_error Thrown on failure. An error code of
+   * asio::error::eof indicates that the connection was closed by the
+   * peer.
+   *
+   * @note The write_some operation may not transmit all of the data to the
+   * peer. Consider using the @ref write function if you need to ensure that
+   * all data is written before the blocking operation completes.
+   *
+   * @par Example
+   * To write a single data buffer use the @ref buffer function as follows:
+   * @code
+   * serial_port.write_some(asio::buffer(data, size));
+   * @endcode
+   * See the @ref buffer documentation for information on writing multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename ConstBufferSequence>
+  std::size_t write_some(const ConstBufferSequence& buffers)
+  {
+    asio::error_code ec;
+    std::size_t s = this->get_service().write_some(
+        this->get_implementation(), buffers, ec);
+    asio::detail::throw_error(ec, "write_some");
+    return s;
+  }
+
+  /// Write some data to the serial port.
+  /**
+   * This function is used to write data to the serial port. The function call
+   * will block until one or more bytes of the data has been written
+   * successfully, or until an error occurs.
+   *
+   * @param buffers One or more data buffers to be written to the serial port.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @returns The number of bytes written. Returns 0 if an error occurred.
+   *
+   * @note The write_some operation may not transmit all of the data to the
+   * peer. Consider using the @ref write function if you need to ensure that
+   * all data is written before the blocking operation completes.
+   */
+  template <typename ConstBufferSequence>
+  std::size_t write_some(const ConstBufferSequence& buffers,
+      asio::error_code& ec)
+  {
+    return this->get_service().write_some(
+        this->get_implementation(), buffers, ec);
+  }
+
+  /// Start an asynchronous write.
+  /**
+   * This function is used to asynchronously write data to the serial port.
+   * The function call always returns immediately.
+   *
+   * @param buffers One or more data buffers to be written to the serial port.
+   * Although the buffers object may be copied as necessary, ownership of the
+   * underlying memory blocks is retained by the caller, which must guarantee
+   * that they remain valid until the handler is called.
+   *
+   * @param handler The handler to be called when the write operation completes.
+   * Copies will be made of the handler as required. The function signature of
+   * the handler must be:
+   * @code void handler(
+   *   const asio::error_code& error, // Result of operation.
+   *   std::size_t bytes_transferred           // Number of bytes written.
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_context::post().
+   *
+   * @note The write operation may not transmit all of the data to the peer.
+   * Consider using the @ref async_write function if you need to ensure that all
+   * data is written before the asynchronous operation completes.
+   *
+   * @par Example
+   * To write a single data buffer use the @ref buffer function as follows:
+   * @code
+   * serial_port.async_write_some(asio::buffer(data, size), handler);
+   * @endcode
+   * See the @ref buffer documentation for information on writing multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename ConstBufferSequence, typename WriteHandler>
+  ASIO_INITFN_RESULT_TYPE(WriteHandler,
+      void (asio::error_code, std::size_t))
+  async_write_some(const ConstBufferSequence& buffers,
+      ASIO_MOVE_ARG(WriteHandler) handler)
+  {
+    // If you get an error on the following line it means that your handler does
+    // not meet the documented type requirements for a WriteHandler.
+    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+    async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_write_some(
+        this->get_implementation(), buffers, init.completion_handler);
+
+    return init.result.get();
+  }
+
+  /// Read some data from the serial port.
+  /**
+   * This function is used to read data from the serial port. The function
+   * call will block until one or more bytes of data has been read successfully,
+   * or until an error occurs.
+   *
+   * @param buffers One or more buffers into which the data will be read.
+   *
+   * @returns The number of bytes read.
+   *
+   * @throws asio::system_error Thrown on failure. An error code of
+   * asio::error::eof indicates that the connection was closed by the
+   * peer.
+   *
+   * @note The read_some operation may not read all of the requested number of
+   * bytes. Consider using the @ref read function if you need to ensure that
+   * the requested amount of data is read before the blocking operation
+   * completes.
+   *
+   * @par Example
+   * To read into a single data buffer use the @ref buffer function as follows:
+   * @code
+   * serial_port.read_some(asio::buffer(data, size));
+   * @endcode
+   * See the @ref buffer documentation for information on reading into multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename MutableBufferSequence>
+  std::size_t read_some(const MutableBufferSequence& buffers)
+  {
+    asio::error_code ec;
+    std::size_t s = this->get_service().read_some(
+        this->get_implementation(), buffers, ec);
+    asio::detail::throw_error(ec, "read_some");
+    return s;
+  }
+
+  /// Read some data from the serial port.
+  /**
+   * This function is used to read data from the serial port. The function
+   * call will block until one or more bytes of data has been read successfully,
+   * or until an error occurs.
+   *
+   * @param buffers One or more buffers into which the data will be read.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @returns The number of bytes read. Returns 0 if an error occurred.
+   *
+   * @note The read_some operation may not read all of the requested number of
+   * bytes. Consider using the @ref read function if you need to ensure that
+   * the requested amount of data is read before the blocking operation
+   * completes.
+   */
+  template <typename MutableBufferSequence>
+  std::size_t read_some(const MutableBufferSequence& buffers,
+      asio::error_code& ec)
+  {
+    return this->get_service().read_some(
+        this->get_implementation(), buffers, ec);
+  }
+
+  /// Start an asynchronous read.
+  /**
+   * This function is used to asynchronously read data from the serial port.
+   * The function call always returns immediately.
+   *
+   * @param buffers One or more buffers into which the data will be read.
+   * Although the buffers object may be copied as necessary, ownership of the
+   * underlying memory blocks is retained by the caller, which must guarantee
+   * that they remain valid until the handler is called.
+   *
+   * @param handler The handler to be called when the read operation completes.
+   * Copies will be made of the handler as required. The function signature of
+   * the handler must be:
+   * @code void handler(
+   *   const asio::error_code& error, // Result of operation.
+   *   std::size_t bytes_transferred           // Number of bytes read.
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_context::post().
+   *
+   * @note The read operation may not read all of the requested number of bytes.
+   * Consider using the @ref async_read function if you need to ensure that the
+   * requested amount of data is read before the asynchronous operation
+   * completes.
+   *
+   * @par Example
+   * To read into a single data buffer use the @ref buffer function as follows:
+   * @code
+   * serial_port.async_read_some(asio::buffer(data, size), handler);
+   * @endcode
+   * See the @ref buffer documentation for information on reading into multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename MutableBufferSequence, typename ReadHandler>
+  ASIO_INITFN_RESULT_TYPE(ReadHandler,
+      void (asio::error_code, std::size_t))
+  async_read_some(const MutableBufferSequence& buffers,
+      ASIO_MOVE_ARG(ReadHandler) handler)
+  {
+    // If you get an error on the following line it means that your handler does
+    // not meet the documented type requirements for a ReadHandler.
+    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+    async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_read_some(
+        this->get_implementation(), buffers, init.completion_handler);
+
+    return init.result.get();
+  }
+};
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 } // namespace asio
 
+#include "asio/detail/pop_options.hpp"
+
+#if !defined(ASIO_ENABLE_OLD_SERVICES)
+# undef ASIO_SVC_T
+#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // defined(ASIO_HAS_SERIAL_PORT)
        //   || defined(GENERATING_DOCUMENTATION)
 
diff --git a/asio/include/asio/serial_port_base.hpp b/asio/include/asio/serial_port_base.hpp
index a6d8652..b4ab4f3 100644
--- a/asio/include/asio/serial_port_base.hpp
+++ b/asio/include/asio/serial_port_base.hpp
@@ -2,7 +2,7 @@
 // serial_port_base.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -54,10 +54,10 @@
   public:
     explicit baud_rate(unsigned int rate = 0);
     unsigned int value() const;
-    ASIO_DECL asio::error_code store(
+    ASIO_DECL ASIO_SYNC_OP_VOID store(
         ASIO_OPTION_STORAGE& storage,
         asio::error_code& ec) const;
-    ASIO_DECL asio::error_code load(
+    ASIO_DECL ASIO_SYNC_OP_VOID load(
         const ASIO_OPTION_STORAGE& storage,
         asio::error_code& ec);
   private:
@@ -74,10 +74,10 @@
     enum type { none, software, hardware };
     ASIO_DECL explicit flow_control(type t = none);
     type value() const;
-    ASIO_DECL asio::error_code store(
+    ASIO_DECL ASIO_SYNC_OP_VOID store(
         ASIO_OPTION_STORAGE& storage,
         asio::error_code& ec) const;
-    ASIO_DECL asio::error_code load(
+    ASIO_DECL ASIO_SYNC_OP_VOID load(
         const ASIO_OPTION_STORAGE& storage,
         asio::error_code& ec);
   private:
@@ -94,10 +94,10 @@
     enum type { none, odd, even };
     ASIO_DECL explicit parity(type t = none);
     type value() const;
-    ASIO_DECL asio::error_code store(
+    ASIO_DECL ASIO_SYNC_OP_VOID store(
         ASIO_OPTION_STORAGE& storage,
         asio::error_code& ec) const;
-    ASIO_DECL asio::error_code load(
+    ASIO_DECL ASIO_SYNC_OP_VOID load(
         const ASIO_OPTION_STORAGE& storage,
         asio::error_code& ec);
   private:
@@ -114,10 +114,10 @@
     enum type { one, onepointfive, two };
     ASIO_DECL explicit stop_bits(type t = one);
     type value() const;
-    ASIO_DECL asio::error_code store(
+    ASIO_DECL ASIO_SYNC_OP_VOID store(
         ASIO_OPTION_STORAGE& storage,
         asio::error_code& ec) const;
-    ASIO_DECL asio::error_code load(
+    ASIO_DECL ASIO_SYNC_OP_VOID load(
         const ASIO_OPTION_STORAGE& storage,
         asio::error_code& ec);
   private:
@@ -133,10 +133,10 @@
   public:
     ASIO_DECL explicit character_size(unsigned int t = 8);
     unsigned int value() const;
-    ASIO_DECL asio::error_code store(
+    ASIO_DECL ASIO_SYNC_OP_VOID store(
         ASIO_OPTION_STORAGE& storage,
         asio::error_code& ec) const;
-    ASIO_DECL asio::error_code load(
+    ASIO_DECL ASIO_SYNC_OP_VOID load(
         const ASIO_OPTION_STORAGE& storage,
         asio::error_code& ec);
   private:
diff --git a/asio/include/asio/serial_port_service.hpp b/asio/include/asio/serial_port_service.hpp
index 7fca7b2..4f47e57 100644
--- a/asio/include/asio/serial_port_service.hpp
+++ b/asio/include/asio/serial_port_service.hpp
@@ -2,7 +2,7 @@
 // serial_port_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_SERIAL_PORT) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -107,17 +109,19 @@
   }
 
   /// Open a serial port.
-  asio::error_code open(implementation_type& impl,
+  ASIO_SYNC_OP_VOID open(implementation_type& impl,
       const std::string& device, asio::error_code& ec)
   {
-    return service_impl_.open(impl, device, ec);
+    service_impl_.open(impl, device, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Assign an existing native handle to a serial port.
-  asio::error_code assign(implementation_type& impl,
+  ASIO_SYNC_OP_VOID assign(implementation_type& impl,
       const native_handle_type& handle, asio::error_code& ec)
   {
-    return service_impl_.assign(impl, handle, ec);
+    service_impl_.assign(impl, handle, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the handle is open.
@@ -127,10 +131,11 @@
   }
 
   /// Close a serial port implementation.
-  asio::error_code close(implementation_type& impl,
+  ASIO_SYNC_OP_VOID close(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.close(impl, ec);
+    service_impl_.close(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native handle implementation.
@@ -140,33 +145,37 @@
   }
 
   /// Cancel all asynchronous operations associated with the handle.
-  asio::error_code cancel(implementation_type& impl,
+  ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.cancel(impl, ec);
+    service_impl_.cancel(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Set a serial port option.
   template <typename SettableSerialPortOption>
-  asio::error_code set_option(implementation_type& impl,
+  ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
       const SettableSerialPortOption& option, asio::error_code& ec)
   {
-    return service_impl_.set_option(impl, option, ec);
+    service_impl_.set_option(impl, option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get a serial port option.
   template <typename GettableSerialPortOption>
-  asio::error_code get_option(const implementation_type& impl,
+  ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
       GettableSerialPortOption& option, asio::error_code& ec) const
   {
-    return service_impl_.get_option(impl, option, ec);
+    service_impl_.get_option(impl, option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Send a break sequence to the serial port.
-  asio::error_code send_break(implementation_type& impl,
+  ASIO_SYNC_OP_VOID send_break(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.send_break(impl, ec);
+    service_impl_.send_break(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Write the given data to the stream.
@@ -188,7 +197,7 @@
     async_completion<WriteHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_write_some(impl, buffers, init.handler);
+    service_impl_.async_write_some(impl, buffers, init.completion_handler);
 
     return init.result.get();
   }
@@ -212,7 +221,7 @@
     async_completion<ReadHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_read_some(impl, buffers, init.handler);
+    service_impl_.async_read_some(impl, buffers, init.completion_handler);
 
     return init.result.get();
   }
@@ -235,4 +244,6 @@
 #endif // defined(ASIO_HAS_SERIAL_PORT)
        //   || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_SERIAL_PORT_SERVICE_HPP
diff --git a/asio/include/asio/signal_set.hpp b/asio/include/asio/signal_set.hpp
index 985b6fa..0850901 100644
--- a/asio/include/asio/signal_set.hpp
+++ b/asio/include/asio/signal_set.hpp
@@ -2,7 +2,7 @@
 // signal_set.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,12 +16,431 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
-#include "asio/basic_signal_set.hpp"
+
+#include "asio/async_result.hpp"
+#include "asio/basic_io_object.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/error.hpp"
+#include "asio/io_context.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/basic_signal_set.hpp"
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/detail/signal_set_service.hpp"
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 namespace asio {
 
-/// Typedef for the typical usage of a signal set.
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+// Typedef for the typical usage of a signal set.
 typedef basic_signal_set<> signal_set;
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+/// Provides signal functionality.
+/**
+ * The signal_set class provides the ability to perform an asynchronous wait
+ * for one or more signals to occur.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Example
+ * Performing an asynchronous wait:
+ * @code
+ * void handler(
+ *     const asio::error_code& error,
+ *     int signal_number)
+ * {
+ *   if (!error)
+ *   {
+ *     // A signal occurred.
+ *   }
+ * }
+ *
+ * ...
+ *
+ * // Construct a signal set registered for process termination.
+ * asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ *
+ * // Start an asynchronous wait for one of the signals to occur.
+ * signals.async_wait(handler);
+ * @endcode
+ *
+ * @par Queueing of signal notifications
+ *
+ * If a signal is registered with a signal_set, and the signal occurs when
+ * there are no waiting handlers, then the signal notification is queued. The
+ * next async_wait operation on that signal_set will dequeue the notification.
+ * If multiple notifications are queued, subsequent async_wait operations
+ * dequeue them one at a time. Signal notifications are dequeued in order of
+ * ascending signal number.
+ *
+ * If a signal number is removed from a signal_set (using the @c remove or @c
+ * erase member functions) then any queued notifications for that signal are
+ * discarded.
+ *
+ * @par Multiple registration of signals
+ *
+ * The same signal number may be registered with different signal_set objects.
+ * When the signal occurs, one handler is called for each signal_set object.
+ *
+ * Note that multiple registration only works for signals that are registered
+ * using Asio. The application must not also register a signal handler using
+ * functions such as @c signal() or @c sigaction().
+ *
+ * @par Signal masking on POSIX platforms
+ *
+ * POSIX allows signals to be blocked using functions such as @c sigprocmask()
+ * and @c pthread_sigmask(). For signals to be delivered, programs must ensure
+ * that any signals registered using signal_set objects are unblocked in at
+ * least one thread.
+ */
+class signal_set
+  : ASIO_SVC_ACCESS basic_io_object<detail::signal_set_service>
+{
+public:
+  /// The type of the executor associated with the object.
+  typedef io_context::executor_type executor_type;
+
+  /// Construct a signal set without adding any signals.
+  /**
+   * This constructor creates a signal set without registering for any signals.
+   *
+   * @param io_context The io_context object that the signal set will use to
+   * dispatch handlers for any asynchronous operations performed on the set.
+   */
+  explicit signal_set(asio::io_context& io_context)
+    : basic_io_object<detail::signal_set_service>(io_context)
+  {
+  }
+
+  /// Construct a signal set and add one signal.
+  /**
+   * This constructor creates a signal set and registers for one signal.
+   *
+   * @param io_context The io_context object that the signal set will use to
+   * dispatch handlers for any asynchronous operations performed on the set.
+   *
+   * @param signal_number_1 The signal number to be added.
+   *
+   * @note This constructor is equivalent to performing:
+   * @code asio::signal_set signals(io_context);
+   * signals.add(signal_number_1); @endcode
+   */
+  signal_set(asio::io_context& io_context, int signal_number_1)
+    : basic_io_object<detail::signal_set_service>(io_context)
+  {
+    asio::error_code ec;
+    this->get_service().add(this->get_implementation(), signal_number_1, ec);
+    asio::detail::throw_error(ec, "add");
+  }
+
+  /// Construct a signal set and add two signals.
+  /**
+   * This constructor creates a signal set and registers for two signals.
+   *
+   * @param io_context The io_context object that the signal set will use to
+   * dispatch handlers for any asynchronous operations performed on the set.
+   *
+   * @param signal_number_1 The first signal number to be added.
+   *
+   * @param signal_number_2 The second signal number to be added.
+   *
+   * @note This constructor is equivalent to performing:
+   * @code asio::signal_set signals(io_context);
+   * signals.add(signal_number_1);
+   * signals.add(signal_number_2); @endcode
+   */
+  signal_set(asio::io_context& io_context, int signal_number_1,
+      int signal_number_2)
+    : basic_io_object<detail::signal_set_service>(io_context)
+  {
+    asio::error_code ec;
+    this->get_service().add(this->get_implementation(), signal_number_1, ec);
+    asio::detail::throw_error(ec, "add");
+    this->get_service().add(this->get_implementation(), signal_number_2, ec);
+    asio::detail::throw_error(ec, "add");
+  }
+
+  /// Construct a signal set and add three signals.
+  /**
+   * This constructor creates a signal set and registers for three signals.
+   *
+   * @param io_context The io_context object that the signal set will use to
+   * dispatch handlers for any asynchronous operations performed on the set.
+   *
+   * @param signal_number_1 The first signal number to be added.
+   *
+   * @param signal_number_2 The second signal number to be added.
+   *
+   * @param signal_number_3 The third signal number to be added.
+   *
+   * @note This constructor is equivalent to performing:
+   * @code asio::signal_set signals(io_context);
+   * signals.add(signal_number_1);
+   * signals.add(signal_number_2);
+   * signals.add(signal_number_3); @endcode
+   */
+  signal_set(asio::io_context& io_context, int signal_number_1,
+      int signal_number_2, int signal_number_3)
+    : basic_io_object<detail::signal_set_service>(io_context)
+  {
+    asio::error_code ec;
+    this->get_service().add(this->get_implementation(), signal_number_1, ec);
+    asio::detail::throw_error(ec, "add");
+    this->get_service().add(this->get_implementation(), signal_number_2, ec);
+    asio::detail::throw_error(ec, "add");
+    this->get_service().add(this->get_implementation(), signal_number_3, ec);
+    asio::detail::throw_error(ec, "add");
+  }
+
+  /// Destroys the signal set.
+  /**
+   * This function destroys the signal set, cancelling any outstanding
+   * asynchronous wait operations associated with the signal set as if by
+   * calling @c cancel.
+   */
+  ~signal_set()
+  {
+  }
+
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_context()
+  {
+    return basic_io_object<detail::signal_set_service>::get_io_context();
+  }
+
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_service()
+  {
+    return basic_io_object<detail::signal_set_service>::get_io_service();
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+  /// Get the executor associated with the object.
+  executor_type get_executor() ASIO_NOEXCEPT
+  {
+    return basic_io_object<detail::signal_set_service>::get_executor();
+  }
+
+  /// Add a signal to a signal_set.
+  /**
+   * This function adds the specified signal to the set. It has no effect if the
+   * signal is already in the set.
+   *
+   * @param signal_number The signal to be added to the set.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void add(int signal_number)
+  {
+    asio::error_code ec;
+    this->get_service().add(this->get_implementation(), signal_number, ec);
+    asio::detail::throw_error(ec, "add");
+  }
+
+  /// Add a signal to a signal_set.
+  /**
+   * This function adds the specified signal to the set. It has no effect if the
+   * signal is already in the set.
+   *
+   * @param signal_number The signal to be added to the set.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID add(int signal_number,
+      asio::error_code& ec)
+  {
+    this->get_service().add(this->get_implementation(), signal_number, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Remove a signal from a signal_set.
+  /**
+   * This function removes the specified signal from the set. It has no effect
+   * if the signal is not in the set.
+   *
+   * @param signal_number The signal to be removed from the set.
+   *
+   * @throws asio::system_error Thrown on failure.
+   *
+   * @note Removes any notifications that have been queued for the specified
+   * signal number.
+   */
+  void remove(int signal_number)
+  {
+    asio::error_code ec;
+    this->get_service().remove(this->get_implementation(), signal_number, ec);
+    asio::detail::throw_error(ec, "remove");
+  }
+
+  /// Remove a signal from a signal_set.
+  /**
+   * This function removes the specified signal from the set. It has no effect
+   * if the signal is not in the set.
+   *
+   * @param signal_number The signal to be removed from the set.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @note Removes any notifications that have been queued for the specified
+   * signal number.
+   */
+  ASIO_SYNC_OP_VOID remove(int signal_number,
+      asio::error_code& ec)
+  {
+    this->get_service().remove(this->get_implementation(), signal_number, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Remove all signals from a signal_set.
+  /**
+   * This function removes all signals from the set. It has no effect if the set
+   * is already empty.
+   *
+   * @throws asio::system_error Thrown on failure.
+   *
+   * @note Removes all queued notifications.
+   */
+  void clear()
+  {
+    asio::error_code ec;
+    this->get_service().clear(this->get_implementation(), ec);
+    asio::detail::throw_error(ec, "clear");
+  }
+
+  /// Remove all signals from a signal_set.
+  /**
+   * This function removes all signals from the set. It has no effect if the set
+   * is already empty.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @note Removes all queued notifications.
+   */
+  ASIO_SYNC_OP_VOID clear(asio::error_code& ec)
+  {
+    this->get_service().clear(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Cancel all operations associated with the signal set.
+  /**
+   * This function forces the completion of any pending asynchronous wait
+   * operations against the signal set. The handler for each cancelled
+   * operation will be invoked with the asio::error::operation_aborted
+   * error code.
+   *
+   * Cancellation does not alter the set of registered signals.
+   *
+   * @throws asio::system_error Thrown on failure.
+   *
+   * @note If a registered signal occurred before cancel() is called, then the
+   * handlers for asynchronous wait operations will:
+   *
+   * @li have already been invoked; or
+   *
+   * @li have been queued for invocation in the near future.
+   *
+   * These handlers can no longer be cancelled, and therefore are passed an
+   * error code that indicates the successful completion of the wait operation.
+   */
+  void cancel()
+  {
+    asio::error_code ec;
+    this->get_service().cancel(this->get_implementation(), ec);
+    asio::detail::throw_error(ec, "cancel");
+  }
+
+  /// Cancel all operations associated with the signal set.
+  /**
+   * This function forces the completion of any pending asynchronous wait
+   * operations against the signal set. The handler for each cancelled
+   * operation will be invoked with the asio::error::operation_aborted
+   * error code.
+   *
+   * Cancellation does not alter the set of registered signals.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @note If a registered signal occurred before cancel() is called, then the
+   * handlers for asynchronous wait operations will:
+   *
+   * @li have already been invoked; or
+   *
+   * @li have been queued for invocation in the near future.
+   *
+   * These handlers can no longer be cancelled, and therefore are passed an
+   * error code that indicates the successful completion of the wait operation.
+   */
+  ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+  {
+    this->get_service().cancel(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Start an asynchronous operation to wait for a signal to be delivered.
+  /**
+   * This function may be used to initiate an asynchronous wait against the
+   * signal set. It always returns immediately.
+   *
+   * For each call to async_wait(), the supplied handler will be called exactly
+   * once. The handler will be called when:
+   *
+   * @li One of the registered signals in the signal set occurs; or
+   *
+   * @li The signal set was cancelled, in which case the handler is passed the
+   * error code asio::error::operation_aborted.
+   *
+   * @param handler The handler to be called when the signal occurs. Copies
+   * will be made of the handler as required. The function signature of the
+   * handler must be:
+   * @code void handler(
+   *   const asio::error_code& error, // Result of operation.
+   *   int signal_number // Indicates which signal occurred.
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_context::post().
+   */
+  template <typename SignalHandler>
+  ASIO_INITFN_RESULT_TYPE(SignalHandler,
+      void (asio::error_code, int))
+  async_wait(ASIO_MOVE_ARG(SignalHandler) handler)
+  {
+    // If you get an error on the following line it means that your handler does
+    // not meet the documented type requirements for a SignalHandler.
+    ASIO_SIGNAL_HANDLER_CHECK(SignalHandler, handler) type_check;
+
+    async_completion<SignalHandler,
+      void (asio::error_code, int)> init(handler);
+
+    this->get_service().async_wait(this->get_implementation(),
+        init.completion_handler);
+
+    return init.result.get();
+  }
+};
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 } // namespace asio
 
diff --git a/asio/include/asio/signal_set_service.hpp b/asio/include/asio/signal_set_service.hpp
index a4e4b27..d4c54b8 100644
--- a/asio/include/asio/signal_set_service.hpp
+++ b/asio/include/asio/signal_set_service.hpp
@@ -2,7 +2,7 @@
 // signal_set_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,6 +16,9 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include "asio/async_result.hpp"
 #include "asio/detail/signal_set_service.hpp"
 #include "asio/error.hpp"
@@ -67,31 +70,35 @@
   }
 
   /// Add a signal to a signal_set.
-  asio::error_code add(implementation_type& impl,
+  ASIO_SYNC_OP_VOID add(implementation_type& impl,
       int signal_number, asio::error_code& ec)
   {
-    return service_impl_.add(impl, signal_number, ec);
+    service_impl_.add(impl, signal_number, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Remove a signal to a signal_set.
-  asio::error_code remove(implementation_type& impl,
+  ASIO_SYNC_OP_VOID remove(implementation_type& impl,
       int signal_number, asio::error_code& ec)
   {
-    return service_impl_.remove(impl, signal_number, ec);
+    service_impl_.remove(impl, signal_number, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Remove all signals from a signal_set.
-  asio::error_code clear(implementation_type& impl,
+  ASIO_SYNC_OP_VOID clear(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.clear(impl, ec);
+    service_impl_.clear(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Cancel all operations associated with the signal set.
-  asio::error_code cancel(implementation_type& impl,
+  ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.cancel(impl, ec);
+    service_impl_.cancel(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   // Start an asynchronous operation to wait for a signal to be delivered.
@@ -104,7 +111,7 @@
     async_completion<SignalHandler,
       void (asio::error_code, int)> init(handler);
 
-    service_impl_.async_wait(impl, init.handler);
+    service_impl_.async_wait(impl, init.completion_handler);
 
     return init.result.get();
   }
@@ -130,4 +137,6 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_SIGNAL_SET_SERVICE_HPP
diff --git a/asio/include/asio/socket_acceptor_service.hpp b/asio/include/asio/socket_acceptor_service.hpp
index 157177d..b9c33ff 100644
--- a/asio/include/asio/socket_acceptor_service.hpp
+++ b/asio/include/asio/socket_acceptor_service.hpp
@@ -2,7 +2,7 @@
 // socket_acceptor_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,6 +16,9 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include "asio/basic_socket.hpp"
 #include "asio/detail/type_traits.hpp"
 #include "asio/error.hpp"
@@ -130,18 +133,20 @@
   }
 
   /// Open a new socket acceptor implementation.
-  asio::error_code open(implementation_type& impl,
+  ASIO_SYNC_OP_VOID open(implementation_type& impl,
       const protocol_type& protocol, asio::error_code& ec)
   {
-    return service_impl_.open(impl, protocol, ec);
+    service_impl_.open(impl, protocol, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Assign an existing native acceptor to a socket acceptor.
-  asio::error_code assign(implementation_type& impl,
+  ASIO_SYNC_OP_VOID assign(implementation_type& impl,
       const protocol_type& protocol, const native_handle_type& native_acceptor,
       asio::error_code& ec)
   {
-    return service_impl_.assign(impl, protocol, native_acceptor, ec);
+    service_impl_.assign(impl, protocol, native_acceptor, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the acceptor is open.
@@ -151,32 +156,36 @@
   }
 
   /// Cancel all asynchronous operations associated with the acceptor.
-  asio::error_code cancel(implementation_type& impl,
+  ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.cancel(impl, ec);
+    service_impl_.cancel(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Bind the socket acceptor to the specified local endpoint.
-  asio::error_code bind(implementation_type& impl,
+  ASIO_SYNC_OP_VOID bind(implementation_type& impl,
       const endpoint_type& endpoint, asio::error_code& ec)
   {
-    return service_impl_.bind(impl, endpoint, ec);
+    service_impl_.bind(impl, endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Place the socket acceptor into the state where it will listen for new
   /// connections.
-  asio::error_code listen(implementation_type& impl, int backlog,
+  ASIO_SYNC_OP_VOID listen(implementation_type& impl, int backlog,
       asio::error_code& ec)
   {
-    return service_impl_.listen(impl, backlog, ec);
+    service_impl_.listen(impl, backlog, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Close a socket acceptor implementation.
-  asio::error_code close(implementation_type& impl,
+  ASIO_SYNC_OP_VOID close(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.close(impl, ec);
+    service_impl_.close(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native acceptor implementation.
@@ -187,26 +196,29 @@
 
   /// Set a socket option.
   template <typename SettableSocketOption>
-  asio::error_code set_option(implementation_type& impl,
+  ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
       const SettableSocketOption& option, asio::error_code& ec)
   {
-    return service_impl_.set_option(impl, option, ec);
+    service_impl_.set_option(impl, option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get a socket option.
   template <typename GettableSocketOption>
-  asio::error_code get_option(const implementation_type& impl,
+  ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
       GettableSocketOption& option, asio::error_code& ec) const
   {
-    return service_impl_.get_option(impl, option, ec);
+    service_impl_.get_option(impl, option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Perform an IO control command on the socket.
   template <typename IoControlCommand>
-  asio::error_code io_control(implementation_type& impl,
+  ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
       IoControlCommand& command, asio::error_code& ec)
   {
-    return service_impl_.io_control(impl, command, ec);
+    service_impl_.io_control(impl, command, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the acceptor.
@@ -216,10 +228,11 @@
   }
 
   /// Sets the non-blocking mode of the acceptor.
-  asio::error_code non_blocking(implementation_type& impl,
+  ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
       bool mode, asio::error_code& ec)
   {
-    return service_impl_.non_blocking(impl, mode, ec);
+    service_impl_.non_blocking(impl, mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the native acceptor implementation.
@@ -229,10 +242,11 @@
   }
 
   /// Sets the non-blocking mode of the native acceptor implementation.
-  asio::error_code native_non_blocking(implementation_type& impl,
+  ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
       bool mode, asio::error_code& ec)
   {
-    return service_impl_.native_non_blocking(impl, mode, ec);
+    service_impl_.native_non_blocking(impl, mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the local endpoint.
@@ -244,10 +258,11 @@
 
   /// Wait for the acceptor to become ready to read, ready to write, or to have
   /// pending error conditions.
-  asio::error_code wait(implementation_type& impl,
+  ASIO_SYNC_OP_VOID wait(implementation_type& impl,
       socket_base::wait_type w, asio::error_code& ec)
   {
-    return service_impl_.wait(impl, w, ec);
+    service_impl_.wait(impl, w, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Asynchronously wait for the acceptor to become ready to read, ready to
@@ -261,19 +276,20 @@
     async_completion<WaitHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_wait(impl, w, init.handler);
+    service_impl_.async_wait(impl, w, init.completion_handler);
 
     return init.result.get();
   }
 
   /// Accept a new connection.
   template <typename Protocol1, typename SocketService>
-  asio::error_code accept(implementation_type& impl,
+  ASIO_SYNC_OP_VOID accept(implementation_type& impl,
       basic_socket<Protocol1, SocketService>& peer,
       endpoint_type* peer_endpoint, asio::error_code& ec,
       typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
   {
-    return service_impl_.accept(impl, peer, peer_endpoint, ec);
+    service_impl_.accept(impl, peer, peer_endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
 #if defined(ASIO_HAS_MOVE)
@@ -299,7 +315,8 @@
     async_completion<AcceptHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_accept(impl, peer, peer_endpoint, init.handler);
+    service_impl_.async_accept(impl,
+        peer, peer_endpoint, init.completion_handler);
 
     return init.result.get();
   }
@@ -318,7 +335,7 @@
         typename Protocol::socket)> init(handler);
 
     service_impl_.async_accept(impl,
-        peer_io_context, peer_endpoint, init.handler);
+        peer_io_context, peer_endpoint, init.completion_handler);
 
     return init.result.get();
   }
@@ -339,4 +356,6 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_SOCKET_ACCEPTOR_SERVICE_HPP
diff --git a/asio/include/asio/socket_base.hpp b/asio/include/asio/socket_base.hpp
index 5927b6a..99ef377 100644
--- a/asio/include/asio/socket_base.hpp
+++ b/asio/include/asio/socket_base.hpp
@@ -2,7 +2,7 @@
 // socket_base.hpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -494,11 +494,22 @@
 
   /// The maximum length of the queue of pending incoming connections.
 #if defined(GENERATING_DOCUMENTATION)
+  static const int max_listen_connections = implementation_defined;
+#else
+  ASIO_STATIC_CONSTANT(int, max_listen_connections
+      = ASIO_OS_DEF(SOMAXCONN));
+#endif
+
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use max_listen_connections.) The maximum length of the queue
+  /// of pending incoming connections.
+#if defined(GENERATING_DOCUMENTATION)
   static const int max_connections = implementation_defined;
 #else
   ASIO_STATIC_CONSTANT(int, max_connections
       = ASIO_OS_DEF(SOMAXCONN));
 #endif
+#endif // !defined(ASIO_NO_DEPRECATED)
 
 protected:
   /// Protected destructor to prevent deletion through this type.
diff --git a/asio/include/asio/spawn.hpp b/asio/include/asio/spawn.hpp
index 9fa6e7b..cffe431 100644
--- a/asio/include/asio/spawn.hpp
+++ b/asio/include/asio/spawn.hpp
@@ -2,7 +2,7 @@
 // spawn.hpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl.hpp b/asio/include/asio/ssl.hpp
index c3addfa..bc3dae0 100644
--- a/asio/include/asio/ssl.hpp
+++ b/asio/include/asio/ssl.hpp
@@ -2,7 +2,7 @@
 // ssl.hpp
 // ~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/context.hpp b/asio/include/asio/ssl/context.hpp
index e6dc651..6e3f2ad 100644
--- a/asio/include/asio/ssl/context.hpp
+++ b/asio/include/asio/ssl/context.hpp
@@ -2,7 +2,7 @@
 // ssl/context.hpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -108,7 +108,7 @@
    *
    * @note Calls @c SSL_CTX_clear_options.
    */
-  ASIO_DECL asio::error_code clear_options(options o,
+  ASIO_DECL ASIO_SYNC_OP_VOID clear_options(options o,
       asio::error_code& ec);
 
   /// Set options on the context.
@@ -137,7 +137,7 @@
    *
    * @note Calls @c SSL_CTX_set_options.
    */
-  ASIO_DECL asio::error_code set_options(options o,
+  ASIO_DECL ASIO_SYNC_OP_VOID set_options(options o,
       asio::error_code& ec);
 
   /// Set the peer verification mode.
@@ -166,7 +166,7 @@
    *
    * @note Calls @c SSL_CTX_set_verify.
    */
-  ASIO_DECL asio::error_code set_verify_mode(
+  ASIO_DECL ASIO_SYNC_OP_VOID set_verify_mode(
       verify_mode v, asio::error_code& ec);
 
   /// Set the peer verification depth.
@@ -195,7 +195,7 @@
    *
    * @note Calls @c SSL_CTX_set_verify_depth.
    */
-  ASIO_DECL asio::error_code set_verify_depth(
+  ASIO_DECL ASIO_SYNC_OP_VOID set_verify_depth(
       int depth, asio::error_code& ec);
 
   /// Set the callback used to verify peer certificates.
@@ -238,7 +238,7 @@
    * @note Calls @c SSL_CTX_set_verify.
    */
   template <typename VerifyCallback>
-  asio::error_code set_verify_callback(VerifyCallback callback,
+  ASIO_SYNC_OP_VOID set_verify_callback(VerifyCallback callback,
       asio::error_code& ec);
 
   /// Load a certification authority file for performing verification.
@@ -267,7 +267,7 @@
    *
    * @note Calls @c SSL_CTX_load_verify_locations.
    */
-  ASIO_DECL asio::error_code load_verify_file(
+  ASIO_DECL ASIO_SYNC_OP_VOID load_verify_file(
       const std::string& filename, asio::error_code& ec);
 
   /// Add certification authority for performing verification.
@@ -296,7 +296,7 @@
    *
    * @note Calls @c SSL_CTX_get_cert_store and @c X509_STORE_add_cert.
    */
-  ASIO_DECL asio::error_code add_certificate_authority(
+  ASIO_DECL ASIO_SYNC_OP_VOID add_certificate_authority(
       const const_buffer& ca, asio::error_code& ec);
 
   /// Configures the context to use the default directories for finding
@@ -323,7 +323,7 @@
    *
    * @note Calls @c SSL_CTX_set_default_verify_paths.
    */
-  ASIO_DECL asio::error_code set_default_verify_paths(
+  ASIO_DECL ASIO_SYNC_OP_VOID set_default_verify_paths(
       asio::error_code& ec);
 
   /// Add a directory containing certificate authority files to be used for
@@ -356,7 +356,7 @@
    *
    * @note Calls @c SSL_CTX_load_verify_locations.
    */
-  ASIO_DECL asio::error_code add_verify_path(
+  ASIO_DECL ASIO_SYNC_OP_VOID add_verify_path(
       const std::string& path, asio::error_code& ec);
 
   /// Use a certificate from a memory buffer.
@@ -386,7 +386,7 @@
    *
    * @note Calls @c SSL_CTX_use_certificate or SSL_CTX_use_certificate_ASN1.
    */
-  ASIO_DECL asio::error_code use_certificate(
+  ASIO_DECL ASIO_SYNC_OP_VOID use_certificate(
       const const_buffer& certificate, file_format format,
       asio::error_code& ec);
 
@@ -417,7 +417,7 @@
    *
    * @note Calls @c SSL_CTX_use_certificate_file.
    */
-  ASIO_DECL asio::error_code use_certificate_file(
+  ASIO_DECL ASIO_SYNC_OP_VOID use_certificate_file(
       const std::string& filename, file_format format,
       asio::error_code& ec);
 
@@ -447,7 +447,7 @@
    *
    * @note Calls @c SSL_CTX_use_certificate and SSL_CTX_add_extra_chain_cert.
    */
-  ASIO_DECL asio::error_code use_certificate_chain(
+  ASIO_DECL ASIO_SYNC_OP_VOID use_certificate_chain(
       const const_buffer& chain, asio::error_code& ec);
 
   /// Use a certificate chain from a file.
@@ -476,7 +476,7 @@
    *
    * @note Calls @c SSL_CTX_use_certificate_chain_file.
    */
-  ASIO_DECL asio::error_code use_certificate_chain_file(
+  ASIO_DECL ASIO_SYNC_OP_VOID use_certificate_chain_file(
       const std::string& filename, asio::error_code& ec);
 
   /// Use a private key from a memory buffer.
@@ -506,7 +506,7 @@
    *
    * @note Calls @c SSL_CTX_use_PrivateKey or SSL_CTX_use_PrivateKey_ASN1.
    */
-  ASIO_DECL asio::error_code use_private_key(
+  ASIO_DECL ASIO_SYNC_OP_VOID use_private_key(
       const const_buffer& private_key, file_format format,
       asio::error_code& ec);
 
@@ -537,7 +537,7 @@
    *
    * @note Calls @c SSL_CTX_use_PrivateKey_file.
    */
-  ASIO_DECL asio::error_code use_private_key_file(
+  ASIO_DECL ASIO_SYNC_OP_VOID use_private_key_file(
       const std::string& filename, file_format format,
       asio::error_code& ec);
 
@@ -570,7 +570,7 @@
    *
    * @note Calls @c SSL_CTX_use_RSAPrivateKey or SSL_CTX_use_RSAPrivateKey_ASN1.
    */
-  ASIO_DECL asio::error_code use_rsa_private_key(
+  ASIO_DECL ASIO_SYNC_OP_VOID use_rsa_private_key(
       const const_buffer& private_key, file_format format,
       asio::error_code& ec);
 
@@ -603,7 +603,7 @@
    *
    * @note Calls @c SSL_CTX_use_RSAPrivateKey_file.
    */
-  ASIO_DECL asio::error_code use_rsa_private_key_file(
+  ASIO_DECL ASIO_SYNC_OP_VOID use_rsa_private_key_file(
       const std::string& filename, file_format format,
       asio::error_code& ec);
 
@@ -635,7 +635,7 @@
    *
    * @note Calls @c SSL_CTX_set_tmp_dh.
    */
-  ASIO_DECL asio::error_code use_tmp_dh(
+  ASIO_DECL ASIO_SYNC_OP_VOID use_tmp_dh(
       const const_buffer& dh, asio::error_code& ec);
 
   /// Use the specified file to obtain the temporary Diffie-Hellman parameters.
@@ -664,7 +664,7 @@
    *
    * @note Calls @c SSL_CTX_set_tmp_dh.
    */
-  ASIO_DECL asio::error_code use_tmp_dh_file(
+  ASIO_DECL ASIO_SYNC_OP_VOID use_tmp_dh_file(
       const std::string& filename, asio::error_code& ec);
 
   /// Set the password callback.
@@ -705,7 +705,7 @@
    * @note Calls @c SSL_CTX_set_default_passwd_cb.
    */
   template <typename PasswordCallback>
-  asio::error_code set_password_callback(PasswordCallback callback,
+  ASIO_SYNC_OP_VOID set_password_callback(PasswordCallback callback,
       asio::error_code& ec);
 
 private:
@@ -716,7 +716,7 @@
   struct dh_cleanup;
 
   // Helper function used to set a peer certificate verification callback.
-  ASIO_DECL asio::error_code do_set_verify_callback(
+  ASIO_DECL ASIO_SYNC_OP_VOID do_set_verify_callback(
       detail::verify_callback_base* callback, asio::error_code& ec);
 
   // Callback used when the SSL implementation wants to verify a certificate.
@@ -724,7 +724,7 @@
       int preverified, X509_STORE_CTX* ctx);
 
   // Helper function used to set a password callback.
-  ASIO_DECL asio::error_code do_set_password_callback(
+  ASIO_DECL ASIO_SYNC_OP_VOID do_set_password_callback(
       detail::password_callback_base* callback, asio::error_code& ec);
 
   // Callback used when the SSL implementation wants a password.
@@ -732,7 +732,7 @@
       char* buf, int size, int purpose, void* data);
 
   // Helper function to set the temporary Diffie-Hellman parameters from a BIO.
-  ASIO_DECL asio::error_code do_use_tmp_dh(
+  ASIO_DECL ASIO_SYNC_OP_VOID do_use_tmp_dh(
       BIO* bio, asio::error_code& ec);
 
   // Helper function to make a BIO from a memory buffer.
diff --git a/asio/include/asio/ssl/context_base.hpp b/asio/include/asio/ssl/context_base.hpp
index cfa2f42..b3af107 100644
--- a/asio/include/asio/ssl/context_base.hpp
+++ b/asio/include/asio/ssl/context_base.hpp
@@ -2,7 +2,7 @@
 // ssl/context_base.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/detail/buffered_handshake_op.hpp b/asio/include/asio/ssl/detail/buffered_handshake_op.hpp
index c18f314..e661bde 100644
--- a/asio/include/asio/ssl/detail/buffered_handshake_op.hpp
+++ b/asio/include/asio/ssl/detail/buffered_handshake_op.hpp
@@ -2,7 +2,7 @@
 // ssl/detail/buffered_handshake_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -41,8 +41,27 @@
       asio::error_code& ec,
       std::size_t& bytes_transferred) const
   {
-    typename ConstBufferSequence::const_iterator iter = buffers_.begin();
-    typename ConstBufferSequence::const_iterator end = buffers_.end();
+    return this->process(eng, ec, bytes_transferred,
+        asio::buffer_sequence_begin(buffers_),
+        asio::buffer_sequence_end(buffers_));
+  }
+
+  template <typename Handler>
+  void call_handler(Handler& handler,
+      const asio::error_code& ec,
+      const std::size_t& bytes_transferred) const
+  {
+    handler(ec, bytes_transferred);
+  }
+
+private:
+  template <typename Iterator>
+  engine::want process(engine& eng,
+      asio::error_code& ec,
+      std::size_t& bytes_transferred,
+      Iterator begin, Iterator end) const
+  {
+    Iterator iter = begin;
     std::size_t accumulated_size = 0;
 
     for (;;)
@@ -81,15 +100,6 @@
     }
   }
 
-  template <typename Handler>
-  void call_handler(Handler& handler,
-      const asio::error_code& ec,
-      const std::size_t& bytes_transferred) const
-  {
-    handler(ec, bytes_transferred);
-  }
-
-private:
   stream_base::handshake_type type_;
   ConstBufferSequence buffers_;
   std::size_t total_buffer_size_;
diff --git a/asio/include/asio/ssl/detail/engine.hpp b/asio/include/asio/ssl/detail/engine.hpp
index f0b738a..c9ea33b 100644
--- a/asio/include/asio/ssl/detail/engine.hpp
+++ b/asio/include/asio/ssl/detail/engine.hpp
@@ -2,7 +2,7 @@
 // ssl/detail/engine.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -93,7 +93,7 @@
       asio::error_code& ec, std::size_t& bytes_transferred);
 
   // Get output data to be written to the transport.
-  ASIO_DECL asio::mutable_buffers_1 get_output(
+  ASIO_DECL asio::mutable_buffer get_output(
       const asio::mutable_buffer& data);
 
   // Put input data that was read from the transport.
@@ -115,9 +115,11 @@
   ASIO_DECL static int verify_callback_function(
       int preverified, X509_STORE_CTX* ctx);
 
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
   // The SSL_accept function may not be thread safe. This mutex is used to
   // protect all calls to the SSL_accept function.
   ASIO_DECL static asio::detail::static_mutex& accept_mutex();
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
 
   // Perform one operation. Returns >= 0 on success or error, want_read if the
   // operation needs more input, or want_write if it needs to write some output
diff --git a/asio/include/asio/ssl/detail/handshake_op.hpp b/asio/include/asio/ssl/detail/handshake_op.hpp
index baacbf7..b6848ea 100644
--- a/asio/include/asio/ssl/detail/handshake_op.hpp
+++ b/asio/include/asio/ssl/detail/handshake_op.hpp
@@ -2,7 +2,7 @@
 // ssl/detail/handshake_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/detail/impl/engine.ipp b/asio/include/asio/ssl/detail/impl/engine.ipp
index 9abe010..5566149 100644
--- a/asio/include/asio/ssl/detail/impl/engine.ipp
+++ b/asio/include/asio/ssl/detail/impl/engine.ipp
@@ -2,7 +2,7 @@
 // ssl/detail/impl/engine.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -40,7 +40,9 @@
     asio::detail::throw_error(ec, "engine");
   }
 
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
   accept_mutex().init();
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
 
   ::SSL_set_mode(ssl_, SSL_MODE_ENABLE_PARTIAL_WRITE);
   ::SSL_set_mode(ssl_, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
@@ -165,7 +167,7 @@
       data.size(), ec, &bytes_transferred);
 }
 
-asio::mutable_buffers_1 engine::get_output(
+asio::mutable_buffer engine::get_output(
     const asio::mutable_buffer& data)
 {
   int length = ::BIO_read(ext_bio_,
@@ -201,8 +203,10 @@
 
   // SSL v2 doesn't provide a protocol-level shutdown, so an eof on the
   // underlying transport is passed through.
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
   if (ssl_->version == SSL2_VERSION)
     return ec;
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
 
   // Otherwise, the peer should have negotiated a proper shutdown.
   if ((::SSL_get_shutdown(ssl_) & SSL_RECEIVED_SHUTDOWN) == 0)
@@ -213,11 +217,13 @@
   return ec;
 }
 
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
 asio::detail::static_mutex& engine::accept_mutex()
 {
   static asio::detail::static_mutex mutex = ASIO_STATIC_MUTEX_INIT;
   return mutex;
 }
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
 
 engine::want engine::perform(int (engine::* op)(void*, std::size_t),
     void* data, std::size_t length, asio::error_code& ec,
@@ -276,7 +282,9 @@
 
 int engine::do_accept(void*, std::size_t)
 {
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
   asio::detail::static_mutex::scoped_lock lock(accept_mutex());
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
   return ::SSL_accept(ssl_);
 }
 
diff --git a/asio/include/asio/ssl/detail/impl/openssl_init.ipp b/asio/include/asio/ssl/detail/impl/openssl_init.ipp
index 2a70bf5..3cf9778 100644
--- a/asio/include/asio/ssl/detail/impl/openssl_init.ipp
+++ b/asio/include/asio/ssl/detail/impl/openssl_init.ipp
@@ -3,7 +3,7 @@
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
 // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -39,11 +39,15 @@
     ::SSL_load_error_strings();        
     ::OpenSSL_add_all_algorithms();
 
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
     mutexes_.resize(::CRYPTO_num_locks());
     for (size_t i = 0; i < mutexes_.size(); ++i)
       mutexes_[i].reset(new asio::detail::mutex);
     ::CRYPTO_set_locking_callback(&do_init::openssl_locking_func);
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
     ::CRYPTO_set_id_callback(&do_init::openssl_id_func);
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
 
 #if !defined(SSL_OP_NO_COMPRESSION) \
   && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
@@ -60,22 +64,34 @@
 #endif // !defined(SSL_OP_NO_COMPRESSION)
        // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
 
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
     ::CRYPTO_set_id_callback(0);
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
     ::CRYPTO_set_locking_callback(0);
     ::ERR_free_strings();
-#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
-    ::ERR_remove_thread_state(NULL);
-#else // (OPENSSL_VERSION_NUMBER >= 0x10000000L)
-    ::ERR_remove_state(0);
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10000000L)
     ::EVP_cleanup();
     ::CRYPTO_cleanup_all_ex_data();
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+    ::ERR_remove_state(0);
+#elif (OPENSSL_VERSION_NUMBER < 0x10100000L)
+    ::ERR_remove_thread_state(NULL);
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) \
+  && (OPENSSL_VERSION_NUMBER < 0x10100000L) \
+  && !defined(OPENSSL_IS_BORINGSSL)
+    ::SSL_COMP_free_compression_methods();
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L)
+       // && (OPENSSL_VERSION_NUMBER < 0x10100000L)
 #if !defined(OPENSSL_IS_BORINGSSL)
     ::CONF_modules_unload(1);
 #endif // !defined(OPENSSL_IS_BORINGSSL)
-#if !defined(OPENSSL_NO_ENGINE)
+#if !defined(OPENSSL_NO_ENGINE) \
+  && (OPENSSL_VERSION_NUMBER < 0x10100000L)
     ::ENGINE_cleanup();
 #endif // !defined(OPENSSL_NO_ENGINE)
+       // && (OPENSSL_VERSION_NUMBER < 0x10100000L)
   }
 
 #if !defined(SSL_OP_NO_COMPRESSION) \
@@ -88,19 +104,20 @@
        // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
 
 private:
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
   static unsigned long openssl_id_func()
   {
 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
     return ::GetCurrentThreadId();
 #else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
-    void* id = instance()->thread_id_;
-    if (id == 0)
-      instance()->thread_id_ = id = &id; // Ugh.
+    void* id = &errno;
     ASIO_ASSERT(sizeof(unsigned long) >= sizeof(void*));
     return reinterpret_cast<unsigned long>(id);
 #endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
   }
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
 
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
   static void openssl_locking_func(int mode, int n, 
     const char* /*file*/, int /*line*/)
   {
@@ -113,11 +130,7 @@
   // Mutexes to be used in locking callbacks.
   std::vector<asio::detail::shared_ptr<
         asio::detail::mutex> > mutexes_;
-
-#if !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
-  // The thread identifiers to be used by openssl.
-  asio::detail::tss_ptr<void> thread_id_;
-#endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
 
 #if !defined(SSL_OP_NO_COMPRESSION) \
   && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
diff --git a/asio/include/asio/ssl/detail/io.hpp b/asio/include/asio/ssl/detail/io.hpp
index 3d5bed6..5d35ba4 100644
--- a/asio/include/asio/ssl/detail/io.hpp
+++ b/asio/include/asio/ssl/detail/io.hpp
@@ -2,7 +2,7 @@
 // ssl/detail/io.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/detail/openssl_init.hpp b/asio/include/asio/ssl/detail/openssl_init.hpp
index 2564ba7..6144534 100644
--- a/asio/include/asio/ssl/detail/openssl_init.hpp
+++ b/asio/include/asio/ssl/detail/openssl_init.hpp
@@ -2,7 +2,7 @@
 // ssl/detail/openssl_init.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/detail/openssl_types.hpp b/asio/include/asio/ssl/detail/openssl_types.hpp
index 5a14148..eda740d 100644
--- a/asio/include/asio/ssl/detail/openssl_types.hpp
+++ b/asio/include/asio/ssl/detail/openssl_types.hpp
@@ -2,7 +2,7 @@
 // ssl/detail/openssl_types.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -21,7 +21,9 @@
 #if !defined(OPENSSL_NO_ENGINE)
 # include <openssl/engine.h>
 #endif // !defined(OPENSSL_NO_ENGINE)
+#include <openssl/dh.h>
 #include <openssl/err.h>
+#include <openssl/rsa.h>
 #include <openssl/x509v3.h>
 #include "asio/detail/socket_types.hpp"
 
diff --git a/asio/include/asio/ssl/detail/password_callback.hpp b/asio/include/asio/ssl/detail/password_callback.hpp
index ad0d9cd..abff36c 100644
--- a/asio/include/asio/ssl/detail/password_callback.hpp
+++ b/asio/include/asio/ssl/detail/password_callback.hpp
@@ -2,7 +2,7 @@
 // ssl/detail/password_callback.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/detail/read_op.hpp b/asio/include/asio/ssl/detail/read_op.hpp
index 44209d6..2195bc8 100644
--- a/asio/include/asio/ssl/detail/read_op.hpp
+++ b/asio/include/asio/ssl/detail/read_op.hpp
@@ -2,7 +2,7 @@
 // ssl/detail/read_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/detail/shutdown_op.hpp b/asio/include/asio/ssl/detail/shutdown_op.hpp
index cfb11d2..974eaa0 100644
--- a/asio/include/asio/ssl/detail/shutdown_op.hpp
+++ b/asio/include/asio/ssl/detail/shutdown_op.hpp
@@ -2,7 +2,7 @@
 // ssl/detail/shutdown_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/detail/stream_core.hpp b/asio/include/asio/ssl/detail/stream_core.hpp
index 1874bda..1872912 100644
--- a/asio/include/asio/ssl/detail/stream_core.hpp
+++ b/asio/include/asio/ssl/detail/stream_core.hpp
@@ -2,7 +2,7 @@
 // ssl/detail/stream_core.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -113,13 +113,13 @@
   std::vector<unsigned char> output_buffer_space_;
 
   // A buffer that may be used to prepare output intended for the transport.
-  const asio::mutable_buffers_1 output_buffer_;
+  const asio::mutable_buffer output_buffer_;
 
   // Buffer space used to read input intended for the engine.
   std::vector<unsigned char> input_buffer_space_;
 
   // A buffer that may be used to read input intended for the engine.
-  const asio::mutable_buffers_1 input_buffer_;
+  const asio::mutable_buffer input_buffer_;
 
   // The buffer pointing to the engine's unconsumed input.
   asio::const_buffer input_;
diff --git a/asio/include/asio/ssl/detail/verify_callback.hpp b/asio/include/asio/ssl/detail/verify_callback.hpp
index 20e246c..288ff66 100644
--- a/asio/include/asio/ssl/detail/verify_callback.hpp
+++ b/asio/include/asio/ssl/detail/verify_callback.hpp
@@ -2,7 +2,7 @@
 // ssl/detail/verify_callback.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/detail/write_op.hpp b/asio/include/asio/ssl/detail/write_op.hpp
index dcd8640..d40719e 100644
--- a/asio/include/asio/ssl/detail/write_op.hpp
+++ b/asio/include/asio/ssl/detail/write_op.hpp
@@ -2,7 +2,7 @@
 // ssl/detail/write_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/error.hpp b/asio/include/asio/ssl/error.hpp
index f044f59..3efef0c 100644
--- a/asio/include/asio/ssl/error.hpp
+++ b/asio/include/asio/ssl/error.hpp
@@ -2,7 +2,7 @@
 // ssl/error.hpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -40,8 +40,14 @@
 
 enum stream_errors
 {
+#if defined(GENERATING_DOCUMENTATION)
   /// The underlying stream closed before the ssl stream gracefully shut down.
+  stream_truncated
+#elif (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL)
+  stream_truncated = ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ)
+#else
   stream_truncated = 1
+#endif
 };
 
 extern ASIO_DECL
diff --git a/asio/include/asio/ssl/impl/context.hpp b/asio/include/asio/ssl/impl/context.hpp
index 43d3aa0..2b5a161 100644
--- a/asio/include/asio/ssl/impl/context.hpp
+++ b/asio/include/asio/ssl/impl/context.hpp
@@ -3,7 +3,7 @@
 // ~~~~~~~~~~~~~~~~~~~~
 //
 // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -34,11 +34,12 @@
 }
 
 template <typename VerifyCallback>
-asio::error_code context::set_verify_callback(
+ASIO_SYNC_OP_VOID context::set_verify_callback(
     VerifyCallback callback, asio::error_code& ec)
 {
-  return do_set_verify_callback(
+  do_set_verify_callback(
       new detail::verify_callback<VerifyCallback>(callback), ec);
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 template <typename PasswordCallback>
@@ -50,11 +51,12 @@
 }
 
 template <typename PasswordCallback>
-asio::error_code context::set_password_callback(
+ASIO_SYNC_OP_VOID context::set_password_callback(
     PasswordCallback callback, asio::error_code& ec)
 {
-  return do_set_password_callback(
+  do_set_password_callback(
       new detail::password_callback<PasswordCallback>(callback), ec);
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 } // namespace ssl
diff --git a/asio/include/asio/ssl/impl/context.ipp b/asio/include/asio/ssl/impl/context.ipp
index 383711b..2b0c38d 100644
--- a/asio/include/asio/ssl/impl/context.ipp
+++ b/asio/include/asio/ssl/impl/context.ipp
@@ -3,7 +3,7 @@
 // ~~~~~~~~~~~~~~~~~~~~
 //
 // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -66,7 +66,8 @@
 
   switch (m)
   {
-#if defined(OPENSSL_NO_SSL2)
+#if defined(OPENSSL_NO_SSL2) \
+  || (OPENSSL_VERSION_NUMBER >= 0x10100000L)
   case context::sslv2:
   case context::sslv2_client:
   case context::sslv2_server:
@@ -74,6 +75,7 @@
         asio::error::invalid_argument, "context");
     break;
 #else // defined(OPENSSL_NO_SSL2)
+      // || (OPENSSL_VERSION_NUMBER >= 0x10100000L)
   case context::sslv2:
     handle_ = ::SSL_CTX_new(::SSLv2_method());
     break;
@@ -84,6 +86,15 @@
     handle_ = ::SSL_CTX_new(::SSLv2_server_method());
     break;
 #endif // defined(OPENSSL_NO_SSL2)
+       // || (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+#if defined(OPENSSL_NO_SSL3)
+  case context::sslv3:
+  case context::sslv3_client:
+  case context::sslv3_server:
+    asio::detail::throw_error(
+        asio::error::invalid_argument, "context");
+    break;
+#else // defined(OPENSSL_NO_SSL3)
   case context::sslv3:
     handle_ = ::SSL_CTX_new(::SSLv3_method());
     break;
@@ -93,6 +104,8 @@
   case context::sslv3_server:
     handle_ = ::SSL_CTX_new(::SSLv3_server_method());
     break;
+#endif // defined(OPENSSL_NO_SSL3)
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
   case context::tlsv1:
     handle_ = ::SSL_CTX_new(::TLSv1_method());
     break;
@@ -102,6 +115,7 @@
   case context::tlsv1_server:
     handle_ = ::SSL_CTX_new(::TLSv1_server_method());
     break;
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
   case context::sslv23:
     handle_ = ::SSL_CTX_new(::SSLv23_method());
     break;
@@ -111,6 +125,7 @@
   case context::sslv23_server:
     handle_ = ::SSL_CTX_new(::SSLv23_server_method());
     break;
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
 #if defined(SSL_TXT_TLSV1_1)
   case context::tlsv11:
     handle_ = ::SSL_CTX_new(::TLSv1_1_method());
@@ -147,6 +162,23 @@
         asio::error::invalid_argument, "context");
     break;
 #endif // defined(SSL_TXT_TLSV1_2) 
+#else // (OPENSSL_VERSION_NUMBER < 0x10100000L)
+  case context::tlsv1:
+  case context::tlsv11:
+  case context::tlsv12:
+    handle_ = ::SSL_CTX_new(::TLS_method());
+    break;
+  case context::tlsv1_client:
+  case context::tlsv11_client:
+  case context::tlsv12_client:
+    handle_ = ::SSL_CTX_new(::TLS_client_method());
+    break;
+  case context::tlsv1_server:
+  case context::tlsv11_server:
+  case context::tlsv12_server:
+    handle_ = ::SSL_CTX_new(::TLS_server_method());
+    break;
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
   default:
     handle_ = ::SSL_CTX_new(0);
     break;
@@ -183,13 +215,22 @@
 {
   if (handle_)
   {
-    if (handle_->default_passwd_callback_userdata)
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+    void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+    void* cb_userdata = handle_->default_passwd_callback_userdata;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+    if (cb_userdata)
     {
       detail::password_callback_base* callback =
         static_cast<detail::password_callback_base*>(
-            handle_->default_passwd_callback_userdata);
+            cb_userdata);
       delete callback;
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+      ::SSL_CTX_set_default_passwd_cb_userdata(handle_, 0);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
       handle_->default_passwd_callback_userdata = 0;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
     }
 
     if (SSL_CTX_get_app_data(handle_))
@@ -217,7 +258,7 @@
   asio::detail::throw_error(ec, "clear_options");
 }
 
-asio::error_code context::clear_options(
+ASIO_SYNC_OP_VOID context::clear_options(
     context::options o, asio::error_code& ec)
 {
 #if (OPENSSL_VERSION_NUMBER >= 0x009080DFL) \
@@ -241,7 +282,7 @@
   ec = asio::error::operation_not_supported;
 #endif // (OPENSSL_VERSION_NUMBER >= 0x009080DFL)
        //   && (OPENSSL_VERSION_NUMBER != 0x00909000L)
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::set_options(context::options o)
@@ -251,7 +292,7 @@
   asio::detail::throw_error(ec, "set_options");
 }
 
-asio::error_code context::set_options(
+ASIO_SYNC_OP_VOID context::set_options(
     context::options o, asio::error_code& ec)
 {
 #if !defined(SSL_OP_NO_COMPRESSION)
@@ -268,7 +309,7 @@
   ::SSL_CTX_set_options(handle_, o);
 
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::set_verify_mode(verify_mode v)
@@ -278,13 +319,13 @@
   asio::detail::throw_error(ec, "set_verify_mode");
 }
 
-asio::error_code context::set_verify_mode(
+ASIO_SYNC_OP_VOID context::set_verify_mode(
     verify_mode v, asio::error_code& ec)
 {
   ::SSL_CTX_set_verify(handle_, v, ::SSL_CTX_get_verify_callback(handle_));
 
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::set_verify_depth(int depth)
@@ -294,13 +335,13 @@
   asio::detail::throw_error(ec, "set_verify_depth");
 }
 
-asio::error_code context::set_verify_depth(
+ASIO_SYNC_OP_VOID context::set_verify_depth(
     int depth, asio::error_code& ec)
 {
   ::SSL_CTX_set_verify_depth(handle_, depth);
 
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::load_verify_file(const std::string& filename)
@@ -310,7 +351,7 @@
   asio::detail::throw_error(ec, "load_verify_file");
 }
 
-asio::error_code context::load_verify_file(
+ASIO_SYNC_OP_VOID context::load_verify_file(
     const std::string& filename, asio::error_code& ec)
 {
   ::ERR_clear_error();
@@ -320,11 +361,11 @@
     ec = asio::error_code(
         static_cast<int>(::ERR_get_error()),
         asio::error::get_ssl_category());
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::add_certificate_authority(const const_buffer& ca)
@@ -334,7 +375,7 @@
   asio::detail::throw_error(ec, "add_certificate_authority");
 }
 
-asio::error_code context::add_certificate_authority(
+ASIO_SYNC_OP_VOID context::add_certificate_authority(
     const const_buffer& ca, asio::error_code& ec)
 {
   ::ERR_clear_error();
@@ -350,7 +391,7 @@
         if (::X509_STORE_add_cert(store, cert.p) == 1)
         {
           ec = asio::error_code();
-          return ec;
+          ASIO_SYNC_OP_VOID_RETURN(ec);
         }
       }
     }
@@ -359,7 +400,7 @@
   ec = asio::error_code(
       static_cast<int>(::ERR_get_error()),
       asio::error::get_ssl_category());
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::set_default_verify_paths()
@@ -369,7 +410,7 @@
   asio::detail::throw_error(ec, "set_default_verify_paths");
 }
 
-asio::error_code context::set_default_verify_paths(
+ASIO_SYNC_OP_VOID context::set_default_verify_paths(
     asio::error_code& ec)
 {
   ::ERR_clear_error();
@@ -379,11 +420,11 @@
     ec = asio::error_code(
         static_cast<int>(::ERR_get_error()),
         asio::error::get_ssl_category());
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::add_verify_path(const std::string& path)
@@ -393,7 +434,7 @@
   asio::detail::throw_error(ec, "add_verify_path");
 }
 
-asio::error_code context::add_verify_path(
+ASIO_SYNC_OP_VOID context::add_verify_path(
     const std::string& path, asio::error_code& ec)
 {
   ::ERR_clear_error();
@@ -403,11 +444,11 @@
     ec = asio::error_code(
         static_cast<int>(::ERR_get_error()),
         asio::error::get_ssl_category());
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::use_certificate(
@@ -418,7 +459,7 @@
   asio::detail::throw_error(ec, "use_certificate");
 }
 
-asio::error_code context::use_certificate(
+ASIO_SYNC_OP_VOID context::use_certificate(
     const const_buffer& certificate, file_format format,
     asio::error_code& ec)
 {
@@ -431,7 +472,7 @@
           static_cast<const unsigned char*>(certificate.data())) == 1)
     {
       ec = asio::error_code();
-      return ec;
+      ASIO_SYNC_OP_VOID_RETURN(ec);
     }
   }
   else if (format == context_base::pem)
@@ -445,7 +486,7 @@
         if (::SSL_CTX_use_certificate(handle_, cert.p) == 1)
         {
           ec = asio::error_code();
-          return ec;
+          ASIO_SYNC_OP_VOID_RETURN(ec);
         }
       }
     }
@@ -453,13 +494,13 @@
   else
   {
     ec = asio::error::invalid_argument;
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   ec = asio::error_code(
       static_cast<int>(::ERR_get_error()),
       asio::error::get_ssl_category());
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::use_certificate_file(
@@ -470,7 +511,7 @@
   asio::detail::throw_error(ec, "use_certificate_file");
 }
 
-asio::error_code context::use_certificate_file(
+ASIO_SYNC_OP_VOID context::use_certificate_file(
     const std::string& filename, file_format format,
     asio::error_code& ec)
 {
@@ -486,7 +527,7 @@
   default:
     {
       ec = asio::error::invalid_argument;
-      return ec;
+      ASIO_SYNC_OP_VOID_RETURN(ec);
     }
   }
 
@@ -497,11 +538,11 @@
     ec = asio::error_code(
         static_cast<int>(::ERR_get_error()),
         asio::error::get_ssl_category());
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::use_certificate_chain(const const_buffer& chain)
@@ -511,7 +552,7 @@
   asio::detail::throw_error(ec, "use_certificate_chain");
 }
 
-asio::error_code context::use_certificate_chain(
+ASIO_SYNC_OP_VOID context::use_certificate_chain(
     const const_buffer& chain, asio::error_code& ec)
 {
   ::ERR_clear_error();
@@ -519,15 +560,22 @@
   bio_cleanup bio = { make_buffer_bio(chain) };
   if (bio.p)
   {
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+    pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+    void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+    pem_password_cb* callback = handle_->default_passwd_callback;
+    void* cb_userdata = handle_->default_passwd_callback_userdata;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
     x509_cleanup cert = {
       ::PEM_read_bio_X509_AUX(bio.p, 0,
-          handle_->default_passwd_callback,
-          handle_->default_passwd_callback_userdata) };
+          callback,
+          cb_userdata) };
     if (!cert.p)
     {
       ec = asio::error_code(ERR_R_PEM_LIB,
           asio::error::get_ssl_category());
-      return ec;
+      ASIO_SYNC_OP_VOID_RETURN(ec);
     }
 
     int result = ::SSL_CTX_use_certificate(handle_, cert.p);
@@ -536,7 +584,7 @@
       ec = asio::error_code(
           static_cast<int>(::ERR_get_error()),
           asio::error::get_ssl_category());
-      return ec;
+      ASIO_SYNC_OP_VOID_RETURN(ec);
     }
 
 #if (OPENSSL_VERSION_NUMBER >= 0x10002000L)
@@ -550,15 +598,15 @@
 #endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L)
 
     while (X509* cacert = ::PEM_read_bio_X509(bio.p, 0,
-          handle_->default_passwd_callback,
-          handle_->default_passwd_callback_userdata))
+          callback,
+          cb_userdata))
     {
       if (!::SSL_CTX_add_extra_chain_cert(handle_, cacert))
       {
         ec = asio::error_code(
             static_cast<int>(::ERR_get_error()),
             asio::error::get_ssl_category());
-        return ec;
+        ASIO_SYNC_OP_VOID_RETURN(ec);
       }
     }
   
@@ -568,14 +616,14 @@
     {
       ::ERR_clear_error();
       ec = asio::error_code();
-      return ec;
+      ASIO_SYNC_OP_VOID_RETURN(ec);
     }
   }
 
   ec = asio::error_code(
       static_cast<int>(::ERR_get_error()),
       asio::error::get_ssl_category());
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::use_certificate_chain_file(const std::string& filename)
@@ -585,7 +633,7 @@
   asio::detail::throw_error(ec, "use_certificate_chain_file");
 }
 
-asio::error_code context::use_certificate_chain_file(
+ASIO_SYNC_OP_VOID context::use_certificate_chain_file(
     const std::string& filename, asio::error_code& ec)
 {
   ::ERR_clear_error();
@@ -595,11 +643,11 @@
     ec = asio::error_code(
         static_cast<int>(::ERR_get_error()),
         asio::error::get_ssl_category());
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::use_private_key(
@@ -610,12 +658,20 @@
   asio::detail::throw_error(ec, "use_private_key");
 }
 
-asio::error_code context::use_private_key(
+ASIO_SYNC_OP_VOID context::use_private_key(
     const const_buffer& private_key, context::file_format format,
     asio::error_code& ec)
 {
   ::ERR_clear_error();
 
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+    pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+    void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+    pem_password_cb* callback = handle_->default_passwd_callback;
+    void* cb_userdata = handle_->default_passwd_callback_userdata;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+
   bio_cleanup bio = { make_buffer_bio(private_key) };
   if (bio.p)
   {
@@ -627,13 +683,13 @@
       break;
     case context_base::pem:
       evp_private_key.p = ::PEM_read_bio_PrivateKey(
-          bio.p, 0, handle_->default_passwd_callback,
-          handle_->default_passwd_callback_userdata);
+          bio.p, 0, callback,
+          cb_userdata);
       break;
     default:
       {
         ec = asio::error::invalid_argument;
-        return ec;
+        ASIO_SYNC_OP_VOID_RETURN(ec);
       }
     }
 
@@ -642,7 +698,7 @@
       if (::SSL_CTX_use_PrivateKey(handle_, evp_private_key.p) == 1)
       {
         ec = asio::error_code();
-        return ec;
+        ASIO_SYNC_OP_VOID_RETURN(ec);
       }
     }
   }
@@ -650,7 +706,7 @@
   ec = asio::error_code(
       static_cast<int>(::ERR_get_error()),
       asio::error::get_ssl_category());
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::use_private_key_file(
@@ -669,12 +725,20 @@
   asio::detail::throw_error(ec, "use_rsa_private_key");
 }
 
-asio::error_code context::use_rsa_private_key(
+ASIO_SYNC_OP_VOID context::use_rsa_private_key(
     const const_buffer& private_key, context::file_format format,
     asio::error_code& ec)
 {
   ::ERR_clear_error();
 
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+    pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+    void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+    pem_password_cb* callback = handle_->default_passwd_callback;
+    void* cb_userdata = handle_->default_passwd_callback_userdata;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+
   bio_cleanup bio = { make_buffer_bio(private_key) };
   if (bio.p)
   {
@@ -686,13 +750,13 @@
       break;
     case context_base::pem:
       rsa_private_key.p = ::PEM_read_bio_RSAPrivateKey(
-          bio.p, 0, handle_->default_passwd_callback,
-          handle_->default_passwd_callback_userdata);
+          bio.p, 0, callback,
+          cb_userdata);
       break;
     default:
       {
         ec = asio::error::invalid_argument;
-        return ec;
+        ASIO_SYNC_OP_VOID_RETURN(ec);
       }
     }
 
@@ -701,7 +765,7 @@
       if (::SSL_CTX_use_RSAPrivateKey(handle_, rsa_private_key.p) == 1)
       {
         ec = asio::error_code();
-        return ec;
+        ASIO_SYNC_OP_VOID_RETURN(ec);
       }
     }
   }
@@ -709,10 +773,10 @@
   ec = asio::error_code(
       static_cast<int>(::ERR_get_error()),
       asio::error::get_ssl_category());
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
-asio::error_code context::use_private_key_file(
+ASIO_SYNC_OP_VOID context::use_private_key_file(
     const std::string& filename, context::file_format format,
     asio::error_code& ec)
 {
@@ -728,7 +792,7 @@
   default:
     {
       ec = asio::error::invalid_argument;
-      return ec;
+      ASIO_SYNC_OP_VOID_RETURN(ec);
     }
   }
 
@@ -739,11 +803,11 @@
     ec = asio::error_code(
         static_cast<int>(::ERR_get_error()),
         asio::error::get_ssl_category());
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::use_rsa_private_key_file(
@@ -754,7 +818,7 @@
   asio::detail::throw_error(ec, "use_rsa_private_key_file");
 }
 
-asio::error_code context::use_rsa_private_key_file(
+ASIO_SYNC_OP_VOID context::use_rsa_private_key_file(
     const std::string& filename, context::file_format format,
     asio::error_code& ec)
 {
@@ -770,7 +834,7 @@
   default:
     {
       ec = asio::error::invalid_argument;
-      return ec;
+      ASIO_SYNC_OP_VOID_RETURN(ec);
     }
   }
 
@@ -782,11 +846,11 @@
     ec = asio::error_code(
         static_cast<int>(::ERR_get_error()),
         asio::error::get_ssl_category());
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::use_tmp_dh(const const_buffer& dh)
@@ -796,7 +860,7 @@
   asio::detail::throw_error(ec, "use_tmp_dh");
 }
 
-asio::error_code context::use_tmp_dh(
+ASIO_SYNC_OP_VOID context::use_tmp_dh(
     const const_buffer& dh, asio::error_code& ec)
 {
   ::ERR_clear_error();
@@ -810,7 +874,7 @@
   ec = asio::error_code(
       static_cast<int>(::ERR_get_error()),
       asio::error::get_ssl_category());
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 void context::use_tmp_dh_file(const std::string& filename)
@@ -820,7 +884,7 @@
   asio::detail::throw_error(ec, "use_tmp_dh_file");
 }
 
-asio::error_code context::use_tmp_dh_file(
+ASIO_SYNC_OP_VOID context::use_tmp_dh_file(
     const std::string& filename, asio::error_code& ec)
 {
   ::ERR_clear_error();
@@ -834,10 +898,10 @@
   ec = asio::error_code(
       static_cast<int>(::ERR_get_error()),
       asio::error::get_ssl_category());
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
-asio::error_code context::do_use_tmp_dh(
+ASIO_SYNC_OP_VOID context::do_use_tmp_dh(
     BIO* bio, asio::error_code& ec)
 {
   ::ERR_clear_error();
@@ -848,17 +912,17 @@
     if (::SSL_CTX_set_tmp_dh(handle_, dh.p) == 1)
     {
       ec = asio::error_code();
-      return ec;
+      ASIO_SYNC_OP_VOID_RETURN(ec);
     }
   }
 
   ec = asio::error_code(
       static_cast<int>(::ERR_get_error()),
       asio::error::get_ssl_category());
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
-asio::error_code context::do_set_verify_callback(
+ASIO_SYNC_OP_VOID context::do_set_verify_callback(
     detail::verify_callback_base* callback, asio::error_code& ec)
 {
   if (SSL_CTX_get_app_data(handle_))
@@ -874,7 +938,7 @@
       &context::verify_callback_function);
 
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 int context::verify_callback_function(int preverified, X509_STORE_CTX* ctx)
@@ -903,19 +967,25 @@
   return 0;
 }
 
-asio::error_code context::do_set_password_callback(
+ASIO_SYNC_OP_VOID context::do_set_password_callback(
     detail::password_callback_base* callback, asio::error_code& ec)
 {
-  if (handle_->default_passwd_callback_userdata)
-    delete static_cast<detail::password_callback_base*>(
-        handle_->default_passwd_callback_userdata);
-
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+  void* old_callback = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+  ::SSL_CTX_set_default_passwd_cb_userdata(handle_, callback);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+  void* old_callback = handle_->default_passwd_callback_userdata;
   handle_->default_passwd_callback_userdata = callback;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+
+  if (old_callback)
+    delete static_cast<detail::password_callback_base*>(
+        old_callback);
 
   SSL_CTX_set_default_passwd_cb(handle_, &context::password_callback_function);
 
   ec = asio::error_code();
-  return ec;
+  ASIO_SYNC_OP_VOID_RETURN(ec);
 }
 
 int context::password_callback_function(
diff --git a/asio/include/asio/ssl/impl/error.ipp b/asio/include/asio/ssl/impl/error.ipp
index 8c20e81..268fc96 100644
--- a/asio/include/asio/ssl/impl/error.ipp
+++ b/asio/include/asio/ssl/impl/error.ipp
@@ -2,7 +2,7 @@
 // ssl/impl/error.ipp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -51,6 +51,16 @@
 } // namespace error
 namespace ssl {
 namespace error {
+
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL)
+
+const asio::error_category& get_stream_category()
+{
+  return asio::error::get_ssl_category();
+}
+
+#else
+
 namespace detail {
 
 class stream_category : public asio::error_category
@@ -79,6 +89,8 @@
   return instance;
 }
 
+#endif
+
 } // namespace error
 } // namespace ssl
 } // namespace asio
diff --git a/asio/include/asio/ssl/impl/rfc2818_verification.ipp b/asio/include/asio/ssl/impl/rfc2818_verification.ipp
index e84cde6..810b742 100644
--- a/asio/include/asio/ssl/impl/rfc2818_verification.ipp
+++ b/asio/include/asio/ssl/impl/rfc2818_verification.ipp
@@ -2,7 +2,7 @@
 // ssl/impl/rfc2818_verification.ipp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/impl/src.hpp b/asio/include/asio/ssl/impl/src.hpp
index 8db35ce..e6e269f 100644
--- a/asio/include/asio/ssl/impl/src.hpp
+++ b/asio/include/asio/ssl/impl/src.hpp
@@ -2,7 +2,7 @@
 // impl/ssl/src.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/rfc2818_verification.hpp b/asio/include/asio/ssl/rfc2818_verification.hpp
index 00a29f1..a4ab67b 100644
--- a/asio/include/asio/ssl/rfc2818_verification.hpp
+++ b/asio/include/asio/ssl/rfc2818_verification.hpp
@@ -2,7 +2,7 @@
 // ssl/rfc2818_verification.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/stream.hpp b/asio/include/asio/ssl/stream.hpp
index 3b4c15f..bc259b5 100644
--- a/asio/include/asio/ssl/stream.hpp
+++ b/asio/include/asio/ssl/stream.hpp
@@ -2,7 +2,7 @@
 // ssl/stream.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -259,10 +259,11 @@
    *
    * @note Calls @c SSL_set_verify.
    */
-  asio::error_code set_verify_mode(
+  ASIO_SYNC_OP_VOID set_verify_mode(
       verify_mode v, asio::error_code& ec)
   {
-    return core_.engine_.set_verify_mode(v, ec);
+    core_.engine_.set_verify_mode(v, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Set the peer verification depth.
@@ -296,10 +297,11 @@
    *
    * @note Calls @c SSL_set_verify_depth.
    */
-  asio::error_code set_verify_depth(
+  ASIO_SYNC_OP_VOID set_verify_depth(
       int depth, asio::error_code& ec)
   {
-    return core_.engine_.set_verify_depth(depth, ec);
+    core_.engine_.set_verify_depth(depth, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Set the callback used to verify peer certificates.
@@ -347,11 +349,12 @@
    * @note Calls @c SSL_set_verify.
    */
   template <typename VerifyCallback>
-  asio::error_code set_verify_callback(VerifyCallback callback,
+  ASIO_SYNC_OP_VOID set_verify_callback(VerifyCallback callback,
       asio::error_code& ec)
   {
-    return core_.engine_.set_verify_callback(
+    core_.engine_.set_verify_callback(
         new detail::verify_callback<VerifyCallback>(callback), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Perform SSL handshaking.
@@ -381,11 +384,11 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code handshake(handshake_type type,
+  ASIO_SYNC_OP_VOID handshake(handshake_type type,
       asio::error_code& ec)
   {
     detail::io(next_layer_, core_, detail::handshake_op(type), ec);
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Perform SSL handshaking.
@@ -421,12 +424,12 @@
    * @param ec Set to indicate what error occurred, if any.
    */
   template <typename ConstBufferSequence>
-  asio::error_code handshake(handshake_type type,
+  ASIO_SYNC_OP_VOID handshake(handshake_type type,
       const ConstBufferSequence& buffers, asio::error_code& ec)
   {
     detail::io(next_layer_, core_,
         detail::buffered_handshake_op<ConstBufferSequence>(type, buffers), ec);
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Start an asynchronous SSL handshake.
@@ -458,7 +461,7 @@
       void (asio::error_code)> init(handler);
 
     detail::async_io(next_layer_, core_,
-        detail::handshake_op(type), init.handler);
+        detail::handshake_op(type), init.completion_handler);
 
     return init.result.get();
   }
@@ -500,7 +503,7 @@
 
     detail::async_io(next_layer_, core_,
         detail::buffered_handshake_op<ConstBufferSequence>(type, buffers),
-        init.handler);
+        init.completion_handler);
 
     return init.result.get();
   }
@@ -526,10 +529,10 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code shutdown(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID shutdown(asio::error_code& ec)
   {
     detail::io(next_layer_, core_, detail::shutdown_op(), ec);
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Asynchronously shut down SSL on the stream.
@@ -556,7 +559,8 @@
     asio::async_completion<ShutdownHandler,
       void (asio::error_code)> init(handler);
 
-    detail::async_io(next_layer_, core_, detail::shutdown_op(), init.handler);
+    detail::async_io(next_layer_, core_, detail::shutdown_op(),
+        init.completion_handler);
 
     return init.result.get();
   }
@@ -646,7 +650,8 @@
       void (asio::error_code, std::size_t)> init(handler);
 
     detail::async_io(next_layer_, core_,
-        detail::write_op<ConstBufferSequence>(buffers), init.handler);
+        detail::write_op<ConstBufferSequence>(buffers),
+        init.completion_handler);
 
     return init.result.get();
   }
@@ -737,7 +742,8 @@
       void (asio::error_code, std::size_t)> init(handler);
 
     detail::async_io(next_layer_, core_,
-        detail::read_op<MutableBufferSequence>(buffers), init.handler);
+        detail::read_op<MutableBufferSequence>(buffers),
+        init.completion_handler);
 
     return init.result.get();
   }
diff --git a/asio/include/asio/ssl/stream_base.hpp b/asio/include/asio/ssl/stream_base.hpp
index ed74134..275d3e3 100644
--- a/asio/include/asio/ssl/stream_base.hpp
+++ b/asio/include/asio/ssl/stream_base.hpp
@@ -2,7 +2,7 @@
 // ssl/stream_base.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/verify_context.hpp b/asio/include/asio/ssl/verify_context.hpp
index 65f97c0..560ffcc 100644
--- a/asio/include/asio/ssl/verify_context.hpp
+++ b/asio/include/asio/ssl/verify_context.hpp
@@ -2,7 +2,7 @@
 // ssl/verify_context.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ssl/verify_mode.hpp b/asio/include/asio/ssl/verify_mode.hpp
index adea0f0..7a2bd56 100644
--- a/asio/include/asio/ssl/verify_mode.hpp
+++ b/asio/include/asio/ssl/verify_mode.hpp
@@ -2,7 +2,7 @@
 // ssl/verify_mode.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/steady_timer.hpp b/asio/include/asio/steady_timer.hpp
index 73990a9..746ac04 100644
--- a/asio/include/asio/steady_timer.hpp
+++ b/asio/include/asio/steady_timer.hpp
@@ -2,7 +2,7 @@
 // steady_timer.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/strand.hpp b/asio/include/asio/strand.hpp
index 488b540..c70162b 100644
--- a/asio/include/asio/strand.hpp
+++ b/asio/include/asio/strand.hpp
@@ -2,7 +2,7 @@
 // strand.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,7 +18,6 @@
 #include "asio/detail/config.hpp"
 #include "asio/detail/strand_executor_service.hpp"
 #include "asio/detail/type_traits.hpp"
-#include "asio/is_executor.hpp"
 
 #include "asio/detail/push_options.hpp"
 
@@ -272,19 +271,16 @@
   implementation_type impl_;
 };
 
-#if !defined(GENERATING_DOCUMENTATION)
-template <typename Executor>
-struct is_executor<strand<Executor> > : true_type {};
-#endif // !defined(GENERATING_DOCUMENTATION)
-
 } // namespace asio
 
 #include "asio/detail/pop_options.hpp"
 
 // If both io_context.hpp and strand.hpp have been included, automatically
 // include the header file needed for the io_context::strand class.
-#if defined(ASIO_IO_CONTEXT_HPP)
-# include "asio/io_context_strand.hpp"
-#endif // defined(ASIO_IO_CONTEXT_HPP)
+#if !defined(ASIO_NO_EXTENSIONS)
+# if defined(ASIO_IO_CONTEXT_HPP)
+#  include "asio/io_context_strand.hpp"
+# endif // defined(ASIO_IO_CONTEXT_HPP)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 #endif // ASIO_STRAND_HPP
diff --git a/asio/include/asio/stream_socket_service.hpp b/asio/include/asio/stream_socket_service.hpp
index 6cee6ca..5cea565 100644
--- a/asio/include/asio/stream_socket_service.hpp
+++ b/asio/include/asio/stream_socket_service.hpp
@@ -2,7 +2,7 @@
 // stream_socket_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,6 +16,9 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include <cstddef>
 #include "asio/async_result.hpp"
 #include "asio/detail/type_traits.hpp"
@@ -131,22 +134,23 @@
   }
 
   /// Open a stream socket.
-  asio::error_code open(implementation_type& impl,
+  ASIO_SYNC_OP_VOID open(implementation_type& impl,
       const protocol_type& protocol, asio::error_code& ec)
   {
     if (protocol.type() == ASIO_OS_DEF(SOCK_STREAM))
       service_impl_.open(impl, protocol, ec);
     else
       ec = asio::error::invalid_argument;
-    return ec;
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Assign an existing native socket to a stream socket.
-  asio::error_code assign(implementation_type& impl,
+  ASIO_SYNC_OP_VOID assign(implementation_type& impl,
       const protocol_type& protocol, const native_handle_type& native_socket,
       asio::error_code& ec)
   {
-    return service_impl_.assign(impl, protocol, native_socket, ec);
+    service_impl_.assign(impl, protocol, native_socket, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the socket is open.
@@ -156,10 +160,11 @@
   }
 
   /// Close a stream socket implementation.
-  asio::error_code close(implementation_type& impl,
+  ASIO_SYNC_OP_VOID close(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.close(impl, ec);
+    service_impl_.close(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native socket implementation.
@@ -169,10 +174,11 @@
   }
 
   /// Cancel all asynchronous operations associated with the socket.
-  asio::error_code cancel(implementation_type& impl,
+  ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.cancel(impl, ec);
+    service_impl_.cancel(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the socket is at the out-of-band data mark.
@@ -190,17 +196,19 @@
   }
 
   /// Bind the stream socket to the specified local endpoint.
-  asio::error_code bind(implementation_type& impl,
+  ASIO_SYNC_OP_VOID bind(implementation_type& impl,
       const endpoint_type& endpoint, asio::error_code& ec)
   {
-    return service_impl_.bind(impl, endpoint, ec);
+    service_impl_.bind(impl, endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Connect the stream socket to the specified endpoint.
-  asio::error_code connect(implementation_type& impl,
+  ASIO_SYNC_OP_VOID connect(implementation_type& impl,
       const endpoint_type& peer_endpoint, asio::error_code& ec)
   {
-    return service_impl_.connect(impl, peer_endpoint, ec);
+    service_impl_.connect(impl, peer_endpoint, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Start an asynchronous connect.
@@ -214,33 +222,36 @@
     async_completion<ConnectHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_connect(impl, peer_endpoint, init.handler);
+    service_impl_.async_connect(impl, peer_endpoint, init.completion_handler);
 
     return init.result.get();
   }
 
   /// Set a socket option.
   template <typename SettableSocketOption>
-  asio::error_code set_option(implementation_type& impl,
+  ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
       const SettableSocketOption& option, asio::error_code& ec)
   {
-    return service_impl_.set_option(impl, option, ec);
+    service_impl_.set_option(impl, option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get a socket option.
   template <typename GettableSocketOption>
-  asio::error_code get_option(const implementation_type& impl,
+  ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
       GettableSocketOption& option, asio::error_code& ec) const
   {
-    return service_impl_.get_option(impl, option, ec);
+    service_impl_.get_option(impl, option, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Perform an IO control command on the socket.
   template <typename IoControlCommand>
-  asio::error_code io_control(implementation_type& impl,
+  ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
       IoControlCommand& command, asio::error_code& ec)
   {
-    return service_impl_.io_control(impl, command, ec);
+    service_impl_.io_control(impl, command, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the socket.
@@ -250,10 +261,11 @@
   }
 
   /// Sets the non-blocking mode of the socket.
-  asio::error_code non_blocking(implementation_type& impl,
+  ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
       bool mode, asio::error_code& ec)
   {
-    return service_impl_.non_blocking(impl, mode, ec);
+    service_impl_.non_blocking(impl, mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Gets the non-blocking mode of the native socket implementation.
@@ -263,10 +275,11 @@
   }
 
   /// Sets the non-blocking mode of the native socket implementation.
-  asio::error_code native_non_blocking(implementation_type& impl,
+  ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
       bool mode, asio::error_code& ec)
   {
-    return service_impl_.native_non_blocking(impl, mode, ec);
+    service_impl_.native_non_blocking(impl, mode, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the local endpoint.
@@ -284,18 +297,20 @@
   }
 
   /// Disable sends or receives on the socket.
-  asio::error_code shutdown(implementation_type& impl,
+  ASIO_SYNC_OP_VOID shutdown(implementation_type& impl,
       socket_base::shutdown_type what, asio::error_code& ec)
   {
-    return service_impl_.shutdown(impl, what, ec);
+    service_impl_.shutdown(impl, what, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Wait for the socket to become ready to read, ready to write, or to have
   /// pending error conditions.
-  asio::error_code wait(implementation_type& impl,
+  ASIO_SYNC_OP_VOID wait(implementation_type& impl,
       socket_base::wait_type w, asio::error_code& ec)
   {
-    return service_impl_.wait(impl, w, ec);
+    service_impl_.wait(impl, w, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Asynchronously wait for the socket to become ready to read, ready to
@@ -309,7 +324,7 @@
     async_completion<WaitHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_wait(impl, w, init.handler);
+    service_impl_.async_wait(impl, w, init.completion_handler);
 
     return init.result.get();
   }
@@ -335,7 +350,7 @@
     async_completion<WriteHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_send(impl, buffers, flags, init.handler);
+    service_impl_.async_send(impl, buffers, flags, init.completion_handler);
 
     return init.result.get();
   }
@@ -361,7 +376,7 @@
     async_completion<ReadHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_receive(impl, buffers, flags, init.handler);
+    service_impl_.async_receive(impl, buffers, flags, init.completion_handler);
 
     return init.result.get();
   }
@@ -381,4 +396,6 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_STREAM_SOCKET_SERVICE_HPP
diff --git a/asio/include/asio/streambuf.hpp b/asio/include/asio/streambuf.hpp
index 75cee1b..8e613e9 100644
--- a/asio/include/asio/streambuf.hpp
+++ b/asio/include/asio/streambuf.hpp
@@ -2,7 +2,7 @@
 // streambuf.hpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/system_error.hpp b/asio/include/asio/system_error.hpp
index 4ec121e..6c7a1e1 100644
--- a/asio/include/asio/system_error.hpp
+++ b/asio/include/asio/system_error.hpp
@@ -2,7 +2,7 @@
 // system_error.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/system_executor.hpp b/asio/include/asio/system_executor.hpp
index e227687..f23e35f 100644
--- a/asio/include/asio/system_executor.hpp
+++ b/asio/include/asio/system_executor.hpp
@@ -2,7 +2,7 @@
 // system_executor.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -19,7 +19,6 @@
 #include "asio/detail/scheduler.hpp"
 #include "asio/detail/thread_group.hpp"
 #include "asio/execution_context.hpp"
-#include "asio/is_executor.hpp"
 
 #include "asio/detail/push_options.hpp"
 
@@ -142,10 +141,6 @@
   };
 };
 
-#if !defined(GENERATING_DOCUMENTATION)
-template <> struct is_executor<system_executor> : true_type {};
-#endif // !defined(GENERATING_DOCUMENTATION)
-
 } // namespace asio
 
 #include "asio/detail/pop_options.hpp"
diff --git a/asio/include/asio/system_timer.hpp b/asio/include/asio/system_timer.hpp
index 8476ac0..d28e92c 100644
--- a/asio/include/asio/system_timer.hpp
+++ b/asio/include/asio/system_timer.hpp
@@ -2,7 +2,7 @@
 // system_timer.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/thread.hpp b/asio/include/asio/thread.hpp
index f101ed5..45ae392 100644
--- a/asio/include/asio/thread.hpp
+++ b/asio/include/asio/thread.hpp
@@ -2,7 +2,7 @@
 // thread.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/thread_pool.hpp b/asio/include/asio/thread_pool.hpp
index f3182bf..f62fc9d 100644
--- a/asio/include/asio/thread_pool.hpp
+++ b/asio/include/asio/thread_pool.hpp
@@ -2,7 +2,7 @@
 // thread_pool.hpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -20,7 +20,6 @@
 #include "asio/detail/scheduler.hpp"
 #include "asio/detail/thread_group.hpp"
 #include "asio/execution_context.hpp"
-#include "asio/is_executor.hpp"
 
 #include "asio/detail/push_options.hpp"
 
@@ -191,10 +190,6 @@
   thread_pool& pool_;
 };
 
-#if !defined(GENERATING_DOCUMENTATION)
-template <> struct is_executor<thread_pool::executor_type> : true_type {};
-#endif // !defined(GENERATING_DOCUMENTATION)
-
 } // namespace asio
 
 #include "asio/detail/pop_options.hpp"
diff --git a/asio/include/asio/time_traits.hpp b/asio/include/asio/time_traits.hpp
index 4cc4e24..c046794 100644
--- a/asio/include/asio/time_traits.hpp
+++ b/asio/include/asio/time_traits.hpp
@@ -2,7 +2,7 @@
 // time_traits.hpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ts/buffer.hpp b/asio/include/asio/ts/buffer.hpp
index f68ced9..257de20 100644
--- a/asio/include/asio/ts/buffer.hpp
+++ b/asio/include/asio/ts/buffer.hpp
@@ -2,7 +2,7 @@
 // ts/buffer.hpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,7 +16,6 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/buffer.hpp"
-#include "asio/streambuf.hpp"
 #include "asio/completion_condition.hpp"
 #include "asio/read.hpp"
 #include "asio/write.hpp"
diff --git a/asio/include/asio/ts/executor.hpp b/asio/include/asio/ts/executor.hpp
index 8ba3871..d67c72e 100644
--- a/asio/include/asio/ts/executor.hpp
+++ b/asio/include/asio/ts/executor.hpp
@@ -2,7 +2,7 @@
 // ts/executor.hpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -29,7 +29,7 @@
 #include "asio/post.hpp"
 #include "asio/defer.hpp"
 #include "asio/strand.hpp"
-#include "asio/package.hpp"
+#include "asio/packaged_task.hpp"
 #include "asio/use_future.hpp"
 
 #endif // ASIO_TS_EXECUTOR_HPP
diff --git a/asio/include/asio/ts/internet.hpp b/asio/include/asio/ts/internet.hpp
index 752a38b..39e5b85 100644
--- a/asio/include/asio/ts/internet.hpp
+++ b/asio/include/asio/ts/internet.hpp
@@ -2,7 +2,7 @@
 // ts/internet.hpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -29,6 +29,8 @@
 #include "asio/ip/basic_resolver_iterator.hpp"
 #include "asio/ip/basic_resolver.hpp"
 #include "asio/ip/host_name.hpp"
+#include "asio/ip/network_v4.hpp"
+#include "asio/ip/network_v6.hpp"
 #include "asio/ip/tcp.hpp"
 #include "asio/ip/udp.hpp"
 #include "asio/ip/v6_only.hpp"
diff --git a/asio/include/asio/ts/io_context.hpp b/asio/include/asio/ts/io_context.hpp
index a648624..fc7e8f8 100644
--- a/asio/include/asio/ts/io_context.hpp
+++ b/asio/include/asio/ts/io_context.hpp
@@ -2,7 +2,7 @@
 // ts/io_context.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ts/networking.hpp b/asio/include/asio/ts/net.hpp
similarity index 70%
rename from asio/include/asio/ts/networking.hpp
rename to asio/include/asio/ts/net.hpp
index 75ac6e8..5af4c6f 100644
--- a/asio/include/asio/ts/networking.hpp
+++ b/asio/include/asio/ts/net.hpp
@@ -1,20 +1,21 @@
 //
-// ts/networking.hpp
-// ~~~~~~~~~~~~~~~~~
+// ts/net.hpp
+// ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
 
-#ifndef ASIO_TS_NETWORKING_HPP
-#define ASIO_TS_NETWORKING_HPP
+#ifndef ASIO_TS_NET_HPP
+#define ASIO_TS_NET_HPP
 
 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
 # pragma once
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
+#include "asio/ts/netfwd.hpp"
 #include "asio/ts/executor.hpp"
 #include "asio/ts/io_context.hpp"
 #include "asio/ts/timer.hpp"
@@ -22,4 +23,4 @@
 #include "asio/ts/socket.hpp"
 #include "asio/ts/internet.hpp"
 
-#endif // ASIO_TS_NETWORKING_HPP
+#endif // ASIO_TS_NET_HPP
diff --git a/asio/include/asio/ts/netfwd.hpp b/asio/include/asio/ts/netfwd.hpp
new file mode 100644
index 0000000..5902921
--- /dev/null
+++ b/asio/include/asio/ts/netfwd.hpp
@@ -0,0 +1,197 @@
+//
+// ts/netfwd.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ASIO_TS_NETFWD_HPP
+#define ASIO_TS_NETFWD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_CHRONO)
+# include "asio/detail/chrono.hpp"
+#endif // defined(ASIO_HAS_CHRONO)
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/detail/date_time_fwd.hpp"
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+class execution_context;
+
+template <typename T, typename Executor>
+class executor_binder;
+
+template <typename Executor>
+class executor_work_guard;
+
+class system_executor;
+
+class executor;
+
+template <typename Executor>
+class strand;
+
+class io_context;
+
+template <typename Clock>
+struct wait_traits;
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+
+template <typename Time>
+struct time_traits;
+
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
+template <typename Clock, typename WaitTraits>
+class waitable_timer_service;
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+
+template <typename TimeType, typename TimeTraits>
+class deadline_timer_service;
+
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
+#if !defined(ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
+#define ASIO_BASIC_WAITABLE_TIMER_FWD_DECL
+
+template <typename Clock,
+    typename WaitTraits = asio::wait_traits<Clock>
+    ASIO_SVC_TPARAM_DEF2(= waitable_timer_service<Clock, WaitTraits>)>
+class basic_waitable_timer;
+
+#endif // !defined(ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
+
+#if defined(ASIO_HAS_CHRONO)
+
+typedef basic_waitable_timer<chrono::system_clock> system_timer;
+
+typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
+
+typedef basic_waitable_timer<chrono::high_resolution_clock>
+  high_resolution_timer;
+
+#endif // defined(ASIO_HAS_CHRONO)
+
+template <class Protocol ASIO_SVC_TPARAM>
+class basic_socket;
+
+template <typename Protocol ASIO_SVC_TPARAM>
+class basic_datagram_socket;
+
+template <typename Protocol ASIO_SVC_TPARAM>
+class basic_stream_socket;
+
+template <typename Protocol ASIO_SVC_TPARAM>
+class basic_socket_acceptor;
+
+#if !defined(ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
+#define ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol
+    ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>),
+#if defined(ASIO_HAS_BOOST_DATE_TIME) \
+  || defined(GENERATING_DOCUMENTATION)
+    typename Clock = boost::posix_time::ptime,
+    typename WaitTraits = time_traits<Clock>
+    ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)>
+#else
+    typename Clock = chrono::steady_clock,
+    typename WaitTraits = wait_traits<Clock>
+    ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)>
+#endif
+class basic_socket_streambuf;
+
+#endif // !defined(ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
+
+#if !defined(ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
+#define ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol
+    ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>),
+#if defined(ASIO_HAS_BOOST_DATE_TIME) \
+  || defined(GENERATING_DOCUMENTATION)
+    typename Clock = boost::posix_time::ptime,
+    typename WaitTraits = time_traits<Clock>
+    ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)>
+#else
+    typename Clock = chrono::steady_clock,
+    typename WaitTraits = wait_traits<Clock>
+    ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)>
+#endif
+class basic_socket_iostream;
+
+#endif // !defined(ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
+
+namespace ip {
+
+class address;
+
+class address_v4;
+
+class address_v6;
+
+template <typename Address>
+class basic_address_iterator;
+
+typedef basic_address_iterator<address_v4> address_v4_iterator;
+
+typedef basic_address_iterator<address_v6> address_v6_iterator;
+
+template <typename Address>
+class basic_address_range;
+
+typedef basic_address_range<address_v4> address_v4_range;
+
+typedef basic_address_range<address_v6> address_v6_range;
+
+class network_v4;
+
+class network_v6;
+
+template <typename InternetProtocol>
+class basic_endpoint;
+
+template <typename InternetProtocol>
+class basic_resolver_entry;
+
+template <typename InternetProtocol>
+class basic_resolver_results;
+
+template <typename InternetProtocol ASIO_SVC_TPARAM>
+class basic_resolver;
+
+class tcp;
+
+class udp;
+
+} // namespace ip
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_TS_NETFWD_HPP
diff --git a/asio/include/asio/ts/socket.hpp b/asio/include/asio/ts/socket.hpp
index bb798dd..ecc4a2e 100644
--- a/asio/include/asio/ts/socket.hpp
+++ b/asio/include/asio/ts/socket.hpp
@@ -2,7 +2,7 @@
 // ts/socket.hpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/ts/thread_pool.hpp b/asio/include/asio/ts/thread_pool.hpp
deleted file mode 100644
index 6d2839d..0000000
--- a/asio/include/asio/ts/thread_pool.hpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// ts/thread_pool.hpp
-// ~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_TS_THREAD_POOL_HPP
-#define ASIO_TS_THREAD_POOL_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/thread_pool.hpp"
-
-#endif // ASIO_TS_THREAD_POOL_HPP
diff --git a/asio/include/asio/ts/timer.hpp b/asio/include/asio/ts/timer.hpp
index f2d4026..a47d656 100644
--- a/asio/include/asio/ts/timer.hpp
+++ b/asio/include/asio/ts/timer.hpp
@@ -2,7 +2,7 @@
 // ts/timer.hpp
 // ~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/unyield.hpp b/asio/include/asio/unyield.hpp
index 50ff8cf..ccbb043 100644
--- a/asio/include/asio/unyield.hpp
+++ b/asio/include/asio/unyield.hpp
@@ -2,7 +2,7 @@
 // unyield.hpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/use_future.hpp b/asio/include/asio/use_future.hpp
index 15136a8..2a0e24f 100644
--- a/asio/include/asio/use_future.hpp
+++ b/asio/include/asio/use_future.hpp
@@ -2,7 +2,7 @@
 // use_future.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,11 +16,25 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_STD_FUTURE) \
+  || defined(GENERATING_DOCUMENTATION)
+
 #include <memory>
+#include "asio/detail/type_traits.hpp"
 
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
+namespace detail {
+
+template <typename Function, typename Allocator>
+class packaged_token;
+
+template <typename Function, typename Allocator, typename Result>
+class packaged_handler;
+
+} // namespace detail
 
 /// Class used to specify that an asynchronous operation should return a future.
 /**
@@ -78,6 +92,31 @@
     return allocator_;
   }
 
+  /// Wrap a function object in a packaged task.
+  /**
+   * The @c package function is used to adapt a function object as a packaged
+   * task. When this adapter is passed as a completion token to an asynchronous
+   * operation, the result of the function object is retuned via a std::future.
+   *
+   * @par Example
+   *
+   * @code std::future<std::size_t> fut =
+   *   my_socket.async_read_some(buffer,
+   *     use_future([](asio::error_code ec, std::size_t n)
+   *       {
+   *         return ec ? 0 : n;
+   *       }));
+   * ...
+   * std::size_t n = fut.get(); @endcode
+   */
+  template <typename Function>
+#if defined(GENERATING_DOCUMENTATION)
+  unspecified
+#else // defined(GENERATING_DOCUMENTATION)
+  detail::packaged_token<typename decay<Function>::type, Allocator>
+#endif // defined(GENERATING_DOCUMENTATION)
+  operator()(ASIO_MOVE_ARG(Function) f) const;
+
 private:
   Allocator allocator_;
 };
@@ -98,4 +137,7 @@
 
 #include "asio/impl/use_future.hpp"
 
+#endif // defined(ASIO_HAS_STD_FUTURE)
+       //   || defined(GENERATING_DOCUMENTATION)
+
 #endif // ASIO_USE_FUTURE_HPP
diff --git a/asio/include/asio/uses_executor.hpp b/asio/include/asio/uses_executor.hpp
index 1706fe9..53b7272 100644
--- a/asio/include/asio/uses_executor.hpp
+++ b/asio/include/asio/uses_executor.hpp
@@ -2,7 +2,7 @@
 // uses_executor.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/version.hpp b/asio/include/asio/version.hpp
index 9def83c..40b4e9a 100644
--- a/asio/include/asio/version.hpp
+++ b/asio/include/asio/version.hpp
@@ -2,7 +2,7 @@
 // version.hpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/wait_traits.hpp b/asio/include/asio/wait_traits.hpp
index 1b87a96..0cc6098 100644
--- a/asio/include/asio/wait_traits.hpp
+++ b/asio/include/asio/wait_traits.hpp
@@ -2,7 +2,7 @@
 // wait_traits.hpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/waitable_timer_service.hpp b/asio/include/asio/waitable_timer_service.hpp
index 3011594..bcb228d 100644
--- a/asio/include/asio/waitable_timer_service.hpp
+++ b/asio/include/asio/waitable_timer_service.hpp
@@ -2,7 +2,7 @@
 // waitable_timer_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,6 +16,9 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #include <cstddef>
 #include "asio/async_result.hpp"
 #include "asio/detail/chrono_time_traits.hpp"
@@ -182,7 +185,7 @@
     async_completion<WaitHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_wait(impl, init.handler);
+    service_impl_.async_wait(impl, init.completion_handler);
 
     return init.result.get();
   }
@@ -202,4 +205,6 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_WAITABLE_TIMER_SERVICE_HPP
diff --git a/asio/include/asio/windows/basic_handle.hpp b/asio/include/asio/windows/basic_handle.hpp
index 6ef8225..3b1ce2c 100644
--- a/asio/include/asio/windows/basic_handle.hpp
+++ b/asio/include/asio/windows/basic_handle.hpp
@@ -2,7 +2,7 @@
 // windows/basic_handle.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
   || defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \
   || defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
@@ -167,10 +169,11 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code assign(const native_handle_type& handle,
+  ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
       asio::error_code& ec)
   {
-    return this->get_service().assign(this->get_implementation(), handle, ec);
+    this->get_service().assign(this->get_implementation(), handle, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the handle is open.
@@ -202,9 +205,10 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code close(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID close(asio::error_code& ec)
   {
-    return this->get_service().close(this->get_implementation(), ec);
+    this->get_service().close(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native handle representation.
@@ -241,9 +245,10 @@
    *
    * @param ec Set to indicate what error occurred, if any.
    */
-  asio::error_code cancel(asio::error_code& ec)
+  ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
   {
-    return this->get_service().cancel(this->get_implementation(), ec);
+    this->get_service().cancel(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
 protected:
@@ -263,4 +268,6 @@
        //   || defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE)
        //   || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_WINDOWS_BASIC_HANDLE_HPP
diff --git a/asio/include/asio/windows/basic_object_handle.hpp b/asio/include/asio/windows/basic_object_handle.hpp
index 8bfce46..d134dbf 100644
--- a/asio/include/asio/windows/basic_object_handle.hpp
+++ b/asio/include/asio/windows/basic_object_handle.hpp
@@ -2,7 +2,7 @@
 // windows/basic_object_handle.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -18,6 +18,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -175,4 +177,6 @@
 #endif // defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE)
        //   || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_WINDOWS_BASIC_OBJECT_HANDLE_HPP
diff --git a/asio/include/asio/windows/basic_random_access_handle.hpp b/asio/include/asio/windows/basic_random_access_handle.hpp
index 9a66a13..4e9ebe5 100644
--- a/asio/include/asio/windows/basic_random_access_handle.hpp
+++ b/asio/include/asio/windows/basic_random_access_handle.hpp
@@ -2,7 +2,7 @@
 // windows/basic_random_access_handle.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -369,4 +371,6 @@
 #endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
        //   || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_WINDOWS_BASIC_RANDOM_ACCESS_HANDLE_HPP
diff --git a/asio/include/asio/windows/basic_stream_handle.hpp b/asio/include/asio/windows/basic_stream_handle.hpp
index ec2ff0d..c0a11fc 100644
--- a/asio/include/asio/windows/basic_stream_handle.hpp
+++ b/asio/include/asio/windows/basic_stream_handle.hpp
@@ -2,7 +2,7 @@
 // windows/basic_stream_handle.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -352,4 +354,6 @@
 #endif // defined(ASIO_HAS_WINDOWS_STREAM_HANDLE)
        //   || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_WINDOWS_BASIC_STREAM_HANDLE_HPP
diff --git a/asio/include/asio/windows/object_handle.hpp b/asio/include/asio/windows/object_handle.hpp
index f4162e1..6b5ad59 100644
--- a/asio/include/asio/windows/object_handle.hpp
+++ b/asio/include/asio/windows/object_handle.hpp
@@ -2,7 +2,7 @@
 // windows/object_handle.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -21,17 +21,360 @@
 #if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
   || defined(GENERATING_DOCUMENTATION)
 
-#include "asio/windows/basic_object_handle.hpp"
+#include "asio/async_result.hpp"
+#include "asio/basic_io_object.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/detail/win_object_handle_service.hpp"
+#include "asio/error.hpp"
+#include "asio/io_context.hpp"
+
+#if defined(ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(ASIO_HAS_MOVE)
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/windows/basic_object_handle.hpp"
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
+#define ASIO_SVC_T asio::detail::win_object_handle_service
+
+#include "asio/detail/push_options.hpp"
 
 namespace asio {
 namespace windows {
 
-/// Typedef for the typical usage of an object handle.
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+// Typedef for the typical usage of an object handle.
 typedef basic_object_handle<> object_handle;
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+/// Provides object-oriented handle functionality.
+/**
+ * The windows::object_handle class provides asynchronous and blocking
+ * object-oriented handle functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class object_handle
+  : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>
+{
+public:
+  /// The type of the executor associated with the object.
+  typedef io_context::executor_type executor_type;
+
+  /// The native representation of a handle.
+#if defined(GENERATING_DOCUMENTATION)
+  typedef implementation_defined native_handle_type;
+#else
+  typedef ASIO_SVC_T::native_handle_type native_handle_type;
+#endif
+
+  /// An object_handle is always the lowest layer.
+  typedef object_handle lowest_layer_type;
+
+  /// Construct an object_handle without opening it.
+  /**
+   * This constructor creates an object handle without opening it.
+   *
+   * @param io_context The io_context object that the object handle will use to
+   * dispatch handlers for any asynchronous operations performed on the handle.
+   */
+  explicit object_handle(asio::io_context& io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
+  {
+  }
+
+  /// Construct an object_handle on an existing native handle.
+  /**
+   * This constructor creates an object handle object to hold an existing native
+   * handle.
+   *
+   * @param io_context The io_context object that the object handle will use to
+   * dispatch handlers for any asynchronous operations performed on the handle.
+   *
+   * @param native_handle The new underlying handle implementation.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  object_handle(asio::io_context& io_context,
+      const native_handle_type& native_handle)
+    : basic_io_object<ASIO_SVC_T>(io_context)
+  {
+    asio::error_code ec;
+    this->get_service().assign(this->get_implementation(), native_handle, ec);
+    asio::detail::throw_error(ec, "assign");
+  }
+
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+  /// Move-construct an object_handle from another.
+  /**
+   * This constructor moves an object handle from one object to another.
+   *
+   * @param other The other object_handle object from which the move will
+   * occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c object_handle(io_context&) constructor.
+   */
+  object_handle(object_handle&& other)
+    : basic_io_object<ASIO_SVC_T>(std::move(other))
+  {
+  }
+
+  /// Move-assign an object_handle from another.
+  /**
+   * This assignment operator moves an object handle from one object to another.
+   *
+   * @param other The other object_handle object from which the move will
+   * occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c object_handle(io_context&) constructor.
+   */
+  object_handle& operator=(object_handle&& other)
+  {
+    basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_context()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_context();
+  }
+
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_service()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_service();
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+  /// Get the executor associated with the object.
+  executor_type get_executor() ASIO_NOEXCEPT
+  {
+    return basic_io_object<ASIO_SVC_T>::get_executor();
+  }
+
+  /// Get a reference to the lowest layer.
+  /**
+   * This function returns a reference to the lowest layer in a stack of
+   * layers. Since an object_handle cannot contain any further layers, it simply
+   * returns a reference to itself.
+   *
+   * @return A reference to the lowest layer in the stack of layers. Ownership
+   * is not transferred to the caller.
+   */
+  lowest_layer_type& lowest_layer()
+  {
+    return *this;
+  }
+
+  /// Get a const reference to the lowest layer.
+  /**
+   * This function returns a const reference to the lowest layer in a stack of
+   * layers. Since an object_handle cannot contain any further layers, it simply
+   * returns a reference to itself.
+   *
+   * @return A const reference to the lowest layer in the stack of layers.
+   * Ownership is not transferred to the caller.
+   */
+  const lowest_layer_type& lowest_layer() const
+  {
+    return *this;
+  }
+
+  /// Assign an existing native handle to the handle.
+  /*
+   * This function opens the handle to hold an existing native handle.
+   *
+   * @param handle A native handle.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void assign(const native_handle_type& handle)
+  {
+    asio::error_code ec;
+    this->get_service().assign(this->get_implementation(), handle, ec);
+    asio::detail::throw_error(ec, "assign");
+  }
+
+  /// Assign an existing native handle to the handle.
+  /*
+   * This function opens the handle to hold an existing native handle.
+   *
+   * @param handle A native handle.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
+      asio::error_code& ec)
+  {
+    this->get_service().assign(this->get_implementation(), handle, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Determine whether the handle is open.
+  bool is_open() const
+  {
+    return this->get_service().is_open(this->get_implementation());
+  }
+
+  /// Close the handle.
+  /**
+   * This function is used to close the handle. Any asynchronous read or write
+   * operations will be cancelled immediately, and will complete with the
+   * asio::error::operation_aborted error.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void close()
+  {
+    asio::error_code ec;
+    this->get_service().close(this->get_implementation(), ec);
+    asio::detail::throw_error(ec, "close");
+  }
+
+  /// Close the handle.
+  /**
+   * This function is used to close the handle. Any asynchronous read or write
+   * operations will be cancelled immediately, and will complete with the
+   * asio::error::operation_aborted error.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID close(asio::error_code& ec)
+  {
+    this->get_service().close(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Get the native handle representation.
+  /**
+   * This function may be used to obtain the underlying representation of the
+   * handle. This is intended to allow access to native handle functionality
+   * that is not otherwise provided.
+   */
+  native_handle_type native_handle()
+  {
+    return this->get_service().native_handle(this->get_implementation());
+  }
+
+  /// Cancel all asynchronous operations associated with the handle.
+  /**
+   * This function causes all outstanding asynchronous read or write operations
+   * to finish immediately, and the handlers for cancelled operations will be
+   * passed the asio::error::operation_aborted error.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void cancel()
+  {
+    asio::error_code ec;
+    this->get_service().cancel(this->get_implementation(), ec);
+    asio::detail::throw_error(ec, "cancel");
+  }
+
+  /// Cancel all asynchronous operations associated with the handle.
+  /**
+   * This function causes all outstanding asynchronous read or write operations
+   * to finish immediately, and the handlers for cancelled operations will be
+   * passed the asio::error::operation_aborted error.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+  {
+    this->get_service().cancel(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Perform a blocking wait on the object handle.
+  /**
+   * This function is used to wait for the object handle to be set to the
+   * signalled state. This function blocks and does not return until the object
+   * handle has been set to the signalled state.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void wait()
+  {
+    asio::error_code ec;
+    this->get_service().wait(this->get_implementation(), ec);
+    asio::detail::throw_error(ec, "wait");
+  }
+
+  /// Perform a blocking wait on the object handle.
+  /**
+   * This function is used to wait for the object handle to be set to the
+   * signalled state. This function blocks and does not return until the object
+   * handle has been set to the signalled state.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  void wait(asio::error_code& ec)
+  {
+    this->get_service().wait(this->get_implementation(), ec);
+  }
+
+  /// Start an asynchronous wait on the object handle.
+  /**
+   * This function is be used to initiate an asynchronous wait against the
+   * object handle. It always returns immediately.
+   *
+   * @param handler The handler to be called when the object handle is set to
+   * the signalled state. Copies will be made of the handler as required. The
+   * function signature of the handler must be:
+   * @code void handler(
+   *   const asio::error_code& error // Result of operation.
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_context::post().
+   */
+  template <typename WaitHandler>
+  ASIO_INITFN_RESULT_TYPE(WaitHandler,
+      void (asio::error_code))
+  async_wait(ASIO_MOVE_ARG(WaitHandler) handler)
+  {
+    asio::async_completion<WaitHandler,
+      void (asio::error_code)> init(handler);
+
+    this->get_service().async_wait(this->get_implementation(),
+        init.completion_handler);
+
+    return init.result.get();
+  }
+};
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 } // namespace windows
 } // namespace asio
 
+#include "asio/detail/pop_options.hpp"
+
+#undef ASIO_SVC_T
+
 #endif // defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE)
        //   || defined(GENERATING_DOCUMENTATION)
 
diff --git a/asio/include/asio/windows/object_handle_service.hpp b/asio/include/asio/windows/object_handle_service.hpp
index 86c9a4f..524a9f8 100644
--- a/asio/include/asio/windows/object_handle_service.hpp
+++ b/asio/include/asio/windows/object_handle_service.hpp
@@ -2,7 +2,7 @@
 // windows/object_handle_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -18,6 +18,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -101,10 +103,11 @@
   }
 
   /// Assign an existing native handle to an object handle.
-  asio::error_code assign(implementation_type& impl,
+  ASIO_SYNC_OP_VOID assign(implementation_type& impl,
       const native_handle_type& handle, asio::error_code& ec)
   {
-    return service_impl_.assign(impl, handle, ec);
+    service_impl_.assign(impl, handle, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the handle is open.
@@ -114,10 +117,11 @@
   }
 
   /// Close an object handle implementation.
-  asio::error_code close(implementation_type& impl,
+  ASIO_SYNC_OP_VOID close(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.close(impl, ec);
+    service_impl_.close(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native handle implementation.
@@ -127,10 +131,11 @@
   }
 
   /// Cancel all asynchronous operations associated with the handle.
-  asio::error_code cancel(implementation_type& impl,
+  ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.cancel(impl, ec);
+    service_impl_.cancel(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   // Wait for a signaled state.
@@ -149,7 +154,7 @@
     asio::async_completion<WaitHandler,
       void (asio::error_code)> init(handler);
 
-    service_impl_.async_wait(impl, init.handler);
+    service_impl_.async_wait(impl, init.completion_handler);
 
     return init.result.get();
   }
@@ -173,4 +178,6 @@
 #endif // defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE)
        //   || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_WINDOWS_OBJECT_HANDLE_SERVICE_HPP
diff --git a/asio/include/asio/windows/overlapped_handle.hpp b/asio/include/asio/windows/overlapped_handle.hpp
new file mode 100644
index 0000000..3db0f1d
--- /dev/null
+++ b/asio/include/asio/windows/overlapped_handle.hpp
@@ -0,0 +1,331 @@
+//
+// windows/overlapped_handle.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ASIO_WINDOWS_OVERLAPPED_HANDLE_HPP
+#define ASIO_WINDOWS_OVERLAPPED_HANDLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if !defined(ASIO_ENABLE_OLD_SERVICES)
+
+#if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
+  || defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \
+  || defined(GENERATING_DOCUMENTATION)
+
+#include <cstddef>
+#include "asio/async_result.hpp"
+#include "asio/basic_io_object.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/detail/win_iocp_handle_service.hpp"
+#include "asio/error.hpp"
+#include "asio/io_context.hpp"
+
+#if defined(ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(ASIO_HAS_MOVE)
+
+#define ASIO_SVC_T asio::detail::win_iocp_handle_service
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace windows {
+
+/// Provides Windows handle functionality for objects that support
+/// overlapped I/O.
+/**
+ * The windows::overlapped_handle class provides the ability to wrap a Windows
+ * handle. The underlying object referred to by the handle must support
+ * overlapped I/O.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class overlapped_handle
+  : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>
+{
+public:
+  /// The type of the executor associated with the object.
+  typedef io_context::executor_type executor_type;
+
+  /// The native representation of a handle.
+#if defined(GENERATING_DOCUMENTATION)
+  typedef implementation_defined native_handle_type;
+#else
+  typedef ASIO_SVC_T::native_handle_type native_handle_type;
+#endif
+
+  /// An overlapped_handle is always the lowest layer.
+  typedef overlapped_handle lowest_layer_type;
+
+  /// Construct an overlapped_handle without opening it.
+  /**
+   * This constructor creates a handle without opening it.
+   *
+   * @param io_context The io_context object that the handle will use to
+   * dispatch handlers for any asynchronous operations performed on the handle.
+   */
+  explicit overlapped_handle(asio::io_context& io_context)
+    : basic_io_object<ASIO_SVC_T>(io_context)
+  {
+  }
+
+  /// Construct an overlapped_handle on an existing native handle.
+  /**
+   * This constructor creates a handle object to hold an existing native handle.
+   *
+   * @param io_context The io_context object that the handle will use to
+   * dispatch handlers for any asynchronous operations performed on the handle.
+   *
+   * @param handle A native handle.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  overlapped_handle(asio::io_context& io_context,
+      const native_handle_type& handle)
+    : basic_io_object<ASIO_SVC_T>(io_context)
+  {
+    asio::error_code ec;
+    this->get_service().assign(this->get_implementation(), handle, ec);
+    asio::detail::throw_error(ec, "assign");
+  }
+
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+  /// Move-construct an overlapped_handle from another.
+  /**
+   * This constructor moves a handle from one object to another.
+   *
+   * @param other The other overlapped_handle object from which the move will
+   * occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c overlapped_handle(io_context&) constructor.
+   */
+  overlapped_handle(overlapped_handle&& other)
+    : basic_io_object<ASIO_SVC_T>(std::move(other))
+  {
+  }
+
+  /// Move-assign an overlapped_handle from another.
+  /**
+   * This assignment operator moves a handle from one object to another.
+   *
+   * @param other The other overlapped_handle object from which the move will
+   * occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c overlapped_handle(io_context&) constructor.
+   */
+  overlapped_handle& operator=(overlapped_handle&& other)
+  {
+    basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+#if !defined(ASIO_NO_DEPRECATED)
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_context()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_context();
+  }
+
+  /// (Deprecated: Use get_executor().) Get the io_context associated with the
+  /// object.
+  /**
+   * This function may be used to obtain the io_context object that the I/O
+   * object uses to dispatch handlers for asynchronous operations.
+   *
+   * @return A reference to the io_context object that the I/O object will use
+   * to dispatch handlers. Ownership is not transferred to the caller.
+   */
+  asio::io_context& get_io_service()
+  {
+    return basic_io_object<ASIO_SVC_T>::get_io_service();
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+  /// Get the executor associated with the object.
+  executor_type get_executor() ASIO_NOEXCEPT
+  {
+    return basic_io_object<ASIO_SVC_T>::get_executor();
+  }
+
+  /// Get a reference to the lowest layer.
+  /**
+   * This function returns a reference to the lowest layer in a stack of
+   * layers. Since an overlapped_handle cannot contain any further layers, it
+   * simply returns a reference to itself.
+   *
+   * @return A reference to the lowest layer in the stack of layers. Ownership
+   * is not transferred to the caller.
+   */
+  lowest_layer_type& lowest_layer()
+  {
+    return *this;
+  }
+
+  /// Get a const reference to the lowest layer.
+  /**
+   * This function returns a const reference to the lowest layer in a stack of
+   * layers. Since an overlapped_handle cannot contain any further layers, it
+   * simply returns a reference to itself.
+   *
+   * @return A const reference to the lowest layer in the stack of layers.
+   * Ownership is not transferred to the caller.
+   */
+  const lowest_layer_type& lowest_layer() const
+  {
+    return *this;
+  }
+
+  /// Assign an existing native handle to the handle.
+  /*
+   * This function opens the handle to hold an existing native handle.
+   *
+   * @param handle A native handle.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void assign(const native_handle_type& handle)
+  {
+    asio::error_code ec;
+    this->get_service().assign(this->get_implementation(), handle, ec);
+    asio::detail::throw_error(ec, "assign");
+  }
+
+  /// Assign an existing native handle to the handle.
+  /*
+   * This function opens the handle to hold an existing native handle.
+   *
+   * @param handle A native handle.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
+      asio::error_code& ec)
+  {
+    this->get_service().assign(this->get_implementation(), handle, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Determine whether the handle is open.
+  bool is_open() const
+  {
+    return this->get_service().is_open(this->get_implementation());
+  }
+
+  /// Close the handle.
+  /**
+   * This function is used to close the handle. Any asynchronous read or write
+   * operations will be cancelled immediately, and will complete with the
+   * asio::error::operation_aborted error.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void close()
+  {
+    asio::error_code ec;
+    this->get_service().close(this->get_implementation(), ec);
+    asio::detail::throw_error(ec, "close");
+  }
+
+  /// Close the handle.
+  /**
+   * This function is used to close the handle. Any asynchronous read or write
+   * operations will be cancelled immediately, and will complete with the
+   * asio::error::operation_aborted error.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID close(asio::error_code& ec)
+  {
+    this->get_service().close(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+  /// Get the native handle representation.
+  /**
+   * This function may be used to obtain the underlying representation of the
+   * handle. This is intended to allow access to native handle functionality
+   * that is not otherwise provided.
+   */
+  native_handle_type native_handle()
+  {
+    return this->get_service().native_handle(this->get_implementation());
+  }
+
+  /// Cancel all asynchronous operations associated with the handle.
+  /**
+   * This function causes all outstanding asynchronous read or write operations
+   * to finish immediately, and the handlers for cancelled operations will be
+   * passed the asio::error::operation_aborted error.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  void cancel()
+  {
+    asio::error_code ec;
+    this->get_service().cancel(this->get_implementation(), ec);
+    asio::detail::throw_error(ec, "cancel");
+  }
+
+  /// Cancel all asynchronous operations associated with the handle.
+  /**
+   * This function causes all outstanding asynchronous read or write operations
+   * to finish immediately, and the handlers for cancelled operations will be
+   * passed the asio::error::operation_aborted error.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   */
+  ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+  {
+    this->get_service().cancel(this->get_implementation(), ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
+  }
+
+protected:
+  /// Protected destructor to prevent deletion through this type.
+  /**
+   * This function destroys the handle, cancelling any outstanding asynchronous
+   * wait operations associated with the handle as if by calling @c cancel.
+   */
+  ~overlapped_handle()
+  {
+  }
+};
+
+} // namespace windows
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#undef ASIO_SVC_T
+
+#endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+       //   || defined(ASIO_HAS_WINDOWS_STREAM_HANDLE)
+       //   || defined(GENERATING_DOCUMENTATION)
+
+#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+
+#endif // ASIO_WINDOWS_OVERLAPPED_HANDLE_HPP
diff --git a/asio/include/asio/windows/overlapped_ptr.hpp b/asio/include/asio/windows/overlapped_ptr.hpp
index 81a6505..00f3baa 100644
--- a/asio/include/asio/windows/overlapped_ptr.hpp
+++ b/asio/include/asio/windows/overlapped_ptr.hpp
@@ -2,7 +2,7 @@
 // windows/overlapped_ptr.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/include/asio/windows/random_access_handle.hpp b/asio/include/asio/windows/random_access_handle.hpp
index 9677723..cc3ea5c 100644
--- a/asio/include/asio/windows/random_access_handle.hpp
+++ b/asio/include/asio/windows/random_access_handle.hpp
@@ -2,7 +2,7 @@
 // windows/random_access_handle.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,21 +16,362 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+#include "asio/windows/overlapped_handle.hpp"
 
 #if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
   || defined(GENERATING_DOCUMENTATION)
 
-#include "asio/windows/basic_random_access_handle.hpp"
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/windows/basic_random_access_handle.hpp"
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
+#include "asio/detail/push_options.hpp"
 
 namespace asio {
 namespace windows {
 
-/// Typedef for the typical usage of a random-access handle.
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+// Typedef for the typical usage of a random-access handle.
 typedef basic_random_access_handle<> random_access_handle;
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+/// Provides random-access handle functionality.
+/**
+ * The windows::random_access_handle class provides asynchronous and
+ * blocking random-access handle functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class random_access_handle
+  : public overlapped_handle
+{
+public:
+  /// Construct a random_access_handle without opening it.
+  /**
+   * This constructor creates a random-access handle without opening it. The
+   * handle needs to be opened before data can be written to or read from it.
+   *
+   * @param io_context The io_context object that the random-access handle will
+   * use to dispatch handlers for any asynchronous operations performed on the
+   * handle.
+   */
+  explicit random_access_handle(asio::io_context& io_context)
+    : overlapped_handle(io_context)
+  {
+  }
+
+  /// Construct a random_access_handle on an existing native handle.
+  /**
+   * This constructor creates a random-access handle object to hold an existing
+   * native handle.
+   *
+   * @param io_context The io_context object that the random-access handle will
+   * use to dispatch handlers for any asynchronous operations performed on the
+   * handle.
+   *
+   * @param handle The new underlying handle implementation.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  random_access_handle(asio::io_context& io_context,
+      const native_handle_type& handle)
+    : overlapped_handle(io_context, handle)
+  {
+  }
+
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+  /// Move-construct a random_access_handle from another.
+  /**
+   * This constructor moves a random-access handle from one object to another.
+   *
+   * @param other The other random_access_handle object from which the
+   * move will occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c random_access_handle(io_context&)
+   * constructor.
+   */
+  random_access_handle(random_access_handle&& other)
+    : overlapped_handle(std::move(other))
+  {
+  }
+
+  /// Move-assign a random_access_handle from another.
+  /**
+   * This assignment operator moves a random-access handle from one object to
+   * another.
+   *
+   * @param other The other random_access_handle object from which the
+   * move will occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c random_access_handle(io_context&)
+   * constructor.
+   */
+  random_access_handle& operator=(random_access_handle&& other)
+  {
+    overlapped_handle::operator=(std::move(other));
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+  /// Write some data to the handle at the specified offset.
+  /**
+   * This function is used to write data to the random-access handle. The
+   * function call will block until one or more bytes of the data has been
+   * written successfully, or until an error occurs.
+   *
+   * @param offset The offset at which the data will be written.
+   *
+   * @param buffers One or more data buffers to be written to the handle.
+   *
+   * @returns The number of bytes written.
+   *
+   * @throws asio::system_error Thrown on failure. An error code of
+   * asio::error::eof indicates that the connection was closed by the
+   * peer.
+   *
+   * @note The write_some_at operation may not write all of the data. Consider
+   * using the @ref write_at function if you need to ensure that all data is
+   * written before the blocking operation completes.
+   *
+   * @par Example
+   * To write a single data buffer use the @ref buffer function as follows:
+   * @code
+   * handle.write_some_at(42, asio::buffer(data, size));
+   * @endcode
+   * See the @ref buffer documentation for information on writing multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename ConstBufferSequence>
+  std::size_t write_some_at(uint64_t offset,
+      const ConstBufferSequence& buffers)
+  {
+    asio::error_code ec;
+    std::size_t s = this->get_service().write_some_at(
+        this->get_implementation(), offset, buffers, ec);
+    asio::detail::throw_error(ec, "write_some_at");
+    return s;
+  }
+
+  /// Write some data to the handle at the specified offset.
+  /**
+   * This function is used to write data to the random-access handle. The
+   * function call will block until one or more bytes of the data has been
+   * written successfully, or until an error occurs.
+   *
+   * @param offset The offset at which the data will be written.
+   *
+   * @param buffers One or more data buffers to be written to the handle.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @returns The number of bytes written. Returns 0 if an error occurred.
+   *
+   * @note The write_some operation may not transmit all of the data to the
+   * peer. Consider using the @ref write_at function if you need to ensure that
+   * all data is written before the blocking operation completes.
+   */
+  template <typename ConstBufferSequence>
+  std::size_t write_some_at(uint64_t offset,
+      const ConstBufferSequence& buffers, asio::error_code& ec)
+  {
+    return this->get_service().write_some_at(
+        this->get_implementation(), offset, buffers, ec);
+  }
+
+  /// Start an asynchronous write at the specified offset.
+  /**
+   * This function is used to asynchronously write data to the random-access
+   * handle. The function call always returns immediately.
+   *
+   * @param offset The offset at which the data will be written.
+   *
+   * @param buffers One or more data buffers to be written to the handle.
+   * Although the buffers object may be copied as necessary, ownership of the
+   * underlying memory blocks is retained by the caller, which must guarantee
+   * that they remain valid until the handler is called.
+   *
+   * @param handler The handler to be called when the write operation completes.
+   * Copies will be made of the handler as required. The function signature of
+   * the handler must be:
+   * @code void handler(
+   *   const asio::error_code& error, // Result of operation.
+   *   std::size_t bytes_transferred           // Number of bytes written.
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_context::post().
+   *
+   * @note The write operation may not transmit all of the data to the peer.
+   * Consider using the @ref async_write_at function if you need to ensure that
+   * all data is written before the asynchronous operation completes.
+   *
+   * @par Example
+   * To write a single data buffer use the @ref buffer function as follows:
+   * @code
+   * handle.async_write_some_at(42, asio::buffer(data, size), handler);
+   * @endcode
+   * See the @ref buffer documentation for information on writing multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename ConstBufferSequence, typename WriteHandler>
+  ASIO_INITFN_RESULT_TYPE(WriteHandler,
+      void (asio::error_code, std::size_t))
+  async_write_some_at(uint64_t offset,
+      const ConstBufferSequence& buffers,
+      ASIO_MOVE_ARG(WriteHandler) handler)
+  {
+    // If you get an error on the following line it means that your handler does
+    // not meet the documented type requirements for a WriteHandler.
+    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+    asio::async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_write_some_at(this->get_implementation(),
+        offset, buffers, init.completion_handler);
+
+    return init.result.get();
+  }
+
+  /// Read some data from the handle at the specified offset.
+  /**
+   * This function is used to read data from the random-access handle. The
+   * function call will block until one or more bytes of data has been read
+   * successfully, or until an error occurs.
+   *
+   * @param offset The offset at which the data will be read.
+   *
+   * @param buffers One or more buffers into which the data will be read.
+   *
+   * @returns The number of bytes read.
+   *
+   * @throws asio::system_error Thrown on failure. An error code of
+   * asio::error::eof indicates that the connection was closed by the
+   * peer.
+   *
+   * @note The read_some operation may not read all of the requested number of
+   * bytes. Consider using the @ref read_at function if you need to ensure that
+   * the requested amount of data is read before the blocking operation
+   * completes.
+   *
+   * @par Example
+   * To read into a single data buffer use the @ref buffer function as follows:
+   * @code
+   * handle.read_some_at(42, asio::buffer(data, size));
+   * @endcode
+   * See the @ref buffer documentation for information on reading into multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename MutableBufferSequence>
+  std::size_t read_some_at(uint64_t offset,
+      const MutableBufferSequence& buffers)
+  {
+    asio::error_code ec;
+    std::size_t s = this->get_service().read_some_at(
+        this->get_implementation(), offset, buffers, ec);
+    asio::detail::throw_error(ec, "read_some_at");
+    return s;
+  }
+
+  /// Read some data from the handle at the specified offset.
+  /**
+   * This function is used to read data from the random-access handle. The
+   * function call will block until one or more bytes of data has been read
+   * successfully, or until an error occurs.
+   *
+   * @param offset The offset at which the data will be read.
+   *
+   * @param buffers One or more buffers into which the data will be read.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @returns The number of bytes read. Returns 0 if an error occurred.
+   *
+   * @note The read_some operation may not read all of the requested number of
+   * bytes. Consider using the @ref read_at function if you need to ensure that
+   * the requested amount of data is read before the blocking operation
+   * completes.
+   */
+  template <typename MutableBufferSequence>
+  std::size_t read_some_at(uint64_t offset,
+      const MutableBufferSequence& buffers, asio::error_code& ec)
+  {
+    return this->get_service().read_some_at(
+        this->get_implementation(), offset, buffers, ec);
+  }
+
+  /// Start an asynchronous read at the specified offset.
+  /**
+   * This function is used to asynchronously read data from the random-access
+   * handle. The function call always returns immediately.
+   *
+   * @param offset The offset at which the data will be read.
+   *
+   * @param buffers One or more buffers into which the data will be read.
+   * Although the buffers object may be copied as necessary, ownership of the
+   * underlying memory blocks is retained by the caller, which must guarantee
+   * that they remain valid until the handler is called.
+   *
+   * @param handler The handler to be called when the read operation completes.
+   * Copies will be made of the handler as required. The function signature of
+   * the handler must be:
+   * @code void handler(
+   *   const asio::error_code& error, // Result of operation.
+   *   std::size_t bytes_transferred           // Number of bytes read.
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_context::post().
+   *
+   * @note The read operation may not read all of the requested number of bytes.
+   * Consider using the @ref async_read_at function if you need to ensure that
+   * the requested amount of data is read before the asynchronous operation
+   * completes.
+   *
+   * @par Example
+   * To read into a single data buffer use the @ref buffer function as follows:
+   * @code
+   * handle.async_read_some_at(42, asio::buffer(data, size), handler);
+   * @endcode
+   * See the @ref buffer documentation for information on reading into multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename MutableBufferSequence, typename ReadHandler>
+  ASIO_INITFN_RESULT_TYPE(ReadHandler,
+      void (asio::error_code, std::size_t))
+  async_read_some_at(uint64_t offset,
+      const MutableBufferSequence& buffers,
+      ASIO_MOVE_ARG(ReadHandler) handler)
+  {
+    // If you get an error on the following line it means that your handler does
+    // not meet the documented type requirements for a ReadHandler.
+    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+    asio::async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_read_some_at(this->get_implementation(),
+        offset, buffers, init.completion_handler);
+
+    return init.result.get();
+  }
+};
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 } // namespace windows
 } // namespace asio
 
+#include "asio/detail/pop_options.hpp"
+
 #endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
        //   || defined(GENERATING_DOCUMENTATION)
 
diff --git a/asio/include/asio/windows/random_access_handle_service.hpp b/asio/include/asio/windows/random_access_handle_service.hpp
index 2dbab74..b3df24a 100644
--- a/asio/include/asio/windows/random_access_handle_service.hpp
+++ b/asio/include/asio/windows/random_access_handle_service.hpp
@@ -2,7 +2,7 @@
 // windows/random_access_handle_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -103,10 +105,11 @@
   }
 
   /// Assign an existing native handle to a random-access handle.
-  asio::error_code assign(implementation_type& impl,
+  ASIO_SYNC_OP_VOID assign(implementation_type& impl,
       const native_handle_type& handle, asio::error_code& ec)
   {
-    return service_impl_.assign(impl, handle, ec);
+    service_impl_.assign(impl, handle, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the handle is open.
@@ -116,10 +119,11 @@
   }
 
   /// Close a random-access handle implementation.
-  asio::error_code close(implementation_type& impl,
+  ASIO_SYNC_OP_VOID close(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.close(impl, ec);
+    service_impl_.close(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native handle implementation.
@@ -129,10 +133,11 @@
   }
 
   /// Cancel all asynchronous operations associated with the handle.
-  asio::error_code cancel(implementation_type& impl,
+  ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.cancel(impl, ec);
+    service_impl_.cancel(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Write the given data at the specified offset.
@@ -154,7 +159,8 @@
     asio::async_completion<WriteHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_write_some_at(impl, offset, buffers, init.handler);
+    service_impl_.async_write_some_at(impl,
+        offset, buffers, init.completion_handler);
 
     return init.result.get();
   }
@@ -178,7 +184,8 @@
     asio::async_completion<ReadHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_read_some_at(impl, offset, buffers, init.handler);
+    service_impl_.async_read_some_at(impl,
+        offset, buffers, init.completion_handler);
 
     return init.result.get();
   }
@@ -202,4 +209,6 @@
 #endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
        //   || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_SERVICE_HPP
diff --git a/asio/include/asio/windows/stream_handle.hpp b/asio/include/asio/windows/stream_handle.hpp
index b35dd75..583637a 100644
--- a/asio/include/asio/windows/stream_handle.hpp
+++ b/asio/include/asio/windows/stream_handle.hpp
@@ -2,7 +2,7 @@
 // windows/stream_handle.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,21 +16,346 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+#include "asio/windows/overlapped_handle.hpp"
 
 #if defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \
   || defined(GENERATING_DOCUMENTATION)
 
-#include "asio/windows/basic_stream_handle.hpp"
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+# include "asio/windows/basic_stream_handle.hpp"
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
+#include "asio/detail/push_options.hpp"
 
 namespace asio {
 namespace windows {
 
-/// Typedef for the typical usage of a stream-oriented handle.
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+// Typedef for the typical usage of a stream-oriented handle.
 typedef basic_stream_handle<> stream_handle;
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+/// Provides stream-oriented handle functionality.
+/**
+ * The windows::stream_handle class provides asynchronous and blocking
+ * stream-oriented handle functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
+ */
+class stream_handle
+  : public overlapped_handle
+{
+public:
+  /// Construct a stream_handle without opening it.
+  /**
+   * This constructor creates a stream handle without opening it. The handle
+   * needs to be opened and then connected or accepted before data can be sent
+   * or received on it.
+   *
+   * @param io_context The io_context object that the stream handle will use to
+   * dispatch handlers for any asynchronous operations performed on the handle.
+   */
+  explicit stream_handle(asio::io_context& io_context)
+    : overlapped_handle(io_context)
+  {
+  }
+
+  /// Construct a stream_handle on an existing native handle.
+  /**
+   * This constructor creates a stream handle object to hold an existing native
+   * handle.
+   *
+   * @param io_context The io_context object that the stream handle will use to
+   * dispatch handlers for any asynchronous operations performed on the handle.
+   *
+   * @param handle The new underlying handle implementation.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  stream_handle(asio::io_context& io_context,
+      const native_handle_type& handle)
+    : overlapped_handle(io_context, handle)
+  {
+  }
+
+#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+  /// Move-construct a stream_handle from another.
+  /**
+   * This constructor moves a stream handle from one object to another.
+   *
+   * @param other The other stream_handle object from which the move
+   * will occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c stream_handle(io_context&) constructor.
+   */
+  stream_handle(stream_handle&& other)
+    : overlapped_handle(std::move(other))
+  {
+  }
+
+  /// Move-assign a stream_handle from another.
+  /**
+   * This assignment operator moves a stream handle from one object to
+   * another.
+   *
+   * @param other The other stream_handle object from which the move
+   * will occur.
+   *
+   * @note Following the move, the moved-from object is in the same state as if
+   * constructed using the @c stream_handle(io_context&) constructor.
+   */
+  stream_handle& operator=(stream_handle&& other)
+  {
+    overlapped_handle::operator=(std::move(other));
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+  /// Write some data to the handle.
+  /**
+   * This function is used to write data to the stream handle. The function call
+   * will block until one or more bytes of the data has been written
+   * successfully, or until an error occurs.
+   *
+   * @param buffers One or more data buffers to be written to the handle.
+   *
+   * @returns The number of bytes written.
+   *
+   * @throws asio::system_error Thrown on failure. An error code of
+   * asio::error::eof indicates that the connection was closed by the
+   * peer.
+   *
+   * @note The write_some operation may not transmit all of the data to the
+   * peer. Consider using the @ref write function if you need to ensure that
+   * all data is written before the blocking operation completes.
+   *
+   * @par Example
+   * To write a single data buffer use the @ref buffer function as follows:
+   * @code
+   * handle.write_some(asio::buffer(data, size));
+   * @endcode
+   * See the @ref buffer documentation for information on writing multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename ConstBufferSequence>
+  std::size_t write_some(const ConstBufferSequence& buffers)
+  {
+    asio::error_code ec;
+    std::size_t s = this->get_service().write_some(
+        this->get_implementation(), buffers, ec);
+    asio::detail::throw_error(ec, "write_some");
+    return s;
+  }
+
+  /// Write some data to the handle.
+  /**
+   * This function is used to write data to the stream handle. The function call
+   * will block until one or more bytes of the data has been written
+   * successfully, or until an error occurs.
+   *
+   * @param buffers One or more data buffers to be written to the handle.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @returns The number of bytes written. Returns 0 if an error occurred.
+   *
+   * @note The write_some operation may not transmit all of the data to the
+   * peer. Consider using the @ref write function if you need to ensure that
+   * all data is written before the blocking operation completes.
+   */
+  template <typename ConstBufferSequence>
+  std::size_t write_some(const ConstBufferSequence& buffers,
+      asio::error_code& ec)
+  {
+    return this->get_service().write_some(
+        this->get_implementation(), buffers, ec);
+  }
+
+  /// Start an asynchronous write.
+  /**
+   * This function is used to asynchronously write data to the stream handle.
+   * The function call always returns immediately.
+   *
+   * @param buffers One or more data buffers to be written to the handle.
+   * Although the buffers object may be copied as necessary, ownership of the
+   * underlying memory blocks is retained by the caller, which must guarantee
+   * that they remain valid until the handler is called.
+   *
+   * @param handler The handler to be called when the write operation completes.
+   * Copies will be made of the handler as required. The function signature of
+   * the handler must be:
+   * @code void handler(
+   *   const asio::error_code& error, // Result of operation.
+   *   std::size_t bytes_transferred           // Number of bytes written.
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_context::post().
+   *
+   * @note The write operation may not transmit all of the data to the peer.
+   * Consider using the @ref async_write function if you need to ensure that all
+   * data is written before the asynchronous operation completes.
+   *
+   * @par Example
+   * To write a single data buffer use the @ref buffer function as follows:
+   * @code
+   * handle.async_write_some(asio::buffer(data, size), handler);
+   * @endcode
+   * See the @ref buffer documentation for information on writing multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename ConstBufferSequence, typename WriteHandler>
+  ASIO_INITFN_RESULT_TYPE(WriteHandler,
+      void (asio::error_code, std::size_t))
+  async_write_some(const ConstBufferSequence& buffers,
+      ASIO_MOVE_ARG(WriteHandler) handler)
+  {
+    // If you get an error on the following line it means that your handler does
+    // not meet the documented type requirements for a WriteHandler.
+    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+    asio::async_completion<WriteHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_write_some(
+        this->get_implementation(), buffers, init.completion_handler);
+
+    return init.result.get();
+  }
+
+  /// Read some data from the handle.
+  /**
+   * This function is used to read data from the stream handle. The function
+   * call will block until one or more bytes of data has been read successfully,
+   * or until an error occurs.
+   *
+   * @param buffers One or more buffers into which the data will be read.
+   *
+   * @returns The number of bytes read.
+   *
+   * @throws asio::system_error Thrown on failure. An error code of
+   * asio::error::eof indicates that the connection was closed by the
+   * peer.
+   *
+   * @note The read_some operation may not read all of the requested number of
+   * bytes. Consider using the @ref read function if you need to ensure that
+   * the requested amount of data is read before the blocking operation
+   * completes.
+   *
+   * @par Example
+   * To read into a single data buffer use the @ref buffer function as follows:
+   * @code
+   * handle.read_some(asio::buffer(data, size));
+   * @endcode
+   * See the @ref buffer documentation for information on reading into multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename MutableBufferSequence>
+  std::size_t read_some(const MutableBufferSequence& buffers)
+  {
+    asio::error_code ec;
+    std::size_t s = this->get_service().read_some(
+        this->get_implementation(), buffers, ec);
+    asio::detail::throw_error(ec, "read_some");
+    return s;
+  }
+
+  /// Read some data from the handle.
+  /**
+   * This function is used to read data from the stream handle. The function
+   * call will block until one or more bytes of data has been read successfully,
+   * or until an error occurs.
+   *
+   * @param buffers One or more buffers into which the data will be read.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @returns The number of bytes read. Returns 0 if an error occurred.
+   *
+   * @note The read_some operation may not read all of the requested number of
+   * bytes. Consider using the @ref read function if you need to ensure that
+   * the requested amount of data is read before the blocking operation
+   * completes.
+   */
+  template <typename MutableBufferSequence>
+  std::size_t read_some(const MutableBufferSequence& buffers,
+      asio::error_code& ec)
+  {
+    return this->get_service().read_some(
+        this->get_implementation(), buffers, ec);
+  }
+
+  /// Start an asynchronous read.
+  /**
+   * This function is used to asynchronously read data from the stream handle.
+   * The function call always returns immediately.
+   *
+   * @param buffers One or more buffers into which the data will be read.
+   * Although the buffers object may be copied as necessary, ownership of the
+   * underlying memory blocks is retained by the caller, which must guarantee
+   * that they remain valid until the handler is called.
+   *
+   * @param handler The handler to be called when the read operation completes.
+   * Copies will be made of the handler as required. The function signature of
+   * the handler must be:
+   * @code void handler(
+   *   const asio::error_code& error, // Result of operation.
+   *   std::size_t bytes_transferred           // Number of bytes read.
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_context::post().
+   *
+   * @note The read operation may not read all of the requested number of bytes.
+   * Consider using the @ref async_read function if you need to ensure that the
+   * requested amount of data is read before the asynchronous operation
+   * completes.
+   *
+   * @par Example
+   * To read into a single data buffer use the @ref buffer function as follows:
+   * @code
+   * handle.async_read_some(asio::buffer(data, size), handler);
+   * @endcode
+   * See the @ref buffer documentation for information on reading into multiple
+   * buffers in one go, and how to use it with arrays, boost::array or
+   * std::vector.
+   */
+  template <typename MutableBufferSequence, typename ReadHandler>
+  ASIO_INITFN_RESULT_TYPE(ReadHandler,
+      void (asio::error_code, std::size_t))
+  async_read_some(const MutableBufferSequence& buffers,
+      ASIO_MOVE_ARG(ReadHandler) handler)
+  {
+    // If you get an error on the following line it means that your handler does
+    // not meet the documented type requirements for a ReadHandler.
+    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+    asio::async_completion<ReadHandler,
+      void (asio::error_code, std::size_t)> init(handler);
+
+    this->get_service().async_read_some(
+        this->get_implementation(), buffers, init.completion_handler);
+
+    return init.result.get();
+  }
+};
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
 } // namespace windows
 } // namespace asio
 
+#include "asio/detail/pop_options.hpp"
+
 #endif // defined(ASIO_HAS_WINDOWS_STREAM_HANDLE)
        //   || defined(GENERATING_DOCUMENTATION)
 
diff --git a/asio/include/asio/windows/stream_handle_service.hpp b/asio/include/asio/windows/stream_handle_service.hpp
index af95ba0..5da3dd7 100644
--- a/asio/include/asio/windows/stream_handle_service.hpp
+++ b/asio/include/asio/windows/stream_handle_service.hpp
@@ -2,7 +2,7 @@
 // windows/stream_handle_service.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,8 @@
 
 #include "asio/detail/config.hpp"
 
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+
 #if defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \
   || defined(GENERATING_DOCUMENTATION)
 
@@ -101,10 +103,11 @@
   }
 
   /// Assign an existing native handle to a stream handle.
-  asio::error_code assign(implementation_type& impl,
+  ASIO_SYNC_OP_VOID assign(implementation_type& impl,
       const native_handle_type& handle, asio::error_code& ec)
   {
-    return service_impl_.assign(impl, handle, ec);
+    service_impl_.assign(impl, handle, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Determine whether the handle is open.
@@ -114,10 +117,11 @@
   }
 
   /// Close a stream handle implementation.
-  asio::error_code close(implementation_type& impl,
+  ASIO_SYNC_OP_VOID close(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.close(impl, ec);
+    service_impl_.close(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Get the native handle implementation.
@@ -127,10 +131,11 @@
   }
 
   /// Cancel all asynchronous operations associated with the handle.
-  asio::error_code cancel(implementation_type& impl,
+  ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
       asio::error_code& ec)
   {
-    return service_impl_.cancel(impl, ec);
+    service_impl_.cancel(impl, ec);
+    ASIO_SYNC_OP_VOID_RETURN(ec);
   }
 
   /// Write the given data to the stream.
@@ -152,7 +157,7 @@
     asio::async_completion<WriteHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_write_some(impl, buffers, init.handler);
+    service_impl_.async_write_some(impl, buffers, init.completion_handler);
 
     return init.result.get();
   }
@@ -176,7 +181,7 @@
     asio::async_completion<ReadHandler,
       void (asio::error_code, std::size_t)> init(handler);
 
-    service_impl_.async_read_some(impl, buffers, init.handler);
+    service_impl_.async_read_some(impl, buffers, init.completion_handler);
 
     return init.result.get();
   }
@@ -200,4 +205,6 @@
 #endif // defined(ASIO_HAS_WINDOWS_STREAM_HANDLE)
        //   || defined(GENERATING_DOCUMENTATION)
 
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+
 #endif // ASIO_WINDOWS_STREAM_HANDLE_SERVICE_HPP
diff --git a/asio/include/asio/write.hpp b/asio/include/asio/write.hpp
index b3fb35a..0010862 100644
--- a/asio/include/asio/write.hpp
+++ b/asio/include/asio/write.hpp
@@ -2,7 +2,7 @@
 // write.hpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,10 +18,13 @@
 #include "asio/detail/config.hpp"
 #include <cstddef>
 #include "asio/async_result.hpp"
-#include "asio/basic_streambuf_fwd.hpp"
 #include "asio/buffer.hpp"
 #include "asio/error.hpp"
 
+#if !defined(ASIO_NO_EXTENSIONS)
+# include "asio/basic_streambuf_fwd.hpp"
+#endif // !defined(ASIO_NO_EXTENSIONS)
+
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
@@ -246,11 +249,11 @@
  *     s, buffers,
  *     asio::transfer_all()); @endcode
  */
-template <typename SyncWriteStream, typename DynamicBufferSequence>
+template <typename SyncWriteStream, typename DynamicBuffer>
 std::size_t write(SyncWriteStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type* = 0);
 
 /// Write all of the supplied data to a stream before returning.
@@ -280,12 +283,12 @@
  *     s, buffers,
  *     asio::transfer_all(), ec); @endcode
  */
-template <typename SyncWriteStream, typename DynamicBufferSequence>
+template <typename SyncWriteStream, typename DynamicBuffer>
 std::size_t write(SyncWriteStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     asio::error_code& ec,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type* = 0);
 
 /// Write a certain amount of data to a stream before returning.
@@ -324,13 +327,13 @@
  *
  * @throws asio::system_error Thrown on failure.
  */
-template <typename SyncWriteStream, typename DynamicBufferSequence,
+template <typename SyncWriteStream, typename DynamicBuffer,
     typename CompletionCondition>
 std::size_t write(SyncWriteStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     CompletionCondition completion_condition,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type* = 0);
 
 /// Write a certain amount of data to a stream before returning.
@@ -370,15 +373,16 @@
  * @returns The number of bytes written. If an error occurs, returns the total
  * number of bytes successfully transferred prior to the error.
  */
-template <typename SyncWriteStream, typename DynamicBufferSequence,
+template <typename SyncWriteStream, typename DynamicBuffer,
     typename CompletionCondition>
 std::size_t write(SyncWriteStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     CompletionCondition completion_condition, asio::error_code& ec,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type* = 0);
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 /// Write all of the supplied data to a stream before returning.
@@ -522,6 +526,7 @@
     CompletionCondition completion_condition, asio::error_code& ec);
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 /*@}*/
 /**
@@ -716,14 +721,14 @@
  * asio::io_context::post().
  */
 template <typename AsyncWriteStream,
-    typename DynamicBufferSequence, typename WriteHandler>
+    typename DynamicBuffer, typename WriteHandler>
 ASIO_INITFN_RESULT_TYPE(WriteHandler,
     void (asio::error_code, std::size_t))
 async_write(AsyncWriteStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     ASIO_MOVE_ARG(WriteHandler) handler,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type* = 0);
 
 /// Start an asynchronous operation to write a certain amount of data to a
@@ -783,18 +788,19 @@
  * the handler will be performed in a manner equivalent to using
  * asio::io_context::post().
  */
-template <typename AsyncWriteStream, typename DynamicBufferSequence,
+template <typename AsyncWriteStream, typename DynamicBuffer,
     typename CompletionCondition, typename WriteHandler>
 ASIO_INITFN_RESULT_TYPE(WriteHandler,
     void (asio::error_code, std::size_t))
 async_write(AsyncWriteStream& s,
-    ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
+    ASIO_MOVE_ARG(DynamicBuffer) buffers,
     CompletionCondition completion_condition,
     ASIO_MOVE_ARG(WriteHandler) handler,
     typename enable_if<
-      is_dynamic_buffer_sequence<DynamicBufferSequence>::value
+      is_dynamic_buffer<DynamicBuffer>::value
     >::type* = 0);
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 /// Start an asynchronous operation to write all of the supplied data to a
@@ -908,6 +914,7 @@
     ASIO_MOVE_ARG(WriteHandler) handler);
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 /*@}*/
 
diff --git a/asio/include/asio/write_at.hpp b/asio/include/asio/write_at.hpp
index 8414ac3..1722774 100644
--- a/asio/include/asio/write_at.hpp
+++ b/asio/include/asio/write_at.hpp
@@ -2,7 +2,7 @@
 // write_at.hpp
 // ~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,10 +18,13 @@
 #include "asio/detail/config.hpp"
 #include <cstddef>
 #include "asio/async_result.hpp"
-#include "asio/basic_streambuf_fwd.hpp"
 #include "asio/detail/cstdint.hpp"
 #include "asio/error.hpp"
 
+#if !defined(ASIO_NO_EXTENSIONS)
+# include "asio/basic_streambuf_fwd.hpp"
+#endif // !defined(ASIO_NO_EXTENSIONS)
+
 #include "asio/detail/push_options.hpp"
 
 namespace asio {
@@ -224,6 +227,7 @@
     uint64_t offset, const ConstBufferSequence& buffers,
     CompletionCondition completion_condition, asio::error_code& ec);
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 /// Write all of the supplied data at the specified offset before returning.
@@ -382,6 +386,7 @@
     asio::error_code& ec);
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 /*@}*/
 /**
@@ -536,6 +541,7 @@
     CompletionCondition completion_condition,
     ASIO_MOVE_ARG(WriteHandler) handler);
 
+#if !defined(ASIO_NO_EXTENSIONS)
 #if !defined(ASIO_NO_IOSTREAM)
 
 /// Start an asynchronous operation to write all of the supplied data at the
@@ -658,6 +664,7 @@
     ASIO_MOVE_ARG(WriteHandler) handler);
 
 #endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 /*@}*/
 
diff --git a/asio/include/asio/yield.hpp b/asio/include/asio/yield.hpp
index 6cf5d6b..fa17817 100644
--- a/asio/include/asio/yield.hpp
+++ b/asio/include/asio/yield.hpp
@@ -2,7 +2,7 @@
 // yield.hpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/asio.cpp b/asio/src/asio.cpp
index f1725fc..2125d62 100644
--- a/asio/src/asio.cpp
+++ b/asio/src/asio.cpp
@@ -2,7 +2,7 @@
 // asio.cpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/asio_ssl.cpp b/asio/src/asio_ssl.cpp
index d9cc2cb..68a16c0 100644
--- a/asio/src/asio_ssl.cpp
+++ b/asio/src/asio_ssl.cpp
@@ -2,7 +2,7 @@
 // asio_ssl.cpp
 // ~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/Jamfile.v2 b/asio/src/doc/Jamfile.v2
index 489915c..3e22af7 100644
--- a/asio/src/doc/Jamfile.v2
+++ b/asio/src/doc/Jamfile.v2
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+# Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 #
 # Distributed under the Boost Software License, Version 1.0. (See accompanying
 # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/asio.qbk b/asio/src/doc/asio.qbk
index e0d5c7a..68cc2e0 100644
--- a/asio/src/doc/asio.qbk
+++ b/asio/src/doc/asio.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,7 +7,7 @@
 
 [library Asio
     [quickbook 1.4]
-    [copyright 2003 - 2015 Christopher M. Kohlhoff]
+    [copyright 2003 - 2016 Christopher M. Kohlhoff]
     [purpose Networking library]
     [license
         Distributed under the Boost Software License, Version 1.0.
@@ -19,8 +19,10 @@
 ]
 
 [template mdash[] '''&mdash; ''']
-[template indexterm1[term1] '''<indexterm><primary>'''[term1]'''</primary></indexterm>''']
-[template indexterm2[term1 term2] '''<indexterm><primary>'''[term1]'''</primary><secondary>'''[term2]'''</secondary></indexterm>''']
+[template half_open_range[text] '''&#91;'''[text])]
+[template indexterm1[id term1] '''<indexterm id="'''[id]'''"><primary>'''[term1]'''</primary></indexterm>''']
+[template indexterm2[id term1 term2] '''<indexterm id="'''[id]'''"><primary>'''[term1]'''</primary><secondary>'''[term2]'''</secondary></indexterm>''']
+[template inline_note[text] \[['Note:] [text] '''&mdash;'''['end note]\] ]
 [template ticket[number]'''<ulink url="https://svn.boost.org/trac/boost/ticket/'''[number]'''">'''#[number]'''</ulink>''']
 [def __POSIX__ /POSIX/]
 [def __Windows__ /Windows/]
@@ -30,9 +32,11 @@
 [def __getsockname__ [@http://www.opengroup.org/onlinepubs/000095399/functions/getsockname.html `getsockname()`]]
 [def __getsockopt__ [@http://www.opengroup.org/onlinepubs/000095399/functions/getsockopt.html `getsockopt()`]]
 [def __ioctl__ [@http://www.opengroup.org/onlinepubs/000095399/functions/ioctl.html `ioctl()`]]
+[def __poll__ [@http://www.opengroup.org/onlinepubs/000095399/functions/poll.html `poll()`]]
 [def __recvfrom__ [@http://www.opengroup.org/onlinepubs/000095399/functions/recvfrom.html `recvfrom()`]]
 [def __sendto__ [@http://www.opengroup.org/onlinepubs/000095399/functions/sendto.html `sendto()`]]
 [def __setsockopt__ [@http://www.opengroup.org/onlinepubs/000095399/functions/setsockopt.html `setsockopt()`]]
+[def __shutdown__ [@http://www.opengroup.org/onlinepubs/000095399/functions/shutdown.html `shutdown()`]]
 [def __socket__ [@http://www.opengroup.org/onlinepubs/000095399/functions/socket.html `socket()`]]
 
 [/=============================================================================]
diff --git a/asio/src/doc/asioref.xsl b/asio/src/doc/asioref.xsl
index 5106668..09c6fef 100644
--- a/asio/src/doc/asioref.xsl
+++ b/asio/src/doc/asioref.xsl
@@ -2,7 +2,7 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
 <!--
-  Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
   Distributed under the Boost Software License, Version 1.0. (See accompanying
   file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/doxy2qbk.pl b/asio/src/doc/doxy2qbk.pl
index 7bac678..9e4e2a2 100644
--- a/asio/src/doc/doxy2qbk.pl
+++ b/asio/src/doc/doxy2qbk.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-# Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+# Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 #
 # Distributed under the Boost Software License, Version 1.0. (See accompanying
 # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/examples.qbk b/asio/src/doc/examples.qbk
index 8cbf93a..17310ee 100644
--- a/asio/src/doc/examples.qbk
+++ b/asio/src/doc/examples.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/history.qbk b/asio/src/doc/history.qbk
index f3f3d35..e5c3ddb 100644
--- a/asio/src/doc/history.qbk
+++ b/asio/src/doc/history.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/index.xml b/asio/src/doc/index.xml
index ebfb723..3b7b556 100644
--- a/asio/src/doc/index.xml
+++ b/asio/src/doc/index.xml
@@ -2,12 +2,12 @@
 <!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "../../../boost/tools/boostbook/dtd/boostbook.dtd">
 
 <!--
-  Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
   Distributed under the Boost Software License, Version 1.0. (See accompanying
   file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 -->
 
 <section id="asio.index">
-  <index/>
+  <index id="asio.index.index"/>
 </section>
diff --git a/asio/src/doc/makepdf.pl b/asio/src/doc/makepdf.pl
index 2f0a158..4bb90a4 100755
--- a/asio/src/doc/makepdf.pl
+++ b/asio/src/doc/makepdf.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-# Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+# Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 #
 # Distributed under the Boost Software License, Version 1.0. (See accompanying
 # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview.qbk b/asio/src/doc/overview.qbk
index 57b3b14..046b2cb 100644
--- a/asio/src/doc/overview.qbk
+++ b/asio/src/doc/overview.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/allocation.qbk b/asio/src/doc/overview/allocation.qbk
index cbbef4a..ecdc71a 100644
--- a/asio/src/doc/overview/allocation.qbk
+++ b/asio/src/doc/overview/allocation.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/async.qbk b/asio/src/doc/overview/async.qbk
index ef566dc..ff62787 100644
--- a/asio/src/doc/overview/async.qbk
+++ b/asio/src/doc/overview/async.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -30,8 +30,8 @@
 [mdash] Asynchronous Operation Processor
 
 [:Executes asynchronous operations and queues events on a completion event
-queue when operations complete. From a high-level point of view, services like
-`stream_socket_service` are asynchronous operation processors.]
+queue when operations complete. From a high-level point of view, internal
+services like `reactive_socket_service` are asynchronous operation processors.]
 
 [mdash] Completion Event Queue
 
@@ -59,7 +59,7 @@
 [:Application-specific code that starts asynchronous operations. The initiator
 interacts with an asynchronous operation processor via a high-level interface
 such as `basic_stream_socket`, which in turn delegates to a service like
-`stream_socket_service`.]
+`reactive_socket_service`.]
 
 [heading Implementation Using Reactor]
 
diff --git a/asio/src/doc/overview/basics.qbk b/asio/src/doc/overview/basics.qbk
index a56a7a9..c867563 100644
--- a/asio/src/doc/overview/basics.qbk
+++ b/asio/src/doc/overview/basics.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/bsd_sockets.qbk b/asio/src/doc/overview/bsd_sockets.qbk
index 644d1cc..acc67da 100644
--- a/asio/src/doc/overview/bsd_sockets.qbk
+++ b/asio/src/doc/overview/bsd_sockets.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/buffers.qbk b/asio/src/doc/overview/buffers.qbk
index 4140811..bd8760d 100644
--- a/asio/src/doc/overview/buffers.qbk
+++ b/asio/src/doc/overview/buffers.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/coroutine.qbk b/asio/src/doc/overview/coroutine.qbk
index d05e62d..6745367 100644
--- a/asio/src/doc/overview/coroutine.qbk
+++ b/asio/src/doc/overview/coroutine.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/cpp2011.qbk b/asio/src/doc/overview/cpp2011.qbk
index 2f1d5c9..fa9e662 100644
--- a/asio/src/doc/overview/cpp2011.qbk
+++ b/asio/src/doc/overview/cpp2011.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/handler_tracking.qbk b/asio/src/doc/overview/handler_tracking.qbk
index 7cbd28a..3c26352 100644
--- a/asio/src/doc/overview/handler_tracking.qbk
+++ b/asio/src/doc/overview/handler_tracking.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/implementation.qbk b/asio/src/doc/overview/implementation.qbk
index a6ac58c..34c92f0 100644
--- a/asio/src/doc/overview/implementation.qbk
+++ b/asio/src/doc/overview/implementation.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -242,8 +242,8 @@
 `io_context::poll_one()`.
 
 * An additional thread per `io_context` is used to trigger timers. This thread
-is created on construction of the first `deadline_timer` or
-`deadline_timer_service` objects.
+is created on construction of the first `basic_deadline_timer` or
+`basic_waitable_timer` objects.
 
 * An additional thread per `io_context` is used for the `select`
 demultiplexing. This thread is created on the first call to `async_connect()`.
diff --git a/asio/src/doc/overview/iostreams.qbk b/asio/src/doc/overview/iostreams.qbk
index 096b4eb..f738f9e 100644
--- a/asio/src/doc/overview/iostreams.qbk
+++ b/asio/src/doc/overview/iostreams.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -28,7 +28,7 @@
   for (;;)
   {
     ip::tcp::iostream stream;
-    acceptor.accept(*stream.rdbuf());
+    acceptor.accept(stream.socket());
     ...
   }
 
diff --git a/asio/src/doc/overview/line_based.qbk b/asio/src/doc/overview/line_based.qbk
index 5c328bb..df007ad 100644
--- a/asio/src/doc/overview/line_based.qbk
+++ b/asio/src/doc/overview/line_based.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/other_protocols.qbk b/asio/src/doc/overview/other_protocols.qbk
index 2921581..9a6fe07 100644
--- a/asio/src/doc/overview/other_protocols.qbk
+++ b/asio/src/doc/overview/other_protocols.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/posix.qbk b/asio/src/doc/overview/posix.qbk
index 4aa6bb9..19c9178 100644
--- a/asio/src/doc/overview/posix.qbk
+++ b/asio/src/doc/overview/posix.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -75,7 +75,15 @@
 
 Asio includes classes added to permit synchronous and asynchronous read and
 write operations to be performed on POSIX file descriptors, such as pipes,
-standard input and output, and various devices (but /not/ regular files).
+standard input and output, and various devices.
+
+These classes also provide limited support for regular files. This support
+assumes that the underlying read and write operations provided by the operating
+system never fail with `EAGAIN` or `EWOULDBLOCK`. (This assumption normally
+holds for buffered file I/O.)  Synchronous and asynchronous read and write
+operations on file descriptors will succeed but the I/O will always be
+performed immediately. Wait operations, and operations involving
+`asio::null_buffers`, are not portably supported.
 
 For example, to perform read and write operations on standard input
 and output, the following objects may be created:
@@ -93,8 +101,6 @@
 [heading See Also]
 
 [link asio.reference.posix__stream_descriptor posix::stream_descriptor],
-[link asio.reference.posix__basic_stream_descriptor posix::basic_stream_descriptor],
-[link asio.reference.posix__stream_descriptor_service posix::stream_descriptor_service],
 [link asio.examples.cpp03_examples.chat Chat example (C++03)],
 [link asio.examples.cpp11_examples.chat Chat example (C++11)].
 
@@ -127,7 +133,7 @@
   }
 
 User-defined services can also be made fork-aware by overriding the
-`io_context::service::fork_service()` virtual function.
+`io_context::service::notify_fork()` virtual function.
 
 Note that any file descriptors accessible via Asio's public API (e.g. the
 descriptors underlying `basic_socket<>`, `posix::stream_descriptor`, etc.) are
@@ -138,7 +144,7 @@
 
 [link asio.reference.io_context.notify_fork io_context::notify_fork()],
 [link asio.reference.io_context.fork_event io_context::fork_event],
-[link asio.reference.execution_context__service.fork_service io_context::service::fork_service()],
+[link asio.reference.execution_context__service.notify_fork io_context::service::notify_fork()],
 [link asio.examples.cpp03_examples.fork Fork examples].
 
 [endsect]
diff --git a/asio/src/doc/overview/protocols.qbk b/asio/src/doc/overview/protocols.qbk
index fd48d29..eed070c 100644
--- a/asio/src/doc/overview/protocols.qbk
+++ b/asio/src/doc/overview/protocols.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/rationale.qbk b/asio/src/doc/overview/rationale.qbk
index 49ab458..13491cd 100644
--- a/asio/src/doc/overview/rationale.qbk
+++ b/asio/src/doc/overview/rationale.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/reactor.qbk b/asio/src/doc/overview/reactor.qbk
index 68559b7..468645a 100644
--- a/asio/src/doc/overview/reactor.qbk
+++ b/asio/src/doc/overview/reactor.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/serial_ports.qbk b/asio/src/doc/overview/serial_ports.qbk
index 843c9a5..dd049cd 100644
--- a/asio/src/doc/overview/serial_ports.qbk
+++ b/asio/src/doc/overview/serial_ports.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -29,8 +29,6 @@
 
 [link asio.reference.serial_port serial_port],
 [link asio.reference.serial_port_base serial_port_base],
-[link asio.reference.basic_serial_port basic_serial_port],
-[link asio.reference.serial_port_service serial_port_service],
 [link asio.reference.serial_port_base__baud_rate serial_port_base::baud_rate],
 [link asio.reference.serial_port_base__flow_control serial_port_base::flow_control],
 [link asio.reference.serial_port_base__parity serial_port_base::parity],
diff --git a/asio/src/doc/overview/signals.qbk b/asio/src/doc/overview/signals.qbk
index 1d46f69..d626ead 100644
--- a/asio/src/doc/overview/signals.qbk
+++ b/asio/src/doc/overview/signals.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/spawn.qbk b/asio/src/doc/overview/spawn.qbk
index 03954a9..908d78f 100644
--- a/asio/src/doc/overview/spawn.qbk
+++ b/asio/src/doc/overview/spawn.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/ssl.qbk b/asio/src/doc/overview/ssl.qbk
index 9d063ef..e5a4d73 100644
--- a/asio/src/doc/overview/ssl.qbk
+++ b/asio/src/doc/overview/ssl.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/strands.qbk b/asio/src/doc/overview/strands.qbk
index 0d4a08b..0b6ff05 100644
--- a/asio/src/doc/overview/strands.qbk
+++ b/asio/src/doc/overview/strands.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/streams.qbk b/asio/src/doc/overview/streams.qbk
index 934c156..ea89e8b 100644
--- a/asio/src/doc/overview/streams.qbk
+++ b/asio/src/doc/overview/streams.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/threads.qbk b/asio/src/doc/overview/threads.qbk
index 471dc1b..b5239d9 100644
--- a/asio/src/doc/overview/threads.qbk
+++ b/asio/src/doc/overview/threads.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/overview/timers.qbk b/asio/src/doc/overview/timers.qbk
index 2a4a5e5..0c5528d 100644
--- a/asio/src/doc/overview/timers.qbk
+++ b/asio/src/doc/overview/timers.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -47,7 +47,6 @@
 
 [link asio.reference.basic_deadline_timer basic_deadline_timer],
 [link asio.reference.deadline_timer deadline_timer],
-[link asio.reference.deadline_timer_service deadline_timer_service],
 [link asio.tutorial.tuttimer1 timer tutorials].
 
 [endsect]
diff --git a/asio/src/doc/overview/windows.qbk b/asio/src/doc/overview/windows.qbk
index 7fabe0f..da49a0b 100644
--- a/asio/src/doc/overview/windows.qbk
+++ b/asio/src/doc/overview/windows.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -37,9 +37,7 @@
 
 [heading See Also]
 
-[link asio.reference.windows__stream_handle windows::stream_handle],
-[link asio.reference.windows__basic_stream_handle windows::basic_stream_handle],
-[link asio.reference.windows__stream_handle_service windows::stream_handle_service].
+[link asio.reference.windows__stream_handle windows::stream_handle].
 
 [heading Notes]
 
@@ -76,9 +74,7 @@
 
 [heading See Also]
 
-[link asio.reference.windows__random_access_handle windows::random_access_handle],
-[link asio.reference.windows__basic_random_access_handle windows::basic_random_access_handle],
-[link asio.reference.windows__random_access_handle_service windows::random_access_handle_service].
+[link asio.reference.windows__random_access_handle windows::random_access_handle].
 
 [heading Notes]
 
@@ -117,9 +113,7 @@
 
 [heading See Also]
 
-[link asio.reference.windows__object_handle windows::object_handle],
-[link asio.reference.windows__basic_object_handle windows::basic_object_handle],
-[link asio.reference.windows__object_handle_service windows::object_handle_service].
+[link asio.reference.windows__object_handle windows::object_handle].
 
 [heading Notes]
 
diff --git a/asio/src/doc/quickref.xml b/asio/src/doc/quickref.xml
index 7a2631a..7d2632a 100644
--- a/asio/src/doc/quickref.xml
+++ b/asio/src/doc/quickref.xml
@@ -2,7 +2,7 @@
 <!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "../../../boost/tools/boostbook/dtd/boostbook.dtd">
 
 <!--
-  Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
   Distributed under the Boost Software License, Version 1.0. (See accompanying
   file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -38,14 +38,13 @@
             <member><link linkend="asio.reference.io_context__executor_type">io_context::executor_type</link></member>
             <member><link linkend="asio.reference.io_context__service">io_context::service</link></member>
             <member><link linkend="asio.reference.io_context__strand">io_context::strand</link></member>
-            <member><link linkend="asio.reference.io_context__work">io_context::work</link></member>
+            <member><link linkend="asio.reference.io_context__work">io_context::work</link> (deprecated)</member>
             <member><link linkend="asio.reference.service_already_exists">service_already_exists</link></member>
             <member><link linkend="asio.reference.system_error">system_error</link></member>
             <member><link linkend="asio.reference.system_executor">system_executor</link></member>
             <member><link linkend="asio.reference.thread">thread</link></member>
             <member><link linkend="asio.reference.thread_pool">thread_pool</link></member>
             <member><link linkend="asio.reference.thread_pool__executor_type">thread_pool::executor_type</link></member>
-            <member><link linkend="asio.reference.use_future_t">use_future_t</link></member>
             <member><link linkend="asio.reference.yield_context">yield_context</link></member>
           </simplelist>
         </entry>
@@ -63,8 +62,7 @@
             <member><link linkend="asio.reference.get_associated_allocator">get_associated_allocator</link></member>
             <member><link linkend="asio.reference.get_associated_executor">get_associated_executor</link></member>
             <member><link linkend="asio.reference.has_service">has_service</link></member>
-            <member><link linkend="asio.reference.make_work">make_work</link></member>
-            <member><link linkend="asio.reference.package">package</link></member>
+            <member><link linkend="asio.reference.make_work_guard">make_work_guard</link></member>
             <member><link linkend="asio.reference.post">post</link></member>
             <member><link linkend="asio.reference.spawn">spawn</link></member>
             <member><link linkend="asio.reference.use_service">use_service</link></member>
@@ -76,11 +74,10 @@
             <member><link linkend="asio.reference.async_completion">async_completion</link></member>
             <member><link linkend="asio.reference.basic_io_object">basic_io_object</link></member>
             <member><link linkend="asio.reference.basic_yield_context">basic_yield_context</link></member>
-            <member><link linkend="asio.reference.executor_work">executor_work</link></member>
-            <member><link linkend="asio.reference.executor_wrapper">executor_wrapper</link></member>
-            <member><link linkend="asio.reference.packaged_handler">packaged_handler</link></member>
-            <member><link linkend="asio.reference.packaged_token">packaged_token</link></member>
+            <member><link linkend="asio.reference.executor_binder">executor_binder</link></member>
+            <member><link linkend="asio.reference.executor_work_guard">executor_work_guard</link></member>
             <member><link linkend="asio.reference.strand">strand</link></member>
+            <member><link linkend="asio.reference.use_future_t">use_future_t</link></member>
           </simplelist>
           <bridgehead renderas="sect3">Special Values</bridgehead>
           <simplelist type="vert" columns="1">
@@ -110,7 +107,7 @@
             <member><link linkend="asio.reference.associated_allocator">associated_allocator</link></member>
             <member><link linkend="asio.reference.associated_executor">associated_executor</link></member>
             <member><link linkend="asio.reference.async_result">async_result</link></member>
-            <member><link linkend="asio.reference.handler_type">handler_type</link></member>
+            <member><link linkend="asio.reference.handler_type">handler_type </link> (deprecated)</member>
             <member><link linkend="asio.reference.is_executor">is_executor</link></member>
             <member><link linkend="asio.reference.uses_executor">uses_executor</link></member>
           </simplelist>
@@ -118,9 +115,9 @@
           <simplelist type="vert" columns="1">
             <member><link linkend="asio.reference.asynchronous_operations">Asynchronous operations</link></member>
             <member><link linkend="asio.reference.CompletionHandler">CompletionHandler</link></member>
+            <member><link linkend="asio.reference.ExecutionContext">ExecutionContext</link></member>
             <member><link linkend="asio.reference.Executor1">Executor</link></member>
             <member><link linkend="asio.reference.Handler">Handler</link></member>
-            <member><link linkend="asio.reference.IoObjectService">IoObjectService</link></member>
             <member><link linkend="asio.reference.Service">Service</link></member>
           </simplelist>
         </entry>
@@ -145,9 +142,9 @@
           <bridgehead renderas="sect3">Classes</bridgehead>
           <simplelist type="vert" columns="1">
             <member><link linkend="asio.reference.const_buffer">const_buffer</link></member>
-            <member><link linkend="asio.reference.const_buffers_1">const_buffers_1</link></member>
             <member><link linkend="asio.reference.mutable_buffer">mutable_buffer</link></member>
-            <member><link linkend="asio.reference.mutable_buffers_1">mutable_buffers_1</link></member>
+            <member><link linkend="asio.reference.const_buffers_1">const_buffers_1 </link> (deprecated)</member>
+            <member><link linkend="asio.reference.mutable_buffers_1">mutable_buffers_1 </link> (deprecated)</member>
             <member><link linkend="asio.reference.null_buffers">null_buffers</link> (deprecated)</member>
             <member><link linkend="asio.reference.streambuf">streambuf</link></member>
           </simplelist>
@@ -171,7 +168,7 @@
             <member><link linkend="asio.reference.async_write">async_write</link></member>
             <member><link linkend="asio.reference.async_write_at">async_write_at</link></member>
             <member><link linkend="asio.reference.buffer">buffer</link></member>
-            <member><link linkend="asio.reference.buffer_cast">buffer_cast</link></member>
+            <member><link linkend="asio.reference.buffer_cast">buffer_cast </link> (deprecated)</member>
             <member><link linkend="asio.reference.buffer_copy">buffer_copy</link></member>
             <member><link linkend="asio.reference.buffer_size">buffer_size</link></member>
             <member><link linkend="asio.reference.buffers_begin">buffers_begin</link></member>
@@ -200,14 +197,14 @@
         <entry valign="top">
           <bridgehead renderas="sect3">Type Requirements</bridgehead>
           <simplelist type="vert" columns="1">
+            <member><link linkend="asio.reference.read_write_operations">Read and write operations</link></member>
             <member><link linkend="asio.reference.AsyncRandomAccessReadDevice">AsyncRandomAccessReadDevice</link></member>
             <member><link linkend="asio.reference.AsyncRandomAccessWriteDevice">AsyncRandomAccessWriteDevice</link></member>
             <member><link linkend="asio.reference.AsyncReadStream">AsyncReadStream</link></member>
             <member><link linkend="asio.reference.AsyncWriteStream">AsyncWriteStream</link></member>
+            <member><link linkend="asio.reference.CompletionCondition">CompletionCondition</link></member>
             <member><link linkend="asio.reference.ConstBufferSequence">ConstBufferSequence</link></member>
-            <member><link linkend="asio.reference.ConvertibleToConstBuffer">ConvertibleToConstBuffer</link></member>
-            <member><link linkend="asio.reference.ConvertibleToMutableBuffer">ConvertibleToMutableBuffer</link></member>
-            <member><link linkend="asio.reference.DynamicBufferSequence">DynamicBufferSequence</link></member>
+            <member><link linkend="asio.reference.DynamicBuffer">DynamicBuffer</link></member>
             <member><link linkend="asio.reference.MutableBufferSequence">MutableBufferSequence</link></member>
             <member><link linkend="asio.reference.ReadHandler">ReadHandler</link></member>
             <member><link linkend="asio.reference.SyncRandomAccessReadDevice">SyncRandomAccessReadDevice</link></member>
@@ -292,7 +289,6 @@
           <bridgehead renderas="sect3">Class Templates</bridgehead>
           <simplelist type="vert" columns="1">
             <member><link linkend="asio.reference.basic_datagram_socket">basic_datagram_socket</link></member>
-            <member><link linkend="asio.reference.basic_deadline_timer">basic_deadline_timer</link></member>
             <member><link linkend="asio.reference.basic_raw_socket">basic_raw_socket</link></member>
             <member><link linkend="asio.reference.basic_seq_packet_socket">basic_seq_packet_socket</link></member>
             <member><link linkend="asio.reference.basic_socket">basic_socket</link></member>
@@ -307,15 +303,6 @@
             <member><link linkend="asio.reference.ip__basic_resolver_iterator">ip::basic_resolver_iterator</link></member>
             <member><link linkend="asio.reference.ip__basic_resolver_query">ip::basic_resolver_query</link></member>
           </simplelist>
-          <bridgehead renderas="sect3">Services</bridgehead>
-          <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.datagram_socket_service">datagram_socket_service</link></member>
-            <member><link linkend="asio.reference.ip__resolver_service">ip::resolver_service</link></member>
-            <member><link linkend="asio.reference.raw_socket_service">raw_socket_service</link></member>
-            <member><link linkend="asio.reference.seq_packet_socket_service">seq_packet_socket_service</link></member>
-            <member><link linkend="asio.reference.socket_acceptor_service">socket_acceptor_service</link></member>
-            <member><link linkend="asio.reference.stream_socket_service">stream_socket_service</link></member>
-          </simplelist>
         </entry>
         <entry valign="top">
           <bridgehead renderas="sect3">Socket Options</bridgehead>
@@ -348,24 +335,23 @@
           </simplelist>
           <bridgehead renderas="sect3">Type Requirements</bridgehead>
           <simplelist type="vert" columns="1">
+            <member><link linkend="asio.reference.synchronous_socket_operations">Synchronous socket operations</link></member>
+            <member><link linkend="asio.reference.asynchronous_socket_operations">Asynchronous socket operations</link></member>
             <member><link linkend="asio.reference.AcceptableProtocol">AcceptableProtocol</link></member>
             <member><link linkend="asio.reference.AcceptHandler">AcceptHandler</link></member>
-            <member><link linkend="asio.reference.ComposedConnectHandler">ComposedConnectHandler</link></member>
+            <member><link linkend="asio.reference.ConnectCondition">ConnectCondition</link></member>
             <member><link linkend="asio.reference.ConnectHandler">ConnectHandler</link></member>
-            <member><link linkend="asio.reference.DatagramSocketService">DatagramSocketService</link></member>
             <member><link linkend="asio.reference.Endpoint">Endpoint</link></member>
+            <member><link linkend="asio.reference.EndpointSequence">EndpointSequence</link></member>
             <member><link linkend="asio.reference.GettableSocketOption">GettableSocketOption</link></member>
             <member><link linkend="asio.reference.InternetProtocol">InternetProtocol</link></member>
             <member><link linkend="asio.reference.IoControlCommand">IoControlCommand</link></member>
+            <member><link linkend="asio.reference.IteratorConnectHandler">IteratorConnectHandler</link></member>
+            <member><link linkend="asio.reference.MoveAcceptHandler">MoveAcceptHandler</link></member>
             <member><link linkend="asio.reference.Protocol">Protocol</link></member>
-            <member><link linkend="asio.reference.RawSocketService">RawSocketService</link></member>
+            <member><link linkend="asio.reference.RangeConnectHandler">RangeConnectHandler</link></member>
             <member><link linkend="asio.reference.ResolveHandler">ResolveHandler</link></member>
-            <member><link linkend="asio.reference.ResolverService">ResolverService</link></member>
-            <member><link linkend="asio.reference.SeqPacketSocketService">SeqPacketSocketService</link></member>
             <member><link linkend="asio.reference.SettableSocketOption">SettableSocketOption</link></member>
-            <member><link linkend="asio.reference.SocketAcceptorService">SocketAcceptorService</link></member>
-            <member><link linkend="asio.reference.SocketService">SocketService</link></member>
-            <member><link linkend="asio.reference.StreamSocketService">StreamSocketService</link></member>
           </simplelist>
         </entry>
       </row>
@@ -398,21 +384,22 @@
           <bridgehead renderas="sect3">Classes</bridgehead>
           <simplelist type="vert" columns="1">
             <member><link linkend="asio.reference.deadline_timer">deadline_timer</link></member>
+            <member><link linkend="asio.reference.high_resolution_timer">high_resolution_timer</link></member>
+            <member><link linkend="asio.reference.steady_timer">steady_timer</link></member>
+            <member><link linkend="asio.reference.system_timer">system_timer</link></member>
           </simplelist>
           <bridgehead renderas="sect3">Class Templates</bridgehead>
           <simplelist type="vert" columns="1">
             <member><link linkend="asio.reference.basic_deadline_timer">basic_deadline_timer</link></member>
+            <member><link linkend="asio.reference.basic_waitable_timer">basic_waitable_timer</link></member>
             <member><link linkend="asio.reference.time_traits_lt__ptime__gt_">time_traits</link></member>
-          </simplelist>
-          <bridgehead renderas="sect3">Services</bridgehead>
-          <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.deadline_timer_service">deadline_timer_service</link></member>
+            <member><link linkend="asio.reference.wait_traits">wait_traits</link></member>
           </simplelist>
           <bridgehead renderas="sect3">Type Requirements</bridgehead>
           <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.TimerService">TimerService</link></member>
             <member><link linkend="asio.reference.TimeTraits">TimeTraits</link></member>
             <member><link linkend="asio.reference.WaitHandler">WaitHandler</link></member>
+            <member><link linkend="asio.reference.WaitTraits">WaitTraits</link></member>
           </simplelist>
         </entry>
         <entry valign="top">
@@ -441,14 +428,6 @@
             <member><link linkend="asio.reference.serial_port">serial_port</link></member>
             <member><link linkend="asio.reference.serial_port_base">serial_port_base</link></member>
           </simplelist>
-          <bridgehead renderas="sect3">Class Templates</bridgehead>
-          <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.basic_serial_port">basic_serial_port</link></member>
-          </simplelist>
-          <bridgehead renderas="sect3">Services</bridgehead>
-          <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.serial_port_service">serial_port_service</link></member>
-          </simplelist>
           <bridgehead renderas="sect3">Serial Port Options</bridgehead>
           <simplelist type="vert" columns="1">
             <member><link linkend="asio.reference.serial_port_base__baud_rate">serial_port_base::baud_rate</link></member>
@@ -460,7 +439,6 @@
           <bridgehead renderas="sect3">Type Requirements</bridgehead>
           <simplelist type="vert" columns="1">
             <member><link linkend="asio.reference.GettableSerialPortOption">GettableSerialPortOption</link></member>
-            <member><link linkend="asio.reference.SerialPortService">SerialPortService</link></member>
             <member><link linkend="asio.reference.SettableSerialPortOption">SettableSerialPortOption</link></member>
           </simplelist>
         </entry>
@@ -469,17 +447,8 @@
           <simplelist type="vert" columns="1">
             <member><link linkend="asio.reference.signal_set">signal_set</link></member>
           </simplelist>
-          <bridgehead renderas="sect3">Class Templates</bridgehead>
-          <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.basic_signal_set">basic_signal_set</link></member>
-          </simplelist>
-          <bridgehead renderas="sect3">Services</bridgehead>
-          <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.signal_set_service">signal_set_service</link></member>
-          </simplelist>
           <bridgehead renderas="sect3">Type Requirements</bridgehead>
           <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.SignalSetService">SignalSetService</link></member>
             <member><link linkend="asio.reference.SignalHandler">SignalHandler</link></member>
           </simplelist>
         </entry>
@@ -514,55 +483,30 @@
             <member><link linkend="asio.reference.local__datagram_protocol">local::datagram_protocol</link></member>
             <member><link linkend="asio.reference.local__datagram_protocol.endpoint">local::datagram_protocol::endpoint</link></member>
             <member><link linkend="asio.reference.local__datagram_protocol.socket">local::datagram_protocol::socket</link></member>
+            <member><link linkend="asio.reference.posix__descriptor">posix::descriptor</link></member>
             <member><link linkend="asio.reference.posix__descriptor_base">posix::descriptor_base</link></member>
             <member><link linkend="asio.reference.posix__stream_descriptor">posix::stream_descriptor</link></member>
           </simplelist>
+        </entry>
+        <entry valign="top">
           <bridgehead renderas="sect3">Free Functions</bridgehead>
           <simplelist type="vert" columns="1">
             <member><link linkend="asio.reference.local__connect_pair">local::connect_pair</link></member>
           </simplelist>
-        </entry>
-        <entry valign="top">
           <bridgehead renderas="sect3">Class Templates</bridgehead>
           <simplelist type="vert" columns="1">
             <member><link linkend="asio.reference.local__basic_endpoint">local::basic_endpoint</link></member>
-            <member><link linkend="asio.reference.posix__basic_descriptor">posix::basic_descriptor</link></member>
-            <member><link linkend="asio.reference.posix__basic_stream_descriptor">posix::basic_stream_descriptor</link></member>
-          </simplelist>
-          <bridgehead renderas="sect3">Services</bridgehead>
-          <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.posix__stream_descriptor_service">posix::stream_descriptor_service</link></member>
-          </simplelist>
-          <bridgehead renderas="sect3">Type Requirements</bridgehead>
-          <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.DescriptorService">DescriptorService</link></member>
-            <member><link linkend="asio.reference.StreamDescriptorService">StreamDescriptorService</link></member>
           </simplelist>
         </entry>
         <entry valign="top" namest="c" nameend="d">
           <bridgehead renderas="sect3">Classes</bridgehead>
           <simplelist type="vert" columns="1">
+            <member><link linkend="asio.reference.windows__object_handle">windows::object_handle</link></member>
+            <member><link linkend="asio.reference.windows__overlapped_handle">windows::overlapped_handle</link></member>
             <member><link linkend="asio.reference.windows__overlapped_ptr">windows::overlapped_ptr</link></member>
             <member><link linkend="asio.reference.windows__random_access_handle">windows::random_access_handle</link></member>
             <member><link linkend="asio.reference.windows__stream_handle">windows::stream_handle</link></member>
           </simplelist>
-          <bridgehead renderas="sect3">Class Templates</bridgehead>
-          <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.windows__basic_handle">windows::basic_handle</link></member>
-            <member><link linkend="asio.reference.windows__basic_random_access_handle">windows::basic_random_access_handle</link></member>
-            <member><link linkend="asio.reference.windows__basic_stream_handle">windows::basic_stream_handle</link></member>
-          </simplelist>
-          <bridgehead renderas="sect3">Services</bridgehead>
-          <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.windows__random_access_handle_service">windows::random_access_handle_service</link></member>
-            <member><link linkend="asio.reference.windows__stream_handle_service">windows::stream_handle_service</link></member>
-          </simplelist>
-          <bridgehead renderas="sect3">Type Requirements</bridgehead>
-          <simplelist type="vert" columns="1">
-            <member><link linkend="asio.reference.HandleService">HandleService</link></member>
-            <member><link linkend="asio.reference.RandomAccessHandleService">RandomAccessHandleService</link></member>
-            <member><link linkend="asio.reference.StreamHandleService">StreamHandleService</link></member>
-          </simplelist>
         </entry>
       </row>
     </tbody>
diff --git a/asio/src/doc/reference.dox b/asio/src/doc/reference.dox
index a5d09e6..d0d5677 100644
--- a/asio/src/doc/reference.dox
+++ b/asio/src/doc/reference.dox
@@ -199,7 +199,21 @@
                          ASIO_DECL= \
                          ASIO_CONSTEXPR=constexpr \
                          ASIO_NOEXCEPT=noexcept \
-                         ASIO_INITFN_RESULT_TYPE(t,a)=void_or_deduced
+                         ASIO_INITFN_RESULT_TYPE(t,a)=void_or_deduced \
+                         ASIO_SVC_TPARAM= \
+                         ASIO_SVC_TPARAM_DEF1()= \
+                         ASIO_SVC_TPARAM_DEF2()= \
+                         ASIO_SVC_TARG= \
+                         ASIO_SVC_TPARAM1= \
+                         ASIO_SVC_TPARAM1_DEF1()= \
+                         ASIO_SVC_TPARAM1_DEF2()= \
+                         ASIO_SVC_TARG1= \
+                         ASIO_SVC_T=asio::detail::service \
+                         ASIO_SVC_T1=asio::detail::service \
+                         ASIO_CONST_BUFFER=const_buffer \
+                         ASIO_MUTABLE_BUFFER=mutable_buffer \
+                         ASIO_SYNC_OP_VOID=void \
+                         ASIO_STRING_VIEW_PARAM=string_view
 EXPAND_AS_DEFINED      = 
 SKIP_FUNCTION_MACROS   = YES
 #---------------------------------------------------------------------------
diff --git a/asio/src/doc/reference.qbk b/asio/src/doc/reference.qbk
index 0d80b34..7b9eb64 100644
--- a/asio/src/doc/reference.qbk
+++ b/asio/src/doc/reference.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -10,6 +10,9 @@
 [xinclude quickref.xml]
 
 [include requirements/asynchronous_operations.qbk]
+[include requirements/read_write_operations.qbk]
+[include requirements/synchronous_socket_operations.qbk]
+[include requirements/asynchronous_socket_operations.qbk]
 [include requirements/AcceptableProtocol.qbk]
 [include requirements/AcceptHandler.qbk]
 [include requirements/AsyncRandomAccessReadDevice.qbk]
@@ -17,54 +20,41 @@
 [include requirements/AsyncReadStream.qbk]
 [include requirements/AsyncWriteStream.qbk]
 [include requirements/BufferedHandshakeHandler.qbk]
+[include requirements/CompletionCondition.qbk]
 [include requirements/CompletionHandler.qbk]
+[include requirements/ConnectCondition.qbk]
 [include requirements/ConnectHandler.qbk]
 [include requirements/ConstBufferSequence.qbk]
-[include requirements/ConvertibleToConstBuffer.qbk]
-[include requirements/ConvertibleToMutableBuffer.qbk]
-[include requirements/DatagramSocketService.qbk]
-[include requirements/DescriptorService.qbk]
-[include requirements/DynamicBufferSequence.qbk]
+[include requirements/DynamicBuffer.qbk]
 [include requirements/Endpoint.qbk]
+[include requirements/EndpointSequence.qbk]
+[include requirements/ExecutionContext.qbk]
 [include requirements/Executor.qbk]
 [include requirements/GettableSerialPortOption.qbk]
 [include requirements/GettableSocketOption.qbk]
 [include requirements/Handler.qbk]
-[include requirements/HandleService.qbk]
 [include requirements/HandshakeHandler.qbk]
 [include requirements/InternetProtocol.qbk]
 [include requirements/IoControlCommand.qbk]
 [include requirements/IoObjectService.qbk]
 [include requirements/IteratorConnectHandler.qbk]
+[include requirements/MoveAcceptHandler.qbk]
 [include requirements/MutableBufferSequence.qbk]
-[include requirements/ObjectHandleService.qbk]
+[include requirements/ProtoAllocator.qbk]
 [include requirements/Protocol.qbk]
-[include requirements/RandomAccessHandleService.qbk]
 [include requirements/RangeConnectHandler.qbk]
-[include requirements/RawSocketService.qbk]
 [include requirements/ReadHandler.qbk]
 [include requirements/ResolveHandler.qbk]
-[include requirements/ResolverService.qbk]
-[include requirements/SeqPacketSocketService.qbk]
-[include requirements/SerialPortService.qbk]
 [include requirements/Service.qbk]
 [include requirements/SettableSerialPortOption.qbk]
 [include requirements/SettableSocketOption.qbk]
 [include requirements/ShutdownHandler.qbk]
 [include requirements/SignalHandler.qbk]
-[include requirements/SignalSetService.qbk]
-[include requirements/SocketAcceptorService.qbk]
-[include requirements/SocketService.qbk]
-[include requirements/StreamDescriptorService.qbk]
-[include requirements/StreamHandleService.qbk]
-[include requirements/StreamSocketService.qbk]
 [include requirements/SyncRandomAccessReadDevice.qbk]
 [include requirements/SyncRandomAccessWriteDevice.qbk]
 [include requirements/SyncReadStream.qbk]
 [include requirements/SyncWriteStream.qbk]
 [include requirements/TimeTraits.qbk]
-[include requirements/TimerService.qbk]
-[include requirements/WaitableTimerService.qbk]
 [include requirements/WaitHandler.qbk]
 [include requirements/WaitTraits.qbk]
 [include requirements/WriteHandler.qbk]
@@ -73,7 +63,7 @@
 
 [section:add_service add_service]
 
-[indexterm1 add_service] 
+[indexterm1 asio.indexterm.add_service..add_service] 
 
   template<
       typename ``[link asio.reference.Service Service]``>
@@ -127,7 +117,7 @@
 
 [section:asio_handler_allocate asio_handler_allocate]
 
-[indexterm1 asio_handler_allocate] 
+[indexterm1 asio.indexterm.asio_handler_allocate..asio_handler_allocate] 
 Default allocation function for handlers. 
 
 
@@ -183,7 +173,7 @@
 
 [section:asio_handler_deallocate asio_handler_deallocate]
 
-[indexterm1 asio_handler_deallocate] 
+[indexterm1 asio.indexterm.asio_handler_deallocate..asio_handler_deallocate] 
 Default deallocation function for handlers. 
 
 
@@ -212,7 +202,7 @@
 
 [section:asio_handler_invoke asio_handler_invoke]
 
-[indexterm1 asio_handler_invoke] 
+[indexterm1 asio.indexterm.asio_handler_invoke..asio_handler_invoke] 
 Default invoke function for handlers. 
 
       
@@ -308,7 +298,7 @@
 
 [section:asio_handler_is_continuation asio_handler_is_continuation]
 
-[indexterm1 asio_handler_is_continuation] 
+[indexterm1 asio.indexterm.asio_handler_is_continuation..asio_handler_is_continuation] 
 Default continuation function for handlers. 
 
 
@@ -409,7 +399,7 @@
 
 [section:get associated_allocator::get]
 
-[indexterm2 get..associated_allocator] 
+[indexterm2 asio.indexterm.associated_allocator.get..get..associated_allocator] 
 If `T` has a nested type `allocator_type`, returns `t.get_allocator()`. Otherwise returns `a`. 
 
 
@@ -425,7 +415,7 @@
 
 [section:type associated_allocator::type]
 
-[indexterm2 type..associated_allocator] 
+[indexterm2 asio.indexterm.associated_allocator.type..type..associated_allocator] 
 If `T` has a nested type `allocator_type`, `T::allocator_type`. Otherwise `Allocator`. 
 
 
@@ -506,7 +496,7 @@
 
 [section:get associated_executor::get]
 
-[indexterm2 get..associated_executor] 
+[indexterm2 asio.indexterm.associated_executor.get..get..associated_executor] 
 If `T` has a nested type `executor_type`, returns `t.get_executor()`. Otherwise returns `ex`. 
 
 
@@ -522,7 +512,7 @@
 
 [section:type associated_executor::type]
 
-[indexterm2 type..associated_executor] 
+[indexterm2 asio.indexterm.associated_executor.type..type..associated_executor] 
 If `T` has a nested type `executor_type`, `T::executor_type`. Otherwise `Executor`. 
 
 
@@ -546,11 +536,11 @@
 [section:async_completion async_completion]
 
 
-Helper template to deduce the real type of a handler, capture a local copy of the handler, and then create an [link asio.reference.async_result `async_result`] for the handler. 
+Helper template to deduce the handler type from a CompletionToken, capture a local copy of the handler, and then create an [link asio.reference.async_result `async_result`] for the handler. 
 
 
   template<
-      typename ``[link asio.reference.Handler Handler]``,
+      typename CompletionToken,
       typename Signature>
   struct async_completion
 
@@ -561,7 +551,7 @@
 
   [
 
-    [[link asio.reference.async_completion.handler_type [*handler_type]]]
+    [[link asio.reference.async_completion.completion_handler_type [*completion_handler_type]]]
     [The real handler type to be used for the asynchronous operation. ]
   
   ]
@@ -584,7 +574,7 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.async_completion.handler [*handler]]]
+    [[link asio.reference.async_completion.completion_handler [*completion_handler]]]
     [A copy of, or reference to, a real handler object. ]
   ]
 
@@ -604,28 +594,28 @@
 
 [section:async_completion async_completion::async_completion]
 
-[indexterm2 async_completion..async_completion] 
+[indexterm2 asio.indexterm.async_completion.async_completion..async_completion..async_completion] 
 Constructor. 
 
 
   async_completion(
-      Handler & orig_handler);
+      CompletionToken & token);
 
 
-The constructor creates the concrete handler and makes the link between the handler and the asynchronous result. 
+The constructor creates the concrete completion handler and makes the link between the handler and the asynchronous result. 
 
 
 [endsect]
 
 
 
-[section:handler async_completion::handler]
+[section:completion_handler async_completion::completion_handler]
 
-[indexterm2 handler..async_completion] 
+[indexterm2 asio.indexterm.async_completion.completion_handler..completion_handler..async_completion] 
 A copy of, or reference to, a real handler object. 
 
 
-  conditional< is_same< Handler, handler_type >::value, handler_type &, handler_type >::type handler;
+  conditional< is_same< CompletionToken, completion_handler_type >::value, completion_handler_type &, completion_handler_type >::type completion_handler;
 
 
 
@@ -633,13 +623,13 @@
 
 
 
-[section:handler_type async_completion::handler_type]
+[section:completion_handler_type async_completion::completion_handler_type]
 
-[indexterm2 handler_type..async_completion] 
+[indexterm2 asio.indexterm.async_completion.completion_handler_type..completion_handler_type..async_completion] 
 The real handler type to be used for the asynchronous operation. 
 
 
-  typedef asio::handler_type< Handler, Signature >::type handler_type;
+  typedef asio::async_result< typename decay< CompletionToken >::type, Signature >::completion_handler_type completion_handler_type;
 
 
 [heading Types]
@@ -648,16 +638,50 @@
 
   [
 
-    [[link asio.reference.handler_type.type [*type]]]
-    [The handler type for the specific signature. ]
+    [[link asio.reference.async_result.completion_handler_type [*completion_handler_type]]]
+    [The concrete completion handler type for the specific signature. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.async_result.return_type [*return_type]]]
+    [The return type of the initiating function. ]
   
   ]
 
 ]
 
-The [link asio.reference.handler_type `handler_type`] traits class is used for determining the concrete handler type to be used for an asynchronous operation. It allows the handler type to be determined at the point where the specific completion handler signature is known.
+[heading Member Functions]
+[table
+  [[Name][Description]]
 
-This template may be specialised for user-defined completion token types. 
+  [
+    [[link asio.reference.async_result.async_result [*async_result]]]
+    [Construct an async result from a given handler. ]
+  ]
+  
+  [
+    [[link asio.reference.async_result.get [*get]]]
+    [Obtain the value to be returned from the initiating function. ]
+  ]
+  
+]
+
+The [link asio.reference.async_result `async_result`] traits class is used for determining:
+
+
+* the concrete completion handler type to be called at the end of the asynchronous operation;
+
+
+* the initiating function return type; and
+
+
+* how the return value of the initiating function is obtained.
+
+The trait allows the handler and return types to be determined at the point where the specific completion handler signature is known.
+
+This template may be specialised for user-defined completion token types. The primary template assumes that the CompletionToken is the completion handler. 
 
 
 [heading Requirements]
@@ -673,11 +697,11 @@
 
 [section:result async_completion::result]
 
-[indexterm2 result..async_completion] 
+[indexterm2 asio.indexterm.async_completion.result..result..async_completion] 
 The result of the asynchronous operation's initiating function. 
 
 
-  async_result< typename asio::handler_type< Handler, Signature >::type > result;
+  async_result< typename decay< CompletionToken >::type, Signature > result;
 
 
 
@@ -689,17 +713,16 @@
 
 [section:async_connect async_connect]
 
-[indexterm1 async_connect] 
+[indexterm1 asio.indexterm.async_connect..async_connect] 
 Asynchronously establishes a socket connection by trying each endpoint in a sequence. 
 
       
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
       typename ``[link asio.reference.RangeConnectHandler RangeConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_connect.overload1 async_connect]``(
-      basic_socket< Protocol, SocketService > & s,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_connect.overload1 async_connect]``(
+      basic_socket< Protocol > & s,
       const EndpointSequence & endpoints,
       RangeConnectHandler && handler,
       typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type *  = 0);
@@ -707,11 +730,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
       typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_connect.overload2 async_connect]``(
-      basic_socket< Protocol, SocketService > & s,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_connect.overload2 async_connect]``(
+      basic_socket< Protocol > & s,
       Iterator begin,
       IteratorConnectHandler && handler,
       typename enable_if<!is_endpoint_sequence< Iterator >::value >::type *  = 0);
@@ -719,11 +741,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
       typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_connect.overload3 async_connect]``(
-      basic_socket< Protocol, SocketService > & s,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_connect.overload3 async_connect]``(
+      basic_socket< Protocol > & s,
       Iterator begin,
       Iterator end,
       IteratorConnectHandler && handler);
@@ -731,12 +752,11 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
-      typename ConnectCondition,
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``,
       typename ``[link asio.reference.RangeConnectHandler RangeConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_connect.overload4 async_connect]``(
-      basic_socket< Protocol, SocketService > & s,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_connect.overload4 async_connect]``(
+      basic_socket< Protocol > & s,
       const EndpointSequence & endpoints,
       ConnectCondition connect_condition,
       RangeConnectHandler && handler,
@@ -745,12 +765,11 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
-      typename ConnectCondition,
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``,
       typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_connect.overload5 async_connect]``(
-      basic_socket< Protocol, SocketService > & s,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_connect.overload5 async_connect]``(
+      basic_socket< Protocol > & s,
       Iterator begin,
       ConnectCondition connect_condition,
       IteratorConnectHandler && handler,
@@ -759,12 +778,11 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
-      typename ConnectCondition,
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``,
       typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_connect.overload6 async_connect]``(
-      basic_socket< Protocol, SocketService > & s,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_connect.overload6 async_connect]``(
+      basic_socket< Protocol > & s,
       Iterator begin,
       Iterator end,
       ConnectCondition connect_condition,
@@ -786,11 +804,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
       typename ``[link asio.reference.RangeConnectHandler RangeConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
-      basic_socket< Protocol, SocketService > & s,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
+      basic_socket< Protocol > & s,
       const EndpointSequence & endpoints,
       RangeConnectHandler && handler,
       typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type *  = 0);
@@ -877,11 +894,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
       typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
-      basic_socket< Protocol, SocketService > & s,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
+      basic_socket< Protocol > & s,
       Iterator begin,
       IteratorConnectHandler && handler,
       typename enable_if<!is_endpoint_sequence< Iterator >::value >::type *  = 0);
@@ -936,11 +952,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
       typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
-      basic_socket< Protocol, SocketService > & s,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
+      basic_socket< Protocol > & s,
       Iterator begin,
       Iterator end,
       IteratorConnectHandler && handler);
@@ -1015,12 +1030,11 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
-      typename ConnectCondition,
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``,
       typename ``[link asio.reference.RangeConnectHandler RangeConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
-      basic_socket< Protocol, SocketService > & s,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
+      basic_socket< Protocol > & s,
       const EndpointSequence & endpoints,
       ConnectCondition connect_condition,
       RangeConnectHandler && handler,
@@ -1140,12 +1154,11 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
-      typename ConnectCondition,
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``,
       typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
-      basic_socket< Protocol, SocketService > & s,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
+      basic_socket< Protocol > & s,
       Iterator begin,
       ConnectCondition connect_condition,
       IteratorConnectHandler && handler,
@@ -1209,12 +1222,11 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
-      typename ConnectCondition,
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``,
       typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
-      basic_socket< Protocol, SocketService > & s,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
+      basic_socket< Protocol > & s,
       Iterator begin,
       Iterator end,
       ConnectCondition connect_condition,
@@ -1332,7 +1344,7 @@
 
 [section:async_read async_read]
 
-[indexterm1 async_read] 
+[indexterm1 asio.indexterm.async_read..async_read] 
 Start an asynchronous operation to read a certain amount of data from a stream. 
 
       
@@ -1340,7 +1352,7 @@
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read.overload1 async_read]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload1 async_read]``(
       AsyncReadStream & s,
       const MutableBufferSequence & buffers,
       ReadHandler && handler,
@@ -1350,9 +1362,9 @@
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read.overload2 async_read]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload2 async_read]``(
       AsyncReadStream & s,
       const MutableBufferSequence & buffers,
       CompletionCondition completion_condition,
@@ -1362,33 +1374,33 @@
 
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read.overload3 async_read]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload3 async_read]``(
       AsyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       ReadHandler && handler,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.async_read.overload3 more...]]``
 
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename CompletionCondition,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read.overload4 async_read]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload4 async_read]``(
       AsyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       CompletionCondition completion_condition,
       ReadHandler && handler,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.async_read.overload4 more...]]``
 
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename Allocator,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read.overload5 async_read]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload5 async_read]``(
       AsyncReadStream & s,
       basic_streambuf< Allocator > & b,
       ReadHandler && handler);
@@ -1397,9 +1409,9 @@
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename Allocator,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read.overload6 async_read]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload6 async_read]``(
       AsyncReadStream & s,
       basic_streambuf< Allocator > & b,
       CompletionCondition completion_condition,
@@ -1423,7 +1435,7 @@
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
       AsyncReadStream & s,
       const MutableBufferSequence & buffers,
       ReadHandler && handler,
@@ -1505,9 +1517,9 @@
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
       AsyncReadStream & s,
       const MutableBufferSequence & buffers,
       CompletionCondition completion_condition,
@@ -1589,13 +1601,13 @@
 
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
       AsyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       ReadHandler && handler,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
 
 
 This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
@@ -1662,15 +1674,15 @@
 
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename CompletionCondition,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
       AsyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       CompletionCondition completion_condition,
       ReadHandler && handler,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
 
 
 This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
@@ -1738,7 +1750,7 @@
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename Allocator,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
       AsyncReadStream & s,
       basic_streambuf< Allocator > & b,
       ReadHandler && handler);
@@ -1809,9 +1821,9 @@
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename Allocator,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
       AsyncReadStream & s,
       basic_streambuf< Allocator > & b,
       CompletionCondition completion_condition,
@@ -1876,7 +1888,7 @@
 
 [section:async_read_at async_read_at]
 
-[indexterm1 async_read_at] 
+[indexterm1 asio.indexterm.async_read_at..async_read_at] 
 Start an asynchronous operation to read a certain amount of data at the specified offset. 
 
       
@@ -1884,7 +1896,7 @@
       typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read_at.overload1 async_read_at]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_at.overload1 async_read_at]``(
       AsyncRandomAccessReadDevice & d,
       uint64_t offset,
       const MutableBufferSequence & buffers,
@@ -1894,9 +1906,9 @@
   template<
       typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read_at.overload2 async_read_at]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_at.overload2 async_read_at]``(
       AsyncRandomAccessReadDevice & d,
       uint64_t offset,
       const MutableBufferSequence & buffers,
@@ -1908,7 +1920,7 @@
       typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
       typename Allocator,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read_at.overload3 async_read_at]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_at.overload3 async_read_at]``(
       AsyncRandomAccessReadDevice & d,
       uint64_t offset,
       basic_streambuf< Allocator > & b,
@@ -1918,9 +1930,9 @@
   template<
       typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
       typename Allocator,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read_at.overload4 async_read_at]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_at.overload4 async_read_at]``(
       AsyncRandomAccessReadDevice & d,
       uint64_t offset,
       basic_streambuf< Allocator > & b,
@@ -1945,7 +1957,7 @@
       typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_at(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_at(
       AsyncRandomAccessReadDevice & d,
       uint64_t offset,
       const MutableBufferSequence & buffers,
@@ -2029,9 +2041,9 @@
   template<
       typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_at(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_at(
       AsyncRandomAccessReadDevice & d,
       uint64_t offset,
       const MutableBufferSequence & buffers,
@@ -2117,7 +2129,7 @@
       typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
       typename Allocator,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_at(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_at(
       AsyncRandomAccessReadDevice & d,
       uint64_t offset,
       basic_streambuf< Allocator > & b,
@@ -2188,9 +2200,9 @@
   template<
       typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
       typename Allocator,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_at(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_at(
       AsyncRandomAccessReadDevice & d,
       uint64_t offset,
       basic_streambuf< Allocator > & b,
@@ -2255,51 +2267,51 @@
 
 [section:async_read_until async_read_until]
 
-[indexterm1 async_read_until] 
+[indexterm1 asio.indexterm.async_read_until..async_read_until] 
 Start an asynchronous operation to read data into a dynamic buffer sequence, or into a streambuf, until it contains a delimiter, matches a regular expression, or a function object indicates a match. 
 
       
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read_until.overload1 async_read_until]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload1 async_read_until]``(
       AsyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       char delim,
       ReadHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.async_read_until.overload1 more...]]``
 
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read_until.overload2 async_read_until]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload2 async_read_until]``(
       AsyncReadStream & s,
-      DynamicBufferSequence && buffers,
-      const std::string & delim,
+      DynamicBuffer && buffers,
+      string_view delim,
       ReadHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.async_read_until.overload2 more...]]``
 
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read_until.overload3 async_read_until]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload3 async_read_until]``(
       AsyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       const boost::regex & expr,
       ReadHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.async_read_until.overload3 more...]]``
 
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename MatchCondition,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read_until.overload4 async_read_until]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload4 async_read_until]``(
       AsyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       MatchCondition match_condition,
       ReadHandler && handler,
       typename enable_if< is_match_condition< MatchCondition >::value >::type *  = 0);
@@ -2309,7 +2321,7 @@
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename Allocator,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read_until.overload5 async_read_until]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload5 async_read_until]``(
       AsyncReadStream & s,
       asio::basic_streambuf< Allocator > & b,
       char delim,
@@ -2320,10 +2332,10 @@
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename Allocator,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read_until.overload6 async_read_until]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload6 async_read_until]``(
       AsyncReadStream & s,
       asio::basic_streambuf< Allocator > & b,
-      const std::string & delim,
+      string_view delim,
       ReadHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.async_read_until.overload6 more...]]``
 
@@ -2331,7 +2343,7 @@
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename Allocator,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read_until.overload7 async_read_until]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload7 async_read_until]``(
       AsyncReadStream & s,
       asio::basic_streambuf< Allocator > & b,
       const boost::regex & expr,
@@ -2343,7 +2355,7 @@
       typename Allocator,
       typename MatchCondition,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_read_until.overload8 async_read_until]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload8 async_read_until]``(
       AsyncReadStream & s,
       asio::basic_streambuf< Allocator > & b,
       MatchCondition match_condition,
@@ -2366,11 +2378,11 @@
 
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_until(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
       AsyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       char delim,
       ReadHandler && handler);
 
@@ -2470,12 +2482,12 @@
 
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_until(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
       AsyncReadStream & s,
-      DynamicBufferSequence && buffers,
-      const std::string & delim,
+      DynamicBuffer && buffers,
+      string_view delim,
       ReadHandler && handler);
 
 
@@ -2574,11 +2586,11 @@
 
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_until(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
       AsyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       const boost::regex & expr,
       ReadHandler && handler);
 
@@ -2680,12 +2692,12 @@
 
   template<
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename MatchCondition,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_until(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
       AsyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       MatchCondition match_condition,
       ReadHandler && handler,
       typename enable_if< is_match_condition< MatchCondition >::value >::type *  = 0);
@@ -2717,7 +2729,7 @@
 ``
 where `iterator` represents the type: 
 ``
-   buffers_iterator<typename DynamicBufferSequence::const_buffers_type>
+   buffers_iterator<typename DynamicBuffer::const_buffers_type>
 ``
 The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]]
 
@@ -2820,7 +2832,7 @@
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename Allocator,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_until(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
       AsyncReadStream & s,
       asio::basic_streambuf< Allocator > & b,
       char delim,
@@ -2925,10 +2937,10 @@
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename Allocator,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_until(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
       AsyncReadStream & s,
       asio::basic_streambuf< Allocator > & b,
-      const std::string & delim,
+      string_view delim,
       ReadHandler && handler);
 
 
@@ -3030,7 +3042,7 @@
       typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
       typename Allocator,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_until(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
       AsyncReadStream & s,
       asio::basic_streambuf< Allocator > & b,
       const boost::regex & expr,
@@ -3137,7 +3149,7 @@
       typename Allocator,
       typename MatchCondition,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_until(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
       AsyncReadStream & s,
       asio::basic_streambuf< Allocator > & b,
       MatchCondition match_condition,
@@ -3272,7 +3284,8 @@
 
 
   template<
-      typename ``[link asio.reference.Handler Handler]``>
+      typename CompletionToken,
+      typename Signature>
   class async_result
 
 
@@ -3282,7 +3295,14 @@
 
   [
 
-    [[link asio.reference.async_result.type [*type]]]
+    [[link asio.reference.async_result.completion_handler_type [*completion_handler_type]]]
+    [The concrete completion handler type for the specific signature. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.async_result.return_type [*return_type]]]
     [The return type of the initiating function. ]
   
   ]
@@ -3305,7 +3325,20 @@
   
 ]
 
-This template may be specialised for user-defined handler types. 
+The [link asio.reference.async_result `async_result`] traits class is used for determining:
+
+
+* the concrete completion handler type to be called at the end of the asynchronous operation;
+
+
+* the initiating function return type; and
+
+
+* how the return value of the initiating function is obtained.
+
+The trait allows the handler and return types to be determined at the point where the specific completion handler signature is known.
+
+This template may be specialised for user-defined completion token types. The primary template assumes that the CompletionToken is the completion handler. 
 
 [heading Requirements]
 
@@ -3316,7 +3349,131 @@
 
 [section:async_result async_result::async_result]
 
-[indexterm2 async_result..async_result] 
+[indexterm2 asio.indexterm.async_result.async_result..async_result..async_result] 
+Construct an async result from a given handler. 
+
+
+  async_result(
+      completion_handler_type & h);
+
+
+When using a specalised [link asio.reference.async_result `async_result`], the constructor has an opportunity to initialise some state associated with the completion handler, which is then returned from the initiating function. 
+
+
+[endsect]
+
+
+
+[section:completion_handler_type async_result::completion_handler_type]
+
+[indexterm2 asio.indexterm.async_result.completion_handler_type..completion_handler_type..async_result] 
+The concrete completion handler type for the specific signature. 
+
+
+  typedef CompletionToken completion_handler_type;
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/async_result.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
+
+[section:get async_result::get]
+
+[indexterm2 asio.indexterm.async_result.get..get..async_result] 
+Obtain the value to be returned from the initiating function. 
+
+
+  return_type get();
+
+
+
+[endsect]
+
+
+
+[section:return_type async_result::return_type]
+
+[indexterm2 asio.indexterm.async_result.return_type..return_type..async_result] 
+The return type of the initiating function. 
+
+
+  typedef void return_type;
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/async_result.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:async_result_lt__Handler__gt_ async_result< Handler >]
+
+
+(Deprecated: Use two-parameter version of [link asio.reference.async_result `async_result`].) An interface for customising the behaviour of an initiating function. 
+
+
+  template<
+      typename ``[link asio.reference.Handler Handler]``>
+  class async_result< Handler >
+
+
+[heading Types]
+[table
+  [[Name][Description]]
+
+  [
+
+    [[link asio.reference.async_result_lt__Handler__gt_.type [*type]]]
+    [The return type of the initiating function. ]
+  
+  ]
+
+]
+
+[heading Member Functions]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.async_result_lt__Handler__gt_.async_result [*async_result]]]
+    [Construct an async result from a given handler. ]
+  ]
+  
+  [
+    [[link asio.reference.async_result_lt__Handler__gt_.get [*get]]]
+    [Obtain the value to be returned from the initiating function. ]
+  ]
+  
+]
+
+This template may be specialised for user-defined handler types. 
+
+[heading Requirements]
+
+['Header: ][^asio/async_result.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[section:async_result async_result< Handler >::async_result]
+
+[indexterm2 asio.indexterm.async_result_lt__Handler__gt_.async_result..async_result..async_result< Handler >] 
 Construct an async result from a given handler. 
 
 
@@ -3331,9 +3488,9 @@
 
 
 
-[section:get async_result::get]
+[section:get async_result< Handler >::get]
 
-[indexterm2 get..async_result] 
+[indexterm2 asio.indexterm.async_result_lt__Handler__gt_.get..get..async_result< Handler >] 
 Obtain the value to be returned from the initiating function. 
 
 
@@ -3345,9 +3502,9 @@
 
 
 
-[section:type async_result::type]
+[section:type async_result< Handler >::type]
 
-[indexterm2 type..async_result] 
+[indexterm2 asio.indexterm.async_result_lt__Handler__gt_.type..type..async_result< Handler >] 
 The return type of the initiating function. 
 
 
@@ -3368,9 +3525,138 @@
 
 [endsect]
 
+[section:async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_ async_result< std::packaged_task< Result(Args...)>, Signature >]
+
+
+Partial specialisation of `async_result` for `std::packaged_task`. 
+
+
+  template<
+      typename Result,
+      typename... Args,
+      typename Signature>
+  class async_result< std::packaged_task< Result(Args...)>, Signature >
+
+
+[heading Types]
+[table
+  [[Name][Description]]
+
+  [
+
+    [[link asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.completion_handler_type [*completion_handler_type]]]
+    [The packaged task is the concrete completion handler type. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.return_type [*return_type]]]
+    [The return type of the initiating function is the future obtained from the packaged task. ]
+  
+  ]
+
+]
+
+[heading Member Functions]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.async_result [*async_result]]]
+    [The constructor extracts the future from the packaged task. ]
+  ]
+  
+  [
+    [[link asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.get [*get]]]
+    [Returns the packaged task's future. ]
+  ]
+  
+]
+
+[heading Requirements]
+
+['Header: ][^asio/packaged_task.hpp]
+
+['Convenience header: ]None
+
+
+[section:async_result async_result< std::packaged_task< Result(Args...)>, Signature >::async_result]
+
+[indexterm2 asio.indexterm.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.async_result..async_result..async_result< std::packaged_task< Result(Args\.\.\.)>, Signature >] 
+The constructor extracts the future from the packaged task. 
+
+
+  async_result(
+      completion_handler_type & h);
+
+
+
+[endsect]
+
+
+
+[section:completion_handler_type async_result< std::packaged_task< Result(Args...)>, Signature >::completion_handler_type]
+
+[indexterm2 asio.indexterm.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.completion_handler_type..completion_handler_type..async_result< std::packaged_task< Result(Args\.\.\.)>, Signature >] 
+The packaged task is the concrete completion handler type. 
+
+
+  typedef std::packaged_task< Result(Args...)> completion_handler_type;
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/packaged_task.hpp]
+
+['Convenience header: ]None
+
+
+[endsect]
+
+
+
+[section:get async_result< std::packaged_task< Result(Args...)>, Signature >::get]
+
+[indexterm2 asio.indexterm.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.get..get..async_result< std::packaged_task< Result(Args\.\.\.)>, Signature >] 
+Returns the packaged task's future. 
+
+
+  return_type get();
+
+
+
+[endsect]
+
+
+
+[section:return_type async_result< std::packaged_task< Result(Args...)>, Signature >::return_type]
+
+[indexterm2 asio.indexterm.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.return_type..return_type..async_result< std::packaged_task< Result(Args\.\.\.)>, Signature >] 
+The return type of the initiating function is the future obtained from the packaged task. 
+
+
+  typedef std::future< Result > return_type;
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/packaged_task.hpp]
+
+['Convenience header: ]None
+
+
+[endsect]
+
+
+
+[endsect]
+
 [section:async_write async_write]
 
-[indexterm1 async_write] 
+[indexterm1 asio.indexterm.async_write..async_write] 
 Start an asynchronous operation to write a certain amount of data to a stream. 
 
       
@@ -3378,7 +3664,7 @@
       typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_write.overload1 async_write]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload1 async_write]``(
       AsyncWriteStream & s,
       const ConstBufferSequence & buffers,
       WriteHandler && handler,
@@ -3388,9 +3674,9 @@
   template<
       typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_write.overload2 async_write]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload2 async_write]``(
       AsyncWriteStream & s,
       const ConstBufferSequence & buffers,
       CompletionCondition completion_condition,
@@ -3400,33 +3686,33 @@
 
   template<
       typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_write.overload3 async_write]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload3 async_write]``(
       AsyncWriteStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       WriteHandler && handler,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.async_write.overload3 more...]]``
 
   template<
       typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename CompletionCondition,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_write.overload4 async_write]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload4 async_write]``(
       AsyncWriteStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       CompletionCondition completion_condition,
       WriteHandler && handler,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.async_write.overload4 more...]]``
 
   template<
       typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
       typename Allocator,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_write.overload5 async_write]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload5 async_write]``(
       AsyncWriteStream & s,
       basic_streambuf< Allocator > & b,
       WriteHandler && handler);
@@ -3435,9 +3721,9 @@
   template<
       typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
       typename Allocator,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_write.overload6 async_write]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload6 async_write]``(
       AsyncWriteStream & s,
       basic_streambuf< Allocator > & b,
       CompletionCondition completion_condition,
@@ -3461,7 +3747,7 @@
       typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
       AsyncWriteStream & s,
       const ConstBufferSequence & buffers,
       WriteHandler && handler,
@@ -3529,9 +3815,9 @@
   template<
       typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
       AsyncWriteStream & s,
       const ConstBufferSequence & buffers,
       CompletionCondition completion_condition,
@@ -3614,13 +3900,13 @@
 
   template<
       typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
       AsyncWriteStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       WriteHandler && handler,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
 
 
 This function is used to asynchronously write a certain number of bytes of data to a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
@@ -3673,15 +3959,15 @@
 
   template<
       typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename CompletionCondition,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
       AsyncWriteStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       CompletionCondition completion_condition,
       WriteHandler && handler,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
 
 
 This function is used to asynchronously write a certain number of bytes of data to a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
@@ -3748,7 +4034,7 @@
       typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
       typename Allocator,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
       AsyncWriteStream & s,
       basic_streambuf< Allocator > & b,
       WriteHandler && handler);
@@ -3805,9 +4091,9 @@
   template<
       typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
       typename Allocator,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
       AsyncWriteStream & s,
       basic_streambuf< Allocator > & b,
       CompletionCondition completion_condition,
@@ -3871,7 +4157,7 @@
 
 [section:async_write_at async_write_at]
 
-[indexterm1 async_write_at] 
+[indexterm1 asio.indexterm.async_write_at..async_write_at] 
 Start an asynchronous operation to write a certain amount of data at the specified offset. 
 
       
@@ -3879,7 +4165,7 @@
       typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_write_at.overload1 async_write_at]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write_at.overload1 async_write_at]``(
       AsyncRandomAccessWriteDevice & d,
       uint64_t offset,
       const ConstBufferSequence & buffers,
@@ -3889,9 +4175,9 @@
   template<
       typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_write_at.overload2 async_write_at]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write_at.overload2 async_write_at]``(
       AsyncRandomAccessWriteDevice & d,
       uint64_t offset,
       const ConstBufferSequence & buffers,
@@ -3903,7 +4189,7 @@
       typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
       typename Allocator,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_write_at.overload3 async_write_at]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write_at.overload3 async_write_at]``(
       AsyncRandomAccessWriteDevice & d,
       uint64_t offset,
       basic_streambuf< Allocator > & b,
@@ -3913,9 +4199,9 @@
   template<
       typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
       typename Allocator,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.async_write_at.overload4 async_write_at]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write_at.overload4 async_write_at]``(
       AsyncRandomAccessWriteDevice & d,
       uint64_t offset,
       basic_streambuf< Allocator > & b,
@@ -3940,7 +4226,7 @@
       typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_at(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_at(
       AsyncRandomAccessWriteDevice & d,
       uint64_t offset,
       const ConstBufferSequence & buffers,
@@ -4010,9 +4296,9 @@
   template<
       typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_at(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_at(
       AsyncRandomAccessWriteDevice & d,
       uint64_t offset,
       const ConstBufferSequence & buffers,
@@ -4099,7 +4385,7 @@
       typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
       typename Allocator,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_at(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_at(
       AsyncRandomAccessWriteDevice & d,
       uint64_t offset,
       basic_streambuf< Allocator > & b,
@@ -4159,9 +4445,9 @@
   template<
       typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
       typename Allocator,
-      typename CompletionCondition,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_at(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_at(
       AsyncRandomAccessWriteDevice & d,
       uint64_t offset,
       basic_streambuf< Allocator > & b,
@@ -4261,7 +4547,7 @@
 
 [section:bad_executor bad_executor::bad_executor]
 
-[indexterm2 bad_executor..bad_executor] 
+[indexterm2 asio.indexterm.bad_executor.bad_executor..bad_executor..bad_executor] 
 Constructor. 
 
 
@@ -4275,7 +4561,7 @@
 
 [section:what bad_executor::what]
 
-[indexterm2 what..bad_executor] 
+[indexterm2 asio.indexterm.bad_executor.what..what..bad_executor] 
 Obtain message associated with exception. 
 
 
@@ -4296,10 +4582,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.DatagramSocketService DatagramSocketService]`` = datagram_socket_service<Protocol>>
+      typename ``[link asio.reference.Protocol Protocol]``>
   class basic_datagram_socket :
-    public basic_socket< Protocol, DatagramSocketService >
+    public basic_socket< Protocol >
 
 
 [heading Types]
@@ -4357,13 +4642,6 @@
 
   [
 
-    [[link asio.reference.basic_datagram_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -4441,13 +4719,6 @@
 
   [
 
-    [[link asio.reference.basic_datagram_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_datagram_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -4659,20 +4930,9 @@
     [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_datagram_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_datagram_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_datagram_socket._basic_datagram_socket [*~basic_datagram_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -4683,6 +4943,11 @@
 
   [
     [[link asio.reference.basic_datagram_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_datagram_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -4727,7 +4992,7 @@
 
 [section:assign basic_datagram_socket::assign]
 
-[indexterm2 assign..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.assign..assign..basic_datagram_socket] 
 Assign an existing native socket to the socket. 
 
 
@@ -4736,7 +5001,7 @@
       const native_handle_type & native_socket);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.assign.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.assign.overload2 assign]``(
+  void ``[link asio.reference.basic_datagram_socket.assign.overload2 assign]``(
       const protocol_type & protocol,
       const native_handle_type & native_socket,
       asio::error_code & ec);
@@ -4771,7 +5036,7 @@
 Assign an existing native socket to the socket. 
 
 
-  asio::error_code assign(
+  void assign(
       const protocol_type & protocol,
       const native_handle_type & native_socket,
       asio::error_code & ec);
@@ -4789,13 +5054,13 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 async_connect..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.async_connect..async_connect..basic_datagram_socket] 
 Start an asynchronous connect. 
 
 
   template<
       typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
       const endpoint_type & peer_endpoint,
       ConnectHandler && handler);
 
@@ -4853,14 +5118,14 @@
 
 [section:async_receive basic_datagram_socket::async_receive]
 
-[indexterm2 async_receive..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.async_receive..async_receive..basic_datagram_socket] 
 Start an asynchronous receive on a connected socket. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_datagram_socket.async_receive.overload1 async_receive]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_receive.overload1 async_receive]``(
       const MutableBufferSequence & buffers,
       ReadHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.async_receive.overload1 more...]]``
@@ -4868,7 +5133,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_datagram_socket.async_receive.overload2 async_receive]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_receive.overload2 async_receive]``(
       const MutableBufferSequence & buffers,
       socket_base::message_flags flags,
       ReadHandler && handler);
@@ -4884,7 +5149,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
       const MutableBufferSequence & buffers,
       ReadHandler && handler);
 
@@ -4941,7 +5206,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
       const MutableBufferSequence & buffers,
       socket_base::message_flags flags,
       ReadHandler && handler);
@@ -4985,14 +5250,14 @@
 
 [section:async_receive_from basic_datagram_socket::async_receive_from]
 
-[indexterm2 async_receive_from..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.async_receive_from..async_receive_from..basic_datagram_socket] 
 Start an asynchronous receive. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_datagram_socket.async_receive_from.overload1 async_receive_from]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_receive_from.overload1 async_receive_from]``(
       const MutableBufferSequence & buffers,
       endpoint_type & sender_endpoint,
       ReadHandler && handler);
@@ -5001,7 +5266,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_datagram_socket.async_receive_from.overload2 async_receive_from]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_receive_from.overload2 async_receive_from]``(
       const MutableBufferSequence & buffers,
       endpoint_type & sender_endpoint,
       socket_base::message_flags flags,
@@ -5018,7 +5283,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive_from(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive_from(
       const MutableBufferSequence & buffers,
       endpoint_type & sender_endpoint,
       ReadHandler && handler);
@@ -5074,7 +5339,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive_from(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive_from(
       const MutableBufferSequence & buffers,
       endpoint_type & sender_endpoint,
       socket_base::message_flags flags,
@@ -5116,14 +5381,14 @@
 
 [section:async_send basic_datagram_socket::async_send]
 
-[indexterm2 async_send..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.async_send..async_send..basic_datagram_socket] 
 Start an asynchronous send on a connected socket. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_datagram_socket.async_send.overload1 async_send]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_send.overload1 async_send]``(
       const ConstBufferSequence & buffers,
       WriteHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.async_send.overload1 more...]]``
@@ -5131,7 +5396,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_datagram_socket.async_send.overload2 async_send]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_send.overload2 async_send]``(
       const ConstBufferSequence & buffers,
       socket_base::message_flags flags,
       WriteHandler && handler);
@@ -5147,7 +5412,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
       const ConstBufferSequence & buffers,
       WriteHandler && handler);
 
@@ -5204,7 +5469,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
       const ConstBufferSequence & buffers,
       socket_base::message_flags flags,
       WriteHandler && handler);
@@ -5248,14 +5513,14 @@
 
 [section:async_send_to basic_datagram_socket::async_send_to]
 
-[indexterm2 async_send_to..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.async_send_to..async_send_to..basic_datagram_socket] 
 Start an asynchronous send. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_datagram_socket.async_send_to.overload1 async_send_to]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_send_to.overload1 async_send_to]``(
       const ConstBufferSequence & buffers,
       const endpoint_type & destination,
       WriteHandler && handler);
@@ -5264,7 +5529,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_datagram_socket.async_send_to.overload2 async_send_to]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_send_to.overload2 async_send_to]``(
       const ConstBufferSequence & buffers,
       const endpoint_type & destination,
       socket_base::message_flags flags,
@@ -5281,7 +5546,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send_to(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send_to(
       const ConstBufferSequence & buffers,
       const endpoint_type & destination,
       WriteHandler && handler);
@@ -5339,7 +5604,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send_to(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send_to(
       const ConstBufferSequence & buffers,
       const endpoint_type & destination,
       socket_base::message_flags flags,
@@ -5385,13 +5650,13 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 async_wait..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.async_wait..async_wait..basic_datagram_socket] 
 Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
   template<
       typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
       wait_type w,
       WaitHandler && handler);
 
@@ -5446,7 +5711,7 @@
 
 [section:at_mark basic_datagram_socket::at_mark]
 
-[indexterm2 at_mark..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.at_mark..at_mark..basic_datagram_socket] 
 Determine whether the socket is at the out-of-band data mark. 
 
 
@@ -5534,7 +5799,7 @@
 
 [section:available basic_datagram_socket::available]
 
-[indexterm2 available..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.available..available..basic_datagram_socket] 
 Determine the number of bytes available for reading. 
 
 
@@ -5622,7 +5887,7 @@
 
 [section:basic_datagram_socket basic_datagram_socket::basic_datagram_socket]
 
-[indexterm2 basic_datagram_socket..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.basic_datagram_socket..basic_datagram_socket..basic_datagram_socket] 
 Construct a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] without opening it. 
 
 
@@ -5671,10 +5936,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.DatagramSocketService DatagramSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   ``[link asio.reference.basic_datagram_socket.basic_datagram_socket.overload6 basic_datagram_socket]``(
-      basic_datagram_socket< Protocol1, DatagramSocketService1 > && other,
+      basic_datagram_socket< Protocol1 > && other,
       typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.basic_datagram_socket.overload6 more...]]``
 
@@ -5878,10 +6142,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.DatagramSocketService DatagramSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   basic_datagram_socket(
-      basic_datagram_socket< Protocol1, DatagramSocketService1 > && other,
+      basic_datagram_socket< Protocol1 > && other,
       typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
 
 
@@ -5912,7 +6175,7 @@
 
 [section:bind basic_datagram_socket::bind]
 
-[indexterm2 bind..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.bind..bind..basic_datagram_socket] 
 Bind the socket to the given local endpoint. 
 
 
@@ -5920,7 +6183,7 @@
       const endpoint_type & endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.bind.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.bind.overload2 bind]``(
+  void ``[link asio.reference.basic_datagram_socket.bind.overload2 bind]``(
       const endpoint_type & endpoint,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.bind.overload2 more...]]``
@@ -5990,7 +6253,7 @@
 Bind the socket to the given local endpoint. 
 
 
-  asio::error_code bind(
+  void bind(
       const endpoint_type & endpoint,
       asio::error_code & ec);
 
@@ -6041,7 +6304,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 broadcast..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.broadcast..broadcast..basic_datagram_socket] 
 Socket option to permit sending of broadcast messages. 
 
 
@@ -6095,7 +6358,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 bytes_readable..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.bytes_readable..bytes_readable..basic_datagram_socket] 
 IO control command to get the amount of data that can be read without blocking. 
 
 
@@ -6134,14 +6397,14 @@
 
 [section:cancel basic_datagram_socket::cancel]
 
-[indexterm2 cancel..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.cancel..cancel..basic_datagram_socket] 
 Cancel all asynchronous operations associated with the socket. 
 
 
   void ``[link asio.reference.basic_datagram_socket.cancel.overload1 cancel]``();
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.cancel.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.cancel.overload2 cancel]``(
+  void ``[link asio.reference.basic_datagram_socket.cancel.overload2 cancel]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.cancel.overload2 more...]]``
 
@@ -6205,7 +6468,7 @@
 Cancel all asynchronous operations associated with the socket. 
 
 
-  asio::error_code cancel(
+  void cancel(
       asio::error_code & ec);
 
 
@@ -6250,14 +6513,14 @@
 
 [section:close basic_datagram_socket::close]
 
-[indexterm2 close..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.close..close..basic_datagram_socket] 
 Close the socket. 
 
 
   void ``[link asio.reference.basic_datagram_socket.close.overload1 close]``();
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.close.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.close.overload2 close]``(
+  void ``[link asio.reference.basic_datagram_socket.close.overload2 close]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.close.overload2 more...]]``
 
@@ -6307,7 +6570,7 @@
 Close the socket. 
 
 
-  asio::error_code close(
+  void close(
       asio::error_code & ec);
 
 
@@ -6355,7 +6618,7 @@
 
 [section:connect basic_datagram_socket::connect]
 
-[indexterm2 connect..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.connect..connect..basic_datagram_socket] 
 Connect the socket to the specified endpoint. 
 
 
@@ -6363,7 +6626,7 @@
       const endpoint_type & peer_endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.connect.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.connect.overload2 connect]``(
+  void ``[link asio.reference.basic_datagram_socket.connect.overload2 connect]``(
       const endpoint_type & peer_endpoint,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.connect.overload2 more...]]``
@@ -6435,7 +6698,7 @@
 Connect the socket to the specified endpoint. 
 
 
-  asio::error_code connect(
+  void connect(
       const endpoint_type & peer_endpoint,
       asio::error_code & ec);
 
@@ -6488,7 +6751,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 debug..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.debug..debug..basic_datagram_socket] 
 Socket option to enable socket-level debugging. 
 
 
@@ -6542,7 +6805,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 do_not_route..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.do_not_route..do_not_route..basic_datagram_socket] 
 Socket option to prevent routing, use local interfaces only. 
 
 
@@ -6596,7 +6859,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 enable_connection_aborted..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.enable_connection_aborted..enable_connection_aborted..basic_datagram_socket] 
 Socket option to report aborted connections on accept. 
 
 
@@ -6647,7 +6910,7 @@
 
 [section:endpoint_type basic_datagram_socket::endpoint_type]
 
-[indexterm2 endpoint_type..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.endpoint_type..endpoint_type..basic_datagram_socket] 
 The endpoint type. 
 
 
@@ -6669,13 +6932,13 @@
 [section:executor_type basic_datagram_socket::executor_type]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 executor_type..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.executor_type..executor_type..basic_datagram_socket] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -6750,9 +7013,9 @@
 [section:get_executor basic_datagram_socket::get_executor]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 get_executor..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.get_executor..get_executor..basic_datagram_socket] 
 Get the executor associated with the object. 
 
 
@@ -6763,61 +7026,13 @@
 [endsect]
 
 
-[section:get_implementation basic_datagram_socket::get_implementation]
-
-[indexterm2 get_implementation..basic_datagram_socket] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.basic_datagram_socket.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.basic_datagram_socket.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.get_implementation.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
 
 [section:get_io_context basic_datagram_socket::get_io_context]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 get_io_context..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.get_io_context..get_io_context..basic_datagram_socket] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -6841,9 +7056,9 @@
 [section:get_io_service basic_datagram_socket::get_io_service]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 get_io_service..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.get_io_service..get_io_service..basic_datagram_socket] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -6865,15 +7080,19 @@
 
 [section:get_option basic_datagram_socket::get_option]
 
-[indexterm2 get_option..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.get_option..get_option..basic_datagram_socket] 
 Get an option from the socket. 
 
 
+  template<
+      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
   void ``[link asio.reference.basic_datagram_socket.get_option.overload1 get_option]``(
       GettableSocketOption & option) const;
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.get_option.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.get_option.overload2 get_option]``(
+  template<
+      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
+  void ``[link asio.reference.basic_datagram_socket.get_option.overload2 get_option]``(
       GettableSocketOption & option,
       asio::error_code & ec) const;
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.get_option.overload2 more...]]``
@@ -6949,7 +7168,7 @@
 
   template<
       typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code get_option(
+  void get_option(
       GettableSocketOption & option,
       asio::error_code & ec) const;
 
@@ -6996,89 +7215,21 @@
 
 [endsect]
 
-[section:get_service basic_datagram_socket::get_service]
-
-[indexterm2 get_service..basic_datagram_socket] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.basic_datagram_socket.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.basic_datagram_socket.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.get_service.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_datagram_socket::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..basic_datagram_socket] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:io_control basic_datagram_socket::io_control]
 
-[indexterm2 io_control..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.io_control..io_control..basic_datagram_socket] 
 Perform an IO control command on the socket. 
 
 
+  template<
+      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
   void ``[link asio.reference.basic_datagram_socket.io_control.overload1 io_control]``(
       IoControlCommand & command);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.io_control.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.io_control.overload2 io_control]``(
+  template<
+      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
+  void ``[link asio.reference.basic_datagram_socket.io_control.overload2 io_control]``(
       IoControlCommand & command,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.io_control.overload2 more...]]``
@@ -7154,7 +7305,7 @@
 
   template<
       typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
+  void io_control(
       IoControlCommand & command,
       asio::error_code & ec);
 
@@ -7207,7 +7358,7 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 is_open..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.is_open..is_open..basic_datagram_socket] 
 Determine whether the socket is open. 
 
 
@@ -7224,7 +7375,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 keep_alive..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.keep_alive..keep_alive..basic_datagram_socket] 
 Socket option to send keep-alives. 
 
 
@@ -7278,7 +7429,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 linger..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.linger..linger..basic_datagram_socket] 
 Socket option to specify whether the socket lingers on close if unsent data is present. 
 
 
@@ -7329,7 +7480,7 @@
 
 [section:local_endpoint basic_datagram_socket::local_endpoint]
 
-[indexterm2 local_endpoint..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.local_endpoint..local_endpoint..basic_datagram_socket] 
 Get the local endpoint of the socket. 
 
 
@@ -7446,7 +7597,7 @@
 
 [section:lowest_layer basic_datagram_socket::lowest_layer]
 
-[indexterm2 lowest_layer..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.lowest_layer..lowest_layer..basic_datagram_socket] 
 Get a reference to the lowest layer. 
 
 
@@ -7520,11 +7671,11 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 lowest_layer_type..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.lowest_layer_type..lowest_layer_type..basic_datagram_socket] 
 A [link asio.reference.basic_socket `basic_socket`] is always the lowest layer. 
 
 
-  typedef basic_socket< Protocol, DatagramSocketService > lowest_layer_type;
+  typedef basic_socket< Protocol > lowest_layer_type;
 
 
 [heading Types]
@@ -7582,13 +7733,6 @@
 
   [
 
-    [[link asio.reference.basic_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -7666,13 +7810,6 @@
 
   [
 
-    [[link asio.reference.basic_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -7851,16 +7988,6 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.basic_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
     [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
     [Protected destructor to prevent deletion through this type. ]
   ]
@@ -7873,6 +8000,11 @@
 
   [
     [[link asio.reference.basic_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -7926,8 +8058,8 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 max_connections..basic_datagram_socket] 
-The maximum length of the queue of pending incoming connections. 
+[indexterm2 asio.indexterm.basic_datagram_socket.max_connections..max_connections..basic_datagram_socket] 
+(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections. 
 
 
   static const int max_connections = implementation_defined;
@@ -7938,12 +8070,29 @@
 
 
 
+[section:max_listen_connections basic_datagram_socket::max_listen_connections]
+
+
+['Inherited from socket_base.]
+
+[indexterm2 asio.indexterm.basic_datagram_socket.max_listen_connections..max_listen_connections..basic_datagram_socket] 
+The maximum length of the queue of pending incoming connections. 
+
+
+  static const int max_listen_connections = implementation_defined;
+
+
+
+[endsect]
+
+
+
 [section:message_do_not_route basic_datagram_socket::message_do_not_route]
 
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_do_not_route..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.message_do_not_route..message_do_not_route..basic_datagram_socket] 
 Specify that the data should not be subject to routing. 
 
 
@@ -7960,7 +8109,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_end_of_record..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.message_end_of_record..message_end_of_record..basic_datagram_socket] 
 Specifies that the data marks the end of a record. 
 
 
@@ -7977,7 +8126,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_flags..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.message_flags..message_flags..basic_datagram_socket] 
 Bitmask type for flags that can be passed to send and receive operations. 
 
 
@@ -8001,7 +8150,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_out_of_band..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.message_out_of_band..message_out_of_band..basic_datagram_socket] 
 Process out-of-band data. 
 
 
@@ -8018,7 +8167,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_peek..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.message_peek..message_peek..basic_datagram_socket] 
 Peek at incoming data without removing it from the input queue. 
 
 
@@ -8035,7 +8184,7 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 native_handle..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.native_handle..native_handle..basic_datagram_socket] 
 Get the native socket representation. 
 
 
@@ -8051,11 +8200,11 @@
 
 [section:native_handle_type basic_datagram_socket::native_handle_type]
 
-[indexterm2 native_handle_type..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.native_handle_type..native_handle_type..basic_datagram_socket] 
 The native representation of a socket. 
 
 
-  typedef DatagramSocketService::native_handle_type native_handle_type;
+  typedef implementation_defined native_handle_type;
 
 
 
@@ -8071,7 +8220,7 @@
 
 [section:native_non_blocking basic_datagram_socket::native_non_blocking]
 
-[indexterm2 native_non_blocking..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.native_non_blocking..native_non_blocking..basic_datagram_socket] 
 Gets the non-blocking mode of the native socket implementation. 
 
 
@@ -8086,7 +8235,7 @@
       bool mode);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.native_non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.native_non_blocking.overload3 native_non_blocking]``(
+  void ``[link asio.reference.basic_datagram_socket.native_non_blocking.overload3 native_non_blocking]``(
       bool mode,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.native_non_blocking.overload3 more...]]``
@@ -8320,7 +8469,7 @@
 Sets the non-blocking mode of the native socket implementation. 
 
 
-  asio::error_code native_non_blocking(
+  void native_non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -8422,7 +8571,7 @@
 
 [section:non_blocking basic_datagram_socket::non_blocking]
 
-[indexterm2 non_blocking..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.non_blocking..non_blocking..basic_datagram_socket] 
 Gets the non-blocking mode of the socket. 
 
 
@@ -8437,7 +8586,7 @@
       bool mode);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.non_blocking.overload3 non_blocking]``(
+  void ``[link asio.reference.basic_datagram_socket.non_blocking.overload3 non_blocking]``(
       bool mode,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.non_blocking.overload3 more...]]``
@@ -8526,7 +8675,7 @@
 Sets the non-blocking mode of the socket. 
 
 
-  asio::error_code non_blocking(
+  void non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -8558,7 +8707,7 @@
 
 [section:open basic_datagram_socket::open]
 
-[indexterm2 open..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.open..open..basic_datagram_socket] 
 Open the socket using the specified protocol. 
 
 
@@ -8566,7 +8715,7 @@
       const protocol_type & protocol = protocol_type());
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.open.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.open.overload2 open]``(
+  void ``[link asio.reference.basic_datagram_socket.open.overload2 open]``(
       const protocol_type & protocol,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.open.overload2 more...]]``
@@ -8634,7 +8783,7 @@
 Open the socket using the specified protocol. 
 
 
-  asio::error_code open(
+  void open(
       const protocol_type & protocol,
       asio::error_code & ec);
 
@@ -8679,7 +8828,7 @@
 
 [section:operator_eq_ basic_datagram_socket::operator=]
 
-[indexterm2 operator=..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.operator_eq_..operator=..basic_datagram_socket] 
 Move-assign a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] from another. 
 
 
@@ -8692,10 +8841,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.DatagramSocketService DatagramSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   enable_if< is_convertible< Protocol1, Protocol >::value, basic_datagram_socket >::type & ``[link asio.reference.basic_datagram_socket.operator_eq_.overload2 operator=]``(
-      basic_datagram_socket< Protocol1, DatagramSocketService1 > && other);
+      basic_datagram_socket< Protocol1 > && other);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.operator_eq_.overload2 more...]]``
 
 
@@ -8740,10 +8888,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.DatagramSocketService DatagramSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   enable_if< is_convertible< Protocol1, Protocol >::value, basic_datagram_socket >::type & operator=(
-      basic_datagram_socket< Protocol1, DatagramSocketService1 > && other);
+      basic_datagram_socket< Protocol1 > && other);
 
 
 This assignment operator moves a datagram socket from one object to another.
@@ -8774,7 +8921,7 @@
 
 [section:protocol_type basic_datagram_socket::protocol_type]
 
-[indexterm2 protocol_type..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.protocol_type..protocol_type..basic_datagram_socket] 
 The protocol type. 
 
 
@@ -8794,7 +8941,7 @@
 
 [section:receive basic_datagram_socket::receive]
 
-[indexterm2 receive..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.receive..receive..basic_datagram_socket] 
 Receive some data on a connected socket. 
 
 
@@ -8989,7 +9136,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 receive_buffer_size..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.receive_buffer_size..receive_buffer_size..basic_datagram_socket] 
 Socket option for the receive buffer size of a socket. 
 
 
@@ -9039,7 +9186,7 @@
 
 [section:receive_from basic_datagram_socket::receive_from]
 
-[indexterm2 receive_from..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.receive_from..receive_from..basic_datagram_socket] 
 Receive a datagram with the endpoint of the sender. 
 
 
@@ -9233,7 +9380,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 receive_low_watermark..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.receive_low_watermark..receive_low_watermark..basic_datagram_socket] 
 Socket option for the receive low watermark. 
 
 
@@ -9283,7 +9430,7 @@
 
 [section:remote_endpoint basic_datagram_socket::remote_endpoint]
 
-[indexterm2 remote_endpoint..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.remote_endpoint..remote_endpoint..basic_datagram_socket] 
 Get the remote endpoint of the socket. 
 
 
@@ -9404,7 +9551,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 reuse_address..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.reuse_address..reuse_address..basic_datagram_socket] 
 Socket option to allow the socket to be bound to an address that is already in use. 
 
 
@@ -9454,7 +9601,7 @@
 
 [section:send basic_datagram_socket::send]
 
-[indexterm2 send..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.send..send..basic_datagram_socket] 
 Send some data on a connected socket. 
 
 
@@ -9649,7 +9796,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 send_buffer_size..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.send_buffer_size..send_buffer_size..basic_datagram_socket] 
 Socket option for the send buffer size of a socket. 
 
 
@@ -9703,7 +9850,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 send_low_watermark..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.send_low_watermark..send_low_watermark..basic_datagram_socket] 
 Socket option for the send low watermark. 
 
 
@@ -9753,7 +9900,7 @@
 
 [section:send_to basic_datagram_socket::send_to]
 
-[indexterm2 send_to..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.send_to..send_to..basic_datagram_socket] 
 Send a datagram to the specified endpoint. 
 
 
@@ -9941,41 +10088,21 @@
 
 [endsect]
 
-
-[section:service_type basic_datagram_socket::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..basic_datagram_socket] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef DatagramSocketService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:set_option basic_datagram_socket::set_option]
 
-[indexterm2 set_option..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.set_option..set_option..basic_datagram_socket] 
 Set an option on the socket. 
 
 
+  template<
+      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
   void ``[link asio.reference.basic_datagram_socket.set_option.overload1 set_option]``(
       const SettableSocketOption & option);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.set_option.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.set_option.overload2 set_option]``(
+  template<
+      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
+  void ``[link asio.reference.basic_datagram_socket.set_option.overload2 set_option]``(
       const SettableSocketOption & option,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.set_option.overload2 more...]]``
@@ -10050,7 +10177,7 @@
 
   template<
       typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code set_option(
+  void set_option(
       const SettableSocketOption & option,
       asio::error_code & ec);
 
@@ -10098,7 +10225,7 @@
 
 [section:shutdown basic_datagram_socket::shutdown]
 
-[indexterm2 shutdown..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.shutdown..shutdown..basic_datagram_socket] 
 Disable sends or receives on the socket. 
 
 
@@ -10106,7 +10233,7 @@
       shutdown_type what);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.shutdown.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.shutdown.overload2 shutdown]``(
+  void ``[link asio.reference.basic_datagram_socket.shutdown.overload2 shutdown]``(
       shutdown_type what,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.shutdown.overload2 more...]]``
@@ -10175,7 +10302,7 @@
 Disable sends or receives on the socket. 
 
 
-  asio::error_code shutdown(
+  void shutdown(
       shutdown_type what,
       asio::error_code & ec);
 
@@ -10225,15 +10352,15 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 shutdown_type..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.shutdown_type..shutdown_type..basic_datagram_socket] 
 Different ways a socket may be shutdown. 
 
 
   enum shutdown_type
 
-[indexterm2 shutdown_receive..basic_datagram_socket]
-[indexterm2 shutdown_send..basic_datagram_socket]
-[indexterm2 shutdown_both..basic_datagram_socket]
+[indexterm2 asio.indexterm.basic_datagram_socket.shutdown_type.shutdown_receive..shutdown_receive..basic_datagram_socket]
+[indexterm2 asio.indexterm.basic_datagram_socket.shutdown_type.shutdown_send..shutdown_send..basic_datagram_socket]
+[indexterm2 asio.indexterm.basic_datagram_socket.shutdown_type.shutdown_both..shutdown_both..basic_datagram_socket]
 
 [heading Values]
 [variablelist
@@ -10262,7 +10389,7 @@
 
 [section:wait basic_datagram_socket::wait]
 
-[indexterm2 wait..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.wait..wait..basic_datagram_socket] 
 Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
@@ -10270,7 +10397,7 @@
       wait_type w);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.wait.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_datagram_socket.wait.overload2 wait]``(
+  void ``[link asio.reference.basic_datagram_socket.wait.overload2 wait]``(
       wait_type w,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_datagram_socket.wait.overload2 more...]]``
@@ -10329,7 +10456,7 @@
 Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
-  asio::error_code wait(
+  void wait(
       wait_type w,
       asio::error_code & ec);
 
@@ -10375,15 +10502,15 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 wait_type..basic_datagram_socket] 
+[indexterm2 asio.indexterm.basic_datagram_socket.wait_type..wait_type..basic_datagram_socket] 
 Wait types. 
 
 
   enum wait_type
 
-[indexterm2 wait_read..basic_datagram_socket]
-[indexterm2 wait_write..basic_datagram_socket]
-[indexterm2 wait_error..basic_datagram_socket]
+[indexterm2 asio.indexterm.basic_datagram_socket.wait_type.wait_read..wait_read..basic_datagram_socket]
+[indexterm2 asio.indexterm.basic_datagram_socket.wait_type.wait_write..wait_write..basic_datagram_socket]
+[indexterm2 asio.indexterm.basic_datagram_socket.wait_type.wait_error..wait_error..basic_datagram_socket]
 
 [heading Values]
 [variablelist
@@ -10413,6 +10540,22 @@
 
 
 
+[section:_basic_datagram_socket basic_datagram_socket::~basic_datagram_socket]
+
+[indexterm2 asio.indexterm.basic_datagram_socket._basic_datagram_socket..~basic_datagram_socket..basic_datagram_socket] 
+Destroys the socket. 
+
+
+  ~basic_datagram_socket();
+
+
+This function destroys the socket, cancelling any outstanding asynchronous operations associated with the socket as if by calling `cancel`. 
+
+
+[endsect]
+
+
+
 [endsect]
 
 [section:basic_deadline_timer basic_deadline_timer]
@@ -10423,10 +10566,8 @@
 
   template<
       typename Time,
-      typename ``[link asio.reference.TimeTraits TimeTraits]`` = asio::time_traits<Time>,
-      typename ``[link asio.reference.TimerService TimerService]`` = deadline_timer_service<Time, TimeTraits>>
-  class basic_deadline_timer :
-    public basic_io_object< TimerService >
+      typename ``[link asio.reference.TimeTraits TimeTraits]`` = asio::time_traits<Time>>
+  class basic_deadline_timer
 
 
 [heading Types]
@@ -10449,20 +10590,6 @@
 
   [
 
-    [[link asio.reference.basic_deadline_timer.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_deadline_timer.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_deadline_timer.time_type [*time_type]]]
     [The time type. ]
   
@@ -10492,7 +10619,9 @@
 
      Constructor to set a particular expiry time as an absolute time. 
 
-     Constructor to set a particular expiry time relative to now. ]
+     Constructor to set a particular expiry time relative to now. 
+
+     Move-construct a basic_deadline_timer from another. ]
   ]
   
   [
@@ -10535,24 +10664,18 @@
   ]
   
   [
+    [[link asio.reference.basic_deadline_timer.operator_eq_ [*operator=]]]
+    [Move-assign a basic_deadline_timer from another. ]
+  ]
+  
+  [
     [[link asio.reference.basic_deadline_timer.wait [*wait]]]
     [Perform a blocking wait on the timer. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_deadline_timer.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_deadline_timer.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_deadline_timer._basic_deadline_timer [*~basic_deadline_timer]]]
+    [Destroys the timer. ]
   ]
   
 ]
@@ -10660,13 +10783,13 @@
 
 [section:async_wait basic_deadline_timer::async_wait]
 
-[indexterm2 async_wait..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.async_wait..async_wait..basic_deadline_timer] 
 Start an asynchronous wait on the timer. 
 
 
   template<
       typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
       WaitHandler && handler);
 
 
@@ -10704,7 +10827,7 @@
 
 [section:basic_deadline_timer basic_deadline_timer::basic_deadline_timer]
 
-[indexterm2 basic_deadline_timer..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.basic_deadline_timer..basic_deadline_timer..basic_deadline_timer] 
 Constructor. 
 
 
@@ -10731,7 +10854,15 @@
   ``  [''''&raquo;''' [link asio.reference.basic_deadline_timer.basic_deadline_timer.overload3 more...]]``
 
 
-[section:overload1 basic_deadline_timer::basic_deadline_timer (1 of 3 overloads)]
+Move-construct a [link asio.reference.basic_deadline_timer `basic_deadline_timer`] from another. 
+
+
+  ``[link asio.reference.basic_deadline_timer.basic_deadline_timer.overload4 basic_deadline_timer]``(
+      basic_deadline_timer && other);
+  ``  [''''&raquo;''' [link asio.reference.basic_deadline_timer.basic_deadline_timer.overload4 more...]]``
+
+
+[section:overload1 basic_deadline_timer::basic_deadline_timer (1 of 4 overloads)]
 
 
 Constructor. 
@@ -10760,7 +10891,7 @@
 
 
 
-[section:overload2 basic_deadline_timer::basic_deadline_timer (2 of 3 overloads)]
+[section:overload2 basic_deadline_timer::basic_deadline_timer (2 of 4 overloads)]
 
 
 Constructor to set a particular expiry time as an absolute time. 
@@ -10792,7 +10923,7 @@
 
 
 
-[section:overload3 basic_deadline_timer::basic_deadline_timer (3 of 3 overloads)]
+[section:overload3 basic_deadline_timer::basic_deadline_timer (3 of 4 overloads)]
 
 
 Constructor to set a particular expiry time relative to now. 
@@ -10823,11 +10954,45 @@
 [endsect]
 
 
+
+[section:overload4 basic_deadline_timer::basic_deadline_timer (4 of 4 overloads)]
+
+
+Move-construct a [link asio.reference.basic_deadline_timer `basic_deadline_timer`] from another. 
+
+
+  basic_deadline_timer(
+      basic_deadline_timer && other);
+
+
+This constructor moves a timer from one object to another.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.basic_deadline_timer `basic_deadline_timer`] object from which the move will occur.]]
+
+]
+
+
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `basic_deadline_timer(io_context&) constructor`. 
+
+
+
+
+[endsect]
+
+
 [endsect]
 
 [section:cancel basic_deadline_timer::cancel]
 
-[indexterm2 cancel..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.cancel..cancel..basic_deadline_timer] 
 Cancel any asynchronous operations that are waiting on the timer. 
 
 
@@ -10935,7 +11100,7 @@
 
 [section:cancel_one basic_deadline_timer::cancel_one]
 
-[indexterm2 cancel_one..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.cancel_one..cancel_one..basic_deadline_timer] 
 Cancels one asynchronous operation that is waiting on the timer. 
 
 
@@ -11044,7 +11209,7 @@
 
 [section:duration_type basic_deadline_timer::duration_type]
 
-[indexterm2 duration_type..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.duration_type..duration_type..basic_deadline_timer] 
 The duration type. 
 
 
@@ -11065,14 +11230,11 @@
 
 [section:executor_type basic_deadline_timer::executor_type]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 executor_type..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.executor_type..executor_type..basic_deadline_timer] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -11145,7 +11307,7 @@
 
 [section:expires_at basic_deadline_timer::expires_at]
 
-[indexterm2 expires_at..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.expires_at..expires_at..basic_deadline_timer] 
 Get the timer's expiry time as an absolute time. 
 
 
@@ -11288,7 +11450,7 @@
 
 [section:expires_from_now basic_deadline_timer::expires_from_now]
 
-[indexterm2 expires_from_now..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.expires_from_now..expires_from_now..basic_deadline_timer] 
 Get the timer's expiry time relative to now. 
 
 
@@ -11432,10 +11594,7 @@
 
 [section:get_executor basic_deadline_timer::get_executor]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.get_executor..get_executor..basic_deadline_timer] 
 Get the executor associated with the object. 
 
 
@@ -11446,61 +11605,10 @@
 [endsect]
 
 
-[section:get_implementation basic_deadline_timer::get_implementation]
-
-[indexterm2 get_implementation..basic_deadline_timer] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.basic_deadline_timer.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_deadline_timer.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.basic_deadline_timer.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_deadline_timer.get_implementation.overload2 more...]]``
-
-
-[section:overload1 basic_deadline_timer::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_deadline_timer::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
 
 [section:get_io_context basic_deadline_timer::get_io_context]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.get_io_context..get_io_context..basic_deadline_timer] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -11523,10 +11631,7 @@
 
 [section:get_io_service basic_deadline_timer::get_io_service]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.get_io_service..get_io_service..basic_deadline_timer] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -11546,97 +11651,35 @@
 [endsect]
 
 
-[section:get_service basic_deadline_timer::get_service]
 
-[indexterm2 get_service..basic_deadline_timer] 
-Get the service associated with the I/O object. 
+[section:operator_eq_ basic_deadline_timer::operator=]
+
+[indexterm2 asio.indexterm.basic_deadline_timer.operator_eq_..operator=..basic_deadline_timer] 
+Move-assign a [link asio.reference.basic_deadline_timer `basic_deadline_timer`] from another. 
 
 
-  service_type & ``[link asio.reference.basic_deadline_timer.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_deadline_timer.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.basic_deadline_timer.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_deadline_timer.get_service.overload2 more...]]``
+  basic_deadline_timer & operator=(
+      basic_deadline_timer && other);
 
 
-[section:overload1 basic_deadline_timer::get_service (1 of 2 overloads)]
+This assignment operator moves a timer from one object to another. Cancels any outstanding asynchronous operations associated with the target object.
 
 
-['Inherited from basic_io_object.]
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.basic_deadline_timer `basic_deadline_timer`] object from which the move will occur.]]
+
+]
 
 
-Get the service associated with the I/O object. 
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `basic_deadline_timer(io_context&) constructor`. 
 
 
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_deadline_timer::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_deadline_timer::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..basic_deadline_timer] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_deadline_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:service_type basic_deadline_timer::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..basic_deadline_timer] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef TimerService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_deadline_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
 
 
 [endsect]
@@ -11645,7 +11688,7 @@
 
 [section:time_type basic_deadline_timer::time_type]
 
-[indexterm2 time_type..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.time_type..time_type..basic_deadline_timer] 
 The time type. 
 
 
@@ -11666,7 +11709,7 @@
 
 [section:traits_type basic_deadline_timer::traits_type]
 
-[indexterm2 traits_type..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.traits_type..traits_type..basic_deadline_timer] 
 The time traits type. 
 
 
@@ -11686,7 +11729,7 @@
 
 [section:wait basic_deadline_timer::wait]
 
-[indexterm2 wait..basic_deadline_timer] 
+[indexterm2 asio.indexterm.basic_deadline_timer.wait..wait..basic_deadline_timer] 
 Perform a blocking wait on the timer. 
 
 
@@ -11757,6 +11800,22 @@
 [endsect]
 
 
+[section:_basic_deadline_timer basic_deadline_timer::~basic_deadline_timer]
+
+[indexterm2 asio.indexterm.basic_deadline_timer._basic_deadline_timer..~basic_deadline_timer..basic_deadline_timer] 
+Destroys the timer. 
+
+
+  ~basic_deadline_timer();
+
+
+This function destroys the timer, cancelling any outstanding asynchronous wait operations associated with the timer as if by calling `cancel`. 
+
+
+[endsect]
+
+
+
 [endsect]
 
 [section:basic_io_object basic_io_object]
@@ -11866,7 +11925,7 @@
 
 [section:basic_io_object basic_io_object::basic_io_object]
 
-[indexterm2 basic_io_object..basic_io_object] 
+[indexterm2 asio.indexterm.basic_io_object.basic_io_object..basic_io_object..basic_io_object] 
 Construct a [link asio.reference.basic_io_object `basic_io_object`]. 
 
 
@@ -11939,7 +11998,7 @@
 
 [section:executor_type basic_io_object::executor_type]
 
-[indexterm2 executor_type..basic_io_object] 
+[indexterm2 asio.indexterm.basic_io_object.executor_type..executor_type..basic_io_object] 
 The type of the executor associated with the object. 
 
 
@@ -12017,7 +12076,7 @@
 
 [section:get_executor basic_io_object::get_executor]
 
-[indexterm2 get_executor..basic_io_object] 
+[indexterm2 asio.indexterm.basic_io_object.get_executor..get_executor..basic_io_object] 
 Get the executor associated with the object. 
 
 
@@ -12030,7 +12089,7 @@
 
 [section:get_implementation basic_io_object::get_implementation]
 
-[indexterm2 get_implementation..basic_io_object] 
+[indexterm2 asio.indexterm.basic_io_object.get_implementation..get_implementation..basic_io_object] 
 Get the underlying implementation of the I/O object. 
 
 
@@ -12073,7 +12132,7 @@
 
 [section:get_io_context basic_io_object::get_io_context]
 
-[indexterm2 get_io_context..basic_io_object] 
+[indexterm2 asio.indexterm.basic_io_object.get_io_context..get_io_context..basic_io_object] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -12096,7 +12155,7 @@
 
 [section:get_io_service basic_io_object::get_io_service]
 
-[indexterm2 get_io_service..basic_io_object] 
+[indexterm2 asio.indexterm.basic_io_object.get_io_service..get_io_service..basic_io_object] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -12118,7 +12177,7 @@
 
 [section:get_service basic_io_object::get_service]
 
-[indexterm2 get_service..basic_io_object] 
+[indexterm2 asio.indexterm.basic_io_object.get_service..get_service..basic_io_object] 
 Get the service associated with the I/O object. 
 
 
@@ -12161,7 +12220,7 @@
 
 [section:implementation_type basic_io_object::implementation_type]
 
-[indexterm2 implementation_type..basic_io_object] 
+[indexterm2 asio.indexterm.basic_io_object.implementation_type..implementation_type..basic_io_object] 
 The underlying implementation type of I/O object. 
 
 
@@ -12182,7 +12241,7 @@
 
 [section:operator_eq_ basic_io_object::operator=]
 
-[indexterm2 operator=..basic_io_object] 
+[indexterm2 asio.indexterm.basic_io_object.operator_eq_..operator=..basic_io_object] 
 Move-assign a [link asio.reference.basic_io_object `basic_io_object`]. 
 
 
@@ -12212,7 +12271,7 @@
 
 [section:service_type basic_io_object::service_type]
 
-[indexterm2 service_type..basic_io_object] 
+[indexterm2 asio.indexterm.basic_io_object.service_type..service_type..basic_io_object] 
 The type of the service that will be used to provide I/O operations. 
 
 
@@ -12233,7 +12292,7 @@
 
 [section:_basic_io_object basic_io_object::~basic_io_object]
 
-[indexterm2 ~basic_io_object..basic_io_object] 
+[indexterm2 asio.indexterm.basic_io_object._basic_io_object..~basic_io_object..basic_io_object] 
 Protected destructor to prevent deletion through this type. 
 
 
@@ -12261,10 +12320,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.RawSocketService RawSocketService]`` = raw_socket_service<Protocol>>
+      typename ``[link asio.reference.Protocol Protocol]``>
   class basic_raw_socket :
-    public basic_socket< Protocol, RawSocketService >
+    public basic_socket< Protocol >
 
 
 [heading Types]
@@ -12322,13 +12380,6 @@
 
   [
 
-    [[link asio.reference.basic_raw_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_raw_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -12406,13 +12457,6 @@
 
   [
 
-    [[link asio.reference.basic_raw_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_raw_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -12624,20 +12668,9 @@
     [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_raw_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_raw_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_raw_socket._basic_raw_socket [*~basic_raw_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -12648,6 +12681,11 @@
 
   [
     [[link asio.reference.basic_raw_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_raw_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -12692,7 +12730,7 @@
 
 [section:assign basic_raw_socket::assign]
 
-[indexterm2 assign..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.assign..assign..basic_raw_socket] 
 Assign an existing native socket to the socket. 
 
 
@@ -12701,7 +12739,7 @@
       const native_handle_type & native_socket);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.assign.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.assign.overload2 assign]``(
+  void ``[link asio.reference.basic_raw_socket.assign.overload2 assign]``(
       const protocol_type & protocol,
       const native_handle_type & native_socket,
       asio::error_code & ec);
@@ -12736,7 +12774,7 @@
 Assign an existing native socket to the socket. 
 
 
-  asio::error_code assign(
+  void assign(
       const protocol_type & protocol,
       const native_handle_type & native_socket,
       asio::error_code & ec);
@@ -12754,13 +12792,13 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 async_connect..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.async_connect..async_connect..basic_raw_socket] 
 Start an asynchronous connect. 
 
 
   template<
       typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
       const endpoint_type & peer_endpoint,
       ConnectHandler && handler);
 
@@ -12818,14 +12856,14 @@
 
 [section:async_receive basic_raw_socket::async_receive]
 
-[indexterm2 async_receive..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.async_receive..async_receive..basic_raw_socket] 
 Start an asynchronous receive on a connected socket. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_raw_socket.async_receive.overload1 async_receive]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_receive.overload1 async_receive]``(
       const MutableBufferSequence & buffers,
       ReadHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.async_receive.overload1 more...]]``
@@ -12833,7 +12871,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_raw_socket.async_receive.overload2 async_receive]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_receive.overload2 async_receive]``(
       const MutableBufferSequence & buffers,
       socket_base::message_flags flags,
       ReadHandler && handler);
@@ -12849,7 +12887,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
       const MutableBufferSequence & buffers,
       ReadHandler && handler);
 
@@ -12906,7 +12944,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
       const MutableBufferSequence & buffers,
       socket_base::message_flags flags,
       ReadHandler && handler);
@@ -12950,14 +12988,14 @@
 
 [section:async_receive_from basic_raw_socket::async_receive_from]
 
-[indexterm2 async_receive_from..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.async_receive_from..async_receive_from..basic_raw_socket] 
 Start an asynchronous receive. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_raw_socket.async_receive_from.overload1 async_receive_from]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_receive_from.overload1 async_receive_from]``(
       const MutableBufferSequence & buffers,
       endpoint_type & sender_endpoint,
       ReadHandler && handler);
@@ -12966,7 +13004,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_raw_socket.async_receive_from.overload2 async_receive_from]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_receive_from.overload2 async_receive_from]``(
       const MutableBufferSequence & buffers,
       endpoint_type & sender_endpoint,
       socket_base::message_flags flags,
@@ -12983,7 +13021,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive_from(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive_from(
       const MutableBufferSequence & buffers,
       endpoint_type & sender_endpoint,
       ReadHandler && handler);
@@ -13039,7 +13077,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive_from(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive_from(
       const MutableBufferSequence & buffers,
       endpoint_type & sender_endpoint,
       socket_base::message_flags flags,
@@ -13081,14 +13119,14 @@
 
 [section:async_send basic_raw_socket::async_send]
 
-[indexterm2 async_send..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.async_send..async_send..basic_raw_socket] 
 Start an asynchronous send on a connected socket. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_raw_socket.async_send.overload1 async_send]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_send.overload1 async_send]``(
       const ConstBufferSequence & buffers,
       WriteHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.async_send.overload1 more...]]``
@@ -13096,7 +13134,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_raw_socket.async_send.overload2 async_send]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_send.overload2 async_send]``(
       const ConstBufferSequence & buffers,
       socket_base::message_flags flags,
       WriteHandler && handler);
@@ -13112,7 +13150,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
       const ConstBufferSequence & buffers,
       WriteHandler && handler);
 
@@ -13169,7 +13207,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
       const ConstBufferSequence & buffers,
       socket_base::message_flags flags,
       WriteHandler && handler);
@@ -13213,14 +13251,14 @@
 
 [section:async_send_to basic_raw_socket::async_send_to]
 
-[indexterm2 async_send_to..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.async_send_to..async_send_to..basic_raw_socket] 
 Start an asynchronous send. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_raw_socket.async_send_to.overload1 async_send_to]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_send_to.overload1 async_send_to]``(
       const ConstBufferSequence & buffers,
       const endpoint_type & destination,
       WriteHandler && handler);
@@ -13229,7 +13267,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_raw_socket.async_send_to.overload2 async_send_to]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_send_to.overload2 async_send_to]``(
       const ConstBufferSequence & buffers,
       const endpoint_type & destination,
       socket_base::message_flags flags,
@@ -13246,7 +13284,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send_to(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send_to(
       const ConstBufferSequence & buffers,
       const endpoint_type & destination,
       WriteHandler && handler);
@@ -13304,7 +13342,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send_to(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send_to(
       const ConstBufferSequence & buffers,
       const endpoint_type & destination,
       socket_base::message_flags flags,
@@ -13350,13 +13388,13 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 async_wait..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.async_wait..async_wait..basic_raw_socket] 
 Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
   template<
       typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
       wait_type w,
       WaitHandler && handler);
 
@@ -13411,7 +13449,7 @@
 
 [section:at_mark basic_raw_socket::at_mark]
 
-[indexterm2 at_mark..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.at_mark..at_mark..basic_raw_socket] 
 Determine whether the socket is at the out-of-band data mark. 
 
 
@@ -13499,7 +13537,7 @@
 
 [section:available basic_raw_socket::available]
 
-[indexterm2 available..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.available..available..basic_raw_socket] 
 Determine the number of bytes available for reading. 
 
 
@@ -13587,7 +13625,7 @@
 
 [section:basic_raw_socket basic_raw_socket::basic_raw_socket]
 
-[indexterm2 basic_raw_socket..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.basic_raw_socket..basic_raw_socket..basic_raw_socket] 
 Construct a [link asio.reference.basic_raw_socket `basic_raw_socket`] without opening it. 
 
 
@@ -13636,10 +13674,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.RawSocketService RawSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   ``[link asio.reference.basic_raw_socket.basic_raw_socket.overload6 basic_raw_socket]``(
-      basic_raw_socket< Protocol1, RawSocketService1 > && other,
+      basic_raw_socket< Protocol1 > && other,
       typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.basic_raw_socket.overload6 more...]]``
 
@@ -13843,10 +13880,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.RawSocketService RawSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   basic_raw_socket(
-      basic_raw_socket< Protocol1, RawSocketService1 > && other,
+      basic_raw_socket< Protocol1 > && other,
       typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
 
 
@@ -13877,7 +13913,7 @@
 
 [section:bind basic_raw_socket::bind]
 
-[indexterm2 bind..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.bind..bind..basic_raw_socket] 
 Bind the socket to the given local endpoint. 
 
 
@@ -13885,7 +13921,7 @@
       const endpoint_type & endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.bind.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.bind.overload2 bind]``(
+  void ``[link asio.reference.basic_raw_socket.bind.overload2 bind]``(
       const endpoint_type & endpoint,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.bind.overload2 more...]]``
@@ -13955,7 +13991,7 @@
 Bind the socket to the given local endpoint. 
 
 
-  asio::error_code bind(
+  void bind(
       const endpoint_type & endpoint,
       asio::error_code & ec);
 
@@ -14006,7 +14042,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 broadcast..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.broadcast..broadcast..basic_raw_socket] 
 Socket option to permit sending of broadcast messages. 
 
 
@@ -14060,7 +14096,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 bytes_readable..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.bytes_readable..bytes_readable..basic_raw_socket] 
 IO control command to get the amount of data that can be read without blocking. 
 
 
@@ -14099,14 +14135,14 @@
 
 [section:cancel basic_raw_socket::cancel]
 
-[indexterm2 cancel..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.cancel..cancel..basic_raw_socket] 
 Cancel all asynchronous operations associated with the socket. 
 
 
   void ``[link asio.reference.basic_raw_socket.cancel.overload1 cancel]``();
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.cancel.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.cancel.overload2 cancel]``(
+  void ``[link asio.reference.basic_raw_socket.cancel.overload2 cancel]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.cancel.overload2 more...]]``
 
@@ -14170,7 +14206,7 @@
 Cancel all asynchronous operations associated with the socket. 
 
 
-  asio::error_code cancel(
+  void cancel(
       asio::error_code & ec);
 
 
@@ -14215,14 +14251,14 @@
 
 [section:close basic_raw_socket::close]
 
-[indexterm2 close..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.close..close..basic_raw_socket] 
 Close the socket. 
 
 
   void ``[link asio.reference.basic_raw_socket.close.overload1 close]``();
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.close.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.close.overload2 close]``(
+  void ``[link asio.reference.basic_raw_socket.close.overload2 close]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.close.overload2 more...]]``
 
@@ -14272,7 +14308,7 @@
 Close the socket. 
 
 
-  asio::error_code close(
+  void close(
       asio::error_code & ec);
 
 
@@ -14320,7 +14356,7 @@
 
 [section:connect basic_raw_socket::connect]
 
-[indexterm2 connect..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.connect..connect..basic_raw_socket] 
 Connect the socket to the specified endpoint. 
 
 
@@ -14328,7 +14364,7 @@
       const endpoint_type & peer_endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.connect.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.connect.overload2 connect]``(
+  void ``[link asio.reference.basic_raw_socket.connect.overload2 connect]``(
       const endpoint_type & peer_endpoint,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.connect.overload2 more...]]``
@@ -14400,7 +14436,7 @@
 Connect the socket to the specified endpoint. 
 
 
-  asio::error_code connect(
+  void connect(
       const endpoint_type & peer_endpoint,
       asio::error_code & ec);
 
@@ -14453,7 +14489,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 debug..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.debug..debug..basic_raw_socket] 
 Socket option to enable socket-level debugging. 
 
 
@@ -14507,7 +14543,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 do_not_route..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.do_not_route..do_not_route..basic_raw_socket] 
 Socket option to prevent routing, use local interfaces only. 
 
 
@@ -14561,7 +14597,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 enable_connection_aborted..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.enable_connection_aborted..enable_connection_aborted..basic_raw_socket] 
 Socket option to report aborted connections on accept. 
 
 
@@ -14612,7 +14648,7 @@
 
 [section:endpoint_type basic_raw_socket::endpoint_type]
 
-[indexterm2 endpoint_type..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.endpoint_type..endpoint_type..basic_raw_socket] 
 The endpoint type. 
 
 
@@ -14634,13 +14670,13 @@
 [section:executor_type basic_raw_socket::executor_type]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 executor_type..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.executor_type..executor_type..basic_raw_socket] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -14715,9 +14751,9 @@
 [section:get_executor basic_raw_socket::get_executor]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 get_executor..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.get_executor..get_executor..basic_raw_socket] 
 Get the executor associated with the object. 
 
 
@@ -14728,61 +14764,13 @@
 [endsect]
 
 
-[section:get_implementation basic_raw_socket::get_implementation]
-
-[indexterm2 get_implementation..basic_raw_socket] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.basic_raw_socket.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.basic_raw_socket.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.get_implementation.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
 
 [section:get_io_context basic_raw_socket::get_io_context]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 get_io_context..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.get_io_context..get_io_context..basic_raw_socket] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -14806,9 +14794,9 @@
 [section:get_io_service basic_raw_socket::get_io_service]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 get_io_service..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.get_io_service..get_io_service..basic_raw_socket] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -14830,15 +14818,19 @@
 
 [section:get_option basic_raw_socket::get_option]
 
-[indexterm2 get_option..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.get_option..get_option..basic_raw_socket] 
 Get an option from the socket. 
 
 
+  template<
+      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
   void ``[link asio.reference.basic_raw_socket.get_option.overload1 get_option]``(
       GettableSocketOption & option) const;
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.get_option.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.get_option.overload2 get_option]``(
+  template<
+      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
+  void ``[link asio.reference.basic_raw_socket.get_option.overload2 get_option]``(
       GettableSocketOption & option,
       asio::error_code & ec) const;
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.get_option.overload2 more...]]``
@@ -14914,7 +14906,7 @@
 
   template<
       typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code get_option(
+  void get_option(
       GettableSocketOption & option,
       asio::error_code & ec) const;
 
@@ -14961,89 +14953,21 @@
 
 [endsect]
 
-[section:get_service basic_raw_socket::get_service]
-
-[indexterm2 get_service..basic_raw_socket] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.basic_raw_socket.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.basic_raw_socket.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.get_service.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_raw_socket::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..basic_raw_socket] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:io_control basic_raw_socket::io_control]
 
-[indexterm2 io_control..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.io_control..io_control..basic_raw_socket] 
 Perform an IO control command on the socket. 
 
 
+  template<
+      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
   void ``[link asio.reference.basic_raw_socket.io_control.overload1 io_control]``(
       IoControlCommand & command);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.io_control.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.io_control.overload2 io_control]``(
+  template<
+      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
+  void ``[link asio.reference.basic_raw_socket.io_control.overload2 io_control]``(
       IoControlCommand & command,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.io_control.overload2 more...]]``
@@ -15119,7 +15043,7 @@
 
   template<
       typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
+  void io_control(
       IoControlCommand & command,
       asio::error_code & ec);
 
@@ -15172,7 +15096,7 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 is_open..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.is_open..is_open..basic_raw_socket] 
 Determine whether the socket is open. 
 
 
@@ -15189,7 +15113,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 keep_alive..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.keep_alive..keep_alive..basic_raw_socket] 
 Socket option to send keep-alives. 
 
 
@@ -15243,7 +15167,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 linger..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.linger..linger..basic_raw_socket] 
 Socket option to specify whether the socket lingers on close if unsent data is present. 
 
 
@@ -15294,7 +15218,7 @@
 
 [section:local_endpoint basic_raw_socket::local_endpoint]
 
-[indexterm2 local_endpoint..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.local_endpoint..local_endpoint..basic_raw_socket] 
 Get the local endpoint of the socket. 
 
 
@@ -15411,7 +15335,7 @@
 
 [section:lowest_layer basic_raw_socket::lowest_layer]
 
-[indexterm2 lowest_layer..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.lowest_layer..lowest_layer..basic_raw_socket] 
 Get a reference to the lowest layer. 
 
 
@@ -15485,11 +15409,11 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 lowest_layer_type..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.lowest_layer_type..lowest_layer_type..basic_raw_socket] 
 A [link asio.reference.basic_socket `basic_socket`] is always the lowest layer. 
 
 
-  typedef basic_socket< Protocol, RawSocketService > lowest_layer_type;
+  typedef basic_socket< Protocol > lowest_layer_type;
 
 
 [heading Types]
@@ -15547,13 +15471,6 @@
 
   [
 
-    [[link asio.reference.basic_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -15631,13 +15548,6 @@
 
   [
 
-    [[link asio.reference.basic_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -15816,16 +15726,6 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.basic_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
     [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
     [Protected destructor to prevent deletion through this type. ]
   ]
@@ -15838,6 +15738,11 @@
 
   [
     [[link asio.reference.basic_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -15891,8 +15796,8 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 max_connections..basic_raw_socket] 
-The maximum length of the queue of pending incoming connections. 
+[indexterm2 asio.indexterm.basic_raw_socket.max_connections..max_connections..basic_raw_socket] 
+(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections. 
 
 
   static const int max_connections = implementation_defined;
@@ -15903,12 +15808,29 @@
 
 
 
+[section:max_listen_connections basic_raw_socket::max_listen_connections]
+
+
+['Inherited from socket_base.]
+
+[indexterm2 asio.indexterm.basic_raw_socket.max_listen_connections..max_listen_connections..basic_raw_socket] 
+The maximum length of the queue of pending incoming connections. 
+
+
+  static const int max_listen_connections = implementation_defined;
+
+
+
+[endsect]
+
+
+
 [section:message_do_not_route basic_raw_socket::message_do_not_route]
 
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_do_not_route..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.message_do_not_route..message_do_not_route..basic_raw_socket] 
 Specify that the data should not be subject to routing. 
 
 
@@ -15925,7 +15847,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_end_of_record..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.message_end_of_record..message_end_of_record..basic_raw_socket] 
 Specifies that the data marks the end of a record. 
 
 
@@ -15942,7 +15864,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_flags..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.message_flags..message_flags..basic_raw_socket] 
 Bitmask type for flags that can be passed to send and receive operations. 
 
 
@@ -15966,7 +15888,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_out_of_band..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.message_out_of_band..message_out_of_band..basic_raw_socket] 
 Process out-of-band data. 
 
 
@@ -15983,7 +15905,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_peek..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.message_peek..message_peek..basic_raw_socket] 
 Peek at incoming data without removing it from the input queue. 
 
 
@@ -16000,7 +15922,7 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 native_handle..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.native_handle..native_handle..basic_raw_socket] 
 Get the native socket representation. 
 
 
@@ -16016,11 +15938,11 @@
 
 [section:native_handle_type basic_raw_socket::native_handle_type]
 
-[indexterm2 native_handle_type..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.native_handle_type..native_handle_type..basic_raw_socket] 
 The native representation of a socket. 
 
 
-  typedef RawSocketService::native_handle_type native_handle_type;
+  typedef implementation_defined native_handle_type;
 
 
 
@@ -16036,7 +15958,7 @@
 
 [section:native_non_blocking basic_raw_socket::native_non_blocking]
 
-[indexterm2 native_non_blocking..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.native_non_blocking..native_non_blocking..basic_raw_socket] 
 Gets the non-blocking mode of the native socket implementation. 
 
 
@@ -16051,7 +15973,7 @@
       bool mode);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.native_non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.native_non_blocking.overload3 native_non_blocking]``(
+  void ``[link asio.reference.basic_raw_socket.native_non_blocking.overload3 native_non_blocking]``(
       bool mode,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.native_non_blocking.overload3 more...]]``
@@ -16285,7 +16207,7 @@
 Sets the non-blocking mode of the native socket implementation. 
 
 
-  asio::error_code native_non_blocking(
+  void native_non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -16387,7 +16309,7 @@
 
 [section:non_blocking basic_raw_socket::non_blocking]
 
-[indexterm2 non_blocking..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.non_blocking..non_blocking..basic_raw_socket] 
 Gets the non-blocking mode of the socket. 
 
 
@@ -16402,7 +16324,7 @@
       bool mode);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.non_blocking.overload3 non_blocking]``(
+  void ``[link asio.reference.basic_raw_socket.non_blocking.overload3 non_blocking]``(
       bool mode,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.non_blocking.overload3 more...]]``
@@ -16491,7 +16413,7 @@
 Sets the non-blocking mode of the socket. 
 
 
-  asio::error_code non_blocking(
+  void non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -16523,7 +16445,7 @@
 
 [section:open basic_raw_socket::open]
 
-[indexterm2 open..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.open..open..basic_raw_socket] 
 Open the socket using the specified protocol. 
 
 
@@ -16531,7 +16453,7 @@
       const protocol_type & protocol = protocol_type());
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.open.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.open.overload2 open]``(
+  void ``[link asio.reference.basic_raw_socket.open.overload2 open]``(
       const protocol_type & protocol,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.open.overload2 more...]]``
@@ -16599,7 +16521,7 @@
 Open the socket using the specified protocol. 
 
 
-  asio::error_code open(
+  void open(
       const protocol_type & protocol,
       asio::error_code & ec);
 
@@ -16644,7 +16566,7 @@
 
 [section:operator_eq_ basic_raw_socket::operator=]
 
-[indexterm2 operator=..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.operator_eq_..operator=..basic_raw_socket] 
 Move-assign a [link asio.reference.basic_raw_socket `basic_raw_socket`] from another. 
 
 
@@ -16657,10 +16579,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.RawSocketService RawSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   enable_if< is_convertible< Protocol1, Protocol >::value, basic_raw_socket >::type & ``[link asio.reference.basic_raw_socket.operator_eq_.overload2 operator=]``(
-      basic_raw_socket< Protocol1, RawSocketService1 > && other);
+      basic_raw_socket< Protocol1 > && other);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.operator_eq_.overload2 more...]]``
 
 
@@ -16705,10 +16626,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.RawSocketService RawSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   enable_if< is_convertible< Protocol1, Protocol >::value, basic_raw_socket >::type & operator=(
-      basic_raw_socket< Protocol1, RawSocketService1 > && other);
+      basic_raw_socket< Protocol1 > && other);
 
 
 This assignment operator moves a raw socket from one object to another.
@@ -16739,7 +16659,7 @@
 
 [section:protocol_type basic_raw_socket::protocol_type]
 
-[indexterm2 protocol_type..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.protocol_type..protocol_type..basic_raw_socket] 
 The protocol type. 
 
 
@@ -16759,7 +16679,7 @@
 
 [section:receive basic_raw_socket::receive]
 
-[indexterm2 receive..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.receive..receive..basic_raw_socket] 
 Receive some data on a connected socket. 
 
 
@@ -16954,7 +16874,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 receive_buffer_size..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.receive_buffer_size..receive_buffer_size..basic_raw_socket] 
 Socket option for the receive buffer size of a socket. 
 
 
@@ -17004,7 +16924,7 @@
 
 [section:receive_from basic_raw_socket::receive_from]
 
-[indexterm2 receive_from..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.receive_from..receive_from..basic_raw_socket] 
 Receive raw data with the endpoint of the sender. 
 
 
@@ -17198,7 +17118,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 receive_low_watermark..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.receive_low_watermark..receive_low_watermark..basic_raw_socket] 
 Socket option for the receive low watermark. 
 
 
@@ -17248,7 +17168,7 @@
 
 [section:remote_endpoint basic_raw_socket::remote_endpoint]
 
-[indexterm2 remote_endpoint..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.remote_endpoint..remote_endpoint..basic_raw_socket] 
 Get the remote endpoint of the socket. 
 
 
@@ -17369,7 +17289,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 reuse_address..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.reuse_address..reuse_address..basic_raw_socket] 
 Socket option to allow the socket to be bound to an address that is already in use. 
 
 
@@ -17419,7 +17339,7 @@
 
 [section:send basic_raw_socket::send]
 
-[indexterm2 send..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.send..send..basic_raw_socket] 
 Send some data on a connected socket. 
 
 
@@ -17614,7 +17534,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 send_buffer_size..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.send_buffer_size..send_buffer_size..basic_raw_socket] 
 Socket option for the send buffer size of a socket. 
 
 
@@ -17668,7 +17588,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 send_low_watermark..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.send_low_watermark..send_low_watermark..basic_raw_socket] 
 Socket option for the send low watermark. 
 
 
@@ -17718,7 +17638,7 @@
 
 [section:send_to basic_raw_socket::send_to]
 
-[indexterm2 send_to..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.send_to..send_to..basic_raw_socket] 
 Send raw data to the specified endpoint. 
 
 
@@ -17906,41 +17826,21 @@
 
 [endsect]
 
-
-[section:service_type basic_raw_socket::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..basic_raw_socket] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef RawSocketService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:set_option basic_raw_socket::set_option]
 
-[indexterm2 set_option..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.set_option..set_option..basic_raw_socket] 
 Set an option on the socket. 
 
 
+  template<
+      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
   void ``[link asio.reference.basic_raw_socket.set_option.overload1 set_option]``(
       const SettableSocketOption & option);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.set_option.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.set_option.overload2 set_option]``(
+  template<
+      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
+  void ``[link asio.reference.basic_raw_socket.set_option.overload2 set_option]``(
       const SettableSocketOption & option,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.set_option.overload2 more...]]``
@@ -18015,7 +17915,7 @@
 
   template<
       typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code set_option(
+  void set_option(
       const SettableSocketOption & option,
       asio::error_code & ec);
 
@@ -18063,7 +17963,7 @@
 
 [section:shutdown basic_raw_socket::shutdown]
 
-[indexterm2 shutdown..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.shutdown..shutdown..basic_raw_socket] 
 Disable sends or receives on the socket. 
 
 
@@ -18071,7 +17971,7 @@
       shutdown_type what);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.shutdown.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.shutdown.overload2 shutdown]``(
+  void ``[link asio.reference.basic_raw_socket.shutdown.overload2 shutdown]``(
       shutdown_type what,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.shutdown.overload2 more...]]``
@@ -18140,7 +18040,7 @@
 Disable sends or receives on the socket. 
 
 
-  asio::error_code shutdown(
+  void shutdown(
       shutdown_type what,
       asio::error_code & ec);
 
@@ -18190,15 +18090,15 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 shutdown_type..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.shutdown_type..shutdown_type..basic_raw_socket] 
 Different ways a socket may be shutdown. 
 
 
   enum shutdown_type
 
-[indexterm2 shutdown_receive..basic_raw_socket]
-[indexterm2 shutdown_send..basic_raw_socket]
-[indexterm2 shutdown_both..basic_raw_socket]
+[indexterm2 asio.indexterm.basic_raw_socket.shutdown_type.shutdown_receive..shutdown_receive..basic_raw_socket]
+[indexterm2 asio.indexterm.basic_raw_socket.shutdown_type.shutdown_send..shutdown_send..basic_raw_socket]
+[indexterm2 asio.indexterm.basic_raw_socket.shutdown_type.shutdown_both..shutdown_both..basic_raw_socket]
 
 [heading Values]
 [variablelist
@@ -18227,7 +18127,7 @@
 
 [section:wait basic_raw_socket::wait]
 
-[indexterm2 wait..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.wait..wait..basic_raw_socket] 
 Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
@@ -18235,7 +18135,7 @@
       wait_type w);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.wait.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_raw_socket.wait.overload2 wait]``(
+  void ``[link asio.reference.basic_raw_socket.wait.overload2 wait]``(
       wait_type w,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_raw_socket.wait.overload2 more...]]``
@@ -18294,7 +18194,7 @@
 Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
-  asio::error_code wait(
+  void wait(
       wait_type w,
       asio::error_code & ec);
 
@@ -18340,15 +18240,15 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 wait_type..basic_raw_socket] 
+[indexterm2 asio.indexterm.basic_raw_socket.wait_type..wait_type..basic_raw_socket] 
 Wait types. 
 
 
   enum wait_type
 
-[indexterm2 wait_read..basic_raw_socket]
-[indexterm2 wait_write..basic_raw_socket]
-[indexterm2 wait_error..basic_raw_socket]
+[indexterm2 asio.indexterm.basic_raw_socket.wait_type.wait_read..wait_read..basic_raw_socket]
+[indexterm2 asio.indexterm.basic_raw_socket.wait_type.wait_write..wait_write..basic_raw_socket]
+[indexterm2 asio.indexterm.basic_raw_socket.wait_type.wait_error..wait_error..basic_raw_socket]
 
 [heading Values]
 [variablelist
@@ -18378,6 +18278,22 @@
 
 
 
+[section:_basic_raw_socket basic_raw_socket::~basic_raw_socket]
+
+[indexterm2 asio.indexterm.basic_raw_socket._basic_raw_socket..~basic_raw_socket..basic_raw_socket] 
+Destroys the socket. 
+
+
+  ~basic_raw_socket();
+
+
+This function destroys the socket, cancelling any outstanding asynchronous operations associated with the socket as if by calling `cancel`. 
+
+
+[endsect]
+
+
+
 [endsect]
 
 [section:basic_seq_packet_socket basic_seq_packet_socket]
@@ -18387,10 +18303,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SeqPacketSocketService SeqPacketSocketService]`` = seq_packet_socket_service<Protocol>>
+      typename ``[link asio.reference.Protocol Protocol]``>
   class basic_seq_packet_socket :
-    public basic_socket< Protocol, SeqPacketSocketService >
+    public basic_socket< Protocol >
 
 
 [heading Types]
@@ -18448,13 +18363,6 @@
 
   [
 
-    [[link asio.reference.basic_seq_packet_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_seq_packet_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -18532,13 +18440,6 @@
 
   [
 
-    [[link asio.reference.basic_seq_packet_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_seq_packet_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -18732,20 +18633,9 @@
     [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_seq_packet_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_seq_packet_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_seq_packet_socket._basic_seq_packet_socket [*~basic_seq_packet_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -18756,6 +18646,11 @@
 
   [
     [[link asio.reference.basic_seq_packet_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_seq_packet_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -18800,7 +18695,7 @@
 
 [section:assign basic_seq_packet_socket::assign]
 
-[indexterm2 assign..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.assign..assign..basic_seq_packet_socket] 
 Assign an existing native socket to the socket. 
 
 
@@ -18809,7 +18704,7 @@
       const native_handle_type & native_socket);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.assign.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.assign.overload2 assign]``(
+  void ``[link asio.reference.basic_seq_packet_socket.assign.overload2 assign]``(
       const protocol_type & protocol,
       const native_handle_type & native_socket,
       asio::error_code & ec);
@@ -18844,7 +18739,7 @@
 Assign an existing native socket to the socket. 
 
 
-  asio::error_code assign(
+  void assign(
       const protocol_type & protocol,
       const native_handle_type & native_socket,
       asio::error_code & ec);
@@ -18862,13 +18757,13 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 async_connect..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.async_connect..async_connect..basic_seq_packet_socket] 
 Start an asynchronous connect. 
 
 
   template<
       typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
       const endpoint_type & peer_endpoint,
       ConnectHandler && handler);
 
@@ -18926,14 +18821,14 @@
 
 [section:async_receive basic_seq_packet_socket::async_receive]
 
-[indexterm2 async_receive..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.async_receive..async_receive..basic_seq_packet_socket] 
 Start an asynchronous receive. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_seq_packet_socket.async_receive.overload1 async_receive]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_seq_packet_socket.async_receive.overload1 async_receive]``(
       const MutableBufferSequence & buffers,
       socket_base::message_flags & out_flags,
       ReadHandler && handler);
@@ -18942,7 +18837,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_seq_packet_socket.async_receive.overload2 async_receive]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_seq_packet_socket.async_receive.overload2 async_receive]``(
       const MutableBufferSequence & buffers,
       socket_base::message_flags in_flags,
       socket_base::message_flags & out_flags,
@@ -18959,7 +18854,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
       const MutableBufferSequence & buffers,
       socket_base::message_flags & out_flags,
       ReadHandler && handler);
@@ -19014,7 +18909,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
       const MutableBufferSequence & buffers,
       socket_base::message_flags in_flags,
       socket_base::message_flags & out_flags,
@@ -19069,14 +18964,14 @@
 
 [section:async_send basic_seq_packet_socket::async_send]
 
-[indexterm2 async_send..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.async_send..async_send..basic_seq_packet_socket] 
 Start an asynchronous send. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
       const ConstBufferSequence & buffers,
       socket_base::message_flags flags,
       WriteHandler && handler);
@@ -19127,13 +19022,13 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 async_wait..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.async_wait..async_wait..basic_seq_packet_socket] 
 Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
   template<
       typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
       wait_type w,
       WaitHandler && handler);
 
@@ -19188,7 +19083,7 @@
 
 [section:at_mark basic_seq_packet_socket::at_mark]
 
-[indexterm2 at_mark..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.at_mark..at_mark..basic_seq_packet_socket] 
 Determine whether the socket is at the out-of-band data mark. 
 
 
@@ -19276,7 +19171,7 @@
 
 [section:available basic_seq_packet_socket::available]
 
-[indexterm2 available..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.available..available..basic_seq_packet_socket] 
 Determine the number of bytes available for reading. 
 
 
@@ -19364,7 +19259,7 @@
 
 [section:basic_seq_packet_socket basic_seq_packet_socket::basic_seq_packet_socket]
 
-[indexterm2 basic_seq_packet_socket..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.basic_seq_packet_socket..basic_seq_packet_socket..basic_seq_packet_socket] 
 Construct a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] without opening it. 
 
 
@@ -19413,10 +19308,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SeqPacketSocketService SeqPacketSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   ``[link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload6 basic_seq_packet_socket]``(
-      basic_seq_packet_socket< Protocol1, SeqPacketSocketService1 > && other,
+      basic_seq_packet_socket< Protocol1 > && other,
       typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload6 more...]]``
 
@@ -19620,10 +19514,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SeqPacketSocketService SeqPacketSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   basic_seq_packet_socket(
-      basic_seq_packet_socket< Protocol1, SeqPacketSocketService1 > && other,
+      basic_seq_packet_socket< Protocol1 > && other,
       typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
 
 
@@ -19654,7 +19547,7 @@
 
 [section:bind basic_seq_packet_socket::bind]
 
-[indexterm2 bind..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.bind..bind..basic_seq_packet_socket] 
 Bind the socket to the given local endpoint. 
 
 
@@ -19662,7 +19555,7 @@
       const endpoint_type & endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.bind.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.bind.overload2 bind]``(
+  void ``[link asio.reference.basic_seq_packet_socket.bind.overload2 bind]``(
       const endpoint_type & endpoint,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.bind.overload2 more...]]``
@@ -19732,7 +19625,7 @@
 Bind the socket to the given local endpoint. 
 
 
-  asio::error_code bind(
+  void bind(
       const endpoint_type & endpoint,
       asio::error_code & ec);
 
@@ -19783,7 +19676,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 broadcast..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.broadcast..broadcast..basic_seq_packet_socket] 
 Socket option to permit sending of broadcast messages. 
 
 
@@ -19837,7 +19730,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 bytes_readable..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.bytes_readable..bytes_readable..basic_seq_packet_socket] 
 IO control command to get the amount of data that can be read without blocking. 
 
 
@@ -19876,14 +19769,14 @@
 
 [section:cancel basic_seq_packet_socket::cancel]
 
-[indexterm2 cancel..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.cancel..cancel..basic_seq_packet_socket] 
 Cancel all asynchronous operations associated with the socket. 
 
 
   void ``[link asio.reference.basic_seq_packet_socket.cancel.overload1 cancel]``();
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.cancel.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.cancel.overload2 cancel]``(
+  void ``[link asio.reference.basic_seq_packet_socket.cancel.overload2 cancel]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.cancel.overload2 more...]]``
 
@@ -19947,7 +19840,7 @@
 Cancel all asynchronous operations associated with the socket. 
 
 
-  asio::error_code cancel(
+  void cancel(
       asio::error_code & ec);
 
 
@@ -19992,14 +19885,14 @@
 
 [section:close basic_seq_packet_socket::close]
 
-[indexterm2 close..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.close..close..basic_seq_packet_socket] 
 Close the socket. 
 
 
   void ``[link asio.reference.basic_seq_packet_socket.close.overload1 close]``();
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.close.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.close.overload2 close]``(
+  void ``[link asio.reference.basic_seq_packet_socket.close.overload2 close]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.close.overload2 more...]]``
 
@@ -20049,7 +19942,7 @@
 Close the socket. 
 
 
-  asio::error_code close(
+  void close(
       asio::error_code & ec);
 
 
@@ -20097,7 +19990,7 @@
 
 [section:connect basic_seq_packet_socket::connect]
 
-[indexterm2 connect..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.connect..connect..basic_seq_packet_socket] 
 Connect the socket to the specified endpoint. 
 
 
@@ -20105,7 +19998,7 @@
       const endpoint_type & peer_endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.connect.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.connect.overload2 connect]``(
+  void ``[link asio.reference.basic_seq_packet_socket.connect.overload2 connect]``(
       const endpoint_type & peer_endpoint,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.connect.overload2 more...]]``
@@ -20177,7 +20070,7 @@
 Connect the socket to the specified endpoint. 
 
 
-  asio::error_code connect(
+  void connect(
       const endpoint_type & peer_endpoint,
       asio::error_code & ec);
 
@@ -20230,7 +20123,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 debug..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.debug..debug..basic_seq_packet_socket] 
 Socket option to enable socket-level debugging. 
 
 
@@ -20284,7 +20177,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 do_not_route..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.do_not_route..do_not_route..basic_seq_packet_socket] 
 Socket option to prevent routing, use local interfaces only. 
 
 
@@ -20338,7 +20231,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 enable_connection_aborted..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.enable_connection_aborted..enable_connection_aborted..basic_seq_packet_socket] 
 Socket option to report aborted connections on accept. 
 
 
@@ -20389,7 +20282,7 @@
 
 [section:endpoint_type basic_seq_packet_socket::endpoint_type]
 
-[indexterm2 endpoint_type..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.endpoint_type..endpoint_type..basic_seq_packet_socket] 
 The endpoint type. 
 
 
@@ -20411,13 +20304,13 @@
 [section:executor_type basic_seq_packet_socket::executor_type]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 executor_type..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.executor_type..executor_type..basic_seq_packet_socket] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -20492,9 +20385,9 @@
 [section:get_executor basic_seq_packet_socket::get_executor]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 get_executor..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.get_executor..get_executor..basic_seq_packet_socket] 
 Get the executor associated with the object. 
 
 
@@ -20505,61 +20398,13 @@
 [endsect]
 
 
-[section:get_implementation basic_seq_packet_socket::get_implementation]
-
-[indexterm2 get_implementation..basic_seq_packet_socket] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.basic_seq_packet_socket.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.basic_seq_packet_socket.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.get_implementation.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
 
 [section:get_io_context basic_seq_packet_socket::get_io_context]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 get_io_context..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.get_io_context..get_io_context..basic_seq_packet_socket] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -20583,9 +20428,9 @@
 [section:get_io_service basic_seq_packet_socket::get_io_service]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 get_io_service..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.get_io_service..get_io_service..basic_seq_packet_socket] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -20607,15 +20452,19 @@
 
 [section:get_option basic_seq_packet_socket::get_option]
 
-[indexterm2 get_option..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.get_option..get_option..basic_seq_packet_socket] 
 Get an option from the socket. 
 
 
+  template<
+      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
   void ``[link asio.reference.basic_seq_packet_socket.get_option.overload1 get_option]``(
       GettableSocketOption & option) const;
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.get_option.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.get_option.overload2 get_option]``(
+  template<
+      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
+  void ``[link asio.reference.basic_seq_packet_socket.get_option.overload2 get_option]``(
       GettableSocketOption & option,
       asio::error_code & ec) const;
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.get_option.overload2 more...]]``
@@ -20691,7 +20540,7 @@
 
   template<
       typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code get_option(
+  void get_option(
       GettableSocketOption & option,
       asio::error_code & ec) const;
 
@@ -20738,89 +20587,21 @@
 
 [endsect]
 
-[section:get_service basic_seq_packet_socket::get_service]
-
-[indexterm2 get_service..basic_seq_packet_socket] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.basic_seq_packet_socket.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.basic_seq_packet_socket.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.get_service.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_seq_packet_socket::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..basic_seq_packet_socket] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:io_control basic_seq_packet_socket::io_control]
 
-[indexterm2 io_control..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.io_control..io_control..basic_seq_packet_socket] 
 Perform an IO control command on the socket. 
 
 
+  template<
+      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
   void ``[link asio.reference.basic_seq_packet_socket.io_control.overload1 io_control]``(
       IoControlCommand & command);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.io_control.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.io_control.overload2 io_control]``(
+  template<
+      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
+  void ``[link asio.reference.basic_seq_packet_socket.io_control.overload2 io_control]``(
       IoControlCommand & command,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.io_control.overload2 more...]]``
@@ -20896,7 +20677,7 @@
 
   template<
       typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
+  void io_control(
       IoControlCommand & command,
       asio::error_code & ec);
 
@@ -20949,7 +20730,7 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 is_open..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.is_open..is_open..basic_seq_packet_socket] 
 Determine whether the socket is open. 
 
 
@@ -20966,7 +20747,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 keep_alive..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.keep_alive..keep_alive..basic_seq_packet_socket] 
 Socket option to send keep-alives. 
 
 
@@ -21020,7 +20801,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 linger..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.linger..linger..basic_seq_packet_socket] 
 Socket option to specify whether the socket lingers on close if unsent data is present. 
 
 
@@ -21071,7 +20852,7 @@
 
 [section:local_endpoint basic_seq_packet_socket::local_endpoint]
 
-[indexterm2 local_endpoint..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.local_endpoint..local_endpoint..basic_seq_packet_socket] 
 Get the local endpoint of the socket. 
 
 
@@ -21188,7 +20969,7 @@
 
 [section:lowest_layer basic_seq_packet_socket::lowest_layer]
 
-[indexterm2 lowest_layer..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.lowest_layer..lowest_layer..basic_seq_packet_socket] 
 Get a reference to the lowest layer. 
 
 
@@ -21262,11 +21043,11 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 lowest_layer_type..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.lowest_layer_type..lowest_layer_type..basic_seq_packet_socket] 
 A [link asio.reference.basic_socket `basic_socket`] is always the lowest layer. 
 
 
-  typedef basic_socket< Protocol, SeqPacketSocketService > lowest_layer_type;
+  typedef basic_socket< Protocol > lowest_layer_type;
 
 
 [heading Types]
@@ -21324,13 +21105,6 @@
 
   [
 
-    [[link asio.reference.basic_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -21408,13 +21182,6 @@
 
   [
 
-    [[link asio.reference.basic_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -21593,16 +21360,6 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.basic_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
     [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
     [Protected destructor to prevent deletion through this type. ]
   ]
@@ -21615,6 +21372,11 @@
 
   [
     [[link asio.reference.basic_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -21668,8 +21430,8 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 max_connections..basic_seq_packet_socket] 
-The maximum length of the queue of pending incoming connections. 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.max_connections..max_connections..basic_seq_packet_socket] 
+(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections. 
 
 
   static const int max_connections = implementation_defined;
@@ -21680,12 +21442,29 @@
 
 
 
+[section:max_listen_connections basic_seq_packet_socket::max_listen_connections]
+
+
+['Inherited from socket_base.]
+
+[indexterm2 asio.indexterm.basic_seq_packet_socket.max_listen_connections..max_listen_connections..basic_seq_packet_socket] 
+The maximum length of the queue of pending incoming connections. 
+
+
+  static const int max_listen_connections = implementation_defined;
+
+
+
+[endsect]
+
+
+
 [section:message_do_not_route basic_seq_packet_socket::message_do_not_route]
 
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_do_not_route..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.message_do_not_route..message_do_not_route..basic_seq_packet_socket] 
 Specify that the data should not be subject to routing. 
 
 
@@ -21702,7 +21481,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_end_of_record..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.message_end_of_record..message_end_of_record..basic_seq_packet_socket] 
 Specifies that the data marks the end of a record. 
 
 
@@ -21719,7 +21498,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_flags..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.message_flags..message_flags..basic_seq_packet_socket] 
 Bitmask type for flags that can be passed to send and receive operations. 
 
 
@@ -21743,7 +21522,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_out_of_band..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.message_out_of_band..message_out_of_band..basic_seq_packet_socket] 
 Process out-of-band data. 
 
 
@@ -21760,7 +21539,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_peek..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.message_peek..message_peek..basic_seq_packet_socket] 
 Peek at incoming data without removing it from the input queue. 
 
 
@@ -21777,7 +21556,7 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 native_handle..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.native_handle..native_handle..basic_seq_packet_socket] 
 Get the native socket representation. 
 
 
@@ -21793,11 +21572,11 @@
 
 [section:native_handle_type basic_seq_packet_socket::native_handle_type]
 
-[indexterm2 native_handle_type..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.native_handle_type..native_handle_type..basic_seq_packet_socket] 
 The native representation of a socket. 
 
 
-  typedef SeqPacketSocketService::native_handle_type native_handle_type;
+  typedef implementation_defined native_handle_type;
 
 
 
@@ -21813,7 +21592,7 @@
 
 [section:native_non_blocking basic_seq_packet_socket::native_non_blocking]
 
-[indexterm2 native_non_blocking..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.native_non_blocking..native_non_blocking..basic_seq_packet_socket] 
 Gets the non-blocking mode of the native socket implementation. 
 
 
@@ -21828,7 +21607,7 @@
       bool mode);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.native_non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.native_non_blocking.overload3 native_non_blocking]``(
+  void ``[link asio.reference.basic_seq_packet_socket.native_non_blocking.overload3 native_non_blocking]``(
       bool mode,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.native_non_blocking.overload3 more...]]``
@@ -22062,7 +21841,7 @@
 Sets the non-blocking mode of the native socket implementation. 
 
 
-  asio::error_code native_non_blocking(
+  void native_non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -22164,7 +21943,7 @@
 
 [section:non_blocking basic_seq_packet_socket::non_blocking]
 
-[indexterm2 non_blocking..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.non_blocking..non_blocking..basic_seq_packet_socket] 
 Gets the non-blocking mode of the socket. 
 
 
@@ -22179,7 +21958,7 @@
       bool mode);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.non_blocking.overload3 non_blocking]``(
+  void ``[link asio.reference.basic_seq_packet_socket.non_blocking.overload3 non_blocking]``(
       bool mode,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.non_blocking.overload3 more...]]``
@@ -22268,7 +22047,7 @@
 Sets the non-blocking mode of the socket. 
 
 
-  asio::error_code non_blocking(
+  void non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -22300,7 +22079,7 @@
 
 [section:open basic_seq_packet_socket::open]
 
-[indexterm2 open..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.open..open..basic_seq_packet_socket] 
 Open the socket using the specified protocol. 
 
 
@@ -22308,7 +22087,7 @@
       const protocol_type & protocol = protocol_type());
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.open.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.open.overload2 open]``(
+  void ``[link asio.reference.basic_seq_packet_socket.open.overload2 open]``(
       const protocol_type & protocol,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.open.overload2 more...]]``
@@ -22376,7 +22155,7 @@
 Open the socket using the specified protocol. 
 
 
-  asio::error_code open(
+  void open(
       const protocol_type & protocol,
       asio::error_code & ec);
 
@@ -22421,7 +22200,7 @@
 
 [section:operator_eq_ basic_seq_packet_socket::operator=]
 
-[indexterm2 operator=..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.operator_eq_..operator=..basic_seq_packet_socket] 
 Move-assign a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] from another. 
 
 
@@ -22434,10 +22213,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SeqPacketSocketService SeqPacketSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   enable_if< is_convertible< Protocol1, Protocol >::value, basic_seq_packet_socket >::type & ``[link asio.reference.basic_seq_packet_socket.operator_eq_.overload2 operator=]``(
-      basic_seq_packet_socket< Protocol1, SeqPacketSocketService1 > && other);
+      basic_seq_packet_socket< Protocol1 > && other);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.operator_eq_.overload2 more...]]``
 
 
@@ -22482,10 +22260,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SeqPacketSocketService SeqPacketSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   enable_if< is_convertible< Protocol1, Protocol >::value, basic_seq_packet_socket >::type & operator=(
-      basic_seq_packet_socket< Protocol1, SeqPacketSocketService1 > && other);
+      basic_seq_packet_socket< Protocol1 > && other);
 
 
 This assignment operator moves a sequenced packet socket from one object to another.
@@ -22516,7 +22293,7 @@
 
 [section:protocol_type basic_seq_packet_socket::protocol_type]
 
-[indexterm2 protocol_type..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.protocol_type..protocol_type..basic_seq_packet_socket] 
 The protocol type. 
 
 
@@ -22536,7 +22313,7 @@
 
 [section:receive basic_seq_packet_socket::receive]
 
-[indexterm2 receive..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.receive..receive..basic_seq_packet_socket] 
 Receive some data on the socket. 
 
 
@@ -22752,7 +22529,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 receive_buffer_size..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.receive_buffer_size..receive_buffer_size..basic_seq_packet_socket] 
 Socket option for the receive buffer size of a socket. 
 
 
@@ -22806,7 +22583,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 receive_low_watermark..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.receive_low_watermark..receive_low_watermark..basic_seq_packet_socket] 
 Socket option for the receive low watermark. 
 
 
@@ -22856,7 +22633,7 @@
 
 [section:remote_endpoint basic_seq_packet_socket::remote_endpoint]
 
-[indexterm2 remote_endpoint..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.remote_endpoint..remote_endpoint..basic_seq_packet_socket] 
 Get the remote endpoint of the socket. 
 
 
@@ -22977,7 +22754,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 reuse_address..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.reuse_address..reuse_address..basic_seq_packet_socket] 
 Socket option to allow the socket to be bound to an address that is already in use. 
 
 
@@ -23027,7 +22804,7 @@
 
 [section:send basic_seq_packet_socket::send]
 
-[indexterm2 send..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.send..send..basic_seq_packet_socket] 
 Send some data on the socket. 
 
 
@@ -23160,7 +22937,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 send_buffer_size..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.send_buffer_size..send_buffer_size..basic_seq_packet_socket] 
 Socket option for the send buffer size of a socket. 
 
 
@@ -23214,7 +22991,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 send_low_watermark..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.send_low_watermark..send_low_watermark..basic_seq_packet_socket] 
 Socket option for the send low watermark. 
 
 
@@ -23262,41 +23039,21 @@
 [endsect]
 
 
-
-[section:service_type basic_seq_packet_socket::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..basic_seq_packet_socket] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef SeqPacketSocketService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:set_option basic_seq_packet_socket::set_option]
 
-[indexterm2 set_option..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.set_option..set_option..basic_seq_packet_socket] 
 Set an option on the socket. 
 
 
+  template<
+      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
   void ``[link asio.reference.basic_seq_packet_socket.set_option.overload1 set_option]``(
       const SettableSocketOption & option);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.set_option.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.set_option.overload2 set_option]``(
+  template<
+      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
+  void ``[link asio.reference.basic_seq_packet_socket.set_option.overload2 set_option]``(
       const SettableSocketOption & option,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.set_option.overload2 more...]]``
@@ -23371,7 +23128,7 @@
 
   template<
       typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code set_option(
+  void set_option(
       const SettableSocketOption & option,
       asio::error_code & ec);
 
@@ -23419,7 +23176,7 @@
 
 [section:shutdown basic_seq_packet_socket::shutdown]
 
-[indexterm2 shutdown..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.shutdown..shutdown..basic_seq_packet_socket] 
 Disable sends or receives on the socket. 
 
 
@@ -23427,7 +23184,7 @@
       shutdown_type what);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.shutdown.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.shutdown.overload2 shutdown]``(
+  void ``[link asio.reference.basic_seq_packet_socket.shutdown.overload2 shutdown]``(
       shutdown_type what,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.shutdown.overload2 more...]]``
@@ -23496,7 +23253,7 @@
 Disable sends or receives on the socket. 
 
 
-  asio::error_code shutdown(
+  void shutdown(
       shutdown_type what,
       asio::error_code & ec);
 
@@ -23546,15 +23303,15 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 shutdown_type..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.shutdown_type..shutdown_type..basic_seq_packet_socket] 
 Different ways a socket may be shutdown. 
 
 
   enum shutdown_type
 
-[indexterm2 shutdown_receive..basic_seq_packet_socket]
-[indexterm2 shutdown_send..basic_seq_packet_socket]
-[indexterm2 shutdown_both..basic_seq_packet_socket]
+[indexterm2 asio.indexterm.basic_seq_packet_socket.shutdown_type.shutdown_receive..shutdown_receive..basic_seq_packet_socket]
+[indexterm2 asio.indexterm.basic_seq_packet_socket.shutdown_type.shutdown_send..shutdown_send..basic_seq_packet_socket]
+[indexterm2 asio.indexterm.basic_seq_packet_socket.shutdown_type.shutdown_both..shutdown_both..basic_seq_packet_socket]
 
 [heading Values]
 [variablelist
@@ -23583,7 +23340,7 @@
 
 [section:wait basic_seq_packet_socket::wait]
 
-[indexterm2 wait..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.wait..wait..basic_seq_packet_socket] 
 Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
@@ -23591,7 +23348,7 @@
       wait_type w);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.wait.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_seq_packet_socket.wait.overload2 wait]``(
+  void ``[link asio.reference.basic_seq_packet_socket.wait.overload2 wait]``(
       wait_type w,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.wait.overload2 more...]]``
@@ -23650,7 +23407,7 @@
 Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
-  asio::error_code wait(
+  void wait(
       wait_type w,
       asio::error_code & ec);
 
@@ -23696,15 +23453,15 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 wait_type..basic_seq_packet_socket] 
+[indexterm2 asio.indexterm.basic_seq_packet_socket.wait_type..wait_type..basic_seq_packet_socket] 
 Wait types. 
 
 
   enum wait_type
 
-[indexterm2 wait_read..basic_seq_packet_socket]
-[indexterm2 wait_write..basic_seq_packet_socket]
-[indexterm2 wait_error..basic_seq_packet_socket]
+[indexterm2 asio.indexterm.basic_seq_packet_socket.wait_type.wait_read..wait_read..basic_seq_packet_socket]
+[indexterm2 asio.indexterm.basic_seq_packet_socket.wait_type.wait_write..wait_write..basic_seq_packet_socket]
+[indexterm2 asio.indexterm.basic_seq_packet_socket.wait_type.wait_error..wait_error..basic_seq_packet_socket]
 
 [heading Values]
 [variablelist
@@ -23734,3067 +23491,16 @@
 
 
 
-[endsect]
+[section:_basic_seq_packet_socket basic_seq_packet_socket::~basic_seq_packet_socket]
 
-[section:basic_serial_port basic_serial_port]
+[indexterm2 asio.indexterm.basic_seq_packet_socket._basic_seq_packet_socket..~basic_seq_packet_socket..basic_seq_packet_socket] 
+Destroys the socket. 
 
 
-Provides serial port functionality. 
+  ~basic_seq_packet_socket();
 
 
-  template<
-      typename ``[link asio.reference.SerialPortService SerialPortService]`` = serial_port_service>
-  class basic_serial_port :
-    public basic_io_object< SerialPortService >,
-    public serial_port_base
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.basic_serial_port.executor_type [*executor_type]]]
-    [The type of the executor associated with the object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_serial_port.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_serial_port.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_serial_port is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_serial_port.native_handle_type [*native_handle_type]]]
-    [The native representation of a serial port. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_serial_port.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.basic_serial_port.assign [*assign]]]
-    [Assign an existing native serial port to the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.async_read_some [*async_read_some]]]
-    [Start an asynchronous read. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.async_write_some [*async_write_some]]]
-    [Start an asynchronous write. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.basic_serial_port [*basic_serial_port]]]
-    [Construct a basic_serial_port without opening it. 
-
-     Construct and open a basic_serial_port. 
-
-     Construct a basic_serial_port on an existing native serial port. 
-
-     Move-construct a basic_serial_port from another. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.close [*close]]]
-    [Close the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.get_executor [*get_executor]]]
-    [Get the executor associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.get_io_context [*get_io_context]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.get_option [*get_option]]]
-    [Get an option from the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.is_open [*is_open]]]
-    [Determine whether the serial port is open. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.lowest_layer [*lowest_layer]]]
-    [Get a reference to the lowest layer. 
-
-     Get a const reference to the lowest layer. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.native_handle [*native_handle]]]
-    [Get the native serial port representation. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.open [*open]]]
-    [Open the serial port using the specified device name. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.operator_eq_ [*operator=]]]
-    [Move-assign a basic_serial_port from another. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.read_some [*read_some]]]
-    [Read some data from the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.send_break [*send_break]]]
-    [Send a break sequence to the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.set_option [*set_option]]]
-    [Set an option on the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.write_some [*write_some]]]
-    [Write some data to the serial port. ]
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.basic_serial_port.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-]
-
-The [link asio.reference.basic_serial_port `basic_serial_port`] class template provides functionality that is common to all serial ports.
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe. 
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_serial_port.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign basic_serial_port::assign]
-
-[indexterm2 assign..basic_serial_port] 
-Assign an existing native serial port to the serial port. 
-
-
-  void ``[link asio.reference.basic_serial_port.assign.overload1 assign]``(
-      const native_handle_type & native_serial_port);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.assign.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_serial_port.assign.overload2 assign]``(
-      const native_handle_type & native_serial_port,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.assign.overload2 more...]]``
-
-
-[section:overload1 basic_serial_port::assign (1 of 2 overloads)]
-
-
-Assign an existing native serial port to the serial port. 
-
-
-  void assign(
-      const native_handle_type & native_serial_port);
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::assign (2 of 2 overloads)]
-
-
-Assign an existing native serial port to the serial port. 
-
-
-  asio::error_code assign(
-      const native_handle_type & native_serial_port,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_read_some basic_serial_port::async_read_some]
-
-[indexterm2 async_read_some..basic_serial_port] 
-Start an asynchronous read. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some(
-      const MutableBufferSequence & buffers,
-      ReadHandler && handler);
-
-
-This function is used to asynchronously read data from the serial port. The function call always returns immediately.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
-``
-   void handler(
-     const asio::error_code& error, // Result of operation.
-     std::size_t bytes_transferred           // Number of bytes read.
-   ); 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-      
-The read operation may not read all of the requested number of bytes. Consider using the [link asio.reference.async_read `async_read`]  function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
-
-
-[heading Example]
-  
-To read into a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
-
-   serial_port.async_read_some(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`]  documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
-
-
-
-
-[endsect]
-
-
-
-[section:async_write_some basic_serial_port::async_write_some]
-
-[indexterm2 async_write_some..basic_serial_port] 
-Start an asynchronous write. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some(
-      const ConstBufferSequence & buffers,
-      WriteHandler && handler);
-
-
-This function is used to asynchronously write data to the serial port. The function call always returns immediately.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[buffers][One or more data buffers to be written to the serial port. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
-``
-   void handler(
-     const asio::error_code& error, // Result of operation.
-     std::size_t bytes_transferred           // Number of bytes written.
-   ); 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-      
-The write operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write `async_write`]  function if you need to ensure that all data is written before the asynchronous operation completes.
-
-
-[heading Example]
-  
-To write a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
-
-   serial_port.async_write_some(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`]  documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
-
-
-
-
-[endsect]
-
-
-[section:basic_serial_port basic_serial_port::basic_serial_port]
-
-[indexterm2 basic_serial_port..basic_serial_port] 
-Construct a [link asio.reference.basic_serial_port `basic_serial_port`] without opening it. 
-
-
-  explicit ``[link asio.reference.basic_serial_port.basic_serial_port.overload1 basic_serial_port]``(
-      asio::io_context & io_context);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.basic_serial_port.overload1 more...]]``
-
-
-Construct and open a [link asio.reference.basic_serial_port `basic_serial_port`]. 
-
-
-  explicit ``[link asio.reference.basic_serial_port.basic_serial_port.overload2 basic_serial_port]``(
-      asio::io_context & io_context,
-      const char * device);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.basic_serial_port.overload2 more...]]``
-
-  explicit ``[link asio.reference.basic_serial_port.basic_serial_port.overload3 basic_serial_port]``(
-      asio::io_context & io_context,
-      const std::string & device);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.basic_serial_port.overload3 more...]]``
-
-
-Construct a [link asio.reference.basic_serial_port `basic_serial_port`] on an existing native serial port. 
-
-
-  ``[link asio.reference.basic_serial_port.basic_serial_port.overload4 basic_serial_port]``(
-      asio::io_context & io_context,
-      const native_handle_type & native_serial_port);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.basic_serial_port.overload4 more...]]``
-
-
-Move-construct a [link asio.reference.basic_serial_port `basic_serial_port`] from another. 
-
-
-  ``[link asio.reference.basic_serial_port.basic_serial_port.overload5 basic_serial_port]``(
-      basic_serial_port && other);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.basic_serial_port.overload5 more...]]``
-
-
-[section:overload1 basic_serial_port::basic_serial_port (1 of 5 overloads)]
-
-
-Construct a [link asio.reference.basic_serial_port `basic_serial_port`] without opening it. 
-
-
-  basic_serial_port(
-      asio::io_context & io_context);
-
-
-This constructor creates a serial port without opening it.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::basic_serial_port (2 of 5 overloads)]
-
-
-Construct and open a [link asio.reference.basic_serial_port `basic_serial_port`]. 
-
-
-  basic_serial_port(
-      asio::io_context & io_context,
-      const char * device);
-
-
-This constructor creates and opens a serial port for the specified device name.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port.]]
-
-[[device][The platform-specific device name for this serial port. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_serial_port::basic_serial_port (3 of 5 overloads)]
-
-
-Construct and open a [link asio.reference.basic_serial_port `basic_serial_port`]. 
-
-
-  basic_serial_port(
-      asio::io_context & io_context,
-      const std::string & device);
-
-
-This constructor creates and opens a serial port for the specified device name.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port.]]
-
-[[device][The platform-specific device name for this serial port. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_serial_port::basic_serial_port (4 of 5 overloads)]
-
-
-Construct a [link asio.reference.basic_serial_port `basic_serial_port`] on an existing native serial port. 
-
-
-  basic_serial_port(
-      asio::io_context & io_context,
-      const native_handle_type & native_serial_port);
-
-
-This constructor creates a serial port object to hold an existing native serial port.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port.]]
-
-[[native_serial_port][A native serial port.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 basic_serial_port::basic_serial_port (5 of 5 overloads)]
-
-
-Move-construct a [link asio.reference.basic_serial_port `basic_serial_port`] from another. 
-
-
-  basic_serial_port(
-      basic_serial_port && other);
-
-
-This constructor moves a serial port from one object to another.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[other][The other [link asio.reference.basic_serial_port `basic_serial_port`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-      
-Following the move, the moved-from object is in the same state as if constructed using the `basic_serial_port(io_context&) constructor`. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:cancel basic_serial_port::cancel]
-
-[indexterm2 cancel..basic_serial_port] 
-Cancel all asynchronous operations associated with the serial port. 
-
-
-  void ``[link asio.reference.basic_serial_port.cancel.overload1 cancel]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.cancel.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_serial_port.cancel.overload2 cancel]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.cancel.overload2 more...]]``
-
-
-[section:overload1 basic_serial_port::cancel (1 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the serial port. 
-
-
-  void cancel();
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::cancel (2 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the serial port. 
-
-
-  asio::error_code cancel(
-      asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close basic_serial_port::close]
-
-[indexterm2 close..basic_serial_port] 
-Close the serial port. 
-
-
-  void ``[link asio.reference.basic_serial_port.close.overload1 close]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.close.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_serial_port.close.overload2 close]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.close.overload2 more...]]``
-
-
-[section:overload1 basic_serial_port::close (1 of 2 overloads)]
-
-
-Close the serial port. 
-
-
-  void close();
-
-
-This function is used to close the serial port. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::close (2 of 2 overloads)]
-
-
-Close the serial port. 
-
-
-  asio::error_code close(
-      asio::error_code & ec);
-
-
-This function is used to close the serial port. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type basic_serial_port::executor_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 executor_type..basic_serial_port] 
-The type of the executor associated with the object. 
-
-
-  typedef asio::io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.io_context__executor_type.context [*context]]]
-    [Obtain the underlying execution context. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.defer [*defer]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
-    [Inform the io_context that some work is no longer outstanding. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
-    [Inform the io_context that it has some outstanding work to do. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.post [*post]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
-    [Determine whether the io_context is running in the current thread. ]
-  ]
-  
-]
-
-[heading Friends]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
-    [Compare two executors for inequality. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
-    [Compare two executors for equality. ]
-  ]
-  
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_serial_port.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor basic_serial_port::get_executor]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..basic_serial_port] 
-Get the executor associated with the object. 
-
-
-  executor_type get_executor();
-
-
-
-[endsect]
-
-
-[section:get_implementation basic_serial_port::get_implementation]
-
-[indexterm2 get_implementation..basic_serial_port] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.basic_serial_port.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.basic_serial_port.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.get_implementation.overload2 more...]]``
-
-
-[section:overload1 basic_serial_port::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_io_context basic_serial_port::get_io_context]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..basic_serial_port] 
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
-
-
-  asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-      
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service basic_serial_port::get_io_service]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..basic_serial_port] 
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
-
-
-  asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-      
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-[section:get_option basic_serial_port::get_option]
-
-[indexterm2 get_option..basic_serial_port] 
-Get an option from the serial port. 
-
-
-  template<
-      typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
-  void ``[link asio.reference.basic_serial_port.get_option.overload1 get_option]``(
-      GettableSerialPortOption & option);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.get_option.overload1 more...]]``
-
-  template<
-      typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
-  asio::error_code ``[link asio.reference.basic_serial_port.get_option.overload2 get_option]``(
-      GettableSerialPortOption & option,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.get_option.overload2 more...]]``
-
-
-[section:overload1 basic_serial_port::get_option (1 of 2 overloads)]
-
-
-Get an option from the serial port. 
-
-
-  template<
-      typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
-  void get_option(
-      GettableSerialPortOption & option);
-
-
-This function is used to get the current value of an option on the serial port.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[option][The option value to be obtained from the serial port.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::get_option (2 of 2 overloads)]
-
-
-Get an option from the serial port. 
-
-
-  template<
-      typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
-  asio::error_code get_option(
-      GettableSerialPortOption & option,
-      asio::error_code & ec);
-
-
-This function is used to get the current value of an option on the serial port.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[option][The option value to be obtained from the serial port.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:get_service basic_serial_port::get_service]
-
-[indexterm2 get_service..basic_serial_port] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.basic_serial_port.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.basic_serial_port.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.get_service.overload2 more...]]``
-
-
-[section:overload1 basic_serial_port::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_serial_port::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..basic_serial_port] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_serial_port.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:is_open basic_serial_port::is_open]
-
-[indexterm2 is_open..basic_serial_port] 
-Determine whether the serial port is open. 
-
-
-  bool is_open() const;
-
-
-
-[endsect]
-
-
-[section:lowest_layer basic_serial_port::lowest_layer]
-
-[indexterm2 lowest_layer..basic_serial_port] 
-Get a reference to the lowest layer. 
-
-
-  lowest_layer_type & ``[link asio.reference.basic_serial_port.lowest_layer.overload1 lowest_layer]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer. 
-
-
-  const lowest_layer_type & ``[link asio.reference.basic_serial_port.lowest_layer.overload2 lowest_layer]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 basic_serial_port::lowest_layer (1 of 2 overloads)]
-
-
-Get a reference to the lowest layer. 
-
-
-  lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_serial_port `basic_serial_port`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-      
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::lowest_layer (2 of 2 overloads)]
-
-
-Get a const reference to the lowest layer. 
-
-
-  const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_serial_port `basic_serial_port`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-      
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type basic_serial_port::lowest_layer_type]
-
-[indexterm2 lowest_layer_type..basic_serial_port] 
-A [link asio.reference.basic_serial_port `basic_serial_port`] is always the lowest layer. 
-
-
-  typedef basic_serial_port< SerialPortService > lowest_layer_type;
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.basic_serial_port.executor_type [*executor_type]]]
-    [The type of the executor associated with the object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_serial_port.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_serial_port.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_serial_port is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_serial_port.native_handle_type [*native_handle_type]]]
-    [The native representation of a serial port. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_serial_port.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.basic_serial_port.assign [*assign]]]
-    [Assign an existing native serial port to the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.async_read_some [*async_read_some]]]
-    [Start an asynchronous read. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.async_write_some [*async_write_some]]]
-    [Start an asynchronous write. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.basic_serial_port [*basic_serial_port]]]
-    [Construct a basic_serial_port without opening it. 
-
-     Construct and open a basic_serial_port. 
-
-     Construct a basic_serial_port on an existing native serial port. 
-
-     Move-construct a basic_serial_port from another. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.close [*close]]]
-    [Close the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.get_executor [*get_executor]]]
-    [Get the executor associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.get_io_context [*get_io_context]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.get_option [*get_option]]]
-    [Get an option from the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.is_open [*is_open]]]
-    [Determine whether the serial port is open. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.lowest_layer [*lowest_layer]]]
-    [Get a reference to the lowest layer. 
-
-     Get a const reference to the lowest layer. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.native_handle [*native_handle]]]
-    [Get the native serial port representation. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.open [*open]]]
-    [Open the serial port using the specified device name. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.operator_eq_ [*operator=]]]
-    [Move-assign a basic_serial_port from another. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.read_some [*read_some]]]
-    [Read some data from the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.send_break [*send_break]]]
-    [Send a break sequence to the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.set_option [*set_option]]]
-    [Set an option on the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.write_some [*write_some]]]
-    [Write some data to the serial port. ]
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.basic_serial_port.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-]
-
-The [link asio.reference.basic_serial_port `basic_serial_port`] class template provides functionality that is common to all serial ports.
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe. 
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_serial_port.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:native_handle basic_serial_port::native_handle]
-
-[indexterm2 native_handle..basic_serial_port] 
-Get the native serial port representation. 
-
-
-  native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the serial port. This is intended to allow access to native serial port functionality that is not otherwise provided. 
-
-
-[endsect]
-
-
-
-[section:native_handle_type basic_serial_port::native_handle_type]
-
-[indexterm2 native_handle_type..basic_serial_port] 
-The native representation of a serial port. 
-
-
-  typedef SerialPortService::native_handle_type native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_serial_port.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:open basic_serial_port::open]
-
-[indexterm2 open..basic_serial_port] 
-Open the serial port using the specified device name. 
-
-
-  void ``[link asio.reference.basic_serial_port.open.overload1 open]``(
-      const std::string & device);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.open.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_serial_port.open.overload2 open]``(
-      const std::string & device,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.open.overload2 more...]]``
-
-
-[section:overload1 basic_serial_port::open (1 of 2 overloads)]
-
-
-Open the serial port using the specified device name. 
-
-
-  void open(
-      const std::string & device);
-
-
-This function opens the serial port for the specified device name.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[device][The platform-specific device name.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::open (2 of 2 overloads)]
-
-
-Open the serial port using the specified device name. 
-
-
-  asio::error_code open(
-      const std::string & device,
-      asio::error_code & ec);
-
-
-This function opens the serial port using the given platform-specific device name.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[device][The platform-specific device name.]]
-
-[[ec][Set the indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_eq_ basic_serial_port::operator=]
-
-[indexterm2 operator=..basic_serial_port] 
-Move-assign a [link asio.reference.basic_serial_port `basic_serial_port`] from another. 
-
-
-  basic_serial_port & operator=(
-      basic_serial_port && other);
-
-
-This assignment operator moves a serial port from one object to another.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[other][The other [link asio.reference.basic_serial_port `basic_serial_port`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-      
-Following the move, the moved-from object is in the same state as if constructed using the `basic_serial_port(io_context&) constructor`. 
-
-
-
-
-[endsect]
-
-
-[section:read_some basic_serial_port::read_some]
-
-[indexterm2 read_some..basic_serial_port] 
-Read some data from the serial port. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.basic_serial_port.read_some.overload1 read_some]``(
-      const MutableBufferSequence & buffers);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.read_some.overload1 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.basic_serial_port.read_some.overload2 read_some]``(
-      const MutableBufferSequence & buffers,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.read_some.overload2 more...]]``
-
-
-[section:overload1 basic_serial_port::read_some (1 of 2 overloads)]
-
-
-Read some data from the serial port. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t read_some(
-      const MutableBufferSequence & buffers);
-
-
-This function is used to read data from the serial port. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[buffers][One or more buffers into which the data will be read.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes read.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-      
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`]  function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-[heading Example]
-  
-To read into a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
-
-   serial_port.read_some(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`]  documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::read_some (2 of 2 overloads)]
-
-
-Read some data from the serial port. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t read_some(
-      const MutableBufferSequence & buffers,
-      asio::error_code & ec);
-
-
-This function is used to read data from the serial port. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[buffers][One or more buffers into which the data will be read.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes read. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-      
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`]  function if you need to ensure that the requested amount of data is read before the blocking operation completes. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:send_break basic_serial_port::send_break]
-
-[indexterm2 send_break..basic_serial_port] 
-Send a break sequence to the serial port. 
-
-
-  void ``[link asio.reference.basic_serial_port.send_break.overload1 send_break]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.send_break.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_serial_port.send_break.overload2 send_break]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.send_break.overload2 more...]]``
-
-
-[section:overload1 basic_serial_port::send_break (1 of 2 overloads)]
-
-
-Send a break sequence to the serial port. 
-
-
-  void send_break();
-
-
-This function causes a break sequence of platform-specific duration to be sent out the serial port.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::send_break (2 of 2 overloads)]
-
-
-Send a break sequence to the serial port. 
-
-
-  asio::error_code send_break(
-      asio::error_code & ec);
-
-
-This function causes a break sequence of platform-specific duration to be sent out the serial port.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:service_type basic_serial_port::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..basic_serial_port] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef SerialPortService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_serial_port.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:set_option basic_serial_port::set_option]
-
-[indexterm2 set_option..basic_serial_port] 
-Set an option on the serial port. 
-
-
-  template<
-      typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
-  void ``[link asio.reference.basic_serial_port.set_option.overload1 set_option]``(
-      const SettableSerialPortOption & option);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.set_option.overload1 more...]]``
-
-  template<
-      typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
-  asio::error_code ``[link asio.reference.basic_serial_port.set_option.overload2 set_option]``(
-      const SettableSerialPortOption & option,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.set_option.overload2 more...]]``
-
-
-[section:overload1 basic_serial_port::set_option (1 of 2 overloads)]
-
-
-Set an option on the serial port. 
-
-
-  template<
-      typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
-  void set_option(
-      const SettableSerialPortOption & option);
-
-
-This function is used to set an option on the serial port.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[option][The option value to be set on the serial port.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::set_option (2 of 2 overloads)]
-
-
-Set an option on the serial port. 
-
-
-  template<
-      typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
-  asio::error_code set_option(
-      const SettableSerialPortOption & option,
-      asio::error_code & ec);
-
-
-This function is used to set an option on the serial port.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[option][The option value to be set on the serial port.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:write_some basic_serial_port::write_some]
-
-[indexterm2 write_some..basic_serial_port] 
-Write some data to the serial port. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.basic_serial_port.write_some.overload1 write_some]``(
-      const ConstBufferSequence & buffers);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.write_some.overload1 more...]]``
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.basic_serial_port.write_some.overload2 write_some]``(
-      const ConstBufferSequence & buffers,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_serial_port.write_some.overload2 more...]]``
-
-
-[section:overload1 basic_serial_port::write_some (1 of 2 overloads)]
-
-
-Write some data to the serial port. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t write_some(
-      const ConstBufferSequence & buffers);
-
-
-This function is used to write data to the serial port. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[buffers][One or more data buffers to be written to the serial port.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes written.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-      
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`]  function if you need to ensure that all data is written before the blocking operation completes.
-
-
-[heading Example]
-  
-To write a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
-
-   serial_port.write_some(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`]  documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_serial_port::write_some (2 of 2 overloads)]
-
-
-Write some data to the serial port. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t write_some(
-      const ConstBufferSequence & buffers,
-      asio::error_code & ec);
-
-
-This function is used to write data to the serial port. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[buffers][One or more data buffers to be written to the serial port.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes written. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-      
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`]  function if you need to ensure that all data is written before the blocking operation completes. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:basic_signal_set basic_signal_set]
-
-
-Provides signal functionality. 
-
-
-  template<
-      typename ``[link asio.reference.SignalSetService SignalSetService]`` = signal_set_service>
-  class basic_signal_set :
-    public basic_io_object< SignalSetService >
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.basic_signal_set.executor_type [*executor_type]]]
-    [The type of the executor associated with the object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_signal_set.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_signal_set.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.basic_signal_set.add [*add]]]
-    [Add a signal to a signal_set. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.async_wait [*async_wait]]]
-    [Start an asynchronous operation to wait for a signal to be delivered. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.basic_signal_set [*basic_signal_set]]]
-    [Construct a signal set without adding any signals. 
-
-     Construct a signal set and add one signal. 
-
-     Construct a signal set and add two signals. 
-
-     Construct a signal set and add three signals. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.cancel [*cancel]]]
-    [Cancel all operations associated with the signal set. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.clear [*clear]]]
-    [Remove all signals from a signal_set. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.get_executor [*get_executor]]]
-    [Get the executor associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.get_io_context [*get_io_context]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.remove [*remove]]]
-    [Remove a signal from a signal_set. ]
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.basic_signal_set.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-]
-
-The [link asio.reference.basic_signal_set `basic_signal_set`] class template provides the ability to perform an asynchronous wait for one or more signals to occur.
-
-Most applications will use the [link asio.reference.signal_set `signal_set`] typedef.
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-[heading Example]
-  
-Performing an asynchronous wait: 
-
-   void handler(
-       const asio::error_code& error,
-       int signal_number)
-   {
-     if (!error)
-     {
-       // A signal occurred.
-     }
-   }
-
-   ...
-
-   // Construct a signal set registered for process termination.
-   asio::signal_set signals(io_context, SIGINT, SIGTERM);
-
-   // Start an asynchronous wait for one of the signals to occur.
-   signals.async_wait(handler);
-
-
-
-
-
-[heading Queueing of signal notifications]
-  
-
-
-If a signal is registered with a signal\_set, and the signal occurs when there are no waiting handlers, then the signal notification is queued. The next async\_wait operation on that signal\_set will dequeue the notification. If multiple notifications are queued, subsequent async\_wait operations dequeue them one at a time. Signal notifications are dequeued in order of ascending signal number.
-
-If a signal number is removed from a signal\_set (using the `remove` or `erase` member functions) then any queued notifications for that signal are discarded.
-
-
-[heading Multiple registration of signals]
-  
-
-
-The same signal number may be registered with different signal\_set objects. When the signal occurs, one handler is called for each signal\_set object.
-
-Note that multiple registration only works for signals that are registered using Asio. The application must not also register a signal handler using functions such as `signal()` or `sigaction()`.
-
-
-[heading Signal masking on POSIX platforms]
-  
-
-
-POSIX allows signals to be blocked using functions such as `sigprocmask()` and `pthread_sigmask()`. For signals to be delivered, programs must ensure that any signals registered using signal\_set objects are unblocked in at least one thread. 
-
-[heading Requirements]
-
-['Header: ][^asio/basic_signal_set.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:add basic_signal_set::add]
-
-[indexterm2 add..basic_signal_set] 
-Add a signal to a signal\_set. 
-
-
-  void ``[link asio.reference.basic_signal_set.add.overload1 add]``(
-      int signal_number);
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.add.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_signal_set.add.overload2 add]``(
-      int signal_number,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.add.overload2 more...]]``
-
-
-[section:overload1 basic_signal_set::add (1 of 2 overloads)]
-
-
-Add a signal to a signal\_set. 
-
-
-  void add(
-      int signal_number);
-
-
-This function adds the specified signal to the set. It has no effect if the signal is already in the set.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[signal_number][The signal to be added to the set.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_signal_set::add (2 of 2 overloads)]
-
-
-Add a signal to a signal\_set. 
-
-
-  asio::error_code add(
-      int signal_number,
-      asio::error_code & ec);
-
-
-This function adds the specified signal to the set. It has no effect if the signal is already in the set.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[signal_number][The signal to be added to the set.]]
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_wait basic_signal_set::async_wait]
-
-[indexterm2 async_wait..basic_signal_set] 
-Start an asynchronous operation to wait for a signal to be delivered. 
-
-
-  template<
-      typename ``[link asio.reference.SignalHandler SignalHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      SignalHandler && handler);
-
-
-This function may be used to initiate an asynchronous wait against the signal set. It always returns immediately.
-
-For each call to `async_wait()`, the supplied handler will be called exactly once. The handler will be called when:
-
-
-* One of the registered signals in the signal set occurs; or
-
-
-* The signal set was cancelled, in which case the handler is passed the error code `asio::error::operation_aborted`.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[handler][The handler to be called when the signal occurs. Copies will be made of the handler as required. The function signature of the handler must be: 
-``
-   void handler(
-     const asio::error_code& error, // Result of operation.
-     int signal_number // Indicates which signal occurred.
-   ); 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[section:basic_signal_set basic_signal_set::basic_signal_set]
-
-[indexterm2 basic_signal_set..basic_signal_set] 
-Construct a signal set without adding any signals. 
-
-
-  explicit ``[link asio.reference.basic_signal_set.basic_signal_set.overload1 basic_signal_set]``(
-      asio::io_context & io_context);
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.basic_signal_set.overload1 more...]]``
-
-
-Construct a signal set and add one signal. 
-
-
-  ``[link asio.reference.basic_signal_set.basic_signal_set.overload2 basic_signal_set]``(
-      asio::io_context & io_context,
-      int signal_number_1);
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.basic_signal_set.overload2 more...]]``
-
-
-Construct a signal set and add two signals. 
-
-
-  ``[link asio.reference.basic_signal_set.basic_signal_set.overload3 basic_signal_set]``(
-      asio::io_context & io_context,
-      int signal_number_1,
-      int signal_number_2);
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.basic_signal_set.overload3 more...]]``
-
-
-Construct a signal set and add three signals. 
-
-
-  ``[link asio.reference.basic_signal_set.basic_signal_set.overload4 basic_signal_set]``(
-      asio::io_context & io_context,
-      int signal_number_1,
-      int signal_number_2,
-      int signal_number_3);
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.basic_signal_set.overload4 more...]]``
-
-
-[section:overload1 basic_signal_set::basic_signal_set (1 of 4 overloads)]
-
-
-Construct a signal set without adding any signals. 
-
-
-  basic_signal_set(
-      asio::io_context & io_context);
-
-
-This constructor creates a signal set without registering for any signals.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the signal set will use to dispatch handlers for any asynchronous operations performed on the set. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_signal_set::basic_signal_set (2 of 4 overloads)]
-
-
-Construct a signal set and add one signal. 
-
-
-  basic_signal_set(
-      asio::io_context & io_context,
-      int signal_number_1);
-
-
-This constructor creates a signal set and registers for one signal.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the signal set will use to dispatch handlers for any asynchronous operations performed on the set.]]
-
-[[signal_number_1][The signal number to be added.]]
-
-]
-
-
-[heading Remarks]
-      
-This constructor is equivalent to performing: 
-
-   asio::signal_set signals(io_context);
-   signals.add(signal_number_1); 
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_signal_set::basic_signal_set (3 of 4 overloads)]
-
-
-Construct a signal set and add two signals. 
-
-
-  basic_signal_set(
-      asio::io_context & io_context,
-      int signal_number_1,
-      int signal_number_2);
-
-
-This constructor creates a signal set and registers for two signals.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the signal set will use to dispatch handlers for any asynchronous operations performed on the set.]]
-
-[[signal_number_1][The first signal number to be added.]]
-
-[[signal_number_2][The second signal number to be added.]]
-
-]
-
-
-[heading Remarks]
-      
-This constructor is equivalent to performing: 
-
-   asio::signal_set signals(io_context);
-   signals.add(signal_number_1);
-   signals.add(signal_number_2); 
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_signal_set::basic_signal_set (4 of 4 overloads)]
-
-
-Construct a signal set and add three signals. 
-
-
-  basic_signal_set(
-      asio::io_context & io_context,
-      int signal_number_1,
-      int signal_number_2,
-      int signal_number_3);
-
-
-This constructor creates a signal set and registers for three signals.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the signal set will use to dispatch handlers for any asynchronous operations performed on the set.]]
-
-[[signal_number_1][The first signal number to be added.]]
-
-[[signal_number_2][The second signal number to be added.]]
-
-[[signal_number_3][The third signal number to be added.]]
-
-]
-
-
-[heading Remarks]
-      
-This constructor is equivalent to performing: 
-
-   asio::signal_set signals(io_context);
-   signals.add(signal_number_1);
-   signals.add(signal_number_2);
-   signals.add(signal_number_3); 
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:cancel basic_signal_set::cancel]
-
-[indexterm2 cancel..basic_signal_set] 
-Cancel all operations associated with the signal set. 
-
-
-  void ``[link asio.reference.basic_signal_set.cancel.overload1 cancel]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.cancel.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_signal_set.cancel.overload2 cancel]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.cancel.overload2 more...]]``
-
-
-[section:overload1 basic_signal_set::cancel (1 of 2 overloads)]
-
-
-Cancel all operations associated with the signal set. 
-
-
-  void cancel();
-
-
-This function forces the completion of any pending asynchronous wait operations against the signal set. The handler for each cancelled operation will be invoked with the `asio::error::operation_aborted` error code.
-
-Cancellation does not alter the set of registered signals.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-      
-If a registered signal occurred before `cancel()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* have been queued for invocation in the near future.
-
-These handlers can no longer be cancelled, and therefore are passed an error code that indicates the successful completion of the wait operation. 
-
-
-[endsect]
-
-
-
-[section:overload2 basic_signal_set::cancel (2 of 2 overloads)]
-
-
-Cancel all operations associated with the signal set. 
-
-
-  asio::error_code cancel(
-      asio::error_code & ec);
-
-
-This function forces the completion of any pending asynchronous wait operations against the signal set. The handler for each cancelled operation will be invoked with the `asio::error::operation_aborted` error code.
-
-Cancellation does not alter the set of registered signals.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-      
-If a registered signal occurred before `cancel()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* have been queued for invocation in the near future.
-
-These handlers can no longer be cancelled, and therefore are passed an error code that indicates the successful completion of the wait operation. 
-
-
-[endsect]
-
-
-[endsect]
-
-[section:clear basic_signal_set::clear]
-
-[indexterm2 clear..basic_signal_set] 
-Remove all signals from a signal\_set. 
-
-
-  void ``[link asio.reference.basic_signal_set.clear.overload1 clear]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.clear.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_signal_set.clear.overload2 clear]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.clear.overload2 more...]]``
-
-
-[section:overload1 basic_signal_set::clear (1 of 2 overloads)]
-
-
-Remove all signals from a signal\_set. 
-
-
-  void clear();
-
-
-This function removes all signals from the set. It has no effect if the set is already empty.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-      
-Removes all queued notifications. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_signal_set::clear (2 of 2 overloads)]
-
-
-Remove all signals from a signal\_set. 
-
-
-  asio::error_code clear(
-      asio::error_code & ec);
-
-
-This function removes all signals from the set. It has no effect if the set is already empty.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-      
-Removes all queued notifications. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type basic_signal_set::executor_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 executor_type..basic_signal_set] 
-The type of the executor associated with the object. 
-
-
-  typedef asio::io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.io_context__executor_type.context [*context]]]
-    [Obtain the underlying execution context. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.defer [*defer]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
-    [Inform the io_context that some work is no longer outstanding. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
-    [Inform the io_context that it has some outstanding work to do. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.post [*post]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
-    [Determine whether the io_context is running in the current thread. ]
-  ]
-  
-]
-
-[heading Friends]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
-    [Compare two executors for inequality. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
-    [Compare two executors for equality. ]
-  ]
-  
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_signal_set.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor basic_signal_set::get_executor]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..basic_signal_set] 
-Get the executor associated with the object. 
-
-
-  executor_type get_executor();
-
-
-
-[endsect]
-
-
-[section:get_implementation basic_signal_set::get_implementation]
-
-[indexterm2 get_implementation..basic_signal_set] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.basic_signal_set.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.basic_signal_set.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.get_implementation.overload2 more...]]``
-
-
-[section:overload1 basic_signal_set::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_signal_set::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_io_context basic_signal_set::get_io_context]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..basic_signal_set] 
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
-
-
-  asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-      
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service basic_signal_set::get_io_service]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..basic_signal_set] 
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
-
-
-  asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-      
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-[section:get_service basic_signal_set::get_service]
-
-[indexterm2 get_service..basic_signal_set] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.basic_signal_set.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.basic_signal_set.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.get_service.overload2 more...]]``
-
-
-[section:overload1 basic_signal_set::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_signal_set::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_signal_set::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..basic_signal_set] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_signal_set.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:remove basic_signal_set::remove]
-
-[indexterm2 remove..basic_signal_set] 
-Remove a signal from a signal\_set. 
-
-
-  void ``[link asio.reference.basic_signal_set.remove.overload1 remove]``(
-      int signal_number);
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.remove.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_signal_set.remove.overload2 remove]``(
-      int signal_number,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_signal_set.remove.overload2 more...]]``
-
-
-[section:overload1 basic_signal_set::remove (1 of 2 overloads)]
-
-
-Remove a signal from a signal\_set. 
-
-
-  void remove(
-      int signal_number);
-
-
-This function removes the specified signal from the set. It has no effect if the signal is not in the set.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[signal_number][The signal to be removed from the set.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-      
-Removes any notifications that have been queued for the specified signal number. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_signal_set::remove (2 of 2 overloads)]
-
-
-Remove a signal from a signal\_set. 
-
-
-  asio::error_code remove(
-      int signal_number,
-      asio::error_code & ec);
-
-
-This function removes the specified signal from the set. It has no effect if the signal is not in the set.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[signal_number][The signal to be removed from the set.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-      
-Removes any notifications that have been queued for the specified signal number. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:service_type basic_signal_set::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..basic_signal_set] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef SignalSetService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_signal_set.hpp]
-
-['Convenience header: ][^asio.hpp]
+This function destroys the socket, cancelling any outstanding asynchronous operations associated with the socket as if by calling `cancel`. 
 
 
 [endsect]
@@ -26810,10 +23516,8 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``>
+      typename ``[link asio.reference.Protocol Protocol]``>
   class basic_socket :
-    public basic_io_object< SocketService >,
     public socket_base
 
 
@@ -26872,13 +23576,6 @@
 
   [
 
-    [[link asio.reference.basic_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -26956,13 +23653,6 @@
 
   [
 
-    [[link asio.reference.basic_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -27141,16 +23831,6 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.basic_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
     [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
     [Protected destructor to prevent deletion through this type. ]
   ]
@@ -27163,6 +23843,11 @@
 
   [
     [[link asio.reference.basic_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -27207,7 +23892,7 @@
 
 [section:assign basic_socket::assign]
 
-[indexterm2 assign..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.assign..assign..basic_socket] 
 Assign an existing native socket to the socket. 
 
 
@@ -27216,7 +23901,7 @@
       const native_handle_type & native_socket);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.assign.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket.assign.overload2 assign]``(
+  void ``[link asio.reference.basic_socket.assign.overload2 assign]``(
       const protocol_type & protocol,
       const native_handle_type & native_socket,
       asio::error_code & ec);
@@ -27245,7 +23930,7 @@
 Assign an existing native socket to the socket. 
 
 
-  asio::error_code assign(
+  void assign(
       const protocol_type & protocol,
       const native_handle_type & native_socket,
       asio::error_code & ec);
@@ -27260,13 +23945,13 @@
 
 [section:async_connect basic_socket::async_connect]
 
-[indexterm2 async_connect..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.async_connect..async_connect..basic_socket] 
 Start an asynchronous connect. 
 
 
   template<
       typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
       const endpoint_type & peer_endpoint,
       ConnectHandler && handler);
 
@@ -27325,13 +24010,13 @@
 
 [section:async_wait basic_socket::async_wait]
 
-[indexterm2 async_wait..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.async_wait..async_wait..basic_socket] 
 Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
   template<
       typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
       wait_type w,
       WaitHandler && handler);
 
@@ -27386,7 +24071,7 @@
 
 [section:at_mark basic_socket::at_mark]
 
-[indexterm2 at_mark..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.at_mark..at_mark..basic_socket] 
 Determine whether the socket is at the out-of-band data mark. 
 
 
@@ -27468,7 +24153,7 @@
 
 [section:available basic_socket::available]
 
-[indexterm2 available..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.available..available..basic_socket] 
 Determine the number of bytes available for reading. 
 
 
@@ -27550,7 +24235,7 @@
 
 [section:basic_socket basic_socket::basic_socket]
 
-[indexterm2 basic_socket..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.basic_socket..basic_socket..basic_socket] 
 Construct a [link asio.reference.basic_socket `basic_socket`] without opening it. 
 
 
@@ -27599,10 +24284,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketService SocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   ``[link asio.reference.basic_socket.basic_socket.overload6 basic_socket]``(
-      basic_socket< Protocol1, SocketService1 > && other,
+      basic_socket< Protocol1 > && other,
       typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.basic_socket.overload6 more...]]``
 
@@ -27806,10 +24490,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketService SocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   basic_socket(
-      basic_socket< Protocol1, SocketService1 > && other,
+      basic_socket< Protocol1 > && other,
       typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
 
 
@@ -27840,7 +24523,7 @@
 
 [section:bind basic_socket::bind]
 
-[indexterm2 bind..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.bind..bind..basic_socket] 
 Bind the socket to the given local endpoint. 
 
 
@@ -27848,7 +24531,7 @@
       const endpoint_type & endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.bind.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket.bind.overload2 bind]``(
+  void ``[link asio.reference.basic_socket.bind.overload2 bind]``(
       const endpoint_type & endpoint,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.bind.overload2 more...]]``
@@ -27912,7 +24595,7 @@
 Bind the socket to the given local endpoint. 
 
 
-  asio::error_code bind(
+  void bind(
       const endpoint_type & endpoint,
       asio::error_code & ec);
 
@@ -27963,7 +24646,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 broadcast..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.broadcast..broadcast..basic_socket] 
 Socket option to permit sending of broadcast messages. 
 
 
@@ -28017,7 +24700,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 bytes_readable..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.bytes_readable..bytes_readable..basic_socket] 
 IO control command to get the amount of data that can be read without blocking. 
 
 
@@ -28056,14 +24739,14 @@
 
 [section:cancel basic_socket::cancel]
 
-[indexterm2 cancel..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.cancel..cancel..basic_socket] 
 Cancel all asynchronous operations associated with the socket. 
 
 
   void ``[link asio.reference.basic_socket.cancel.overload1 cancel]``();
   ``  [''''&raquo;''' [link asio.reference.basic_socket.cancel.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket.cancel.overload2 cancel]``(
+  void ``[link asio.reference.basic_socket.cancel.overload2 cancel]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.cancel.overload2 more...]]``
 
@@ -28121,7 +24804,7 @@
 Cancel all asynchronous operations associated with the socket. 
 
 
-  asio::error_code cancel(
+  void cancel(
       asio::error_code & ec);
 
 
@@ -28166,14 +24849,14 @@
 
 [section:close basic_socket::close]
 
-[indexterm2 close..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.close..close..basic_socket] 
 Close the socket. 
 
 
   void ``[link asio.reference.basic_socket.close.overload1 close]``();
   ``  [''''&raquo;''' [link asio.reference.basic_socket.close.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket.close.overload2 close]``(
+  void ``[link asio.reference.basic_socket.close.overload2 close]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.close.overload2 more...]]``
 
@@ -28217,7 +24900,7 @@
 Close the socket. 
 
 
-  asio::error_code close(
+  void close(
       asio::error_code & ec);
 
 
@@ -28265,7 +24948,7 @@
 
 [section:connect basic_socket::connect]
 
-[indexterm2 connect..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.connect..connect..basic_socket] 
 Connect the socket to the specified endpoint. 
 
 
@@ -28273,7 +24956,7 @@
       const endpoint_type & peer_endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.connect.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket.connect.overload2 connect]``(
+  void ``[link asio.reference.basic_socket.connect.overload2 connect]``(
       const endpoint_type & peer_endpoint,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.connect.overload2 more...]]``
@@ -28339,7 +25022,7 @@
 Connect the socket to the specified endpoint. 
 
 
-  asio::error_code connect(
+  void connect(
       const endpoint_type & peer_endpoint,
       asio::error_code & ec);
 
@@ -28392,7 +25075,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 debug..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.debug..debug..basic_socket] 
 Socket option to enable socket-level debugging. 
 
 
@@ -28446,7 +25129,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 do_not_route..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.do_not_route..do_not_route..basic_socket] 
 Socket option to prevent routing, use local interfaces only. 
 
 
@@ -28500,7 +25183,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 enable_connection_aborted..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.enable_connection_aborted..enable_connection_aborted..basic_socket] 
 Socket option to report aborted connections on accept. 
 
 
@@ -28551,7 +25234,7 @@
 
 [section:endpoint_type basic_socket::endpoint_type]
 
-[indexterm2 endpoint_type..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.endpoint_type..endpoint_type..basic_socket] 
 The endpoint type. 
 
 
@@ -28572,14 +25255,11 @@
 
 [section:executor_type basic_socket::executor_type]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 executor_type..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.executor_type..executor_type..basic_socket] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -28653,10 +25333,7 @@
 
 [section:get_executor basic_socket::get_executor]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.get_executor..get_executor..basic_socket] 
 Get the executor associated with the object. 
 
 
@@ -28667,61 +25344,10 @@
 [endsect]
 
 
-[section:get_implementation basic_socket::get_implementation]
-
-[indexterm2 get_implementation..basic_socket] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.basic_socket.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_socket.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.basic_socket.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket.get_implementation.overload2 more...]]``
-
-
-[section:overload1 basic_socket::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
 
 [section:get_io_context basic_socket::get_io_context]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.get_io_context..get_io_context..basic_socket] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -28744,10 +25370,7 @@
 
 [section:get_io_service basic_socket::get_io_service]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.get_io_service..get_io_service..basic_socket] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -28769,7 +25392,7 @@
 
 [section:get_option basic_socket::get_option]
 
-[indexterm2 get_option..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.get_option..get_option..basic_socket] 
 Get an option from the socket. 
 
 
@@ -28781,7 +25404,7 @@
 
   template<
       typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code ``[link asio.reference.basic_socket.get_option.overload2 get_option]``(
+  void ``[link asio.reference.basic_socket.get_option.overload2 get_option]``(
       GettableSocketOption & option,
       asio::error_code & ec) const;
   ``  [''''&raquo;''' [link asio.reference.basic_socket.get_option.overload2 more...]]``
@@ -28851,7 +25474,7 @@
 
   template<
       typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code get_option(
+  void get_option(
       GettableSocketOption & option,
       asio::error_code & ec) const;
 
@@ -28898,81 +25521,9 @@
 
 [endsect]
 
-[section:get_service basic_socket::get_service]
-
-[indexterm2 get_service..basic_socket] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.basic_socket.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_socket.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.basic_socket.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket.get_service.overload2 more...]]``
-
-
-[section:overload1 basic_socket::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_socket::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..basic_socket] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:io_control basic_socket::io_control]
 
-[indexterm2 io_control..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.io_control..io_control..basic_socket] 
 Perform an IO control command on the socket. 
 
 
@@ -28984,7 +25535,7 @@
 
   template<
       typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code ``[link asio.reference.basic_socket.io_control.overload2 io_control]``(
+  void ``[link asio.reference.basic_socket.io_control.overload2 io_control]``(
       IoControlCommand & command,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.io_control.overload2 more...]]``
@@ -29054,7 +25605,7 @@
 
   template<
       typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
+  void io_control(
       IoControlCommand & command,
       asio::error_code & ec);
 
@@ -29104,7 +25655,7 @@
 
 [section:is_open basic_socket::is_open]
 
-[indexterm2 is_open..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.is_open..is_open..basic_socket] 
 Determine whether the socket is open. 
 
 
@@ -29121,7 +25672,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 keep_alive..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.keep_alive..keep_alive..basic_socket] 
 Socket option to send keep-alives. 
 
 
@@ -29175,7 +25726,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 linger..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.linger..linger..basic_socket] 
 Socket option to specify whether the socket lingers on close if unsent data is present. 
 
 
@@ -29226,7 +25777,7 @@
 
 [section:local_endpoint basic_socket::local_endpoint]
 
-[indexterm2 local_endpoint..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.local_endpoint..local_endpoint..basic_socket] 
 Get the local endpoint of the socket. 
 
 
@@ -29337,7 +25888,7 @@
 
 [section:lowest_layer basic_socket::lowest_layer]
 
-[indexterm2 lowest_layer..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.lowest_layer..lowest_layer..basic_socket] 
 Get a reference to the lowest layer. 
 
 
@@ -29402,11 +25953,11 @@
 
 [section:lowest_layer_type basic_socket::lowest_layer_type]
 
-[indexterm2 lowest_layer_type..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.lowest_layer_type..lowest_layer_type..basic_socket] 
 A [link asio.reference.basic_socket `basic_socket`] is always the lowest layer. 
 
 
-  typedef basic_socket< Protocol, SocketService > lowest_layer_type;
+  typedef basic_socket< Protocol > lowest_layer_type;
 
 
 [heading Types]
@@ -29464,13 +26015,6 @@
 
   [
 
-    [[link asio.reference.basic_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -29548,13 +26092,6 @@
 
   [
 
-    [[link asio.reference.basic_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -29733,16 +26270,6 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.basic_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
     [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
     [Protected destructor to prevent deletion through this type. ]
   ]
@@ -29755,6 +26282,11 @@
 
   [
     [[link asio.reference.basic_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -29808,8 +26340,8 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 max_connections..basic_socket] 
-The maximum length of the queue of pending incoming connections. 
+[indexterm2 asio.indexterm.basic_socket.max_connections..max_connections..basic_socket] 
+(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections. 
 
 
   static const int max_connections = implementation_defined;
@@ -29820,12 +26352,29 @@
 
 
 
+[section:max_listen_connections basic_socket::max_listen_connections]
+
+
+['Inherited from socket_base.]
+
+[indexterm2 asio.indexterm.basic_socket.max_listen_connections..max_listen_connections..basic_socket] 
+The maximum length of the queue of pending incoming connections. 
+
+
+  static const int max_listen_connections = implementation_defined;
+
+
+
+[endsect]
+
+
+
 [section:message_do_not_route basic_socket::message_do_not_route]
 
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_do_not_route..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.message_do_not_route..message_do_not_route..basic_socket] 
 Specify that the data should not be subject to routing. 
 
 
@@ -29842,7 +26391,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_end_of_record..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.message_end_of_record..message_end_of_record..basic_socket] 
 Specifies that the data marks the end of a record. 
 
 
@@ -29859,7 +26408,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_flags..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.message_flags..message_flags..basic_socket] 
 Bitmask type for flags that can be passed to send and receive operations. 
 
 
@@ -29883,7 +26432,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_out_of_band..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.message_out_of_band..message_out_of_band..basic_socket] 
 Process out-of-band data. 
 
 
@@ -29900,7 +26449,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_peek..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.message_peek..message_peek..basic_socket] 
 Peek at incoming data without removing it from the input queue. 
 
 
@@ -29914,7 +26463,7 @@
 
 [section:native_handle basic_socket::native_handle]
 
-[indexterm2 native_handle..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.native_handle..native_handle..basic_socket] 
 Get the native socket representation. 
 
 
@@ -29930,11 +26479,11 @@
 
 [section:native_handle_type basic_socket::native_handle_type]
 
-[indexterm2 native_handle_type..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.native_handle_type..native_handle_type..basic_socket] 
 The native representation of a socket. 
 
 
-  typedef SocketService::native_handle_type native_handle_type;
+  typedef implementation_defined native_handle_type;
 
 
 
@@ -29950,7 +26499,7 @@
 
 [section:native_non_blocking basic_socket::native_non_blocking]
 
-[indexterm2 native_non_blocking..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.native_non_blocking..native_non_blocking..basic_socket] 
 Gets the non-blocking mode of the native socket implementation. 
 
 
@@ -29965,7 +26514,7 @@
       bool mode);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.native_non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket.native_non_blocking.overload3 native_non_blocking]``(
+  void ``[link asio.reference.basic_socket.native_non_blocking.overload3 native_non_blocking]``(
       bool mode,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.native_non_blocking.overload3 more...]]``
@@ -30190,7 +26739,7 @@
 Sets the non-blocking mode of the native socket implementation. 
 
 
-  asio::error_code native_non_blocking(
+  void native_non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -30292,7 +26841,7 @@
 
 [section:non_blocking basic_socket::non_blocking]
 
-[indexterm2 non_blocking..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.non_blocking..non_blocking..basic_socket] 
 Gets the non-blocking mode of the socket. 
 
 
@@ -30307,7 +26856,7 @@
       bool mode);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket.non_blocking.overload3 non_blocking]``(
+  void ``[link asio.reference.basic_socket.non_blocking.overload3 non_blocking]``(
       bool mode,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.non_blocking.overload3 more...]]``
@@ -30387,7 +26936,7 @@
 Sets the non-blocking mode of the socket. 
 
 
-  asio::error_code non_blocking(
+  void non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -30419,7 +26968,7 @@
 
 [section:open basic_socket::open]
 
-[indexterm2 open..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.open..open..basic_socket] 
 Open the socket using the specified protocol. 
 
 
@@ -30427,7 +26976,7 @@
       const protocol_type & protocol = protocol_type());
   ``  [''''&raquo;''' [link asio.reference.basic_socket.open.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket.open.overload2 open]``(
+  void ``[link asio.reference.basic_socket.open.overload2 open]``(
       const protocol_type & protocol,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.open.overload2 more...]]``
@@ -30489,7 +27038,7 @@
 Open the socket using the specified protocol. 
 
 
-  asio::error_code open(
+  void open(
       const protocol_type & protocol,
       asio::error_code & ec);
 
@@ -30534,7 +27083,7 @@
 
 [section:operator_eq_ basic_socket::operator=]
 
-[indexterm2 operator=..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.operator_eq_..operator=..basic_socket] 
 Move-assign a [link asio.reference.basic_socket `basic_socket`] from another. 
 
 
@@ -30547,10 +27096,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketService SocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   enable_if< is_convertible< Protocol1, Protocol >::value, basic_socket >::type & ``[link asio.reference.basic_socket.operator_eq_.overload2 operator=]``(
-      basic_socket< Protocol1, SocketService1 > && other);
+      basic_socket< Protocol1 > && other);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.operator_eq_.overload2 more...]]``
 
 
@@ -30595,10 +27143,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketService SocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   enable_if< is_convertible< Protocol1, Protocol >::value, basic_socket >::type & operator=(
-      basic_socket< Protocol1, SocketService1 > && other);
+      basic_socket< Protocol1 > && other);
 
 
 This assignment operator moves a socket from one object to another.
@@ -30629,7 +27176,7 @@
 
 [section:protocol_type basic_socket::protocol_type]
 
-[indexterm2 protocol_type..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.protocol_type..protocol_type..basic_socket] 
 The protocol type. 
 
 
@@ -30653,7 +27200,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 receive_buffer_size..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.receive_buffer_size..receive_buffer_size..basic_socket] 
 Socket option for the receive buffer size of a socket. 
 
 
@@ -30707,7 +27254,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 receive_low_watermark..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.receive_low_watermark..receive_low_watermark..basic_socket] 
 Socket option for the receive low watermark. 
 
 
@@ -30757,7 +27304,7 @@
 
 [section:remote_endpoint basic_socket::remote_endpoint]
 
-[indexterm2 remote_endpoint..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.remote_endpoint..remote_endpoint..basic_socket] 
 Get the remote endpoint of the socket. 
 
 
@@ -30872,7 +27419,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 reuse_address..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.reuse_address..reuse_address..basic_socket] 
 Socket option to allow the socket to be bound to an address that is already in use. 
 
 
@@ -30926,7 +27473,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 send_buffer_size..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.send_buffer_size..send_buffer_size..basic_socket] 
 Socket option for the send buffer size of a socket. 
 
 
@@ -30980,7 +27527,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 send_low_watermark..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.send_low_watermark..send_low_watermark..basic_socket] 
 Socket option for the send low watermark. 
 
 
@@ -31028,33 +27575,9 @@
 [endsect]
 
 
-
-[section:service_type basic_socket::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..basic_socket] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef SocketService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:set_option basic_socket::set_option]
 
-[indexterm2 set_option..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.set_option..set_option..basic_socket] 
 Set an option on the socket. 
 
 
@@ -31066,7 +27589,7 @@
 
   template<
       typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code ``[link asio.reference.basic_socket.set_option.overload2 set_option]``(
+  void ``[link asio.reference.basic_socket.set_option.overload2 set_option]``(
       const SettableSocketOption & option,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.set_option.overload2 more...]]``
@@ -31135,7 +27658,7 @@
 
   template<
       typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code set_option(
+  void set_option(
       const SettableSocketOption & option,
       asio::error_code & ec);
 
@@ -31183,7 +27706,7 @@
 
 [section:shutdown basic_socket::shutdown]
 
-[indexterm2 shutdown..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.shutdown..shutdown..basic_socket] 
 Disable sends or receives on the socket. 
 
 
@@ -31191,7 +27714,7 @@
       shutdown_type what);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.shutdown.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket.shutdown.overload2 shutdown]``(
+  void ``[link asio.reference.basic_socket.shutdown.overload2 shutdown]``(
       shutdown_type what,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.shutdown.overload2 more...]]``
@@ -31254,7 +27777,7 @@
 Disable sends or receives on the socket. 
 
 
-  asio::error_code shutdown(
+  void shutdown(
       shutdown_type what,
       asio::error_code & ec);
 
@@ -31304,15 +27827,15 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 shutdown_type..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.shutdown_type..shutdown_type..basic_socket] 
 Different ways a socket may be shutdown. 
 
 
   enum shutdown_type
 
-[indexterm2 shutdown_receive..basic_socket]
-[indexterm2 shutdown_send..basic_socket]
-[indexterm2 shutdown_both..basic_socket]
+[indexterm2 asio.indexterm.basic_socket.shutdown_type.shutdown_receive..shutdown_receive..basic_socket]
+[indexterm2 asio.indexterm.basic_socket.shutdown_type.shutdown_send..shutdown_send..basic_socket]
+[indexterm2 asio.indexterm.basic_socket.shutdown_type.shutdown_both..shutdown_both..basic_socket]
 
 [heading Values]
 [variablelist
@@ -31341,7 +27864,7 @@
 
 [section:wait basic_socket::wait]
 
-[indexterm2 wait..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.wait..wait..basic_socket] 
 Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
@@ -31349,7 +27872,7 @@
       wait_type w);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.wait.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket.wait.overload2 wait]``(
+  void ``[link asio.reference.basic_socket.wait.overload2 wait]``(
       wait_type w,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket.wait.overload2 more...]]``
@@ -31402,7 +27925,7 @@
 Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
-  asio::error_code wait(
+  void wait(
       wait_type w,
       asio::error_code & ec);
 
@@ -31448,15 +27971,15 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 wait_type..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket.wait_type..wait_type..basic_socket] 
 Wait types. 
 
 
   enum wait_type
 
-[indexterm2 wait_read..basic_socket]
-[indexterm2 wait_write..basic_socket]
-[indexterm2 wait_error..basic_socket]
+[indexterm2 asio.indexterm.basic_socket.wait_type.wait_read..wait_read..basic_socket]
+[indexterm2 asio.indexterm.basic_socket.wait_type.wait_write..wait_write..basic_socket]
+[indexterm2 asio.indexterm.basic_socket.wait_type.wait_error..wait_error..basic_socket]
 
 [heading Values]
 [variablelist
@@ -31488,13 +28011,15 @@
 
 [section:_basic_socket basic_socket::~basic_socket]
 
-[indexterm2 ~basic_socket..basic_socket] 
+[indexterm2 asio.indexterm.basic_socket._basic_socket..~basic_socket..basic_socket] 
 Protected destructor to prevent deletion through this type. 
 
 
   ~basic_socket();
 
 
+This function destroys the socket, cancelling any outstanding asynchronous operations associated with the socket as if by calling `cancel`. 
+
 
 [endsect]
 
@@ -31509,10 +28034,8 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketAcceptorService SocketAcceptorService]`` = socket_acceptor_service<Protocol>>
+      typename ``[link asio.reference.Protocol Protocol]``>
   class basic_socket_acceptor :
-    public basic_io_object< SocketAcceptorService >,
     public socket_base
 
 
@@ -31571,13 +28094,6 @@
 
   [
 
-    [[link asio.reference.basic_socket_acceptor.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket_acceptor.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -31648,13 +28164,6 @@
 
   [
 
-    [[link asio.reference.basic_socket_acceptor.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket_acceptor.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -31806,20 +28315,9 @@
     [Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_socket_acceptor.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_acceptor.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_socket_acceptor._basic_socket_acceptor [*~basic_socket_acceptor]]]
+    [Destroys the acceptor. ]
   ]
   
 ]
@@ -31830,6 +28328,11 @@
 
   [
     [[link asio.reference.basic_socket_acceptor.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_socket_acceptor.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -31889,23 +28392,21 @@
 
 [section:accept basic_socket_acceptor::accept]
 
-[indexterm2 accept..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.accept..accept..basic_socket_acceptor] 
 Accept a new connection. 
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketService SocketService]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   void ``[link asio.reference.basic_socket_acceptor.accept.overload1 accept]``(
-      basic_socket< Protocol1, SocketService > & peer,
+      basic_socket< Protocol1 > & peer,
       typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload1 more...]]``
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketService SocketService]``>
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.accept.overload2 accept]``(
-      basic_socket< Protocol1, SocketService > & peer,
+      typename ``[link asio.reference.Protocol Protocol1]``>
+  void ``[link asio.reference.basic_socket_acceptor.accept.overload2 accept]``(
+      basic_socket< Protocol1 > & peer,
       asio::error_code & ec,
       typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload2 more...]]``
@@ -31914,17 +28415,13 @@
 Accept a new connection and obtain the endpoint of the peer. 
 
 
-  template<
-      typename ``[link asio.reference.SocketService SocketService]``>
   void ``[link asio.reference.basic_socket_acceptor.accept.overload3 accept]``(
-      basic_socket< protocol_type, SocketService > & peer,
+      basic_socket< protocol_type > & peer,
       endpoint_type & peer_endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload3 more...]]``
 
-  template<
-      typename ``[link asio.reference.SocketService SocketService]``>
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.accept.overload4 accept]``(
-      basic_socket< protocol_type, SocketService > & peer,
+  void ``[link asio.reference.basic_socket_acceptor.accept.overload4 accept]``(
+      basic_socket< protocol_type > & peer,
       endpoint_type & peer_endpoint,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload4 more...]]``
@@ -31973,10 +28470,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketService SocketService]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   void accept(
-      basic_socket< Protocol1, SocketService > & peer,
+      basic_socket< Protocol1 > & peer,
       typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type *  = 0);
 
 
@@ -32029,10 +28525,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketService SocketService]``>
-  asio::error_code accept(
-      basic_socket< Protocol1, SocketService > & peer,
+      typename ``[link asio.reference.Protocol Protocol1]``>
+  void accept(
+      basic_socket< Protocol1 > & peer,
       asio::error_code & ec,
       typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type *  = 0);
 
@@ -32082,10 +28577,8 @@
 Accept a new connection and obtain the endpoint of the peer. 
 
 
-  template<
-      typename ``[link asio.reference.SocketService SocketService]``>
   void accept(
-      basic_socket< protocol_type, SocketService > & peer,
+      basic_socket< protocol_type > & peer,
       endpoint_type & peer_endpoint);
 
 
@@ -32140,10 +28633,8 @@
 Accept a new connection and obtain the endpoint of the peer. 
 
 
-  template<
-      typename ``[link asio.reference.SocketService SocketService]``>
-  asio::error_code accept(
-      basic_socket< protocol_type, SocketService > & peer,
+  void accept(
+      basic_socket< protocol_type > & peer,
       endpoint_type & peer_endpoint,
       asio::error_code & ec);
 
@@ -32643,7 +29134,7 @@
 
 [section:assign basic_socket_acceptor::assign]
 
-[indexterm2 assign..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.assign..assign..basic_socket_acceptor] 
 Assigns an existing native acceptor to the acceptor. 
 
 
@@ -32652,7 +29143,7 @@
       const native_handle_type & native_acceptor);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.assign.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.assign.overload2 assign]``(
+  void ``[link asio.reference.basic_socket_acceptor.assign.overload2 assign]``(
       const protocol_type & protocol,
       const native_handle_type & native_acceptor,
       asio::error_code & ec);
@@ -32681,7 +29172,7 @@
 Assigns an existing native acceptor to the acceptor. 
 
 
-  asio::error_code assign(
+  void assign(
       const protocol_type & protocol,
       const native_handle_type & native_acceptor,
       asio::error_code & ec);
@@ -32695,52 +29186,50 @@
 
 [section:async_accept basic_socket_acceptor::async_accept]
 
-[indexterm2 async_accept..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.async_accept..async_accept..basic_socket_acceptor] 
 Start an asynchronous accept. 
 
 
   template<
       typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.AcceptHandler AcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload1 async_accept]``(
-      basic_socket< Protocol1, SocketService > & peer,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload1 async_accept]``(
+      basic_socket< Protocol1 > & peer,
       AcceptHandler && handler,
       typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.async_accept.overload1 more...]]``
 
   template<
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.AcceptHandler AcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload2 async_accept]``(
-      basic_socket< protocol_type, SocketService > & peer,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload2 async_accept]``(
+      basic_socket< protocol_type > & peer,
       endpoint_type & peer_endpoint,
       AcceptHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.async_accept.overload2 more...]]``
 
   template<
       typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload3 async_accept]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload3 async_accept]``(
       MoveAcceptHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.async_accept.overload3 more...]]``
 
   template<
       typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload4 async_accept]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload4 async_accept]``(
       asio::io_context & io_context,
       MoveAcceptHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.async_accept.overload4 more...]]``
 
   template<
       typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload5 async_accept]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload5 async_accept]``(
       endpoint_type & peer_endpoint,
       MoveAcceptHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.async_accept.overload5 more...]]``
 
   template<
       typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload6 async_accept]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload6 async_accept]``(
       asio::io_context & io_context,
       endpoint_type & peer_endpoint,
       MoveAcceptHandler && handler);
@@ -32755,10 +29244,9 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.AcceptHandler AcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_accept(
-      basic_socket< Protocol1, SocketService > & peer,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_accept(
+      basic_socket< Protocol1 > & peer,
       AcceptHandler && handler,
       typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type *  = 0);
 
@@ -32820,10 +29308,9 @@
 
 
   template<
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.AcceptHandler AcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_accept(
-      basic_socket< protocol_type, SocketService > & peer,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_accept(
+      basic_socket< protocol_type > & peer,
       endpoint_type & peer_endpoint,
       AcceptHandler && handler);
 
@@ -32865,7 +29352,7 @@
 
   template<
       typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_accept(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_accept(
       MoveAcceptHandler && handler);
 
 
@@ -32928,7 +29415,7 @@
 
   template<
       typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_accept(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_accept(
       asio::io_context & io_context,
       MoveAcceptHandler && handler);
 
@@ -32994,7 +29481,7 @@
 
   template<
       typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_accept(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_accept(
       endpoint_type & peer_endpoint,
       MoveAcceptHandler && handler);
 
@@ -33061,7 +29548,7 @@
 
   template<
       typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_accept(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_accept(
       asio::io_context & io_context,
       endpoint_type & peer_endpoint,
       MoveAcceptHandler && handler);
@@ -33127,13 +29614,13 @@
 
 [section:async_wait basic_socket_acceptor::async_wait]
 
-[indexterm2 async_wait..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.async_wait..async_wait..basic_socket_acceptor] 
 Asynchronously wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. 
 
 
   template<
       typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
       wait_type w,
       WaitHandler && handler);
 
@@ -33190,7 +29677,7 @@
 
 [section:basic_socket_acceptor basic_socket_acceptor::basic_socket_acceptor]
 
-[indexterm2 basic_socket_acceptor..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.basic_socket_acceptor..basic_socket_acceptor..basic_socket_acceptor] 
 Construct an acceptor without opening it. 
 
 
@@ -33240,10 +29727,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketAcceptorService SocketAcceptorService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   ``[link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload6 basic_socket_acceptor]``(
-      basic_socket_acceptor< Protocol1, SocketAcceptorService1 > && other,
+      basic_socket_acceptor< Protocol1 > && other,
       typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload6 more...]]``
 
@@ -33465,10 +29951,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketAcceptorService SocketAcceptorService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   basic_socket_acceptor(
-      basic_socket_acceptor< Protocol1, SocketAcceptorService1 > && other,
+      basic_socket_acceptor< Protocol1 > && other,
       typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
 
 
@@ -33499,7 +29984,7 @@
 
 [section:bind basic_socket_acceptor::bind]
 
-[indexterm2 bind..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.bind..bind..basic_socket_acceptor] 
 Bind the acceptor to the given local endpoint. 
 
 
@@ -33507,7 +29992,7 @@
       const endpoint_type & endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.bind.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.bind.overload2 bind]``(
+  void ``[link asio.reference.basic_socket_acceptor.bind.overload2 bind]``(
       const endpoint_type & endpoint,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.bind.overload2 more...]]``
@@ -33571,7 +30056,7 @@
 Bind the acceptor to the given local endpoint. 
 
 
-  asio::error_code bind(
+  void bind(
       const endpoint_type & endpoint,
       asio::error_code & ec);
 
@@ -33622,7 +30107,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 broadcast..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.broadcast..broadcast..basic_socket_acceptor] 
 Socket option to permit sending of broadcast messages. 
 
 
@@ -33676,7 +30161,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 bytes_readable..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.bytes_readable..bytes_readable..basic_socket_acceptor] 
 IO control command to get the amount of data that can be read without blocking. 
 
 
@@ -33715,14 +30200,14 @@
 
 [section:cancel basic_socket_acceptor::cancel]
 
-[indexterm2 cancel..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.cancel..cancel..basic_socket_acceptor] 
 Cancel all asynchronous operations associated with the acceptor. 
 
 
   void ``[link asio.reference.basic_socket_acceptor.cancel.overload1 cancel]``();
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.cancel.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.cancel.overload2 cancel]``(
+  void ``[link asio.reference.basic_socket_acceptor.cancel.overload2 cancel]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.cancel.overload2 more...]]``
 
@@ -33761,7 +30246,7 @@
 Cancel all asynchronous operations associated with the acceptor. 
 
 
-  asio::error_code cancel(
+  void cancel(
       asio::error_code & ec);
 
 
@@ -33787,14 +30272,14 @@
 
 [section:close basic_socket_acceptor::close]
 
-[indexterm2 close..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.close..close..basic_socket_acceptor] 
 Close the acceptor. 
 
 
   void ``[link asio.reference.basic_socket_acceptor.close.overload1 close]``();
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.close.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.close.overload2 close]``(
+  void ``[link asio.reference.basic_socket_acceptor.close.overload2 close]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.close.overload2 more...]]``
 
@@ -33835,7 +30320,7 @@
 Close the acceptor. 
 
 
-  asio::error_code close(
+  void close(
       asio::error_code & ec);
 
 
@@ -33884,7 +30369,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 debug..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.debug..debug..basic_socket_acceptor] 
 Socket option to enable socket-level debugging. 
 
 
@@ -33938,7 +30423,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 do_not_route..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.do_not_route..do_not_route..basic_socket_acceptor] 
 Socket option to prevent routing, use local interfaces only. 
 
 
@@ -33992,7 +30477,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 enable_connection_aborted..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.enable_connection_aborted..enable_connection_aborted..basic_socket_acceptor] 
 Socket option to report aborted connections on accept. 
 
 
@@ -34043,7 +30528,7 @@
 
 [section:endpoint_type basic_socket_acceptor::endpoint_type]
 
-[indexterm2 endpoint_type..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.endpoint_type..endpoint_type..basic_socket_acceptor] 
 The endpoint type. 
 
 
@@ -34064,14 +30549,11 @@
 
 [section:executor_type basic_socket_acceptor::executor_type]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 executor_type..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.executor_type..executor_type..basic_socket_acceptor] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -34145,10 +30627,7 @@
 
 [section:get_executor basic_socket_acceptor::get_executor]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.get_executor..get_executor..basic_socket_acceptor] 
 Get the executor associated with the object. 
 
 
@@ -34159,61 +30638,10 @@
 [endsect]
 
 
-[section:get_implementation basic_socket_acceptor::get_implementation]
-
-[indexterm2 get_implementation..basic_socket_acceptor] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.basic_socket_acceptor.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.basic_socket_acceptor.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.get_implementation.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
 
 [section:get_io_context basic_socket_acceptor::get_io_context]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.get_io_context..get_io_context..basic_socket_acceptor] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -34236,10 +30664,7 @@
 
 [section:get_io_service basic_socket_acceptor::get_io_service]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.get_io_service..get_io_service..basic_socket_acceptor] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -34261,7 +30686,7 @@
 
 [section:get_option basic_socket_acceptor::get_option]
 
-[indexterm2 get_option..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.get_option..get_option..basic_socket_acceptor] 
 Get an option from the acceptor. 
 
 
@@ -34273,7 +30698,7 @@
 
   template<
       typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.get_option.overload2 get_option]``(
+  void ``[link asio.reference.basic_socket_acceptor.get_option.overload2 get_option]``(
       GettableSocketOption & option,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.get_option.overload2 more...]]``
@@ -34343,7 +30768,7 @@
 
   template<
       typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code get_option(
+  void get_option(
       GettableSocketOption & option,
       asio::error_code & ec);
 
@@ -34390,81 +30815,9 @@
 
 [endsect]
 
-[section:get_service basic_socket_acceptor::get_service]
-
-[indexterm2 get_service..basic_socket_acceptor] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.basic_socket_acceptor.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.basic_socket_acceptor.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.get_service.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_socket_acceptor::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..basic_socket_acceptor] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:io_control basic_socket_acceptor::io_control]
 
-[indexterm2 io_control..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.io_control..io_control..basic_socket_acceptor] 
 Perform an IO control command on the acceptor. 
 
 
@@ -34476,7 +30829,7 @@
 
   template<
       typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.io_control.overload2 io_control]``(
+  void ``[link asio.reference.basic_socket_acceptor.io_control.overload2 io_control]``(
       IoControlCommand & command,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.io_control.overload2 more...]]``
@@ -34545,7 +30898,7 @@
 
   template<
       typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
+  void io_control(
       IoControlCommand & command,
       asio::error_code & ec);
 
@@ -34594,7 +30947,7 @@
 
 [section:is_open basic_socket_acceptor::is_open]
 
-[indexterm2 is_open..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.is_open..is_open..basic_socket_acceptor] 
 Determine whether the acceptor is open. 
 
 
@@ -34611,7 +30964,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 keep_alive..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.keep_alive..keep_alive..basic_socket_acceptor] 
 Socket option to send keep-alives. 
 
 
@@ -34665,7 +31018,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 linger..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.linger..linger..basic_socket_acceptor] 
 Socket option to specify whether the socket lingers on close if unsent data is present. 
 
 
@@ -34716,15 +31069,15 @@
 
 [section:listen basic_socket_acceptor::listen]
 
-[indexterm2 listen..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.listen..listen..basic_socket_acceptor] 
 Place the acceptor into the state where it will listen for new connections. 
 
 
   void ``[link asio.reference.basic_socket_acceptor.listen.overload1 listen]``(
-      int backlog = socket_base::max_connections);
+      int backlog = socket_base::max_listen_connections);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.listen.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.listen.overload2 listen]``(
+  void ``[link asio.reference.basic_socket_acceptor.listen.overload2 listen]``(
       int backlog,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.listen.overload2 more...]]``
@@ -34737,7 +31090,7 @@
 
 
   void listen(
-      int backlog = socket_base::max_connections);
+      int backlog = socket_base::max_listen_connections);
 
 
 This function puts the socket acceptor into the state where it may accept new connections.
@@ -34775,7 +31128,7 @@
 Place the acceptor into the state where it will listen for new connections. 
 
 
-  asio::error_code listen(
+  void listen(
       int backlog,
       asio::error_code & ec);
 
@@ -34802,7 +31155,7 @@
    asio::ip::tcp::acceptor acceptor(io_context);
    ...
    asio::error_code ec;
-   acceptor.listen(asio::socket_base::max_connections, ec);
+   acceptor.listen(asio::socket_base::max_listen_connections, ec);
    if (ec)
    {
      // An error occurred.
@@ -34821,7 +31174,7 @@
 
 [section:local_endpoint basic_socket_acceptor::local_endpoint]
 
-[indexterm2 local_endpoint..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.local_endpoint..local_endpoint..basic_socket_acceptor] 
 Get the local endpoint of the acceptor. 
 
 
@@ -34936,8 +31289,8 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 max_connections..basic_socket_acceptor] 
-The maximum length of the queue of pending incoming connections. 
+[indexterm2 asio.indexterm.basic_socket_acceptor.max_connections..max_connections..basic_socket_acceptor] 
+(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections. 
 
 
   static const int max_connections = implementation_defined;
@@ -34948,12 +31301,29 @@
 
 
 
+[section:max_listen_connections basic_socket_acceptor::max_listen_connections]
+
+
+['Inherited from socket_base.]
+
+[indexterm2 asio.indexterm.basic_socket_acceptor.max_listen_connections..max_listen_connections..basic_socket_acceptor] 
+The maximum length of the queue of pending incoming connections. 
+
+
+  static const int max_listen_connections = implementation_defined;
+
+
+
+[endsect]
+
+
+
 [section:message_do_not_route basic_socket_acceptor::message_do_not_route]
 
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_do_not_route..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.message_do_not_route..message_do_not_route..basic_socket_acceptor] 
 Specify that the data should not be subject to routing. 
 
 
@@ -34970,7 +31340,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_end_of_record..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.message_end_of_record..message_end_of_record..basic_socket_acceptor] 
 Specifies that the data marks the end of a record. 
 
 
@@ -34987,7 +31357,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_flags..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.message_flags..message_flags..basic_socket_acceptor] 
 Bitmask type for flags that can be passed to send and receive operations. 
 
 
@@ -35011,7 +31381,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_out_of_band..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.message_out_of_band..message_out_of_band..basic_socket_acceptor] 
 Process out-of-band data. 
 
 
@@ -35028,7 +31398,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_peek..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.message_peek..message_peek..basic_socket_acceptor] 
 Peek at incoming data without removing it from the input queue. 
 
 
@@ -35042,7 +31412,7 @@
 
 [section:native_handle basic_socket_acceptor::native_handle]
 
-[indexterm2 native_handle..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.native_handle..native_handle..basic_socket_acceptor] 
 Get the native acceptor representation. 
 
 
@@ -35058,11 +31428,11 @@
 
 [section:native_handle_type basic_socket_acceptor::native_handle_type]
 
-[indexterm2 native_handle_type..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.native_handle_type..native_handle_type..basic_socket_acceptor] 
 The native representation of an acceptor. 
 
 
-  typedef SocketAcceptorService::native_handle_type native_handle_type;
+  typedef implementation_defined native_handle_type;
 
 
 
@@ -35078,7 +31448,7 @@
 
 [section:native_non_blocking basic_socket_acceptor::native_non_blocking]
 
-[indexterm2 native_non_blocking..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.native_non_blocking..native_non_blocking..basic_socket_acceptor] 
 Gets the non-blocking mode of the native acceptor implementation. 
 
 
@@ -35093,7 +31463,7 @@
       bool mode);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.native_non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.native_non_blocking.overload3 native_non_blocking]``(
+  void ``[link asio.reference.basic_socket_acceptor.native_non_blocking.overload3 native_non_blocking]``(
       bool mode,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.native_non_blocking.overload3 more...]]``
@@ -35172,7 +31542,7 @@
 Sets the non-blocking mode of the native acceptor implementation. 
 
 
-  asio::error_code native_non_blocking(
+  void native_non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -35201,7 +31571,7 @@
 
 [section:non_blocking basic_socket_acceptor::non_blocking]
 
-[indexterm2 non_blocking..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.non_blocking..non_blocking..basic_socket_acceptor] 
 Gets the non-blocking mode of the acceptor. 
 
 
@@ -35216,7 +31586,7 @@
       bool mode);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.non_blocking.overload3 non_blocking]``(
+  void ``[link asio.reference.basic_socket_acceptor.non_blocking.overload3 non_blocking]``(
       bool mode,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.non_blocking.overload3 more...]]``
@@ -35296,7 +31666,7 @@
 Sets the non-blocking mode of the acceptor. 
 
 
-  asio::error_code non_blocking(
+  void non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -35328,7 +31698,7 @@
 
 [section:open basic_socket_acceptor::open]
 
-[indexterm2 open..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.open..open..basic_socket_acceptor] 
 Open the acceptor using the specified protocol. 
 
 
@@ -35336,7 +31706,7 @@
       const protocol_type & protocol = protocol_type());
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.open.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.open.overload2 open]``(
+  void ``[link asio.reference.basic_socket_acceptor.open.overload2 open]``(
       const protocol_type & protocol,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.open.overload2 more...]]``
@@ -35398,7 +31768,7 @@
 Open the acceptor using the specified protocol. 
 
 
-  asio::error_code open(
+  void open(
       const protocol_type & protocol,
       asio::error_code & ec);
 
@@ -35443,7 +31813,7 @@
 
 [section:operator_eq_ basic_socket_acceptor::operator=]
 
-[indexterm2 operator=..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.operator_eq_..operator=..basic_socket_acceptor] 
 Move-assign a [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] from another. 
 
 
@@ -35456,10 +31826,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketAcceptorService SocketAcceptorService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   enable_if< is_convertible< Protocol1, Protocol >::value, basic_socket_acceptor >::type & ``[link asio.reference.basic_socket_acceptor.operator_eq_.overload2 operator=]``(
-      basic_socket_acceptor< Protocol1, SocketAcceptorService1 > && other);
+      basic_socket_acceptor< Protocol1 > && other);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.operator_eq_.overload2 more...]]``
 
 
@@ -35504,10 +31873,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketAcceptorService SocketAcceptorService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   enable_if< is_convertible< Protocol1, Protocol >::value, basic_socket_acceptor >::type & operator=(
-      basic_socket_acceptor< Protocol1, SocketAcceptorService1 > && other);
+      basic_socket_acceptor< Protocol1 > && other);
 
 
 This assignment operator moves an acceptor from one object to another.
@@ -35538,7 +31906,7 @@
 
 [section:protocol_type basic_socket_acceptor::protocol_type]
 
-[indexterm2 protocol_type..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.protocol_type..protocol_type..basic_socket_acceptor] 
 The protocol type. 
 
 
@@ -35562,7 +31930,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 receive_buffer_size..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.receive_buffer_size..receive_buffer_size..basic_socket_acceptor] 
 Socket option for the receive buffer size of a socket. 
 
 
@@ -35616,7 +31984,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 receive_low_watermark..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.receive_low_watermark..receive_low_watermark..basic_socket_acceptor] 
 Socket option for the receive low watermark. 
 
 
@@ -35670,7 +32038,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 reuse_address..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.reuse_address..reuse_address..basic_socket_acceptor] 
 Socket option to allow the socket to be bound to an address that is already in use. 
 
 
@@ -35724,7 +32092,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 send_buffer_size..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.send_buffer_size..send_buffer_size..basic_socket_acceptor] 
 Socket option for the send buffer size of a socket. 
 
 
@@ -35778,7 +32146,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 send_low_watermark..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.send_low_watermark..send_low_watermark..basic_socket_acceptor] 
 Socket option for the send low watermark. 
 
 
@@ -35826,33 +32194,9 @@
 [endsect]
 
 
-
-[section:service_type basic_socket_acceptor::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..basic_socket_acceptor] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef SocketAcceptorService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:set_option basic_socket_acceptor::set_option]
 
-[indexterm2 set_option..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.set_option..set_option..basic_socket_acceptor] 
 Set an option on the acceptor. 
 
 
@@ -35864,7 +32208,7 @@
 
   template<
       typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.set_option.overload2 set_option]``(
+  void ``[link asio.reference.basic_socket_acceptor.set_option.overload2 set_option]``(
       const SettableSocketOption & option,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.set_option.overload2 more...]]``
@@ -35933,7 +32277,7 @@
 
   template<
       typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code set_option(
+  void set_option(
       const SettableSocketOption & option,
       asio::error_code & ec);
 
@@ -35985,15 +32329,15 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 shutdown_type..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.shutdown_type..shutdown_type..basic_socket_acceptor] 
 Different ways a socket may be shutdown. 
 
 
   enum shutdown_type
 
-[indexterm2 shutdown_receive..basic_socket_acceptor]
-[indexterm2 shutdown_send..basic_socket_acceptor]
-[indexterm2 shutdown_both..basic_socket_acceptor]
+[indexterm2 asio.indexterm.basic_socket_acceptor.shutdown_type.shutdown_receive..shutdown_receive..basic_socket_acceptor]
+[indexterm2 asio.indexterm.basic_socket_acceptor.shutdown_type.shutdown_send..shutdown_send..basic_socket_acceptor]
+[indexterm2 asio.indexterm.basic_socket_acceptor.shutdown_type.shutdown_both..shutdown_both..basic_socket_acceptor]
 
 [heading Values]
 [variablelist
@@ -36022,7 +32366,7 @@
 
 [section:wait basic_socket_acceptor::wait]
 
-[indexterm2 wait..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.wait..wait..basic_socket_acceptor] 
 Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. 
 
 
@@ -36030,7 +32374,7 @@
       wait_type w);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.wait.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket_acceptor.wait.overload2 wait]``(
+  void ``[link asio.reference.basic_socket_acceptor.wait.overload2 wait]``(
       wait_type w,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_acceptor.wait.overload2 more...]]``
@@ -36083,7 +32427,7 @@
 Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. 
 
 
-  asio::error_code wait(
+  void wait(
       wait_type w,
       asio::error_code & ec);
 
@@ -36129,15 +32473,15 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 wait_type..basic_socket_acceptor] 
+[indexterm2 asio.indexterm.basic_socket_acceptor.wait_type..wait_type..basic_socket_acceptor] 
 Wait types. 
 
 
   enum wait_type
 
-[indexterm2 wait_read..basic_socket_acceptor]
-[indexterm2 wait_write..basic_socket_acceptor]
-[indexterm2 wait_error..basic_socket_acceptor]
+[indexterm2 asio.indexterm.basic_socket_acceptor.wait_type.wait_read..wait_read..basic_socket_acceptor]
+[indexterm2 asio.indexterm.basic_socket_acceptor.wait_type.wait_write..wait_write..basic_socket_acceptor]
+[indexterm2 asio.indexterm.basic_socket_acceptor.wait_type.wait_error..wait_error..basic_socket_acceptor]
 
 [heading Values]
 [variablelist
@@ -36167,6 +32511,22 @@
 
 
 
+[section:_basic_socket_acceptor basic_socket_acceptor::~basic_socket_acceptor]
+
+[indexterm2 asio.indexterm.basic_socket_acceptor._basic_socket_acceptor..~basic_socket_acceptor..basic_socket_acceptor] 
+Destroys the acceptor. 
+
+
+  ~basic_socket_acceptor();
+
+
+This function destroys the acceptor, cancelling any outstanding asynchronous operations associated with the acceptor as if by calling `cancel`. 
+
+
+[endsect]
+
+
+
 [endsect]
 
 [section:basic_socket_iostream basic_socket_iostream]
@@ -36177,10 +32537,8 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.StreamSocketService StreamSocketService]`` = stream_socket_service<Protocol>,
-      typename Time = boost::posix_time::ptime,
-      typename ``[link asio.reference.TimeTraits TimeTraits]`` = asio::time_traits<Time>,
-      typename ``[link asio.reference.TimerService TimerService]`` = deadline_timer_service<Time, TimeTraits>>
+      typename Clock = chrono::steady_clock,
+      typename ``[link asio.reference.WaitTraits WaitTraits]`` = wait_traits<Clock>>
   class basic_socket_iostream
 
 
@@ -36190,6 +32548,13 @@
 
   [
 
+    [[link asio.reference.basic_socket_iostream.clock_type [*clock_type]]]
+    [The clock type. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.basic_socket_iostream.duration [*duration]]]
     [The duration type. ]
   
@@ -36211,6 +32576,13 @@
 
   [
 
+    [[link asio.reference.basic_socket_iostream.protocol_type [*protocol_type]]]
+    [The protocol type. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.basic_socket_iostream.time_point [*time_point]]]
     [The time type. ]
   
@@ -36233,6 +32605,10 @@
     [[link asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
     [Construct a basic_socket_iostream without establishing a connection. 
 
+     Construct a basic_socket_iostream from the supplied socket. 
+
+     Move-construct a basic_socket_iostream from another. 
+
      Establish a connection to an endpoint corresponding to a resolver query. ]
   ]
   
@@ -36276,10 +32652,20 @@
   ]
   
   [
+    [[link asio.reference.basic_socket_iostream.operator_eq_ [*operator=]]]
+    [Move-assign a basic_socket_iostream from another. ]
+  ]
+  
+  [
     [[link asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
     [Return a pointer to the underlying streambuf. ]
   ]
   
+  [
+    [[link asio.reference.basic_socket_iostream.socket [*socket]]]
+    [Get a reference to the underlying socket. ]
+  ]
+  
 ]
 
 [heading Requirements]
@@ -36290,7 +32676,7 @@
 
 [section:basic_socket_iostream basic_socket_iostream::basic_socket_iostream]
 
-[indexterm2 basic_socket_iostream..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.basic_socket_iostream..basic_socket_iostream..basic_socket_iostream] 
 Construct a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] without establishing a connection. 
 
 
@@ -36298,6 +32684,22 @@
   ``  [''''&raquo;''' [link asio.reference.basic_socket_iostream.basic_socket_iostream.overload1 more...]]``
 
 
+Construct a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] from the supplied socket. 
+
+
+  explicit ``[link asio.reference.basic_socket_iostream.basic_socket_iostream.overload2 basic_socket_iostream]``(
+      basic_stream_socket< protocol_type > s);
+  ``  [''''&raquo;''' [link asio.reference.basic_socket_iostream.basic_socket_iostream.overload2 more...]]``
+
+
+Move-construct a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] from another. 
+
+
+  ``[link asio.reference.basic_socket_iostream.basic_socket_iostream.overload3 basic_socket_iostream]``(
+      basic_socket_iostream && other);
+  ``  [''''&raquo;''' [link asio.reference.basic_socket_iostream.basic_socket_iostream.overload3 more...]]``
+
+
 Establish a connection to an endpoint corresponding to a resolver query. 
 
 
@@ -36305,14 +32707,14 @@
       typename T1,
       ... ,
       typename TN>
-  explicit ``[link asio.reference.basic_socket_iostream.basic_socket_iostream.overload2 basic_socket_iostream]``(
+  explicit ``[link asio.reference.basic_socket_iostream.basic_socket_iostream.overload4 basic_socket_iostream]``(
       T1 t1,
       ... ,
       TN tn);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_iostream.basic_socket_iostream.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.basic_socket_iostream.basic_socket_iostream.overload4 more...]]``
 
 
-[section:overload1 basic_socket_iostream::basic_socket_iostream (1 of 2 overloads)]
+[section:overload1 basic_socket_iostream::basic_socket_iostream (1 of 4 overloads)]
 
 
 Construct a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] without establishing a connection. 
@@ -36326,7 +32728,37 @@
 
 
 
-[section:overload2 basic_socket_iostream::basic_socket_iostream (2 of 2 overloads)]
+[section:overload2 basic_socket_iostream::basic_socket_iostream (2 of 4 overloads)]
+
+
+Construct a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] from the supplied socket. 
+
+
+  basic_socket_iostream(
+      basic_stream_socket< protocol_type > s);
+
+
+
+[endsect]
+
+
+
+[section:overload3 basic_socket_iostream::basic_socket_iostream (3 of 4 overloads)]
+
+
+Move-construct a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] from another. 
+
+
+  basic_socket_iostream(
+      basic_socket_iostream && other);
+
+
+
+[endsect]
+
+
+
+[section:overload4 basic_socket_iostream::basic_socket_iostream (4 of 4 overloads)]
 
 
 Establish a connection to an endpoint corresponding to a resolver query. 
@@ -36351,9 +32783,30 @@
 [endsect]
 
 
+[section:clock_type basic_socket_iostream::clock_type]
+
+[indexterm2 asio.indexterm.basic_socket_iostream.clock_type..clock_type..basic_socket_iostream] 
+The clock type. 
+
+
+  typedef Clock clock_type;
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/basic_socket_iostream.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
+
 [section:close basic_socket_iostream::close]
 
-[indexterm2 close..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.close..close..basic_socket_iostream] 
 Close the connection. 
 
 
@@ -36367,7 +32820,7 @@
 
 [section:connect basic_socket_iostream::connect]
 
-[indexterm2 connect..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.connect..connect..basic_socket_iostream] 
 Establish a connection to an endpoint corresponding to a resolver query. 
 
 
@@ -36390,11 +32843,11 @@
 
 [section:duration basic_socket_iostream::duration]
 
-[indexterm2 duration..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.duration..duration..basic_socket_iostream] 
 The duration type. 
 
 
-  typedef TimeTraits::duration duration;
+  typedef WaitTraits::duration duration;
 
 
 
@@ -36411,11 +32864,11 @@
 
 [section:duration_type basic_socket_iostream::duration_type]
 
-[indexterm2 duration_type..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.duration_type..duration_type..basic_socket_iostream] 
 (Deprecated: Use duration.) The duration type. 
 
 
-  typedef TimeTraits::duration_type duration_type;
+  typedef WaitTraits::duration_type duration_type;
 
 
 
@@ -36432,7 +32885,7 @@
 
 [section:endpoint_type basic_socket_iostream::endpoint_type]
 
-[indexterm2 endpoint_type..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.endpoint_type..endpoint_type..basic_socket_iostream] 
 The endpoint type. 
 
 
@@ -36453,7 +32906,7 @@
 
 [section:error basic_socket_iostream::error]
 
-[indexterm2 error..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.error..error..basic_socket_iostream] 
 Get the last error associated with the stream. 
 
 
@@ -36488,7 +32941,7 @@
 
 [section:expires_after basic_socket_iostream::expires_after]
 
-[indexterm2 expires_after..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.expires_after..expires_after..basic_socket_iostream] 
 Set the stream's expiry time relative to now. 
 
 
@@ -36516,7 +32969,7 @@
 
 [section:expires_at basic_socket_iostream::expires_at]
 
-[indexterm2 expires_at..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.expires_at..expires_at..basic_socket_iostream] 
 (Deprecated: Use `expiry()`.) Get the stream's expiry time as an absolute time. 
 
 
@@ -36585,7 +33038,7 @@
 
 [section:expires_from_now basic_socket_iostream::expires_from_now]
 
-[indexterm2 expires_from_now..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.expires_from_now..expires_from_now..basic_socket_iostream] 
 (Deprecated: Use `expiry()`.) Get the stream's expiry time relative to now. 
 
 
@@ -36655,7 +33108,7 @@
 
 [section:expiry basic_socket_iostream::expiry]
 
-[indexterm2 expiry..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.expiry..expiry..basic_socket_iostream] 
 Get the stream's expiry time as an absolute time. 
 
 
@@ -36674,13 +33127,63 @@
 
 
 
+[section:operator_eq_ basic_socket_iostream::operator=]
+
+[indexterm2 asio.indexterm.basic_socket_iostream.operator_eq_..operator=..basic_socket_iostream] 
+Move-assign a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] from another. 
+
+
+  basic_socket_iostream & operator=(
+      basic_socket_iostream && other);
+
+
+
+[endsect]
+
+
+
+[section:protocol_type basic_socket_iostream::protocol_type]
+
+[indexterm2 asio.indexterm.basic_socket_iostream.protocol_type..protocol_type..basic_socket_iostream] 
+The protocol type. 
+
+
+  typedef Protocol protocol_type;
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/basic_socket_iostream.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
+
 [section:rdbuf basic_socket_iostream::rdbuf]
 
-[indexterm2 rdbuf..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.rdbuf..rdbuf..basic_socket_iostream] 
 Return a pointer to the underlying streambuf. 
 
 
-  basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService > * rdbuf() const;
+  basic_socket_streambuf< Protocol, Clock, WaitTraits > * rdbuf() const;
+
+
+
+[endsect]
+
+
+
+[section:socket basic_socket_iostream::socket]
+
+[indexterm2 asio.indexterm.basic_socket_iostream.socket..socket..basic_socket_iostream] 
+Get a reference to the underlying socket. 
+
+
+  basic_socket< Protocol > & socket();
 
 
 
@@ -36690,11 +33193,11 @@
 
 [section:time_point basic_socket_iostream::time_point]
 
-[indexterm2 time_point..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.time_point..time_point..basic_socket_iostream] 
 The time type. 
 
 
-  typedef TimeTraits::time_point time_point;
+  typedef WaitTraits::time_point time_point;
 
 
 
@@ -36711,11 +33214,11 @@
 
 [section:time_type basic_socket_iostream::time_type]
 
-[indexterm2 time_type..basic_socket_iostream] 
+[indexterm2 asio.indexterm.basic_socket_iostream.time_type..time_type..basic_socket_iostream] 
 (Deprecated: Use time\_point.) The time type. 
 
 
-  typedef TimeTraits::time_type time_type;
+  typedef WaitTraits::time_type time_type;
 
 
 
@@ -36740,12 +33243,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.StreamSocketService StreamSocketService]`` = stream_socket_service<Protocol>,
-      typename Time = boost::posix_time::ptime,
-      typename ``[link asio.reference.TimeTraits TimeTraits]`` = asio::time_traits<Time>,
-      typename ``[link asio.reference.TimerService TimerService]`` = deadline_timer_service<Time, TimeTraits>>
+      typename Clock = chrono::steady_clock,
+      typename ``[link asio.reference.WaitTraits WaitTraits]`` = wait_traits<Clock>>
   class basic_socket_streambuf :
-    public basic_socket< Protocol, StreamSocketService >
+    basic_socket< Protocol >
 
 
 [heading Types]
@@ -36754,29 +33255,8 @@
 
   [
 
-    [[link asio.reference.basic_socket_streambuf.broadcast [*broadcast]]]
-    [Socket option to permit sending of broadcast messages. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.bytes_readable [*bytes_readable]]]
-    [IO control command to get the amount of data that can be read without blocking. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.debug [*debug]]]
-    [Socket option to enable socket-level debugging. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.do_not_route [*do_not_route]]]
-    [Socket option to prevent routing, use local interfaces only. ]
+    [[link asio.reference.basic_socket_streambuf.clock_type [*clock_type]]]
+    [The clock type. ]
   
   ]
 
@@ -36796,13 +33276,6 @@
 
   [
 
-    [[link asio.reference.basic_socket_streambuf.enable_connection_aborted [*enable_connection_aborted]]]
-    [Socket option to report aborted connections on accept. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket_streambuf.endpoint_type [*endpoint_type]]]
     [The endpoint type. ]
   
@@ -36810,55 +33283,6 @@
 
   [
 
-    [[link asio.reference.basic_socket_streambuf.executor_type [*executor_type]]]
-    [The type of the executor associated with the object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.keep_alive [*keep_alive]]]
-    [Socket option to send keep-alives. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.linger [*linger]]]
-    [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_socket is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.message_flags [*message_flags]]]
-    [Bitmask type for flags that can be passed to send and receive operations. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.native_handle_type [*native_handle_type]]]
-    [The native representation of a socket. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket_streambuf.protocol_type [*protocol_type]]]
     [The protocol type. ]
   
@@ -36866,55 +33290,6 @@
 
   [
 
-    [[link asio.reference.basic_socket_streambuf.receive_buffer_size [*receive_buffer_size]]]
-    [Socket option for the receive buffer size of a socket. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.receive_low_watermark [*receive_low_watermark]]]
-    [Socket option for the receive low watermark. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.reuse_address [*reuse_address]]]
-    [Socket option to allow the socket to be bound to an address that is already in use. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.send_buffer_size [*send_buffer_size]]]
-    [Socket option for the send buffer size of a socket. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.send_low_watermark [*send_low_watermark]]]
-    [Socket option for the send low watermark. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket_streambuf.shutdown_type [*shutdown_type]]]
-    [Different ways a socket may be shutdown. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket_streambuf.time_point [*time_point]]]
     [The time type. ]
   
@@ -36927,13 +33302,6 @@
   
   ]
 
-  [
-
-    [[link asio.reference.basic_socket_streambuf.wait_type [*wait_type]]]
-    [Wait types. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -36941,57 +33309,27 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.basic_socket_streambuf.assign [*assign]]]
-    [Assign an existing native socket to the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.async_connect [*async_connect]]]
-    [Start an asynchronous connect. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.async_wait [*async_wait]]]
-    [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.at_mark [*at_mark]]]
-    [Determine whether the socket is at the out-of-band data mark. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.available [*available]]]
-    [Determine the number of bytes available for reading. ]
-  ]
-  
-  [
     [[link asio.reference.basic_socket_streambuf.basic_socket_streambuf [*basic_socket_streambuf]]]
-    [Construct a basic_socket_streambuf without establishing a connection. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.bind [*bind]]]
-    [Bind the socket to the given local endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the socket. ]
+    [Construct a basic_socket_streambuf without establishing a connection. 
+
+     Construct a basic_socket_streambuf from the supplied socket. 
+
+     Move-construct a basic_socket_streambuf from another. ]
   ]
   
   [
     [[link asio.reference.basic_socket_streambuf.close [*close]]]
-    [Close the connection. 
-
-     Close the socket. ]
+    [Close the connection. ]
   ]
   
   [
     [[link asio.reference.basic_socket_streambuf.connect [*connect]]]
-    [Establish a connection. 
-
-     Connect the socket to the specified endpoint. ]
+    [Establish a connection. ]
+  ]
+  
+  [
+    [[link asio.reference.basic_socket_streambuf.error [*error]]]
+    [Get the last error associated with the stream buffer. ]
   ]
   
   [
@@ -37003,9 +33341,7 @@
     [[link asio.reference.basic_socket_streambuf.expires_at [*expires_at]]]
     [(Deprecated: Use expiry().) Get the stream buffer's expiry time as an absolute time. 
 
-     Set the stream buffer's expiry time as an absolute time. 
-
-     Set the stream buffer's expiry time relative to now. ]
+     Set the stream buffer's expiry time as an absolute time. ]
   ]
   
   [
@@ -37021,94 +33357,18 @@
   ]
   
   [
-    [[link asio.reference.basic_socket_streambuf.get_executor [*get_executor]]]
-    [Get the executor associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.get_io_context [*get_io_context]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.get_option [*get_option]]]
-    [Get an option from the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.io_control [*io_control]]]
-    [Perform an IO control command on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.is_open [*is_open]]]
-    [Determine whether the socket is open. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.local_endpoint [*local_endpoint]]]
-    [Get the local endpoint of the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.lowest_layer [*lowest_layer]]]
-    [Get a reference to the lowest layer. 
-
-     Get a const reference to the lowest layer. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.native_handle [*native_handle]]]
-    [Get the native socket representation. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.native_non_blocking [*native_non_blocking]]]
-    [Gets the non-blocking mode of the native socket implementation. 
-
-     Sets the non-blocking mode of the native socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.non_blocking [*non_blocking]]]
-    [Gets the non-blocking mode of the socket. 
-
-     Sets the non-blocking mode of the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.open [*open]]]
-    [Open the socket using the specified protocol. ]
+    [[link asio.reference.basic_socket_streambuf.operator_eq_ [*operator=]]]
+    [Move-assign a basic_socket_streambuf from another. ]
   ]
   
   [
     [[link asio.reference.basic_socket_streambuf.puberror [*puberror]]]
-    [Get the last error associated with the stream buffer. ]
+    [(Deprecated: Use error().) Get the last error associated with the stream buffer. ]
   ]
   
   [
-    [[link asio.reference.basic_socket_streambuf.remote_endpoint [*remote_endpoint]]]
-    [Get the remote endpoint of the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.set_option [*set_option]]]
-    [Set an option on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.shutdown [*shutdown]]]
-    [Disable sends or receives on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.wait [*wait]]]
-    [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
+    [[link asio.reference.basic_socket_streambuf.socket [*socket]]]
+    [Get a reference to the underlying socket. ]
   ]
   
   [
@@ -37123,21 +33383,6 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.basic_socket_streambuf.error [*error]]]
-    [Get the last error associated with the stream buffer. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
     [[link asio.reference.basic_socket_streambuf.overflow [*overflow]]]
     []
   ]
@@ -37159,430 +33404,41 @@
   
 ]
 
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.basic_socket_streambuf.max_connections [*max_connections]]]
-    [The maximum length of the queue of pending incoming connections. ]
-  ]
-
-  [
-    [[link asio.reference.basic_socket_streambuf.message_do_not_route [*message_do_not_route]]]
-    [Specify that the data should not be subject to routing. ]
-  ]
-
-  [
-    [[link asio.reference.basic_socket_streambuf.message_end_of_record [*message_end_of_record]]]
-    [Specifies that the data marks the end of a record. ]
-  ]
-
-  [
-    [[link asio.reference.basic_socket_streambuf.message_out_of_band [*message_out_of_band]]]
-    [Process out-of-band data. ]
-  ]
-
-  [
-    [[link asio.reference.basic_socket_streambuf.message_peek [*message_peek]]]
-    [Peek at incoming data without removing it from the input queue. ]
-  ]
-
-]
-
-[heading Friends]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.basic_socket_streambuf.io_handler [*io_handler]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_streambuf.timer_handler [*timer_handler]]]
-    []
-  ]
-  
-]
-
 [heading Requirements]
 
 ['Header: ][^asio/basic_socket_streambuf.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
-[section:assign basic_socket_streambuf::assign]
-
-[indexterm2 assign..basic_socket_streambuf] 
-Assign an existing native socket to the socket. 
-
-
-  void ``[link asio.reference.basic_socket_streambuf.assign.overload1 assign]``(
-      const protocol_type & protocol,
-      const native_handle_type & native_socket);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.assign.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.assign.overload2 assign]``(
-      const protocol_type & protocol,
-      const native_handle_type & native_socket,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.assign.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::assign (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Assign an existing native socket to the socket. 
-
-
-  void assign(
-      const protocol_type & protocol,
-      const native_handle_type & native_socket);
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::assign (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Assign an existing native socket to the socket. 
-
-
-  asio::error_code assign(
-      const protocol_type & protocol,
-      const native_handle_type & native_socket,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_connect basic_socket_streambuf::async_connect]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 async_connect..basic_socket_streambuf] 
-Start an asynchronous connect. 
-
-
-  template<
-      typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
-      const endpoint_type & peer_endpoint,
-      ConnectHandler && handler);
-
-
-This function is used to asynchronously connect a socket to the specified remote endpoint. The function call always returns immediately.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[peer_endpoint][The remote endpoint to which the socket will be connected. Copies will be made of the endpoint object as required.]]
-
-[[handler][The handler to be called when the connection operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
-``
-   void handler(
-     const asio::error_code& error // Result of operation
-   ); 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-  
-
-
-   void connect_handler(const asio::error_code& error)
-   {
-     if (!error)
-     {
-       // Connect succeeded.
-     }
-   }
-
-   ...
-
-   asio::ip::tcp::socket socket(io_context);
-   asio::ip::tcp::endpoint endpoint(
-       asio::ip::address::from_string("1.2.3.4"), 12345);
-   socket.async_connect(endpoint, connect_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:async_wait basic_socket_streambuf::async_wait]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 async_wait..basic_socket_streambuf] 
-Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  template<
-      typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      wait_type w,
-      WaitHandler && handler);
-
-
-This function is used to perform an asynchronous wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[w][Specifies the desired socket state.]]
-
-[[handler][The handler to be called when the wait operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
-``
-   void handler(
-     const asio::error_code& error // Result of operation
-   ); 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-  
-
-
-   void wait_handler(const asio::error_code& error)
-   {
-     if (!error)
-     {
-       // Wait succeeded.
-     }
-   }
-
-   ...
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   socket.async_wait(asio::ip::tcp::socket::wait_read, wait_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-[section:at_mark basic_socket_streambuf::at_mark]
-
-[indexterm2 at_mark..basic_socket_streambuf] 
-Determine whether the socket is at the out-of-band data mark. 
-
-
-  bool ``[link asio.reference.basic_socket_streambuf.at_mark.overload1 at_mark]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.at_mark.overload1 more...]]``
-
-  bool ``[link asio.reference.basic_socket_streambuf.at_mark.overload2 at_mark]``(
-      asio::error_code & ec) const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.at_mark.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::at_mark (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine whether the socket is at the out-of-band data mark. 
-
-
-  bool at_mark() const;
-
-
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
-
-
-[heading Return Value]
-      
-A bool indicating whether the socket is at the out-of-band data mark.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::at_mark (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine whether the socket is at the out-of-band data mark. 
-
-
-  bool at_mark(
-      asio::error_code & ec) const;
-
-
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-      
-A bool indicating whether the socket is at the out-of-band data mark. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:available basic_socket_streambuf::available]
-
-[indexterm2 available..basic_socket_streambuf] 
-Determine the number of bytes available for reading. 
-
-
-  std::size_t ``[link asio.reference.basic_socket_streambuf.available.overload1 available]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.available.overload1 more...]]``
-
-  std::size_t ``[link asio.reference.basic_socket_streambuf.available.overload2 available]``(
-      asio::error_code & ec) const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.available.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::available (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine the number of bytes available for reading. 
-
-
-  std::size_t available() const;
-
-
-This function is used to determine the number of bytes that may be read without blocking.
-
-
-[heading Return Value]
-      
-The number of bytes that may be read without blocking, or 0 if an error occurs.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::available (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine the number of bytes available for reading. 
-
-
-  std::size_t available(
-      asio::error_code & ec) const;
-
-
-This function is used to determine the number of bytes that may be read without blocking.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes that may be read without blocking, or 0 if an error occurs. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
 [section:basic_socket_streambuf basic_socket_streambuf::basic_socket_streambuf]
 
-[indexterm2 basic_socket_streambuf..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.basic_socket_streambuf..basic_socket_streambuf..basic_socket_streambuf] 
+Construct a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] without establishing a connection. 
+
+
+  ``[link asio.reference.basic_socket_streambuf.basic_socket_streambuf.overload1 basic_socket_streambuf]``();
+  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.basic_socket_streambuf.overload1 more...]]``
+
+
+Construct a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] from the supplied socket. 
+
+
+  explicit ``[link asio.reference.basic_socket_streambuf.basic_socket_streambuf.overload2 basic_socket_streambuf]``(
+      basic_stream_socket< protocol_type > s);
+  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.basic_socket_streambuf.overload2 more...]]``
+
+
+Move-construct a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] from another. 
+
+
+  ``[link asio.reference.basic_socket_streambuf.basic_socket_streambuf.overload3 basic_socket_streambuf]``(
+      basic_socket_streambuf && other);
+  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.basic_socket_streambuf.overload3 more...]]``
+
+
+[section:overload1 basic_socket_streambuf::basic_socket_streambuf (1 of 3 overloads)]
+
+
 Construct a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] without establishing a connection. 
 
 
@@ -37593,70 +33449,15 @@
 [endsect]
 
 
-[section:bind basic_socket_streambuf::bind]
 
-[indexterm2 bind..basic_socket_streambuf] 
-Bind the socket to the given local endpoint. 
+[section:overload2 basic_socket_streambuf::basic_socket_streambuf (2 of 3 overloads)]
 
 
-  void ``[link asio.reference.basic_socket_streambuf.bind.overload1 bind]``(
-      const endpoint_type & endpoint);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.bind.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.bind.overload2 bind]``(
-      const endpoint_type & endpoint,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.bind.overload2 more...]]``
+Construct a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] from the supplied socket. 
 
 
-[section:overload1 basic_socket_streambuf::bind (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Bind the socket to the given local endpoint. 
-
-
-  void bind(
-      const endpoint_type & endpoint);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-  
-
-
-   asio::ip::tcp::socket socket(io_context);
-   socket.open(asio::ip::tcp::v4());
-   socket.bind(asio::ip::tcp::endpoint(
-         asio::ip::tcp::v4(), 12345));
-
-
-
-
+  basic_socket_streambuf(
+      basic_stream_socket< protocol_type > s);
 
 
 
@@ -37664,52 +33465,14 @@
 
 
 
-[section:overload2 basic_socket_streambuf::bind (2 of 2 overloads)]
+[section:overload3 basic_socket_streambuf::basic_socket_streambuf (3 of 3 overloads)]
 
 
-['Inherited from basic_socket.]
+Move-construct a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] from another. 
 
 
-Bind the socket to the given local endpoint. 
-
-
-  asio::error_code bind(
-      const endpoint_type & endpoint,
-      asio::error_code & ec);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-  
-
-
-   asio::ip::tcp::socket socket(io_context);
-   socket.open(asio::ip::tcp::v4());
-   asio::error_code ec;
-   socket.bind(asio::ip::tcp::endpoint(
-         asio::ip::tcp::v4(), 12345), ec);
-   if (ec)
-   {
-     // An error occurred.
-   }
-
-
-
-
+  basic_socket_streambuf(
+      basic_socket_streambuf && other);
 
 
 
@@ -37719,46 +33482,13 @@
 [endsect]
 
 
-[section:broadcast basic_socket_streambuf::broadcast]
+[section:clock_type basic_socket_streambuf::clock_type]
+
+[indexterm2 asio.indexterm.basic_socket_streambuf.clock_type..clock_type..basic_socket_streambuf] 
+The clock type. 
 
 
-['Inherited from socket_base.]
-
-[indexterm2 broadcast..basic_socket_streambuf] 
-Socket option to permit sending of broadcast messages. 
-
-
-  typedef implementation_defined broadcast;
-
-
-
-Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
-
-
-[heading Examples]
-  
-Setting the option: 
-
-   asio::ip::udp::socket socket(io_context); 
-   ...
-   asio::socket_base::broadcast option(true);
-   socket.set_option(option);
-
-
-
-
-
-Getting the current option value: 
-
-   asio::ip::udp::socket socket(io_context); 
-   ...
-   asio::socket_base::broadcast option;
-   socket.get_option(option);
-   bool is_set = option.value();
-
-
-
-
+  typedef Clock clock_type;
 
 
 
@@ -37773,189 +33503,13 @@
 
 
 
-[section:bytes_readable basic_socket_streambuf::bytes_readable]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 bytes_readable..basic_socket_streambuf] 
-IO control command to get the amount of data that can be read without blocking. 
-
-
-  typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-  
-
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::bytes_readable command(true);
-   socket.io_control(command);
-   std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:cancel basic_socket_streambuf::cancel]
-
-[indexterm2 cancel..basic_socket_streambuf] 
-Cancel all asynchronous operations associated with the socket. 
-
-
-  void ``[link asio.reference.basic_socket_streambuf.cancel.overload1 cancel]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.cancel.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.cancel.overload2 cancel]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.cancel.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::cancel (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Cancel all asynchronous operations associated with the socket. 
-
-
-  void cancel();
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-      
-Calls to `cancel()` will always fail with `asio::error::operation_not_supported` when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining ASIO\_DISABLE\_IOCP.
-
-
-* Use the `close()` function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above. 
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::cancel (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Cancel all asynchronous operations associated with the socket. 
-
-
-  asio::error_code cancel(
-      asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-      
-Calls to `cancel()` will always fail with `asio::error::operation_not_supported` when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining ASIO\_DISABLE\_IOCP.
-
-
-* Use the `close()` function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above. 
-
-
-[endsect]
-
-
-[endsect]
-
 [section:close basic_socket_streambuf::close]
 
-[indexterm2 close..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.close..close..basic_socket_streambuf] 
 Close the connection. 
 
 
-  basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService > * ``[link asio.reference.basic_socket_streambuf.close.overload1 close]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.close.overload1 more...]]``
-
-
-Close the socket. 
-
-
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.close.overload2 close]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.close.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::close (1 of 2 overloads)]
-
-
-Close the connection. 
-
-
-  basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService > * close();
+  basic_socket_streambuf * close();
 
 
 
@@ -37969,69 +33523,13 @@
 [endsect]
 
 
-
-[section:overload2 basic_socket_streambuf::close (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Close the socket. 
-
-
-  asio::error_code close(
-      asio::error_code & ec);
-
-
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any. Note that, even if the function indicates an error, the underlying descriptor is closed.]]
-
-]
-
-
-[heading Example]
-  
-
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::error_code ec;
-   socket.close(ec);
-   if (ec)
-   {
-     // An error occurred.
-   }
-
-
-
-
-
-[heading Remarks]
-      
-For portable behaviour with respect to graceful closure of a connected socket, call `shutdown()` before closing the socket. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
 [section:connect basic_socket_streambuf::connect]
 
-[indexterm2 connect..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.connect..connect..basic_socket_streambuf] 
 Establish a connection. 
 
 
-  basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService > * ``[link asio.reference.basic_socket_streambuf.connect.overload1 connect]``(
+  basic_socket_streambuf * ``[link asio.reference.basic_socket_streambuf.connect.overload1 connect]``(
       const endpoint_type & endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.connect.overload1 more...]]``
 
@@ -38039,29 +33537,20 @@
       typename T1,
       ... ,
       typename TN>
-  basic_socket_streambuf< Protocol, StreamSocketService > * ``[link asio.reference.basic_socket_streambuf.connect.overload2 connect]``(
+  basic_socket_streambuf * ``[link asio.reference.basic_socket_streambuf.connect.overload2 connect]``(
       T1 t1,
       ... ,
       TN tn);
   ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.connect.overload2 more...]]``
 
 
-Connect the socket to the specified endpoint. 
-
-
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.connect.overload3 connect]``(
-      const endpoint_type & peer_endpoint,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.connect.overload3 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::connect (1 of 3 overloads)]
+[section:overload1 basic_socket_streambuf::connect (1 of 2 overloads)]
 
 
 Establish a connection. 
 
 
-  basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService > * connect(
+  basic_socket_streambuf * connect(
       const endpoint_type & endpoint);
 
 
@@ -38079,7 +33568,7 @@
 
 
 
-[section:overload2 basic_socket_streambuf::connect (2 of 3 overloads)]
+[section:overload2 basic_socket_streambuf::connect (2 of 2 overloads)]
 
 
 Establish a connection. 
@@ -38089,7 +33578,7 @@
       typename T1,
       ... ,
       typename TN>
-  basic_socket_streambuf< Protocol, StreamSocketService > * connect(
+  basic_socket_streambuf * connect(
       T1 t1,
       ... ,
       TN tn);
@@ -38108,179 +33597,16 @@
 [endsect]
 
 
-
-[section:overload3 basic_socket_streambuf::connect (3 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Connect the socket to the specified endpoint. 
-
-
-  asio::error_code connect(
-      const endpoint_type & peer_endpoint,
-      asio::error_code & ec);
-
-
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-  
-
-
-   asio::ip::tcp::socket socket(io_context);
-   asio::ip::tcp::endpoint endpoint(
-       asio::ip::address::from_string("1.2.3.4"), 12345);
-   asio::error_code ec;
-   socket.connect(endpoint, ec);
-   if (ec)
-   {
-     // An error occurred.
-   }
-
-
-
-
-
-
-
 [endsect]
 
 
-[endsect]
-
-
-[section:debug basic_socket_streambuf::debug]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 debug..basic_socket_streambuf] 
-Socket option to enable socket-level debugging. 
-
-
-  typedef implementation_defined debug;
-
-
-
-Implements the SOL\_SOCKET/SO\_DEBUG socket option.
-
-
-[heading Examples]
-  
-Setting the option: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::debug option(true);
-   socket.set_option(option);
-
-
-
-
-
-Getting the current option value: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::debug option;
-   socket.get_option(option);
-   bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:do_not_route basic_socket_streambuf::do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 do_not_route..basic_socket_streambuf] 
-Socket option to prevent routing, use local interfaces only. 
-
-
-  typedef implementation_defined do_not_route;
-
-
-
-Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
-
-
-[heading Examples]
-  
-Setting the option: 
-
-   asio::ip::udp::socket socket(io_context); 
-   ...
-   asio::socket_base::do_not_route option(true);
-   socket.set_option(option);
-
-
-
-
-
-Getting the current option value: 
-
-   asio::ip::udp::socket socket(io_context); 
-   ...
-   asio::socket_base::do_not_route option;
-   socket.get_option(option);
-   bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
 [section:duration basic_socket_streambuf::duration]
 
-[indexterm2 duration..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.duration..duration..basic_socket_streambuf] 
 The duration type. 
 
 
-  typedef TimeTraits::duration duration;
+  typedef WaitTraits::duration duration;
 
 
 
@@ -38297,65 +33623,11 @@
 
 [section:duration_type basic_socket_streambuf::duration_type]
 
-[indexterm2 duration_type..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.duration_type..duration_type..basic_socket_streambuf] 
 (Deprecated: Use duration.) The duration type. 
 
 
-  typedef TimeTraits::duration_type duration_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:enable_connection_aborted basic_socket_streambuf::enable_connection_aborted]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 enable_connection_aborted..basic_socket_streambuf] 
-Socket option to report aborted connections on accept. 
-
-
-  typedef implementation_defined enable_connection_aborted;
-
-
-
-Implements a custom socket option that determines whether or not an accept operation is permitted to fail with `asio::error::connection_aborted`. By default the option is false.
-
-
-[heading Examples]
-  
-Setting the option: 
-
-   asio::ip::tcp::acceptor acceptor(io_context); 
-   ...
-   asio::socket_base::enable_connection_aborted option(true);
-   acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value: 
-
-   asio::ip::tcp::acceptor acceptor(io_context); 
-   ...
-   asio::socket_base::enable_connection_aborted option;
-   acceptor.get_option(option);
-   bool is_set = option.value();
-
-
-
-
+  typedef WaitTraits::duration_type duration_type;
 
 
 
@@ -38372,7 +33644,7 @@
 
 [section:endpoint_type basic_socket_streambuf::endpoint_type]
 
-[indexterm2 endpoint_type..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.endpoint_type..endpoint_type..basic_socket_streambuf] 
 The endpoint type. 
 
 
@@ -38393,11 +33665,11 @@
 
 [section:error basic_socket_streambuf::error]
 
-[indexterm2 error..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.error..error..basic_socket_streambuf] 
 Get the last error associated with the stream buffer. 
 
 
-  virtual const asio::error_code & error() const;
+  const asio::error_code & error() const;
 
 
 
@@ -38412,90 +33684,9 @@
 
 
 
-[section:executor_type basic_socket_streambuf::executor_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 executor_type..basic_socket_streambuf] 
-The type of the executor associated with the object. 
-
-
-  typedef asio::io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.io_context__executor_type.context [*context]]]
-    [Obtain the underlying execution context. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.defer [*defer]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
-    [Inform the io_context that some work is no longer outstanding. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
-    [Inform the io_context that it has some outstanding work to do. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.post [*post]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
-    [Determine whether the io_context is running in the current thread. ]
-  ]
-  
-]
-
-[heading Friends]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
-    [Compare two executors for inequality. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
-    [Compare two executors for equality. ]
-  ]
-  
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
 [section:expires_after basic_socket_streambuf::expires_after]
 
-[indexterm2 expires_after..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.expires_after..expires_after..basic_socket_streambuf] 
 Set the stream buffer's expiry time relative to now. 
 
 
@@ -38523,7 +33714,7 @@
 
 [section:expires_at basic_socket_streambuf::expires_at]
 
-[indexterm2 expires_at..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.expires_at..expires_at..basic_socket_streambuf] 
 (Deprecated: Use `expiry()`.) Get the stream buffer's expiry time as an absolute time. 
 
 
@@ -38539,15 +33730,7 @@
   ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.expires_at.overload2 more...]]``
 
 
-Set the stream buffer's expiry time relative to now. 
-
-
-  void ``[link asio.reference.basic_socket_streambuf.expires_at.overload3 expires_at]``(
-      const duration & expiry_time);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.expires_at.overload3 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::expires_at (1 of 3 overloads)]
+[section:overload1 basic_socket_streambuf::expires_at (1 of 2 overloads)]
 
 
 (Deprecated: Use `expiry()`.) Get the stream buffer's expiry time as an absolute time. 
@@ -38568,7 +33751,7 @@
 
 
 
-[section:overload2 basic_socket_streambuf::expires_at (2 of 3 overloads)]
+[section:overload2 basic_socket_streambuf::expires_at (2 of 2 overloads)]
 
 
 Set the stream buffer's expiry time as an absolute time. 
@@ -38596,40 +33779,11 @@
 [endsect]
 
 
-
-[section:overload3 basic_socket_streambuf::expires_at (3 of 3 overloads)]
-
-
-Set the stream buffer's expiry time relative to now. 
-
-
-  void expires_at(
-      const duration & expiry_time);
-
-
-This function sets the expiry time associated with the stream. Stream operations performed after this time (where the operations cannot be completed using the internal buffers) will fail with the error `asio::error::operation_aborted`.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[expiry_time][The expiry time to be used for the timer. ]]
-
-]
-
-
-
-
-[endsect]
-
-
 [endsect]
 
 [section:expires_from_now basic_socket_streambuf::expires_from_now]
 
-[indexterm2 expires_from_now..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.expires_from_now..expires_from_now..basic_socket_streambuf] 
 (Deprecated: Use `expiry()`.) Get the stream buffer's expiry time relative to now. 
 
 
@@ -38699,7 +33853,7 @@
 
 [section:expiry basic_socket_streambuf::expiry]
 
-[indexterm2 expiry..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.expiry..expiry..basic_socket_streambuf] 
 Get the stream buffer's expiry time as an absolute time. 
 
 
@@ -38718,1961 +33872,24 @@
 
 
 
-[section:get_executor basic_socket_streambuf::get_executor]
+[section:operator_eq_ basic_socket_streambuf::operator=]
+
+[indexterm2 asio.indexterm.basic_socket_streambuf.operator_eq_..operator=..basic_socket_streambuf] 
+Move-assign a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] from another. 
 
 
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..basic_socket_streambuf] 
-Get the executor associated with the object. 
-
-
-  executor_type get_executor();
+  basic_socket_streambuf & operator=(
+      basic_socket_streambuf && other);
 
 
 
 [endsect]
 
 
-[section:get_implementation basic_socket_streambuf::get_implementation]
-
-[indexterm2 get_implementation..basic_socket_streambuf] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.basic_socket_streambuf.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.basic_socket_streambuf.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.get_implementation.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_io_context basic_socket_streambuf::get_io_context]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..basic_socket_streambuf] 
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
-
-
-  asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-      
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service basic_socket_streambuf::get_io_service]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..basic_socket_streambuf] 
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
-
-
-  asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-      
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-[section:get_option basic_socket_streambuf::get_option]
-
-[indexterm2 get_option..basic_socket_streambuf] 
-Get an option from the socket. 
-
-
-  void ``[link asio.reference.basic_socket_streambuf.get_option.overload1 get_option]``(
-      GettableSocketOption & option) const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.get_option.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.get_option.overload2 get_option]``(
-      GettableSocketOption & option,
-      asio::error_code & ec) const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.get_option.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::get_option (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get an option from the socket. 
-
-
-  template<
-      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  void get_option(
-      GettableSocketOption & option) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[option][The option value to be obtained from the socket.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-  
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option: 
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::ip::tcp::socket::keep_alive option;
-   socket.get_option(option);
-   bool is_set = option.value();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::get_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get an option from the socket. 
-
-
-  template<
-      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code get_option(
-      GettableSocketOption & option,
-      asio::error_code & ec) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[option][The option value to be obtained from the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-  
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option: 
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::ip::tcp::socket::keep_alive option;
-   asio::error_code ec;
-   socket.get_option(option, ec);
-   if (ec)
-   {
-     // An error occurred.
-   }
-   bool is_set = option.value();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:get_service basic_socket_streambuf::get_service]
-
-[indexterm2 get_service..basic_socket_streambuf] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.basic_socket_streambuf.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.basic_socket_streambuf.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.get_service.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_socket_streambuf::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..basic_socket_streambuf] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:io_control basic_socket_streambuf::io_control]
-
-[indexterm2 io_control..basic_socket_streambuf] 
-Perform an IO control command on the socket. 
-
-
-  void ``[link asio.reference.basic_socket_streambuf.io_control.overload1 io_control]``(
-      IoControlCommand & command);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.io_control.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.io_control.overload2 io_control]``(
-      IoControlCommand & command,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.io_control.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::io_control (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Perform an IO control command on the socket. 
-
-
-  template<
-      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  void io_control(
-      IoControlCommand & command);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[command][The IO control command to be performed on the socket.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-  
-Getting the number of bytes ready to read: 
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::ip::tcp::socket::bytes_readable command;
-   socket.io_control(command);
-   std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::io_control (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Perform an IO control command on the socket. 
-
-
-  template<
-      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
-      IoControlCommand & command,
-      asio::error_code & ec);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[command][The IO control command to be performed on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-  
-Getting the number of bytes ready to read: 
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::ip::tcp::socket::bytes_readable command;
-   asio::error_code ec;
-   socket.io_control(command, ec);
-   if (ec)
-   {
-     // An error occurred.
-   }
-   std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:io_handler basic_socket_streambuf::io_handler]
-
-[indexterm2 io_handler..basic_socket_streambuf] 
-
-  friend struct io_handler();
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:is_open basic_socket_streambuf::is_open]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 is_open..basic_socket_streambuf] 
-Determine whether the socket is open. 
-
-
-  bool is_open() const;
-
-
-
-[endsect]
-
-
-
-[section:keep_alive basic_socket_streambuf::keep_alive]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 keep_alive..basic_socket_streambuf] 
-Socket option to send keep-alives. 
-
-
-  typedef implementation_defined keep_alive;
-
-
-
-Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
-
-
-[heading Examples]
-  
-Setting the option: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::keep_alive option(true);
-   socket.set_option(option);
-
-
-
-
-
-Getting the current option value: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::keep_alive option;
-   socket.get_option(option);
-   bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:linger basic_socket_streambuf::linger]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 linger..basic_socket_streambuf] 
-Socket option to specify whether the socket lingers on close if unsent data is present. 
-
-
-  typedef implementation_defined linger;
-
-
-
-Implements the SOL\_SOCKET/SO\_LINGER socket option.
-
-
-[heading Examples]
-  
-Setting the option: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::linger option(true, 30);
-   socket.set_option(option);
-
-
-
-
-
-Getting the current option value: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::linger option;
-   socket.get_option(option);
-   bool is_set = option.enabled();
-   unsigned short timeout = option.timeout();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:local_endpoint basic_socket_streambuf::local_endpoint]
-
-[indexterm2 local_endpoint..basic_socket_streambuf] 
-Get the local endpoint of the socket. 
-
-
-  endpoint_type ``[link asio.reference.basic_socket_streambuf.local_endpoint.overload1 local_endpoint]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.local_endpoint.overload1 more...]]``
-
-  endpoint_type ``[link asio.reference.basic_socket_streambuf.local_endpoint.overload2 local_endpoint]``(
-      asio::error_code & ec) const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.local_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::local_endpoint (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the local endpoint of the socket. 
-
-
-  endpoint_type local_endpoint() const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Return Value]
-      
-An object that represents the local endpoint of the socket.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-  
-
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::local_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the local endpoint of the socket. 
-
-
-  endpoint_type local_endpoint(
-      asio::error_code & ec) const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-      
-An object that represents the local endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-
-[heading Example]
-  
-
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::error_code ec;
-   asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
-   if (ec)
-   {
-     // An error occurred.
-   }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:lowest_layer basic_socket_streambuf::lowest_layer]
-
-[indexterm2 lowest_layer..basic_socket_streambuf] 
-Get a reference to the lowest layer. 
-
-
-  lowest_layer_type & ``[link asio.reference.basic_socket_streambuf.lowest_layer.overload1 lowest_layer]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer. 
-
-
-  const lowest_layer_type & ``[link asio.reference.basic_socket_streambuf.lowest_layer.overload2 lowest_layer]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::lowest_layer (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get a reference to the lowest layer. 
-
-
-  lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_socket `basic_socket`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-      
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::lowest_layer (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get a const reference to the lowest layer. 
-
-
-  const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_socket `basic_socket`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-      
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type basic_socket_streambuf::lowest_layer_type]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 lowest_layer_type..basic_socket_streambuf] 
-A [link asio.reference.basic_socket `basic_socket`] is always the lowest layer. 
-
-
-  typedef basic_socket< Protocol, StreamSocketService > lowest_layer_type;
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.basic_socket.broadcast [*broadcast]]]
-    [Socket option to permit sending of broadcast messages. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.bytes_readable [*bytes_readable]]]
-    [IO control command to get the amount of data that can be read without blocking. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.debug [*debug]]]
-    [Socket option to enable socket-level debugging. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.do_not_route [*do_not_route]]]
-    [Socket option to prevent routing, use local interfaces only. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.enable_connection_aborted [*enable_connection_aborted]]]
-    [Socket option to report aborted connections on accept. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.endpoint_type [*endpoint_type]]]
-    [The endpoint type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.executor_type [*executor_type]]]
-    [The type of the executor associated with the object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
-    [Socket option to send keep-alives. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.linger [*linger]]]
-    [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_socket is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.message_flags [*message_flags]]]
-    [Bitmask type for flags that can be passed to send and receive operations. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.native_handle_type [*native_handle_type]]]
-    [The native representation of a socket. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.protocol_type [*protocol_type]]]
-    [The protocol type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.receive_buffer_size [*receive_buffer_size]]]
-    [Socket option for the receive buffer size of a socket. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.receive_low_watermark [*receive_low_watermark]]]
-    [Socket option for the receive low watermark. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.reuse_address [*reuse_address]]]
-    [Socket option to allow the socket to be bound to an address that is already in use. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.send_buffer_size [*send_buffer_size]]]
-    [Socket option for the send buffer size of a socket. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.send_low_watermark [*send_low_watermark]]]
-    [Socket option for the send low watermark. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
-    [Different ways a socket may be shutdown. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_socket.wait_type [*wait_type]]]
-    [Wait types. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.basic_socket.assign [*assign]]]
-    [Assign an existing native socket to the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.async_connect [*async_connect]]]
-    [Start an asynchronous connect. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.async_wait [*async_wait]]]
-    [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.at_mark [*at_mark]]]
-    [Determine whether the socket is at the out-of-band data mark. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.available [*available]]]
-    [Determine the number of bytes available for reading. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.basic_socket [*basic_socket]]]
-    [Construct a basic_socket without opening it. 
-
-     Construct and open a basic_socket. 
-
-     Construct a basic_socket, opening it and binding it to the given local endpoint. 
-
-     Construct a basic_socket on an existing native socket. 
-
-     Move-construct a basic_socket from another. 
-
-     Move-construct a basic_socket from a socket of another protocol type. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.bind [*bind]]]
-    [Bind the socket to the given local endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.close [*close]]]
-    [Close the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.connect [*connect]]]
-    [Connect the socket to the specified endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.get_executor [*get_executor]]]
-    [Get the executor associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.get_io_context [*get_io_context]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.get_option [*get_option]]]
-    [Get an option from the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.io_control [*io_control]]]
-    [Perform an IO control command on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.is_open [*is_open]]]
-    [Determine whether the socket is open. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.local_endpoint [*local_endpoint]]]
-    [Get the local endpoint of the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.lowest_layer [*lowest_layer]]]
-    [Get a reference to the lowest layer. 
-
-     Get a const reference to the lowest layer. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.native_handle [*native_handle]]]
-    [Get the native socket representation. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.native_non_blocking [*native_non_blocking]]]
-    [Gets the non-blocking mode of the native socket implementation. 
-
-     Sets the non-blocking mode of the native socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.non_blocking [*non_blocking]]]
-    [Gets the non-blocking mode of the socket. 
-
-     Sets the non-blocking mode of the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.open [*open]]]
-    [Open the socket using the specified protocol. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.operator_eq_ [*operator=]]]
-    [Move-assign a basic_socket from another. 
-
-     Move-assign a basic_socket from a socket of another protocol type. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.remote_endpoint [*remote_endpoint]]]
-    [Get the remote endpoint of the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.set_option [*set_option]]]
-    [Set an option on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.shutdown [*shutdown]]]
-    [Disable sends or receives on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.wait [*wait]]]
-    [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.basic_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
-    [Protected destructor to prevent deletion through this type. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.basic_socket.max_connections [*max_connections]]]
-    [The maximum length of the queue of pending incoming connections. ]
-  ]
-
-  [
-    [[link asio.reference.basic_socket.message_do_not_route [*message_do_not_route]]]
-    [Specify that the data should not be subject to routing. ]
-  ]
-
-  [
-    [[link asio.reference.basic_socket.message_end_of_record [*message_end_of_record]]]
-    [Specifies that the data marks the end of a record. ]
-  ]
-
-  [
-    [[link asio.reference.basic_socket.message_out_of_band [*message_out_of_band]]]
-    [Process out-of-band data. ]
-  ]
-
-  [
-    [[link asio.reference.basic_socket.message_peek [*message_peek]]]
-    [Peek at incoming data without removing it from the input queue. ]
-  ]
-
-]
-
-The [link asio.reference.basic_socket `basic_socket`] class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe. 
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:max_connections basic_socket_streambuf::max_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 max_connections..basic_socket_streambuf] 
-The maximum length of the queue of pending incoming connections. 
-
-
-  static const int max_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_do_not_route basic_socket_streambuf::message_do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 message_do_not_route..basic_socket_streambuf] 
-Specify that the data should not be subject to routing. 
-
-
-  static const int message_do_not_route = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_end_of_record basic_socket_streambuf::message_end_of_record]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 message_end_of_record..basic_socket_streambuf] 
-Specifies that the data marks the end of a record. 
-
-
-  static const int message_end_of_record = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_flags basic_socket_streambuf::message_flags]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 message_flags..basic_socket_streambuf] 
-Bitmask type for flags that can be passed to send and receive operations. 
-
-
-  typedef int message_flags;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:message_out_of_band basic_socket_streambuf::message_out_of_band]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 message_out_of_band..basic_socket_streambuf] 
-Process out-of-band data. 
-
-
-  static const int message_out_of_band = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_peek basic_socket_streambuf::message_peek]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 message_peek..basic_socket_streambuf] 
-Peek at incoming data without removing it from the input queue. 
-
-
-  static const int message_peek = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:native_handle basic_socket_streambuf::native_handle]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 native_handle..basic_socket_streambuf] 
-Get the native socket representation. 
-
-
-  native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the socket. This is intended to allow access to native socket functionality that is not otherwise provided. 
-
-
-[endsect]
-
-
-
-[section:native_handle_type basic_socket_streambuf::native_handle_type]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 native_handle_type..basic_socket_streambuf] 
-The native representation of a socket. 
-
-
-  typedef StreamSocketService::native_handle_type native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking basic_socket_streambuf::native_non_blocking]
-
-[indexterm2 native_non_blocking..basic_socket_streambuf] 
-Gets the non-blocking mode of the native socket implementation. 
-
-
-  bool ``[link asio.reference.basic_socket_streambuf.native_non_blocking.overload1 native_non_blocking]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native socket implementation. 
-
-
-  void ``[link asio.reference.basic_socket_streambuf.native_non_blocking.overload2 native_non_blocking]``(
-      bool mode);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.native_non_blocking.overload2 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.native_non_blocking.overload3 native_non_blocking]``(
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.native_non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::native_non_blocking (1 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Gets the non-blocking mode of the native socket implementation. 
-
-
-  bool native_non_blocking() const;
-
-
-This function is used to retrieve the non-blocking mode of the underlying native socket. This mode has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Return Value]
-      
-`true` if the underlying socket is in non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).
-
-
-[heading Remarks]
-      
-The current non-blocking mode is cached by the socket object. Consequently, the return value may be incorrect if the non-blocking mode was set directly on the native socket.
-
-
-[heading Example]
-  
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated: 
-
-   template <typename Handler>
-   struct sendfile_op
-   {
-     tcp::socket& sock_;
-     int fd_;
-     Handler handler_;
-     off_t offset_;
-     std::size_t total_bytes_transferred_;
-
-     // Function call operator meeting WriteHandler requirements.
-     // Used as the handler for the async_write_some operation.
-     void operator()(asio::error_code ec, std::size_t)
-     {
-       // Put the underlying socket into non-blocking mode.
-       if (!ec)
-         if (!sock_.native_non_blocking())
-           sock_.native_non_blocking(true, ec);
-
-       if (!ec)
-       {
-         for (;;)
-         {
-           // Try the system call.
-           errno = 0;
-           int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
-           ec = asio::error_code(n < 0 ? errno : 0,
-               asio::error::get_system_category());
-           total_bytes_transferred_ += ec ? 0 : n;
-
-           // Retry operation immediately if interrupted by signal.
-           if (ec == asio::error::interrupted)
-             continue;
-
-           // Check if we need to run the operation again.
-           if (ec == asio::error::would_block
-               || ec == asio::error::try_again)
-           {
-             // We have to wait for the socket to become ready again.
-             sock_.async_wait(tcp::socket::wait_write, *this);
-             return;
-           }
-
-           if (ec || n == 0)
-           {
-             // An error occurred, or we have reached the end of the file.
-             // Either way we must exit the loop so we can call the handler.
-             break;
-           }
-
-           // Loop around to try calling sendfile again.
-         }
-       }
-
-       // Pass result back to user's handler.
-       handler_(ec, total_bytes_transferred_);
-     }
-   };
-
-   template <typename Handler>
-   void async_sendfile(tcp::socket& sock, int fd, Handler h)
-   {
-     sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
-     sock.async_wait(tcp::socket::wait_write, op);
-   } 
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::native_non_blocking (2 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the native socket implementation. 
-
-
-  void native_non_blocking(
-      bool mode);
-
-
-This function is used to modify the non-blocking mode of the underlying native socket. It has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[mode][If `true`, the underlying socket is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense.]]
-
-]
-
-
-[heading Example]
-  
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated: 
-
-   template <typename Handler>
-   struct sendfile_op
-   {
-     tcp::socket& sock_;
-     int fd_;
-     Handler handler_;
-     off_t offset_;
-     std::size_t total_bytes_transferred_;
-
-     // Function call operator meeting WriteHandler requirements.
-     // Used as the handler for the async_write_some operation.
-     void operator()(asio::error_code ec, std::size_t)
-     {
-       // Put the underlying socket into non-blocking mode.
-       if (!ec)
-         if (!sock_.native_non_blocking())
-           sock_.native_non_blocking(true, ec);
-
-       if (!ec)
-       {
-         for (;;)
-         {
-           // Try the system call.
-           errno = 0;
-           int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
-           ec = asio::error_code(n < 0 ? errno : 0,
-               asio::error::get_system_category());
-           total_bytes_transferred_ += ec ? 0 : n;
-
-           // Retry operation immediately if interrupted by signal.
-           if (ec == asio::error::interrupted)
-             continue;
-
-           // Check if we need to run the operation again.
-           if (ec == asio::error::would_block
-               || ec == asio::error::try_again)
-           {
-             // We have to wait for the socket to become ready again.
-             sock_.async_wait(tcp::socket::wait_write, *this);
-             return;
-           }
-
-           if (ec || n == 0)
-           {
-             // An error occurred, or we have reached the end of the file.
-             // Either way we must exit the loop so we can call the handler.
-             break;
-           }
-
-           // Loop around to try calling sendfile again.
-         }
-       }
-
-       // Pass result back to user's handler.
-       handler_(ec, total_bytes_transferred_);
-     }
-   };
-
-   template <typename Handler>
-   void async_sendfile(tcp::socket& sock, int fd, Handler h)
-   {
-     sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
-     sock.async_wait(tcp::socket::wait_write, op);
-   } 
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_socket_streambuf::native_non_blocking (3 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the native socket implementation. 
-
-
-  asio::error_code native_non_blocking(
-      bool mode,
-      asio::error_code & ec);
-
-
-This function is used to modify the non-blocking mode of the underlying native socket. It has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[mode][If `true`, the underlying socket is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-[[ec][Set to indicate what error occurred, if any. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense.]]
-
-]
-
-
-[heading Example]
-  
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated: 
-
-   template <typename Handler>
-   struct sendfile_op
-   {
-     tcp::socket& sock_;
-     int fd_;
-     Handler handler_;
-     off_t offset_;
-     std::size_t total_bytes_transferred_;
-
-     // Function call operator meeting WriteHandler requirements.
-     // Used as the handler for the async_write_some operation.
-     void operator()(asio::error_code ec, std::size_t)
-     {
-       // Put the underlying socket into non-blocking mode.
-       if (!ec)
-         if (!sock_.native_non_blocking())
-           sock_.native_non_blocking(true, ec);
-
-       if (!ec)
-       {
-         for (;;)
-         {
-           // Try the system call.
-           errno = 0;
-           int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
-           ec = asio::error_code(n < 0 ? errno : 0,
-               asio::error::get_system_category());
-           total_bytes_transferred_ += ec ? 0 : n;
-
-           // Retry operation immediately if interrupted by signal.
-           if (ec == asio::error::interrupted)
-             continue;
-
-           // Check if we need to run the operation again.
-           if (ec == asio::error::would_block
-               || ec == asio::error::try_again)
-           {
-             // We have to wait for the socket to become ready again.
-             sock_.async_wait(tcp::socket::wait_write, *this);
-             return;
-           }
-
-           if (ec || n == 0)
-           {
-             // An error occurred, or we have reached the end of the file.
-             // Either way we must exit the loop so we can call the handler.
-             break;
-           }
-
-           // Loop around to try calling sendfile again.
-         }
-       }
-
-       // Pass result back to user's handler.
-       handler_(ec, total_bytes_transferred_);
-     }
-   };
-
-   template <typename Handler>
-   void async_sendfile(tcp::socket& sock, int fd, Handler h)
-   {
-     sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
-     sock.async_wait(tcp::socket::wait_write, op);
-   } 
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking basic_socket_streambuf::non_blocking]
-
-[indexterm2 non_blocking..basic_socket_streambuf] 
-Gets the non-blocking mode of the socket. 
-
-
-  bool ``[link asio.reference.basic_socket_streambuf.non_blocking.overload1 non_blocking]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the socket. 
-
-
-  void ``[link asio.reference.basic_socket_streambuf.non_blocking.overload2 non_blocking]``(
-      bool mode);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.non_blocking.overload2 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.non_blocking.overload3 non_blocking]``(
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::non_blocking (1 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Gets the non-blocking mode of the socket. 
-
-
-  bool non_blocking() const;
-
-
-
-[heading Return Value]
-      
-`true` if the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.
-
-
-[heading Remarks]
-      
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::non_blocking (2 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the socket. 
-
-
-  void non_blocking(
-      bool mode);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[mode][If `true`, the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-      
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_socket_streambuf::non_blocking (3 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the socket. 
-
-
-  asio::error_code non_blocking(
-      bool mode,
-      asio::error_code & ec);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[mode][If `true`, the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-      
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:open basic_socket_streambuf::open]
-
-[indexterm2 open..basic_socket_streambuf] 
-Open the socket using the specified protocol. 
-
-
-  void ``[link asio.reference.basic_socket_streambuf.open.overload1 open]``(
-      const protocol_type & protocol = protocol_type());
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.open.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.open.overload2 open]``(
-      const protocol_type & protocol,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.open.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::open (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Open the socket using the specified protocol. 
-
-
-  void open(
-      const protocol_type & protocol = protocol_type());
-
-
-This function opens the socket so that it will use the specified protocol.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-  
-
-
-   asio::ip::tcp::socket socket(io_context);
-   socket.open(asio::ip::tcp::v4());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::open (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Open the socket using the specified protocol. 
-
-
-  asio::error_code open(
-      const protocol_type & protocol,
-      asio::error_code & ec);
-
-
-This function opens the socket so that it will use the specified protocol.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[protocol][An object specifying which protocol is to be used.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-  
-
-
-   asio::ip::tcp::socket socket(io_context);
-   asio::error_code ec;
-   socket.open(asio::ip::tcp::v4(), ec);
-   if (ec)
-   {
-     // An error occurred.
-   }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
 
 [section:overflow basic_socket_streambuf::overflow]
 
-[indexterm2 overflow..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.overflow..overflow..basic_socket_streambuf] 
 
   int_type overflow(
       int_type c);
@@ -40685,10 +33902,7 @@
 
 [section:protocol_type basic_socket_streambuf::protocol_type]
 
-
-['Inherited from basic_socket.]
-
-[indexterm2 protocol_type..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.protocol_type..protocol_type..basic_socket_streambuf] 
 The protocol type. 
 
 
@@ -40709,8 +33923,8 @@
 
 [section:puberror basic_socket_streambuf::puberror]
 
-[indexterm2 puberror..basic_socket_streambuf] 
-Get the last error associated with the stream buffer. 
+[indexterm2 asio.indexterm.basic_socket_streambuf.puberror..puberror..basic_socket_streambuf] 
+(Deprecated: Use `error()`.) Get the last error associated with the stream buffer. 
 
 
   const asio::error_code & puberror() const;
@@ -40728,551 +33942,9 @@
 
 
 
-[section:receive_buffer_size basic_socket_streambuf::receive_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 receive_buffer_size..basic_socket_streambuf] 
-Socket option for the receive buffer size of a socket. 
-
-
-  typedef implementation_defined receive_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
-
-
-[heading Examples]
-  
-Setting the option: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::receive_buffer_size option(8192);
-   socket.set_option(option);
-
-
-
-
-
-Getting the current option value: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::receive_buffer_size option;
-   socket.get_option(option);
-   int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:receive_low_watermark basic_socket_streambuf::receive_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 receive_low_watermark..basic_socket_streambuf] 
-Socket option for the receive low watermark. 
-
-
-  typedef implementation_defined receive_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
-
-
-[heading Examples]
-  
-Setting the option: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::receive_low_watermark option(1024);
-   socket.set_option(option);
-
-
-
-
-
-Getting the current option value: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::receive_low_watermark option;
-   socket.get_option(option);
-   int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:remote_endpoint basic_socket_streambuf::remote_endpoint]
-
-[indexterm2 remote_endpoint..basic_socket_streambuf] 
-Get the remote endpoint of the socket. 
-
-
-  endpoint_type ``[link asio.reference.basic_socket_streambuf.remote_endpoint.overload1 remote_endpoint]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.remote_endpoint.overload1 more...]]``
-
-  endpoint_type ``[link asio.reference.basic_socket_streambuf.remote_endpoint.overload2 remote_endpoint]``(
-      asio::error_code & ec) const;
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.remote_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::remote_endpoint (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the remote endpoint of the socket. 
-
-
-  endpoint_type remote_endpoint() const;
-
-
-This function is used to obtain the remote endpoint of the socket.
-
-
-[heading Return Value]
-      
-An object that represents the remote endpoint of the socket.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-  
-
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::remote_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the remote endpoint of the socket. 
-
-
-  endpoint_type remote_endpoint(
-      asio::error_code & ec) const;
-
-
-This function is used to obtain the remote endpoint of the socket.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-      
-An object that represents the remote endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-
-[heading Example]
-  
-
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::error_code ec;
-   asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
-   if (ec)
-   {
-     // An error occurred.
-   }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:reuse_address basic_socket_streambuf::reuse_address]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 reuse_address..basic_socket_streambuf] 
-Socket option to allow the socket to be bound to an address that is already in use. 
-
-
-  typedef implementation_defined reuse_address;
-
-
-
-Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
-
-
-[heading Examples]
-  
-Setting the option: 
-
-   asio::ip::tcp::acceptor acceptor(io_context); 
-   ...
-   asio::socket_base::reuse_address option(true);
-   acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value: 
-
-   asio::ip::tcp::acceptor acceptor(io_context); 
-   ...
-   asio::socket_base::reuse_address option;
-   acceptor.get_option(option);
-   bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:send_buffer_size basic_socket_streambuf::send_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 send_buffer_size..basic_socket_streambuf] 
-Socket option for the send buffer size of a socket. 
-
-
-  typedef implementation_defined send_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
-
-
-[heading Examples]
-  
-Setting the option: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::send_buffer_size option(8192);
-   socket.set_option(option);
-
-
-
-
-
-Getting the current option value: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::send_buffer_size option;
-   socket.get_option(option);
-   int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:send_low_watermark basic_socket_streambuf::send_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 send_low_watermark..basic_socket_streambuf] 
-Socket option for the send low watermark. 
-
-
-  typedef implementation_defined send_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
-
-
-[heading Examples]
-  
-Setting the option: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::send_low_watermark option(1024);
-   socket.set_option(option);
-
-
-
-
-
-Getting the current option value: 
-
-   asio::ip::tcp::socket socket(io_context); 
-   ...
-   asio::socket_base::send_low_watermark option;
-   socket.get_option(option);
-   int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:service_type basic_socket_streambuf::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..basic_socket_streambuf] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef StreamSocketService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:set_option basic_socket_streambuf::set_option]
-
-[indexterm2 set_option..basic_socket_streambuf] 
-Set an option on the socket. 
-
-
-  void ``[link asio.reference.basic_socket_streambuf.set_option.overload1 set_option]``(
-      const SettableSocketOption & option);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.set_option.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.set_option.overload2 set_option]``(
-      const SettableSocketOption & option,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.set_option.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::set_option (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Set an option on the socket. 
-
-
-  template<
-      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  void set_option(
-      const SettableSocketOption & option);
-
-
-This function is used to set an option on the socket.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[option][The new option value to be set on the socket.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-  
-Setting the IPPROTO\_TCP/TCP\_NODELAY option: 
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::ip::tcp::no_delay option(true);
-   socket.set_option(option);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::set_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Set an option on the socket. 
-
-
-  template<
-      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code set_option(
-      const SettableSocketOption & option,
-      asio::error_code & ec);
-
-
-This function is used to set an option on the socket.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[option][The new option value to be set on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-  
-Setting the IPPROTO\_TCP/TCP\_NODELAY option: 
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::ip::tcp::no_delay option(true);
-   asio::error_code ec;
-   socket.set_option(option, ec);
-   if (ec)
-   {
-     // An error occurred.
-   }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
 [section:setbuf basic_socket_streambuf::setbuf]
 
-[indexterm2 setbuf..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.setbuf..setbuf..basic_socket_streambuf] 
 
   std::streambuf * setbuf(
       char_type * s,
@@ -41283,164 +33955,14 @@
 [endsect]
 
 
-[section:shutdown basic_socket_streambuf::shutdown]
 
-[indexterm2 shutdown..basic_socket_streambuf] 
-Disable sends or receives on the socket. 
+[section:socket basic_socket_streambuf::socket]
 
+[indexterm2 asio.indexterm.basic_socket_streambuf.socket..socket..basic_socket_streambuf] 
+Get a reference to the underlying socket. 
 
-  void ``[link asio.reference.basic_socket_streambuf.shutdown.overload1 shutdown]``(
-      shutdown_type what);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.shutdown.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.shutdown.overload2 shutdown]``(
-      shutdown_type what,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.shutdown.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::shutdown (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Disable sends or receives on the socket. 
-
-
-  void shutdown(
-      shutdown_type what);
-
-
-This function is used to disable send operations, receive operations, or both.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[what][Determines what types of operation will no longer be allowed.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-  
-Shutting down the send side of the socket: 
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   socket.shutdown(asio::ip::tcp::socket::shutdown_send);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::shutdown (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Disable sends or receives on the socket. 
-
-
-  asio::error_code shutdown(
-      shutdown_type what,
-      asio::error_code & ec);
-
-
-This function is used to disable send operations, receive operations, or both.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[what][Determines what types of operation will no longer be allowed.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-  
-Shutting down the send side of the socket: 
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::error_code ec;
-   socket.shutdown(asio::ip::tcp::socket::shutdown_send, ec);
-   if (ec)
-   {
-     // An error occurred.
-   }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:shutdown_type basic_socket_streambuf::shutdown_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 shutdown_type..basic_socket_streambuf] 
-Different ways a socket may be shutdown. 
-
-
-  enum shutdown_type
-
-[indexterm2 shutdown_receive..basic_socket_streambuf]
-[indexterm2 shutdown_send..basic_socket_streambuf]
-[indexterm2 shutdown_both..basic_socket_streambuf]
-
-[heading Values]
-[variablelist
-
-  [
-    [shutdown_receive]
-    [Shutdown the receive side of the socket. ]
-  ]
-
-  [
-    [shutdown_send]
-    [Shutdown the send side of the socket. ]
-  ]
-
-  [
-    [shutdown_both]
-    [Shutdown both send and receive on the socket. ]
-  ]
-
-]
+  basic_socket< Protocol > & socket();
 
 
 
@@ -41450,7 +33972,7 @@
 
 [section:sync basic_socket_streambuf::sync]
 
-[indexterm2 sync..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.sync..sync..basic_socket_streambuf] 
 
   int sync();
 
@@ -41462,11 +33984,11 @@
 
 [section:time_point basic_socket_streambuf::time_point]
 
-[indexterm2 time_point..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.time_point..time_point..basic_socket_streambuf] 
 The time type. 
 
 
-  typedef TimeTraits::time_point time_point;
+  typedef WaitTraits::time_point time_point;
 
 
 
@@ -41483,11 +34005,11 @@
 
 [section:time_type basic_socket_streambuf::time_type]
 
-[indexterm2 time_type..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.time_type..time_type..basic_socket_streambuf] 
 (Deprecated: Use time\_point.) The time type. 
 
 
-  typedef TimeTraits::time_type time_type;
+  typedef WaitTraits::time_type time_type;
 
 
 
@@ -41502,27 +34024,9 @@
 
 
 
-[section:timer_handler basic_socket_streambuf::timer_handler]
-
-[indexterm2 timer_handler..basic_socket_streambuf] 
-
-  friend struct timer_handler();
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
 [section:underflow basic_socket_streambuf::underflow]
 
-[indexterm2 underflow..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf.underflow..underflow..basic_socket_streambuf] 
 
   int_type underflow();
 
@@ -41531,162 +34035,10 @@
 [endsect]
 
 
-[section:wait basic_socket_streambuf::wait]
-
-[indexterm2 wait..basic_socket_streambuf] 
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  void ``[link asio.reference.basic_socket_streambuf.wait.overload1 wait]``(
-      wait_type w);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.wait.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.basic_socket_streambuf.wait.overload2 wait]``(
-      wait_type w,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_socket_streambuf.wait.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::wait (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  void wait(
-      wait_type w);
-
-
-This function is used to perform a blocking wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[w][Specifies the desired socket state.]]
-
-]
-
-
-[heading Example]
-  
-Waiting for a socket to become readable. 
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   socket.wait(asio::ip::tcp::socket::wait_read);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::wait (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  asio::error_code wait(
-      wait_type w,
-      asio::error_code & ec);
-
-
-This function is used to perform a blocking wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[w][Specifies the desired socket state.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-  
-Waiting for a socket to become readable. 
-
-   asio::ip::tcp::socket socket(io_context);
-   ...
-   asio::error_code ec;
-   socket.wait(asio::ip::tcp::socket::wait_read, ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:wait_type basic_socket_streambuf::wait_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 wait_type..basic_socket_streambuf] 
-Wait types. 
-
-
-  enum wait_type
-
-[indexterm2 wait_read..basic_socket_streambuf]
-[indexterm2 wait_write..basic_socket_streambuf]
-[indexterm2 wait_error..basic_socket_streambuf]
-
-[heading Values]
-[variablelist
-
-  [
-    [wait_read]
-    [Wait for a socket to become ready to read. ]
-  ]
-
-  [
-    [wait_write]
-    [Wait for a socket to become ready to write. ]
-  ]
-
-  [
-    [wait_error]
-    [Wait for a socket to have error conditions pending. ]
-  ]
-
-]
-
-
-For use with `basic_socket::wait()` and `basic_socket::async_wait()`. 
-
-
-[endsect]
-
-
 
 [section:_basic_socket_streambuf basic_socket_streambuf::~basic_socket_streambuf]
 
-[indexterm2 ~basic_socket_streambuf..basic_socket_streambuf] 
+[indexterm2 asio.indexterm.basic_socket_streambuf._basic_socket_streambuf..~basic_socket_streambuf..basic_socket_streambuf] 
 Destructor flushes buffered data. 
 
 
@@ -41707,10 +34059,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.StreamSocketService StreamSocketService]`` = stream_socket_service<Protocol>>
+      typename ``[link asio.reference.Protocol Protocol]``>
   class basic_stream_socket :
-    public basic_socket< Protocol, StreamSocketService >
+    public basic_socket< Protocol >
 
 
 [heading Types]
@@ -41768,13 +34119,6 @@
 
   [
 
-    [[link asio.reference.basic_stream_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -41852,13 +34196,6 @@
 
   [
 
-    [[link asio.reference.basic_stream_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -42072,20 +34409,9 @@
     [Write some data to the socket. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_stream_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_stream_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_stream_socket._basic_stream_socket [*~basic_stream_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -42096,6 +34422,11 @@
 
   [
     [[link asio.reference.basic_stream_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_stream_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -42141,7 +34472,7 @@
 
 [section:assign basic_stream_socket::assign]
 
-[indexterm2 assign..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.assign..assign..basic_stream_socket] 
 Assign an existing native socket to the socket. 
 
 
@@ -42150,7 +34481,7 @@
       const native_handle_type & native_socket);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.assign.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.assign.overload2 assign]``(
+  void ``[link asio.reference.basic_stream_socket.assign.overload2 assign]``(
       const protocol_type & protocol,
       const native_handle_type & native_socket,
       asio::error_code & ec);
@@ -42185,7 +34516,7 @@
 Assign an existing native socket to the socket. 
 
 
-  asio::error_code assign(
+  void assign(
       const protocol_type & protocol,
       const native_handle_type & native_socket,
       asio::error_code & ec);
@@ -42203,13 +34534,13 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 async_connect..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.async_connect..async_connect..basic_stream_socket] 
 Start an asynchronous connect. 
 
 
   template<
       typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
       const endpoint_type & peer_endpoint,
       ConnectHandler && handler);
 
@@ -42268,14 +34599,14 @@
 
 [section:async_read_some basic_stream_socket::async_read_some]
 
-[indexterm2 async_read_some..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.async_read_some..async_read_some..basic_stream_socket] 
 Start an asynchronous read. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
       const MutableBufferSequence & buffers,
       ReadHandler && handler);
 
@@ -42324,14 +34655,14 @@
 
 [section:async_receive basic_stream_socket::async_receive]
 
-[indexterm2 async_receive..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.async_receive..async_receive..basic_stream_socket] 
 Start an asynchronous receive. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_stream_socket.async_receive.overload1 async_receive]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_stream_socket.async_receive.overload1 async_receive]``(
       const MutableBufferSequence & buffers,
       ReadHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.async_receive.overload1 more...]]``
@@ -42339,7 +34670,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_stream_socket.async_receive.overload2 async_receive]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_stream_socket.async_receive.overload2 async_receive]``(
       const MutableBufferSequence & buffers,
       socket_base::message_flags flags,
       ReadHandler && handler);
@@ -42355,7 +34686,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
       const MutableBufferSequence & buffers,
       ReadHandler && handler);
 
@@ -42412,7 +34743,7 @@
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
       const MutableBufferSequence & buffers,
       socket_base::message_flags flags,
       ReadHandler && handler);
@@ -42466,14 +34797,14 @@
 
 [section:async_send basic_stream_socket::async_send]
 
-[indexterm2 async_send..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.async_send..async_send..basic_stream_socket] 
 Start an asynchronous send. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_stream_socket.async_send.overload1 async_send]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_stream_socket.async_send.overload1 async_send]``(
       const ConstBufferSequence & buffers,
       WriteHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.async_send.overload1 more...]]``
@@ -42481,7 +34812,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.basic_stream_socket.async_send.overload2 async_send]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_stream_socket.async_send.overload2 async_send]``(
       const ConstBufferSequence & buffers,
       socket_base::message_flags flags,
       WriteHandler && handler);
@@ -42497,7 +34828,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
       const ConstBufferSequence & buffers,
       WriteHandler && handler);
 
@@ -42554,7 +34885,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
       const ConstBufferSequence & buffers,
       socket_base::message_flags flags,
       WriteHandler && handler);
@@ -42612,13 +34943,13 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 async_wait..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.async_wait..async_wait..basic_stream_socket] 
 Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
   template<
       typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
       wait_type w,
       WaitHandler && handler);
 
@@ -42674,14 +35005,14 @@
 
 [section:async_write_some basic_stream_socket::async_write_some]
 
-[indexterm2 async_write_some..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.async_write_some..async_write_some..basic_stream_socket] 
 Start an asynchronous write. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
       const ConstBufferSequence & buffers,
       WriteHandler && handler);
 
@@ -42730,7 +35061,7 @@
 
 [section:at_mark basic_stream_socket::at_mark]
 
-[indexterm2 at_mark..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.at_mark..at_mark..basic_stream_socket] 
 Determine whether the socket is at the out-of-band data mark. 
 
 
@@ -42818,7 +35149,7 @@
 
 [section:available basic_stream_socket::available]
 
-[indexterm2 available..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.available..available..basic_stream_socket] 
 Determine the number of bytes available for reading. 
 
 
@@ -42906,7 +35237,7 @@
 
 [section:basic_stream_socket basic_stream_socket::basic_stream_socket]
 
-[indexterm2 basic_stream_socket..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.basic_stream_socket..basic_stream_socket..basic_stream_socket] 
 Construct a [link asio.reference.basic_stream_socket `basic_stream_socket`] without opening it. 
 
 
@@ -42955,10 +35286,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.StreamSocketService StreamSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   ``[link asio.reference.basic_stream_socket.basic_stream_socket.overload6 basic_stream_socket]``(
-      basic_stream_socket< Protocol1, StreamSocketService1 > && other,
+      basic_stream_socket< Protocol1 > && other,
       typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.basic_stream_socket.overload6 more...]]``
 
@@ -43162,10 +35492,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.StreamSocketService StreamSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   basic_stream_socket(
-      basic_stream_socket< Protocol1, StreamSocketService1 > && other,
+      basic_stream_socket< Protocol1 > && other,
       typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
 
 
@@ -43196,7 +35525,7 @@
 
 [section:bind basic_stream_socket::bind]
 
-[indexterm2 bind..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.bind..bind..basic_stream_socket] 
 Bind the socket to the given local endpoint. 
 
 
@@ -43204,7 +35533,7 @@
       const endpoint_type & endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.bind.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.bind.overload2 bind]``(
+  void ``[link asio.reference.basic_stream_socket.bind.overload2 bind]``(
       const endpoint_type & endpoint,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.bind.overload2 more...]]``
@@ -43274,7 +35603,7 @@
 Bind the socket to the given local endpoint. 
 
 
-  asio::error_code bind(
+  void bind(
       const endpoint_type & endpoint,
       asio::error_code & ec);
 
@@ -43325,7 +35654,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 broadcast..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.broadcast..broadcast..basic_stream_socket] 
 Socket option to permit sending of broadcast messages. 
 
 
@@ -43379,7 +35708,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 bytes_readable..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.bytes_readable..bytes_readable..basic_stream_socket] 
 IO control command to get the amount of data that can be read without blocking. 
 
 
@@ -43418,14 +35747,14 @@
 
 [section:cancel basic_stream_socket::cancel]
 
-[indexterm2 cancel..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.cancel..cancel..basic_stream_socket] 
 Cancel all asynchronous operations associated with the socket. 
 
 
   void ``[link asio.reference.basic_stream_socket.cancel.overload1 cancel]``();
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.cancel.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.cancel.overload2 cancel]``(
+  void ``[link asio.reference.basic_stream_socket.cancel.overload2 cancel]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.cancel.overload2 more...]]``
 
@@ -43489,7 +35818,7 @@
 Cancel all asynchronous operations associated with the socket. 
 
 
-  asio::error_code cancel(
+  void cancel(
       asio::error_code & ec);
 
 
@@ -43534,14 +35863,14 @@
 
 [section:close basic_stream_socket::close]
 
-[indexterm2 close..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.close..close..basic_stream_socket] 
 Close the socket. 
 
 
   void ``[link asio.reference.basic_stream_socket.close.overload1 close]``();
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.close.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.close.overload2 close]``(
+  void ``[link asio.reference.basic_stream_socket.close.overload2 close]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.close.overload2 more...]]``
 
@@ -43591,7 +35920,7 @@
 Close the socket. 
 
 
-  asio::error_code close(
+  void close(
       asio::error_code & ec);
 
 
@@ -43639,7 +35968,7 @@
 
 [section:connect basic_stream_socket::connect]
 
-[indexterm2 connect..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.connect..connect..basic_stream_socket] 
 Connect the socket to the specified endpoint. 
 
 
@@ -43647,7 +35976,7 @@
       const endpoint_type & peer_endpoint);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.connect.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.connect.overload2 connect]``(
+  void ``[link asio.reference.basic_stream_socket.connect.overload2 connect]``(
       const endpoint_type & peer_endpoint,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.connect.overload2 more...]]``
@@ -43719,7 +36048,7 @@
 Connect the socket to the specified endpoint. 
 
 
-  asio::error_code connect(
+  void connect(
       const endpoint_type & peer_endpoint,
       asio::error_code & ec);
 
@@ -43772,7 +36101,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 debug..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.debug..debug..basic_stream_socket] 
 Socket option to enable socket-level debugging. 
 
 
@@ -43826,7 +36155,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 do_not_route..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.do_not_route..do_not_route..basic_stream_socket] 
 Socket option to prevent routing, use local interfaces only. 
 
 
@@ -43880,7 +36209,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 enable_connection_aborted..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.enable_connection_aborted..enable_connection_aborted..basic_stream_socket] 
 Socket option to report aborted connections on accept. 
 
 
@@ -43931,7 +36260,7 @@
 
 [section:endpoint_type basic_stream_socket::endpoint_type]
 
-[indexterm2 endpoint_type..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.endpoint_type..endpoint_type..basic_stream_socket] 
 The endpoint type. 
 
 
@@ -43953,13 +36282,13 @@
 [section:executor_type basic_stream_socket::executor_type]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 executor_type..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.executor_type..executor_type..basic_stream_socket] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -44034,9 +36363,9 @@
 [section:get_executor basic_stream_socket::get_executor]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 get_executor..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.get_executor..get_executor..basic_stream_socket] 
 Get the executor associated with the object. 
 
 
@@ -44047,61 +36376,13 @@
 [endsect]
 
 
-[section:get_implementation basic_stream_socket::get_implementation]
-
-[indexterm2 get_implementation..basic_stream_socket] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.basic_stream_socket.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.basic_stream_socket.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.get_implementation.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
 
 [section:get_io_context basic_stream_socket::get_io_context]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 get_io_context..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.get_io_context..get_io_context..basic_stream_socket] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -44125,9 +36406,9 @@
 [section:get_io_service basic_stream_socket::get_io_service]
 
 
-['Inherited from basic_io_object.]
+['Inherited from basic_socket.]
 
-[indexterm2 get_io_service..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.get_io_service..get_io_service..basic_stream_socket] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -44149,15 +36430,19 @@
 
 [section:get_option basic_stream_socket::get_option]
 
-[indexterm2 get_option..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.get_option..get_option..basic_stream_socket] 
 Get an option from the socket. 
 
 
+  template<
+      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
   void ``[link asio.reference.basic_stream_socket.get_option.overload1 get_option]``(
       GettableSocketOption & option) const;
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.get_option.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.get_option.overload2 get_option]``(
+  template<
+      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
+  void ``[link asio.reference.basic_stream_socket.get_option.overload2 get_option]``(
       GettableSocketOption & option,
       asio::error_code & ec) const;
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.get_option.overload2 more...]]``
@@ -44233,7 +36518,7 @@
 
   template<
       typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code get_option(
+  void get_option(
       GettableSocketOption & option,
       asio::error_code & ec) const;
 
@@ -44280,89 +36565,21 @@
 
 [endsect]
 
-[section:get_service basic_stream_socket::get_service]
-
-[indexterm2 get_service..basic_stream_socket] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.basic_stream_socket.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.basic_stream_socket.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.get_service.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_stream_socket::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..basic_stream_socket] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:io_control basic_stream_socket::io_control]
 
-[indexterm2 io_control..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.io_control..io_control..basic_stream_socket] 
 Perform an IO control command on the socket. 
 
 
+  template<
+      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
   void ``[link asio.reference.basic_stream_socket.io_control.overload1 io_control]``(
       IoControlCommand & command);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.io_control.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.io_control.overload2 io_control]``(
+  template<
+      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
+  void ``[link asio.reference.basic_stream_socket.io_control.overload2 io_control]``(
       IoControlCommand & command,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.io_control.overload2 more...]]``
@@ -44438,7 +36655,7 @@
 
   template<
       typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
+  void io_control(
       IoControlCommand & command,
       asio::error_code & ec);
 
@@ -44491,7 +36708,7 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 is_open..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.is_open..is_open..basic_stream_socket] 
 Determine whether the socket is open. 
 
 
@@ -44508,7 +36725,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 keep_alive..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.keep_alive..keep_alive..basic_stream_socket] 
 Socket option to send keep-alives. 
 
 
@@ -44562,7 +36779,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 linger..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.linger..linger..basic_stream_socket] 
 Socket option to specify whether the socket lingers on close if unsent data is present. 
 
 
@@ -44613,7 +36830,7 @@
 
 [section:local_endpoint basic_stream_socket::local_endpoint]
 
-[indexterm2 local_endpoint..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.local_endpoint..local_endpoint..basic_stream_socket] 
 Get the local endpoint of the socket. 
 
 
@@ -44730,7 +36947,7 @@
 
 [section:lowest_layer basic_stream_socket::lowest_layer]
 
-[indexterm2 lowest_layer..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.lowest_layer..lowest_layer..basic_stream_socket] 
 Get a reference to the lowest layer. 
 
 
@@ -44804,11 +37021,11 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 lowest_layer_type..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.lowest_layer_type..lowest_layer_type..basic_stream_socket] 
 A [link asio.reference.basic_socket `basic_socket`] is always the lowest layer. 
 
 
-  typedef basic_socket< Protocol, StreamSocketService > lowest_layer_type;
+  typedef basic_socket< Protocol > lowest_layer_type;
 
 
 [heading Types]
@@ -44866,13 +37083,6 @@
 
   [
 
-    [[link asio.reference.basic_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -44950,13 +37160,6 @@
 
   [
 
-    [[link asio.reference.basic_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -45135,16 +37338,6 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.basic_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
     [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
     [Protected destructor to prevent deletion through this type. ]
   ]
@@ -45157,6 +37350,11 @@
 
   [
     [[link asio.reference.basic_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -45210,8 +37408,8 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 max_connections..basic_stream_socket] 
-The maximum length of the queue of pending incoming connections. 
+[indexterm2 asio.indexterm.basic_stream_socket.max_connections..max_connections..basic_stream_socket] 
+(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections. 
 
 
   static const int max_connections = implementation_defined;
@@ -45222,12 +37420,29 @@
 
 
 
+[section:max_listen_connections basic_stream_socket::max_listen_connections]
+
+
+['Inherited from socket_base.]
+
+[indexterm2 asio.indexterm.basic_stream_socket.max_listen_connections..max_listen_connections..basic_stream_socket] 
+The maximum length of the queue of pending incoming connections. 
+
+
+  static const int max_listen_connections = implementation_defined;
+
+
+
+[endsect]
+
+
+
 [section:message_do_not_route basic_stream_socket::message_do_not_route]
 
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_do_not_route..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.message_do_not_route..message_do_not_route..basic_stream_socket] 
 Specify that the data should not be subject to routing. 
 
 
@@ -45244,7 +37459,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_end_of_record..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.message_end_of_record..message_end_of_record..basic_stream_socket] 
 Specifies that the data marks the end of a record. 
 
 
@@ -45261,7 +37476,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_flags..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.message_flags..message_flags..basic_stream_socket] 
 Bitmask type for flags that can be passed to send and receive operations. 
 
 
@@ -45285,7 +37500,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_out_of_band..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.message_out_of_band..message_out_of_band..basic_stream_socket] 
 Process out-of-band data. 
 
 
@@ -45302,7 +37517,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 message_peek..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.message_peek..message_peek..basic_stream_socket] 
 Peek at incoming data without removing it from the input queue. 
 
 
@@ -45319,7 +37534,7 @@
 
 ['Inherited from basic_socket.]
 
-[indexterm2 native_handle..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.native_handle..native_handle..basic_stream_socket] 
 Get the native socket representation. 
 
 
@@ -45335,11 +37550,11 @@
 
 [section:native_handle_type basic_stream_socket::native_handle_type]
 
-[indexterm2 native_handle_type..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.native_handle_type..native_handle_type..basic_stream_socket] 
 The native representation of a socket. 
 
 
-  typedef StreamSocketService::native_handle_type native_handle_type;
+  typedef implementation_defined native_handle_type;
 
 
 
@@ -45355,7 +37570,7 @@
 
 [section:native_non_blocking basic_stream_socket::native_non_blocking]
 
-[indexterm2 native_non_blocking..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.native_non_blocking..native_non_blocking..basic_stream_socket] 
 Gets the non-blocking mode of the native socket implementation. 
 
 
@@ -45370,7 +37585,7 @@
       bool mode);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.native_non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.native_non_blocking.overload3 native_non_blocking]``(
+  void ``[link asio.reference.basic_stream_socket.native_non_blocking.overload3 native_non_blocking]``(
       bool mode,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.native_non_blocking.overload3 more...]]``
@@ -45604,7 +37819,7 @@
 Sets the non-blocking mode of the native socket implementation. 
 
 
-  asio::error_code native_non_blocking(
+  void native_non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -45706,7 +37921,7 @@
 
 [section:non_blocking basic_stream_socket::non_blocking]
 
-[indexterm2 non_blocking..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.non_blocking..non_blocking..basic_stream_socket] 
 Gets the non-blocking mode of the socket. 
 
 
@@ -45721,7 +37936,7 @@
       bool mode);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.non_blocking.overload3 non_blocking]``(
+  void ``[link asio.reference.basic_stream_socket.non_blocking.overload3 non_blocking]``(
       bool mode,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.non_blocking.overload3 more...]]``
@@ -45810,7 +38025,7 @@
 Sets the non-blocking mode of the socket. 
 
 
-  asio::error_code non_blocking(
+  void non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -45842,7 +38057,7 @@
 
 [section:open basic_stream_socket::open]
 
-[indexterm2 open..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.open..open..basic_stream_socket] 
 Open the socket using the specified protocol. 
 
 
@@ -45850,7 +38065,7 @@
       const protocol_type & protocol = protocol_type());
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.open.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.open.overload2 open]``(
+  void ``[link asio.reference.basic_stream_socket.open.overload2 open]``(
       const protocol_type & protocol,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.open.overload2 more...]]``
@@ -45918,7 +38133,7 @@
 Open the socket using the specified protocol. 
 
 
-  asio::error_code open(
+  void open(
       const protocol_type & protocol,
       asio::error_code & ec);
 
@@ -45963,7 +38178,7 @@
 
 [section:operator_eq_ basic_stream_socket::operator=]
 
-[indexterm2 operator=..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.operator_eq_..operator=..basic_stream_socket] 
 Move-assign a [link asio.reference.basic_stream_socket `basic_stream_socket`] from another. 
 
 
@@ -45976,10 +38191,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.StreamSocketService StreamSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   enable_if< is_convertible< Protocol1, Protocol >::value, basic_stream_socket >::type & ``[link asio.reference.basic_stream_socket.operator_eq_.overload2 operator=]``(
-      basic_stream_socket< Protocol1, StreamSocketService1 > && other);
+      basic_stream_socket< Protocol1 > && other);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.operator_eq_.overload2 more...]]``
 
 
@@ -46024,10 +38238,9 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.StreamSocketService StreamSocketService1]``>
+      typename ``[link asio.reference.Protocol Protocol1]``>
   enable_if< is_convertible< Protocol1, Protocol >::value, basic_stream_socket >::type & operator=(
-      basic_stream_socket< Protocol1, StreamSocketService1 > && other);
+      basic_stream_socket< Protocol1 > && other);
 
 
 This assignment operator moves a stream socket from one object to another.
@@ -46058,7 +38271,7 @@
 
 [section:protocol_type basic_stream_socket::protocol_type]
 
-[indexterm2 protocol_type..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.protocol_type..protocol_type..basic_stream_socket] 
 The protocol type. 
 
 
@@ -46078,7 +38291,7 @@
 
 [section:read_some basic_stream_socket::read_some]
 
-[indexterm2 read_some..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.read_some..read_some..basic_stream_socket] 
 Read some data from the socket. 
 
 
@@ -46204,7 +38417,7 @@
 
 [section:receive basic_stream_socket::receive]
 
-[indexterm2 receive..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.receive..receive..basic_stream_socket] 
 Receive some data on the socket. 
 
 
@@ -46413,7 +38626,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 receive_buffer_size..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.receive_buffer_size..receive_buffer_size..basic_stream_socket] 
 Socket option for the receive buffer size of a socket. 
 
 
@@ -46467,7 +38680,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 receive_low_watermark..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.receive_low_watermark..receive_low_watermark..basic_stream_socket] 
 Socket option for the receive low watermark. 
 
 
@@ -46517,7 +38730,7 @@
 
 [section:remote_endpoint basic_stream_socket::remote_endpoint]
 
-[indexterm2 remote_endpoint..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.remote_endpoint..remote_endpoint..basic_stream_socket] 
 Get the remote endpoint of the socket. 
 
 
@@ -46638,7 +38851,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 reuse_address..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.reuse_address..reuse_address..basic_stream_socket] 
 Socket option to allow the socket to be bound to an address that is already in use. 
 
 
@@ -46688,7 +38901,7 @@
 
 [section:send basic_stream_socket::send]
 
-[indexterm2 send..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.send..send..basic_stream_socket] 
 Send some data on the socket. 
 
 
@@ -46893,7 +39106,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 send_buffer_size..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.send_buffer_size..send_buffer_size..basic_stream_socket] 
 Socket option for the send buffer size of a socket. 
 
 
@@ -46947,7 +39160,7 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 send_low_watermark..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.send_low_watermark..send_low_watermark..basic_stream_socket] 
 Socket option for the send low watermark. 
 
 
@@ -46995,41 +39208,21 @@
 [endsect]
 
 
-
-[section:service_type basic_stream_socket::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..basic_stream_socket] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef StreamSocketService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:set_option basic_stream_socket::set_option]
 
-[indexterm2 set_option..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.set_option..set_option..basic_stream_socket] 
 Set an option on the socket. 
 
 
+  template<
+      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
   void ``[link asio.reference.basic_stream_socket.set_option.overload1 set_option]``(
       const SettableSocketOption & option);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.set_option.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.set_option.overload2 set_option]``(
+  template<
+      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
+  void ``[link asio.reference.basic_stream_socket.set_option.overload2 set_option]``(
       const SettableSocketOption & option,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.set_option.overload2 more...]]``
@@ -47104,7 +39297,7 @@
 
   template<
       typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code set_option(
+  void set_option(
       const SettableSocketOption & option,
       asio::error_code & ec);
 
@@ -47152,7 +39345,7 @@
 
 [section:shutdown basic_stream_socket::shutdown]
 
-[indexterm2 shutdown..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.shutdown..shutdown..basic_stream_socket] 
 Disable sends or receives on the socket. 
 
 
@@ -47160,7 +39353,7 @@
       shutdown_type what);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.shutdown.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.shutdown.overload2 shutdown]``(
+  void ``[link asio.reference.basic_stream_socket.shutdown.overload2 shutdown]``(
       shutdown_type what,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.shutdown.overload2 more...]]``
@@ -47229,7 +39422,7 @@
 Disable sends or receives on the socket. 
 
 
-  asio::error_code shutdown(
+  void shutdown(
       shutdown_type what,
       asio::error_code & ec);
 
@@ -47279,15 +39472,15 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 shutdown_type..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.shutdown_type..shutdown_type..basic_stream_socket] 
 Different ways a socket may be shutdown. 
 
 
   enum shutdown_type
 
-[indexterm2 shutdown_receive..basic_stream_socket]
-[indexterm2 shutdown_send..basic_stream_socket]
-[indexterm2 shutdown_both..basic_stream_socket]
+[indexterm2 asio.indexterm.basic_stream_socket.shutdown_type.shutdown_receive..shutdown_receive..basic_stream_socket]
+[indexterm2 asio.indexterm.basic_stream_socket.shutdown_type.shutdown_send..shutdown_send..basic_stream_socket]
+[indexterm2 asio.indexterm.basic_stream_socket.shutdown_type.shutdown_both..shutdown_both..basic_stream_socket]
 
 [heading Values]
 [variablelist
@@ -47316,7 +39509,7 @@
 
 [section:wait basic_stream_socket::wait]
 
-[indexterm2 wait..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.wait..wait..basic_stream_socket] 
 Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
@@ -47324,7 +39517,7 @@
       wait_type w);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.wait.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.basic_stream_socket.wait.overload2 wait]``(
+  void ``[link asio.reference.basic_stream_socket.wait.overload2 wait]``(
       wait_type w,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_stream_socket.wait.overload2 more...]]``
@@ -47383,7 +39576,7 @@
 Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
 
 
-  asio::error_code wait(
+  void wait(
       wait_type w,
       asio::error_code & ec);
 
@@ -47429,15 +39622,15 @@
 
 ['Inherited from socket_base.]
 
-[indexterm2 wait_type..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.wait_type..wait_type..basic_stream_socket] 
 Wait types. 
 
 
   enum wait_type
 
-[indexterm2 wait_read..basic_stream_socket]
-[indexterm2 wait_write..basic_stream_socket]
-[indexterm2 wait_error..basic_stream_socket]
+[indexterm2 asio.indexterm.basic_stream_socket.wait_type.wait_read..wait_read..basic_stream_socket]
+[indexterm2 asio.indexterm.basic_stream_socket.wait_type.wait_write..wait_write..basic_stream_socket]
+[indexterm2 asio.indexterm.basic_stream_socket.wait_type.wait_error..wait_error..basic_stream_socket]
 
 [heading Values]
 [variablelist
@@ -47468,7 +39661,7 @@
 
 [section:write_some basic_stream_socket::write_some]
 
-[indexterm2 write_some..basic_stream_socket] 
+[indexterm2 asio.indexterm.basic_stream_socket.write_some..write_some..basic_stream_socket] 
 Write some data to the socket. 
 
 
@@ -47593,6 +39786,22 @@
 [endsect]
 
 
+[section:_basic_stream_socket basic_stream_socket::~basic_stream_socket]
+
+[indexterm2 asio.indexterm.basic_stream_socket._basic_stream_socket..~basic_stream_socket..basic_stream_socket] 
+Destroys the socket. 
+
+
+  ~basic_stream_socket();
+
+
+This function destroys the socket, cancelling any outstanding asynchronous operations associated with the socket as if by calling `cancel`. 
+
+
+[endsect]
+
+
+
 [endsect]
 
 [section:basic_streambuf basic_streambuf]
@@ -47761,7 +39970,7 @@
 
 [section:basic_streambuf basic_streambuf::basic_streambuf]
 
-[indexterm2 basic_streambuf..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.basic_streambuf..basic_streambuf..basic_streambuf] 
 Construct a [link asio.reference.basic_streambuf `basic_streambuf`] object. 
 
 
@@ -47779,7 +39988,7 @@
 
 [section:capacity basic_streambuf::capacity]
 
-[indexterm2 capacity..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.capacity..capacity..basic_streambuf] 
 Get the current capacity of the [link asio.reference.basic_streambuf `basic_streambuf`]. 
 
 
@@ -47800,7 +40009,7 @@
 
 [section:commit basic_streambuf::commit]
 
-[indexterm2 commit..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.commit..commit..basic_streambuf] 
 Move characters from the output sequence to the input sequence. 
 
 
@@ -47826,7 +40035,7 @@
 
 [section:const_buffers_type basic_streambuf::const_buffers_type]
 
-[indexterm2 const_buffers_type..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.const_buffers_type..const_buffers_type..basic_streambuf] 
 The type used to represent the input sequence as a list of buffers. 
 
 
@@ -47847,7 +40056,7 @@
 
 [section:consume basic_streambuf::consume]
 
-[indexterm2 consume..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.consume..consume..basic_streambuf] 
 Remove characters from the input sequence. 
 
 
@@ -47871,7 +40080,7 @@
 
 [section:data basic_streambuf::data]
 
-[indexterm2 data..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.data..data..basic_streambuf] 
 Get a list of buffers that represents the input sequence. 
 
 
@@ -47897,7 +40106,7 @@
 
 [section:max_size basic_streambuf::max_size]
 
-[indexterm2 max_size..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.max_size..max_size..basic_streambuf] 
 Get the maximum size of the [link asio.reference.basic_streambuf `basic_streambuf`]. 
 
 
@@ -47918,7 +40127,7 @@
 
 [section:mutable_buffers_type basic_streambuf::mutable_buffers_type]
 
-[indexterm2 mutable_buffers_type..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.mutable_buffers_type..mutable_buffers_type..basic_streambuf] 
 The type used to represent the output sequence as a list of buffers. 
 
 
@@ -47939,7 +40148,7 @@
 
 [section:overflow basic_streambuf::overflow]
 
-[indexterm2 overflow..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.overflow..overflow..basic_streambuf] 
 Override std::streambuf behaviour. 
 
 
@@ -47956,7 +40165,7 @@
 
 [section:prepare basic_streambuf::prepare]
 
-[indexterm2 prepare..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.prepare..prepare..basic_streambuf] 
 Get a list of buffers that represents the output sequence, with the given size. 
 
 
@@ -47995,7 +40204,7 @@
 
 [section:reserve basic_streambuf::reserve]
 
-[indexterm2 reserve..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.reserve..reserve..basic_streambuf] 
 
   void reserve(
       std::size_t n);
@@ -48008,7 +40217,7 @@
 
 [section:size basic_streambuf::size]
 
-[indexterm2 size..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.size..size..basic_streambuf] 
 Get the size of the input sequence. 
 
 
@@ -48026,7 +40235,7 @@
    while (i != bufs.end())
    {
      const_buffer buf(*i++);
-     s += buffer_size(buf);
+     s += buf.size();
    }
 
 
@@ -48041,7 +40250,7 @@
 
 [section:underflow basic_streambuf::underflow]
 
-[indexterm2 underflow..basic_streambuf] 
+[indexterm2 asio.indexterm.basic_streambuf.underflow..underflow..basic_streambuf] 
 Override std::streambuf behaviour. 
 
 
@@ -48146,7 +40355,7 @@
 
 [section:basic_streambuf_ref basic_streambuf_ref::basic_streambuf_ref]
 
-[indexterm2 basic_streambuf_ref..basic_streambuf_ref] 
+[indexterm2 asio.indexterm.basic_streambuf_ref.basic_streambuf_ref..basic_streambuf_ref..basic_streambuf_ref] 
 Construct a [link asio.reference.basic_streambuf_ref `basic_streambuf_ref`] for the given [link asio.reference.basic_streambuf `basic_streambuf`] object. 
 
 
@@ -48220,7 +40429,7 @@
 
 [section:capacity basic_streambuf_ref::capacity]
 
-[indexterm2 capacity..basic_streambuf_ref] 
+[indexterm2 asio.indexterm.basic_streambuf_ref.capacity..capacity..basic_streambuf_ref] 
 Get the current capacity of the dynamic buffer. 
 
 
@@ -48234,7 +40443,7 @@
 
 [section:commit basic_streambuf_ref::commit]
 
-[indexterm2 commit..basic_streambuf_ref] 
+[indexterm2 asio.indexterm.basic_streambuf_ref.commit..commit..basic_streambuf_ref] 
 Move bytes from the output sequence to the input sequence. 
 
 
@@ -48249,7 +40458,7 @@
 
 [section:const_buffers_type basic_streambuf_ref::const_buffers_type]
 
-[indexterm2 const_buffers_type..basic_streambuf_ref] 
+[indexterm2 asio.indexterm.basic_streambuf_ref.const_buffers_type..const_buffers_type..basic_streambuf_ref] 
 The type used to represent the input sequence as a list of buffers. 
 
 
@@ -48415,7 +40624,7 @@
 
 [section:consume basic_streambuf_ref::consume]
 
-[indexterm2 consume..basic_streambuf_ref] 
+[indexterm2 asio.indexterm.basic_streambuf_ref.consume..consume..basic_streambuf_ref] 
 Remove characters from the input sequence. 
 
 
@@ -48430,7 +40639,7 @@
 
 [section:data basic_streambuf_ref::data]
 
-[indexterm2 data..basic_streambuf_ref] 
+[indexterm2 asio.indexterm.basic_streambuf_ref.data..data..basic_streambuf_ref] 
 Get a list of buffers that represents the input sequence. 
 
 
@@ -48444,7 +40653,7 @@
 
 [section:max_size basic_streambuf_ref::max_size]
 
-[indexterm2 max_size..basic_streambuf_ref] 
+[indexterm2 asio.indexterm.basic_streambuf_ref.max_size..max_size..basic_streambuf_ref] 
 Get the maximum size of the dynamic buffer. 
 
 
@@ -48458,7 +40667,7 @@
 
 [section:mutable_buffers_type basic_streambuf_ref::mutable_buffers_type]
 
-[indexterm2 mutable_buffers_type..basic_streambuf_ref] 
+[indexterm2 asio.indexterm.basic_streambuf_ref.mutable_buffers_type..mutable_buffers_type..basic_streambuf_ref] 
 The type used to represent the output sequence as a list of buffers. 
 
 
@@ -48624,7 +40833,7 @@
 
 [section:prepare basic_streambuf_ref::prepare]
 
-[indexterm2 prepare..basic_streambuf_ref] 
+[indexterm2 asio.indexterm.basic_streambuf_ref.prepare..prepare..basic_streambuf_ref] 
 Get a list of buffers that represents the output sequence, with the given size. 
 
 
@@ -48639,7 +40848,7 @@
 
 [section:size basic_streambuf_ref::size]
 
-[indexterm2 size..basic_streambuf_ref] 
+[indexterm2 asio.indexterm.basic_streambuf_ref.size..size..basic_streambuf_ref] 
 Get the size of the input sequence. 
 
 
@@ -48661,10 +40870,8 @@
 
   template<
       typename Clock,
-      typename ``[link asio.reference.WaitTraits WaitTraits]`` = asio::wait_traits<Clock>,
-      typename ``[link asio.reference.WaitableTimerService WaitableTimerService]`` = waitable_timer_service<Clock, WaitTraits>>
-  class basic_waitable_timer :
-    public basic_io_object< WaitableTimerService >
+      typename ``[link asio.reference.WaitTraits WaitTraits]``>
+  class basic_waitable_timer
 
 
 [heading Types]
@@ -48694,20 +40901,6 @@
 
   [
 
-    [[link asio.reference.basic_waitable_timer.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_waitable_timer.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_waitable_timer.time_point [*time_point]]]
     [The time point type of the clock. ]
   
@@ -48744,12 +40937,16 @@
   
   [
     [[link asio.reference.basic_waitable_timer.cancel [*cancel]]]
-    [Cancel any asynchronous operations that are waiting on the timer. ]
+    [Cancel any asynchronous operations that are waiting on the timer. 
+
+     (Deprecated: Use non-error_code overload.) Cancel any asynchronous operations that are waiting on the timer. ]
   ]
   
   [
     [[link asio.reference.basic_waitable_timer.cancel_one [*cancel_one]]]
-    [Cancels one asynchronous operation that is waiting on the timer. ]
+    [Cancels one asynchronous operation that is waiting on the timer. 
+
+     (Deprecated: Use non-error_code overload.) Cancels one asynchronous operation that is waiting on the timer. ]
   ]
   
   [
@@ -48761,7 +40958,9 @@
     [[link asio.reference.basic_waitable_timer.expires_at [*expires_at]]]
     [(Deprecated: Use expiry().) Get the timer's expiry time as an absolute time. 
 
-     Set the timer's expiry time as an absolute time. ]
+     Set the timer's expiry time as an absolute time. 
+
+     (Deprecated: Use non-error_code overload.) Set the timer's expiry time as an absolute time. ]
   ]
   
   [
@@ -48801,20 +41000,9 @@
     [Perform a blocking wait on the timer. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_waitable_timer.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_waitable_timer.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_waitable_timer._basic_waitable_timer [*~basic_waitable_timer]]]
+    [Destroys the timer. ]
   ]
   
 ]
@@ -48927,13 +41115,13 @@
 
 [section:async_wait basic_waitable_timer::async_wait]
 
-[indexterm2 async_wait..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.async_wait..async_wait..basic_waitable_timer] 
 Start an asynchronous wait on the timer. 
 
 
   template<
       typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
       WaitHandler && handler);
 
 
@@ -48971,7 +41159,7 @@
 
 [section:basic_waitable_timer basic_waitable_timer::basic_waitable_timer]
 
-[indexterm2 basic_waitable_timer..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.basic_waitable_timer..basic_waitable_timer..basic_waitable_timer] 
 Constructor. 
 
 
@@ -49136,13 +41324,17 @@
 
 [section:cancel basic_waitable_timer::cancel]
 
-[indexterm2 cancel..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.cancel..cancel..basic_waitable_timer] 
 Cancel any asynchronous operations that are waiting on the timer. 
 
 
   std::size_t ``[link asio.reference.basic_waitable_timer.cancel.overload1 cancel]``();
   ``  [''''&raquo;''' [link asio.reference.basic_waitable_timer.cancel.overload1 more...]]``
 
+
+(Deprecated: Use non-error\_code overload.) Cancel any asynchronous operations that are waiting on the timer. 
+
+
   std::size_t ``[link asio.reference.basic_waitable_timer.cancel.overload2 cancel]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_waitable_timer.cancel.overload2 more...]]``
@@ -49197,7 +41389,7 @@
 [section:overload2 basic_waitable_timer::cancel (2 of 2 overloads)]
 
 
-Cancel any asynchronous operations that are waiting on the timer. 
+(Deprecated: Use non-error\_code overload.) Cancel any asynchronous operations that are waiting on the timer. 
 
 
   std::size_t cancel(
@@ -49244,13 +41436,17 @@
 
 [section:cancel_one basic_waitable_timer::cancel_one]
 
-[indexterm2 cancel_one..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.cancel_one..cancel_one..basic_waitable_timer] 
 Cancels one asynchronous operation that is waiting on the timer. 
 
 
   std::size_t ``[link asio.reference.basic_waitable_timer.cancel_one.overload1 cancel_one]``();
   ``  [''''&raquo;''' [link asio.reference.basic_waitable_timer.cancel_one.overload1 more...]]``
 
+
+(Deprecated: Use non-error\_code overload.) Cancels one asynchronous operation that is waiting on the timer. 
+
+
   std::size_t ``[link asio.reference.basic_waitable_timer.cancel_one.overload2 cancel_one]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.basic_waitable_timer.cancel_one.overload2 more...]]``
@@ -49305,7 +41501,7 @@
 [section:overload2 basic_waitable_timer::cancel_one (2 of 2 overloads)]
 
 
-Cancels one asynchronous operation that is waiting on the timer. 
+(Deprecated: Use non-error\_code overload.) Cancels one asynchronous operation that is waiting on the timer. 
 
 
   std::size_t cancel_one(
@@ -49353,7 +41549,7 @@
 
 [section:clock_type basic_waitable_timer::clock_type]
 
-[indexterm2 clock_type..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.clock_type..clock_type..basic_waitable_timer] 
 The clock type. 
 
 
@@ -49374,7 +41570,7 @@
 
 [section:duration basic_waitable_timer::duration]
 
-[indexterm2 duration..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.duration..duration..basic_waitable_timer] 
 The duration type of the clock. 
 
 
@@ -49395,14 +41591,11 @@
 
 [section:executor_type basic_waitable_timer::executor_type]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 executor_type..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.executor_type..executor_type..basic_waitable_timer] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -49473,25 +41666,10 @@
 [endsect]
 
 
+
 [section:expires_after basic_waitable_timer::expires_after]
 
-[indexterm2 expires_after..basic_waitable_timer] 
-Set the timer's expiry time relative to now. 
-
-
-  std::size_t ``[link asio.reference.basic_waitable_timer.expires_after.overload1 expires_after]``(
-      const duration & expiry_time);
-  ``  [''''&raquo;''' [link asio.reference.basic_waitable_timer.expires_after.overload1 more...]]``
-
-  std::size_t ``[link asio.reference.basic_waitable_timer.expires_after.overload2 expires_after]``(
-      const duration & expiry_time,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.basic_waitable_timer.expires_after.overload2 more...]]``
-
-
-[section:overload1 basic_waitable_timer::expires_after (1 of 2 overloads)]
-
-
+[indexterm2 asio.indexterm.basic_waitable_timer.expires_after..expires_after..basic_waitable_timer] 
 Set the timer's expiry time relative to now. 
 
 
@@ -49543,59 +41721,9 @@
 [endsect]
 
 
-
-[section:overload2 basic_waitable_timer::expires_after (2 of 2 overloads)]
-
-
-Set the timer's expiry time relative to now. 
-
-
-  std::size_t expires_after(
-      const duration & expiry_time,
-      asio::error_code & ec);
-
-
-This function sets the expiry time. Any pending asynchronous wait operations will be cancelled. The handler for each cancelled operation will be invoked with the `asio::error::operation_aborted` error code.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[expiry_time][The expiry time to be used for the timer.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of asynchronous operations that were cancelled.
-
-
-[heading Remarks]
-      
-If the timer has already expired when `expires_after()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* have been queued for invocation in the near future.
-
-These handlers can no longer be cancelled, and therefore are passed an error code that indicates the successful completion of the wait operation. 
-
-
-[endsect]
-
-
-[endsect]
-
 [section:expires_at basic_waitable_timer::expires_at]
 
-[indexterm2 expires_at..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.expires_at..expires_at..basic_waitable_timer] 
 (Deprecated: Use `expiry()`.) Get the timer's expiry time as an absolute time. 
 
 
@@ -49610,6 +41738,10 @@
       const time_point & expiry_time);
   ``  [''''&raquo;''' [link asio.reference.basic_waitable_timer.expires_at.overload2 more...]]``
 
+
+(Deprecated: Use non-error\_code overload.) Set the timer's expiry time as an absolute time. 
+
+
   std::size_t ``[link asio.reference.basic_waitable_timer.expires_at.overload3 expires_at]``(
       const time_point & expiry_time,
       asio::error_code & ec);
@@ -49690,7 +41822,7 @@
 [section:overload3 basic_waitable_timer::expires_at (3 of 3 overloads)]
 
 
-Set the timer's expiry time as an absolute time. 
+(Deprecated: Use non-error\_code overload.) Set the timer's expiry time as an absolute time. 
 
 
   std::size_t expires_at(
@@ -49738,7 +41870,7 @@
 
 [section:expires_from_now basic_waitable_timer::expires_from_now]
 
-[indexterm2 expires_from_now..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.expires_from_now..expires_from_now..basic_waitable_timer] 
 (Deprecated: Use `expiry()`.) Get the timer's expiry time relative to now. 
 
 
@@ -49882,7 +42014,7 @@
 
 [section:expiry basic_waitable_timer::expiry]
 
-[indexterm2 expiry..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.expiry..expiry..basic_waitable_timer] 
 Get the timer's expiry time as an absolute time. 
 
 
@@ -49898,10 +42030,7 @@
 
 [section:get_executor basic_waitable_timer::get_executor]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.get_executor..get_executor..basic_waitable_timer] 
 Get the executor associated with the object. 
 
 
@@ -49912,61 +42041,10 @@
 [endsect]
 
 
-[section:get_implementation basic_waitable_timer::get_implementation]
-
-[indexterm2 get_implementation..basic_waitable_timer] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.basic_waitable_timer.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_waitable_timer.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.basic_waitable_timer.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_waitable_timer.get_implementation.overload2 more...]]``
-
-
-[section:overload1 basic_waitable_timer::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_waitable_timer::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
 
 [section:get_io_context basic_waitable_timer::get_io_context]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.get_io_context..get_io_context..basic_waitable_timer] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -49989,10 +42067,7 @@
 
 [section:get_io_service basic_waitable_timer::get_io_service]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.get_io_service..get_io_service..basic_waitable_timer] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -50012,82 +42087,10 @@
 [endsect]
 
 
-[section:get_service basic_waitable_timer::get_service]
-
-[indexterm2 get_service..basic_waitable_timer] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.basic_waitable_timer.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.basic_waitable_timer.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.basic_waitable_timer.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.basic_waitable_timer.get_service.overload2 more...]]``
-
-
-[section:overload1 basic_waitable_timer::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_waitable_timer::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_waitable_timer::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..basic_waitable_timer] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_waitable_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 
 [section:operator_eq_ basic_waitable_timer::operator=]
 
-[indexterm2 operator=..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.operator_eq_..operator=..basic_waitable_timer] 
 Move-assign a [link asio.reference.basic_waitable_timer `basic_waitable_timer`] from another. 
 
 
@@ -50095,7 +42098,7 @@
       basic_waitable_timer && other);
 
 
-This assignment operator moves a timer from one object to another.
+This assignment operator moves a timer from one object to another. Cancels any outstanding asynchronous operations associated with the target object.
 
 
 [heading Parameters]
@@ -50119,33 +42122,9 @@
 
 
 
-[section:service_type basic_waitable_timer::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..basic_waitable_timer] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef WaitableTimerService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_waitable_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
 [section:time_point basic_waitable_timer::time_point]
 
-[indexterm2 time_point..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.time_point..time_point..basic_waitable_timer] 
 The time point type of the clock. 
 
 
@@ -50166,7 +42145,7 @@
 
 [section:traits_type basic_waitable_timer::traits_type]
 
-[indexterm2 traits_type..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.traits_type..traits_type..basic_waitable_timer] 
 The wait traits type. 
 
 
@@ -50186,7 +42165,7 @@
 
 [section:wait basic_waitable_timer::wait]
 
-[indexterm2 wait..basic_waitable_timer] 
+[indexterm2 asio.indexterm.basic_waitable_timer.wait..wait..basic_waitable_timer] 
 Perform a blocking wait on the timer. 
 
 
@@ -50257,6 +42236,22 @@
 [endsect]
 
 
+[section:_basic_waitable_timer basic_waitable_timer::~basic_waitable_timer]
+
+[indexterm2 asio.indexterm.basic_waitable_timer._basic_waitable_timer..~basic_waitable_timer..basic_waitable_timer] 
+Destroys the timer. 
+
+
+  ~basic_waitable_timer();
+
+
+This function destroys the timer, cancelling any outstanding asynchronous wait operations associated with the timer as if by calling `cancel`. 
+
+
+[endsect]
+
+
+
 [endsect]
 
 [section:basic_yield_context basic_yield_context]
@@ -50333,7 +42328,7 @@
 
 [section:basic_yield_context basic_yield_context::basic_yield_context]
 
-[indexterm2 basic_yield_context..basic_yield_context] 
+[indexterm2 asio.indexterm.basic_yield_context.basic_yield_context..basic_yield_context..basic_yield_context] 
 Construct a yield context to represent the specified coroutine. 
 
 
@@ -50396,7 +42391,7 @@
 
 [section:callee_type basic_yield_context::callee_type]
 
-[indexterm2 callee_type..basic_yield_context] 
+[indexterm2 asio.indexterm.basic_yield_context.callee_type..callee_type..basic_yield_context] 
 The coroutine callee type, used by the implementation. 
 
 
@@ -50429,7 +42424,7 @@
 
 [section:caller_type basic_yield_context::caller_type]
 
-[indexterm2 caller_type..basic_yield_context] 
+[indexterm2 asio.indexterm.basic_yield_context.caller_type..caller_type..basic_yield_context] 
 The coroutine caller type, used by the implementation. 
 
 
@@ -50462,7 +42457,7 @@
 
 [section:operator_lb__rb_ basic_yield_context::operator\[\]]
 
-[indexterm2 operator\[\]..basic_yield_context] 
+[indexterm2 asio.indexterm.basic_yield_context.operator_lb__rb_..operator\[\]..basic_yield_context] 
 Return a yield context that sets the specified [link asio.reference.error_code `error_code`]. 
 
 
@@ -50498,7 +42493,7 @@
 
 [section:bind_executor bind_executor]
 
-[indexterm1 bind_executor] 
+[indexterm1 asio.indexterm.bind_executor..bind_executor] 
 Associate an object of type `T` with an executor of type `Executor`. 
 
     
@@ -50570,34 +42565,34 @@
 
 [section:buffer buffer]
 
-[indexterm1 buffer] 
+[indexterm1 asio.indexterm.buffer..buffer] 
 The `asio::buffer` function is used to create a buffer object to represent raw memory, an array of POD elements, a vector of POD elements, or a std::string. 
 
       
-  mutable_buffers_1 ``[link asio.reference.buffer.overload1 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload1 buffer]``(
       const mutable_buffer & b);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload1 more...]]``
 
-  mutable_buffers_1 ``[link asio.reference.buffer.overload2 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload2 buffer]``(
       const mutable_buffer & b,
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload2 more...]]``
 
-  const_buffers_1 ``[link asio.reference.buffer.overload3 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload3 buffer]``(
       const const_buffer & b);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload3 more...]]``
 
-  const_buffers_1 ``[link asio.reference.buffer.overload4 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload4 buffer]``(
       const const_buffer & b,
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload4 more...]]``
 
-  mutable_buffers_1 ``[link asio.reference.buffer.overload5 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload5 buffer]``(
       void * data,
       std::size_t size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload5 more...]]``
 
-  const_buffers_1 ``[link asio.reference.buffer.overload6 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload6 buffer]``(
       const void * data,
       std::size_t size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload6 more...]]``
@@ -50605,14 +42600,14 @@
   template<
       typename PodType,
       std::size_t N>
-  mutable_buffers_1 ``[link asio.reference.buffer.overload7 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload7 buffer]``(
       PodType (&data)[N]);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload7 more...]]``
 
   template<
       typename PodType,
       std::size_t N>
-  mutable_buffers_1 ``[link asio.reference.buffer.overload8 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload8 buffer]``(
       PodType (&data)[N],
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload8 more...]]``
@@ -50620,14 +42615,14 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 ``[link asio.reference.buffer.overload9 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload9 buffer]``(
       const PodType (&data)[N]);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload9 more...]]``
 
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 ``[link asio.reference.buffer.overload10 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload10 buffer]``(
       const PodType (&data)[N],
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload10 more...]]``
@@ -50635,14 +42630,14 @@
   template<
       typename PodType,
       std::size_t N>
-  mutable_buffers_1 ``[link asio.reference.buffer.overload11 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload11 buffer]``(
       boost::array< PodType, N > & data);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload11 more...]]``
 
   template<
       typename PodType,
       std::size_t N>
-  mutable_buffers_1 ``[link asio.reference.buffer.overload12 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload12 buffer]``(
       boost::array< PodType, N > & data,
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload12 more...]]``
@@ -50650,14 +42645,14 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 ``[link asio.reference.buffer.overload13 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload13 buffer]``(
       boost::array< const PodType, N > & data);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload13 more...]]``
 
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 ``[link asio.reference.buffer.overload14 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload14 buffer]``(
       boost::array< const PodType, N > & data,
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload14 more...]]``
@@ -50665,14 +42660,14 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 ``[link asio.reference.buffer.overload15 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload15 buffer]``(
       const boost::array< PodType, N > & data);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload15 more...]]``
 
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 ``[link asio.reference.buffer.overload16 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload16 buffer]``(
       const boost::array< PodType, N > & data,
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload16 more...]]``
@@ -50680,14 +42675,14 @@
   template<
       typename PodType,
       std::size_t N>
-  mutable_buffers_1 ``[link asio.reference.buffer.overload17 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload17 buffer]``(
       std::array< PodType, N > & data);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload17 more...]]``
 
   template<
       typename PodType,
       std::size_t N>
-  mutable_buffers_1 ``[link asio.reference.buffer.overload18 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload18 buffer]``(
       std::array< PodType, N > & data,
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload18 more...]]``
@@ -50695,14 +42690,14 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 ``[link asio.reference.buffer.overload19 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload19 buffer]``(
       std::array< const PodType, N > & data);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload19 more...]]``
 
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 ``[link asio.reference.buffer.overload20 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload20 buffer]``(
       std::array< const PodType, N > & data,
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload20 more...]]``
@@ -50710,14 +42705,14 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 ``[link asio.reference.buffer.overload21 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload21 buffer]``(
       const std::array< PodType, N > & data);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload21 more...]]``
 
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 ``[link asio.reference.buffer.overload22 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload22 buffer]``(
       const std::array< PodType, N > & data,
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload22 more...]]``
@@ -50725,14 +42720,14 @@
   template<
       typename PodType,
       typename Allocator>
-  mutable_buffers_1 ``[link asio.reference.buffer.overload23 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload23 buffer]``(
       std::vector< PodType, Allocator > & data);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload23 more...]]``
 
   template<
       typename PodType,
       typename Allocator>
-  mutable_buffers_1 ``[link asio.reference.buffer.overload24 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload24 buffer]``(
       std::vector< PodType, Allocator > & data,
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload24 more...]]``
@@ -50740,14 +42735,14 @@
   template<
       typename PodType,
       typename Allocator>
-  const_buffers_1 ``[link asio.reference.buffer.overload25 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload25 buffer]``(
       const std::vector< PodType, Allocator > & data);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload25 more...]]``
 
   template<
       typename PodType,
       typename Allocator>
-  const_buffers_1 ``[link asio.reference.buffer.overload26 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload26 buffer]``(
       const std::vector< PodType, Allocator > & data,
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload26 more...]]``
@@ -50756,7 +42751,7 @@
       typename Elem,
       typename Traits,
       typename Allocator>
-  mutable_buffers_1 ``[link asio.reference.buffer.overload27 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload27 buffer]``(
       std::basic_string< Elem, Traits, Allocator > & data);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload27 more...]]``
 
@@ -50764,7 +42759,7 @@
       typename Elem,
       typename Traits,
       typename Allocator>
-  mutable_buffers_1 ``[link asio.reference.buffer.overload28 buffer]``(
+  mutable_buffer ``[link asio.reference.buffer.overload28 buffer]``(
       std::basic_string< Elem, Traits, Allocator > & data,
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload28 more...]]``
@@ -50773,7 +42768,7 @@
       typename Elem,
       typename Traits,
       typename Allocator>
-  const_buffers_1 ``[link asio.reference.buffer.overload29 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload29 buffer]``(
       const std::basic_string< Elem, Traits, Allocator > & data);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload29 more...]]``
 
@@ -50781,11 +42776,26 @@
       typename Elem,
       typename Traits,
       typename Allocator>
-  const_buffers_1 ``[link asio.reference.buffer.overload30 buffer]``(
+  const_buffer ``[link asio.reference.buffer.overload30 buffer]``(
       const std::basic_string< Elem, Traits, Allocator > & data,
       std::size_t max_size_in_bytes);
   ``  [''''&raquo;''' [link asio.reference.buffer.overload30 more...]]``
 
+  template<
+      typename Elem,
+      typename Traits>
+  const_buffer ``[link asio.reference.buffer.overload31 buffer]``(
+      basic_string_view< Elem, Traits > data);
+  ``  [''''&raquo;''' [link asio.reference.buffer.overload31 more...]]``
+
+  template<
+      typename Elem,
+      typename Traits>
+  const_buffer ``[link asio.reference.buffer.overload32 buffer]``(
+      basic_string_view< Elem, Traits > data,
+      std::size_t max_size_in_bytes);
+  ``  [''''&raquo;''' [link asio.reference.buffer.overload32 more...]]``
+
 A buffer object represents a contiguous region of memory as a 2-tuple consisting of a pointer and size in bytes. A tuple of the form `{void*, size_t}` specifies a mutable (modifiable) region of memory. Similarly, a tuple of the form `{const void*, size_t}` specifies a const (non-modifiable) region of memory. These two forms correspond to the classes [link asio.reference.mutable_buffer `mutable_buffer`] and [link asio.reference.const_buffer `const_buffer`], respectively. To mirror C++'s conversion rules, a [link asio.reference.mutable_buffer `mutable_buffer`] is implicitly convertible to a [link asio.reference.const_buffer `const_buffer`], and the opposite conversion is not permitted.
 
 The simplest use case involves reading or writing a single buffer of a specified size:
@@ -50825,24 +42835,24 @@
   
 
 
-The contents of a buffer may be accessed using the [link asio.reference.buffer_size `buffer_size`]  and [link asio.reference.buffer_cast `buffer_cast`]  functions:
+The contents of a buffer may be accessed using the `data()` and `size()` member functions:
 
 
 
    asio::mutable_buffer b1 = ...;
-   std::size_t s1 = asio::buffer_size(b1);
-   unsigned char* p1 = asio::buffer_cast<unsigned char*>(b1);
+   std::size_t s1 = b1.size();
+   unsigned char* p1 = static_cast<unsigned char*>(b1.data());
 
    asio::const_buffer b2 = ...;
-   std::size_t s2 = asio::buffer_size(b2);
-   const void* p2 = asio::buffer_cast<const void*>(b2); 
+   std::size_t s2 = b2.size();
+   const void* p2 = b2.data(); 
 
 
 
 
-The `asio::buffer_cast` function permits violations of type safety, so uses of it in application code should be carefully considered.
+The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered.
 
-For convenience, the [link asio.reference.buffer_size `buffer_size`]  function also works on buffer sequences (that is, types meeting the ConstBufferSequence or MutableBufferSequence type requirements). In this case, the function returns the total size of all buffers in the sequence.
+For convenience, a [link asio.reference.buffer_size `buffer_size`]  function is provided that works with both buffers and buffer sequences (that is, types meeting the ConstBufferSequence or MutableBufferSequence type requirements). In this case, the function returns the total size of all buffers in the sequence.
 
 
 [heading Buffer Copying]
@@ -50851,7 +42861,7 @@
 
 The [link asio.reference.buffer_copy `buffer_copy`]  function may be used to copy raw bytes between individual buffers and buffer sequences.
 
-In particular, when used with the [link asio.reference.buffer_size `buffer_size`] , the [link asio.reference.buffer_copy `buffer_copy`]  function can be used to linearise a sequence of buffers. For example:
+In particular, when used with the [link asio.reference.buffer_size `buffer_size`]  function, the [link asio.reference.buffer_copy `buffer_copy`]  function can be used to linearise a sequence of buffers. For example:
 
 
 
@@ -50967,20 +42977,20 @@
 ['Convenience header: ][^asio.hpp]
 
 
-[section:overload1 buffer (1 of 30 overloads)]
+[section:overload1 buffer (1 of 32 overloads)]
 
 
 Create a new modifiable buffer from an existing buffer. 
 
 
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       const mutable_buffer & b);
 
 
 
 [heading Return Value]
       
-`mutable_buffers_1(b)`. 
+`mutable_buffer(b)`. 
 
 
 
@@ -50989,13 +42999,13 @@
 
 
 
-[section:overload2 buffer (2 of 30 overloads)]
+[section:overload2 buffer (2 of 32 overloads)]
 
 
 Create a new modifiable buffer from an existing buffer. 
 
 
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       const mutable_buffer & b,
       std::size_t max_size_in_bytes);
 
@@ -51003,11 +43013,11 @@
 
 [heading Return Value]
       
-A [link asio.reference.mutable_buffers_1 `mutable_buffers_1`] value equivalent to: 
+A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to: 
 
-   mutable_buffers_1(
-       buffer_cast<void*>(b),
-       min(buffer_size(b), max_size_in_bytes)); 
+   mutable_buffer(
+       b.data(),
+       min(b.size(), max_size_in_bytes)); 
 
 
 
@@ -51019,20 +43029,20 @@
 
 
 
-[section:overload3 buffer (3 of 30 overloads)]
+[section:overload3 buffer (3 of 32 overloads)]
 
 
 Create a new non-modifiable buffer from an existing buffer. 
 
 
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const const_buffer & b);
 
 
 
 [heading Return Value]
       
-`const_buffers_1(b)`. 
+`const_buffer(b)`. 
 
 
 
@@ -51041,13 +43051,13 @@
 
 
 
-[section:overload4 buffer (4 of 30 overloads)]
+[section:overload4 buffer (4 of 32 overloads)]
 
 
 Create a new non-modifiable buffer from an existing buffer. 
 
 
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const const_buffer & b,
       std::size_t max_size_in_bytes);
 
@@ -51055,11 +43065,11 @@
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
-       buffer_cast<const void*>(b),
-       min(buffer_size(b), max_size_in_bytes)); 
+   const_buffer(
+       b.data(),
+       min(b.size(), max_size_in_bytes)); 
 
 
 
@@ -51071,13 +43081,13 @@
 
 
 
-[section:overload5 buffer (5 of 30 overloads)]
+[section:overload5 buffer (5 of 32 overloads)]
 
 
 Create a new modifiable buffer that represents the given memory range. 
 
 
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       void * data,
       std::size_t size_in_bytes);
 
@@ -51085,7 +43095,7 @@
 
 [heading Return Value]
       
-`mutable_buffers_1(data, size_in_bytes)`. 
+`mutable_buffer(data, size_in_bytes)`. 
 
 
 
@@ -51094,13 +43104,13 @@
 
 
 
-[section:overload6 buffer (6 of 30 overloads)]
+[section:overload6 buffer (6 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given memory range. 
 
 
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const void * data,
       std::size_t size_in_bytes);
 
@@ -51108,7 +43118,7 @@
 
 [heading Return Value]
       
-`const_buffers_1(data, size_in_bytes)`. 
+`const_buffer(data, size_in_bytes)`. 
 
 
 
@@ -51117,7 +43127,7 @@
 
 
 
-[section:overload7 buffer (7 of 30 overloads)]
+[section:overload7 buffer (7 of 32 overloads)]
 
 
 Create a new modifiable buffer that represents the given POD array. 
@@ -51126,16 +43136,16 @@
   template<
       typename PodType,
       std::size_t N>
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       PodType (&data)[N]);
 
 
 
 [heading Return Value]
       
-A [link asio.reference.mutable_buffers_1 `mutable_buffers_1`] value equivalent to: 
+A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to: 
 
-   mutable_buffers_1(
+   mutable_buffer(
        static_cast<void*>(data),
        N * sizeof(PodType)); 
 
@@ -51149,7 +43159,7 @@
 
 
 
-[section:overload8 buffer (8 of 30 overloads)]
+[section:overload8 buffer (8 of 32 overloads)]
 
 
 Create a new modifiable buffer that represents the given POD array. 
@@ -51158,7 +43168,7 @@
   template<
       typename PodType,
       std::size_t N>
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       PodType (&data)[N],
       std::size_t max_size_in_bytes);
 
@@ -51166,9 +43176,9 @@
 
 [heading Return Value]
       
-A [link asio.reference.mutable_buffers_1 `mutable_buffers_1`] value equivalent to: 
+A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to: 
 
-   mutable_buffers_1(
+   mutable_buffer(
        static_cast<void*>(data),
        min(N * sizeof(PodType), max_size_in_bytes)); 
 
@@ -51182,7 +43192,7 @@
 
 
 
-[section:overload9 buffer (9 of 30 overloads)]
+[section:overload9 buffer (9 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given POD array. 
@@ -51191,16 +43201,16 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const PodType (&data)[N]);
 
 
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        static_cast<const void*>(data),
        N * sizeof(PodType)); 
 
@@ -51214,7 +43224,7 @@
 
 
 
-[section:overload10 buffer (10 of 30 overloads)]
+[section:overload10 buffer (10 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given POD array. 
@@ -51223,7 +43233,7 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const PodType (&data)[N],
       std::size_t max_size_in_bytes);
 
@@ -51231,9 +43241,9 @@
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        static_cast<const void*>(data),
        min(N * sizeof(PodType), max_size_in_bytes)); 
 
@@ -51247,7 +43257,7 @@
 
 
 
-[section:overload11 buffer (11 of 30 overloads)]
+[section:overload11 buffer (11 of 32 overloads)]
 
 
 Create a new modifiable buffer that represents the given POD array. 
@@ -51256,16 +43266,16 @@
   template<
       typename PodType,
       std::size_t N>
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       boost::array< PodType, N > & data);
 
 
 
 [heading Return Value]
       
-A [link asio.reference.mutable_buffers_1 `mutable_buffers_1`] value equivalent to: 
+A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to: 
 
-   mutable_buffers_1(
+   mutable_buffer(
        data.data(),
        data.size() * sizeof(PodType)); 
 
@@ -51279,7 +43289,7 @@
 
 
 
-[section:overload12 buffer (12 of 30 overloads)]
+[section:overload12 buffer (12 of 32 overloads)]
 
 
 Create a new modifiable buffer that represents the given POD array. 
@@ -51288,7 +43298,7 @@
   template<
       typename PodType,
       std::size_t N>
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       boost::array< PodType, N > & data,
       std::size_t max_size_in_bytes);
 
@@ -51296,9 +43306,9 @@
 
 [heading Return Value]
       
-A [link asio.reference.mutable_buffers_1 `mutable_buffers_1`] value equivalent to: 
+A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to: 
 
-   mutable_buffers_1(
+   mutable_buffer(
        data.data(),
        min(data.size() * sizeof(PodType), max_size_in_bytes)); 
 
@@ -51312,7 +43322,7 @@
 
 
 
-[section:overload13 buffer (13 of 30 overloads)]
+[section:overload13 buffer (13 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given POD array. 
@@ -51321,16 +43331,16 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       boost::array< const PodType, N > & data);
 
 
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        data.data(),
        data.size() * sizeof(PodType)); 
 
@@ -51344,7 +43354,7 @@
 
 
 
-[section:overload14 buffer (14 of 30 overloads)]
+[section:overload14 buffer (14 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given POD array. 
@@ -51353,7 +43363,7 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       boost::array< const PodType, N > & data,
       std::size_t max_size_in_bytes);
 
@@ -51361,9 +43371,9 @@
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        data.data(),
        min(data.size() * sizeof(PodType), max_size_in_bytes)); 
 
@@ -51377,7 +43387,7 @@
 
 
 
-[section:overload15 buffer (15 of 30 overloads)]
+[section:overload15 buffer (15 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given POD array. 
@@ -51386,16 +43396,16 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const boost::array< PodType, N > & data);
 
 
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        data.data(),
        data.size() * sizeof(PodType)); 
 
@@ -51409,7 +43419,7 @@
 
 
 
-[section:overload16 buffer (16 of 30 overloads)]
+[section:overload16 buffer (16 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given POD array. 
@@ -51418,7 +43428,7 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const boost::array< PodType, N > & data,
       std::size_t max_size_in_bytes);
 
@@ -51426,9 +43436,9 @@
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        data.data(),
        min(data.size() * sizeof(PodType), max_size_in_bytes)); 
 
@@ -51442,7 +43452,7 @@
 
 
 
-[section:overload17 buffer (17 of 30 overloads)]
+[section:overload17 buffer (17 of 32 overloads)]
 
 
 Create a new modifiable buffer that represents the given POD array. 
@@ -51451,16 +43461,16 @@
   template<
       typename PodType,
       std::size_t N>
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       std::array< PodType, N > & data);
 
 
 
 [heading Return Value]
       
-A [link asio.reference.mutable_buffers_1 `mutable_buffers_1`] value equivalent to: 
+A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to: 
 
-   mutable_buffers_1(
+   mutable_buffer(
        data.data(),
        data.size() * sizeof(PodType)); 
 
@@ -51474,7 +43484,7 @@
 
 
 
-[section:overload18 buffer (18 of 30 overloads)]
+[section:overload18 buffer (18 of 32 overloads)]
 
 
 Create a new modifiable buffer that represents the given POD array. 
@@ -51483,7 +43493,7 @@
   template<
       typename PodType,
       std::size_t N>
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       std::array< PodType, N > & data,
       std::size_t max_size_in_bytes);
 
@@ -51491,9 +43501,9 @@
 
 [heading Return Value]
       
-A [link asio.reference.mutable_buffers_1 `mutable_buffers_1`] value equivalent to: 
+A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to: 
 
-   mutable_buffers_1(
+   mutable_buffer(
        data.data(),
        min(data.size() * sizeof(PodType), max_size_in_bytes)); 
 
@@ -51507,7 +43517,7 @@
 
 
 
-[section:overload19 buffer (19 of 30 overloads)]
+[section:overload19 buffer (19 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given POD array. 
@@ -51516,16 +43526,16 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       std::array< const PodType, N > & data);
 
 
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        data.data(),
        data.size() * sizeof(PodType)); 
 
@@ -51539,7 +43549,7 @@
 
 
 
-[section:overload20 buffer (20 of 30 overloads)]
+[section:overload20 buffer (20 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given POD array. 
@@ -51548,7 +43558,7 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       std::array< const PodType, N > & data,
       std::size_t max_size_in_bytes);
 
@@ -51556,9 +43566,9 @@
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        data.data(),
        min(data.size() * sizeof(PodType), max_size_in_bytes)); 
 
@@ -51572,7 +43582,7 @@
 
 
 
-[section:overload21 buffer (21 of 30 overloads)]
+[section:overload21 buffer (21 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given POD array. 
@@ -51581,16 +43591,16 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const std::array< PodType, N > & data);
 
 
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        data.data(),
        data.size() * sizeof(PodType)); 
 
@@ -51604,7 +43614,7 @@
 
 
 
-[section:overload22 buffer (22 of 30 overloads)]
+[section:overload22 buffer (22 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given POD array. 
@@ -51613,7 +43623,7 @@
   template<
       typename PodType,
       std::size_t N>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const std::array< PodType, N > & data,
       std::size_t max_size_in_bytes);
 
@@ -51621,9 +43631,9 @@
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        data.data(),
        min(data.size() * sizeof(PodType), max_size_in_bytes)); 
 
@@ -51637,7 +43647,7 @@
 
 
 
-[section:overload23 buffer (23 of 30 overloads)]
+[section:overload23 buffer (23 of 32 overloads)]
 
 
 Create a new modifiable buffer that represents the given POD vector. 
@@ -51646,16 +43656,16 @@
   template<
       typename PodType,
       typename Allocator>
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       std::vector< PodType, Allocator > & data);
 
 
 
 [heading Return Value]
       
-A [link asio.reference.mutable_buffers_1 `mutable_buffers_1`] value equivalent to: 
+A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to: 
 
-   mutable_buffers_1(
+   mutable_buffer(
        data.size() ? &data[0] : 0,
        data.size() * sizeof(PodType)); 
 
@@ -51674,7 +43684,7 @@
 
 
 
-[section:overload24 buffer (24 of 30 overloads)]
+[section:overload24 buffer (24 of 32 overloads)]
 
 
 Create a new modifiable buffer that represents the given POD vector. 
@@ -51683,7 +43693,7 @@
   template<
       typename PodType,
       typename Allocator>
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       std::vector< PodType, Allocator > & data,
       std::size_t max_size_in_bytes);
 
@@ -51691,9 +43701,9 @@
 
 [heading Return Value]
       
-A [link asio.reference.mutable_buffers_1 `mutable_buffers_1`] value equivalent to: 
+A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to: 
 
-   mutable_buffers_1(
+   mutable_buffer(
        data.size() ? &data[0] : 0,
        min(data.size() * sizeof(PodType), max_size_in_bytes)); 
 
@@ -51712,7 +43722,7 @@
 
 
 
-[section:overload25 buffer (25 of 30 overloads)]
+[section:overload25 buffer (25 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given POD vector. 
@@ -51721,16 +43731,16 @@
   template<
       typename PodType,
       typename Allocator>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const std::vector< PodType, Allocator > & data);
 
 
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        data.size() ? &data[0] : 0,
        data.size() * sizeof(PodType)); 
 
@@ -51749,7 +43759,7 @@
 
 
 
-[section:overload26 buffer (26 of 30 overloads)]
+[section:overload26 buffer (26 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given POD vector. 
@@ -51758,7 +43768,7 @@
   template<
       typename PodType,
       typename Allocator>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const std::vector< PodType, Allocator > & data,
       std::size_t max_size_in_bytes);
 
@@ -51766,9 +43776,9 @@
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        data.size() ? &data[0] : 0,
        min(data.size() * sizeof(PodType), max_size_in_bytes)); 
 
@@ -51787,7 +43797,7 @@
 
 
 
-[section:overload27 buffer (27 of 30 overloads)]
+[section:overload27 buffer (27 of 32 overloads)]
 
 
 Create a new modifiable buffer that represents the given string. 
@@ -51797,14 +43807,14 @@
       typename Elem,
       typename Traits,
       typename Allocator>
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       std::basic_string< Elem, Traits, Allocator > & data);
 
 
 
 [heading Return Value]
       
-`mutable_buffers_1(data.size() ? &data[0] : 0, data.size() * sizeof(Elem))`.
+`mutable_buffer(data.size() ? &data[0] : 0, data.size() * sizeof(Elem))`.
 
 
 [heading Remarks]
@@ -51818,7 +43828,7 @@
 
 
 
-[section:overload28 buffer (28 of 30 overloads)]
+[section:overload28 buffer (28 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given string. 
@@ -51828,7 +43838,7 @@
       typename Elem,
       typename Traits,
       typename Allocator>
-  mutable_buffers_1 buffer(
+  mutable_buffer buffer(
       std::basic_string< Elem, Traits, Allocator > & data,
       std::size_t max_size_in_bytes);
 
@@ -51836,9 +43846,9 @@
 
 [heading Return Value]
       
-A [link asio.reference.mutable_buffers_1 `mutable_buffers_1`] value equivalent to: 
+A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to: 
 
-   mutable_buffers_1(
+   mutable_buffer(
        data.size() ? &data[0] : 0,
        min(data.size() * sizeof(Elem), max_size_in_bytes)); 
 
@@ -51857,7 +43867,7 @@
 
 
 
-[section:overload29 buffer (29 of 30 overloads)]
+[section:overload29 buffer (29 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given string. 
@@ -51867,14 +43877,14 @@
       typename Elem,
       typename Traits,
       typename Allocator>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const std::basic_string< Elem, Traits, Allocator > & data);
 
 
 
 [heading Return Value]
       
-`const_buffers_1(data.data(), data.size() * sizeof(Elem))`.
+`const_buffer(data.data(), data.size() * sizeof(Elem))`.
 
 
 [heading Remarks]
@@ -51888,7 +43898,7 @@
 
 
 
-[section:overload30 buffer (30 of 30 overloads)]
+[section:overload30 buffer (30 of 32 overloads)]
 
 
 Create a new non-modifiable buffer that represents the given string. 
@@ -51898,7 +43908,7 @@
       typename Elem,
       typename Traits,
       typename Allocator>
-  const_buffers_1 buffer(
+  const_buffer buffer(
       const std::basic_string< Elem, Traits, Allocator > & data,
       std::size_t max_size_in_bytes);
 
@@ -51906,9 +43916,9 @@
 
 [heading Return Value]
       
-A [link asio.reference.const_buffers_1 `const_buffers_1`] value equivalent to: 
+A [link asio.reference.const_buffer `const_buffer`] value equivalent to: 
 
-   const_buffers_1(
+   const_buffer(
        data.data(),
        min(data.size() * sizeof(Elem), max_size_in_bytes)); 
 
@@ -51926,12 +43936,70 @@
 [endsect]
 
 
+
+[section:overload31 buffer (31 of 32 overloads)]
+
+
+Create a new modifiable buffer that represents the given string\_view. 
+
+
+  template<
+      typename Elem,
+      typename Traits>
+  const_buffer buffer(
+      basic_string_view< Elem, Traits > data);
+
+
+
+[heading Return Value]
+      
+`mutable_buffer(data.size() ? &data[0] : 0, data.size() * sizeof(Elem))`. 
+
+
+
+
+[endsect]
+
+
+
+[section:overload32 buffer (32 of 32 overloads)]
+
+
+Create a new non-modifiable buffer that represents the given string. 
+
+
+  template<
+      typename Elem,
+      typename Traits>
+  const_buffer buffer(
+      basic_string_view< Elem, Traits > data,
+      std::size_t max_size_in_bytes);
+
+
+
+[heading Return Value]
+      
+A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to: 
+
+   mutable_buffer(
+       data.size() ? &data[0] : 0,
+       min(data.size() * sizeof(Elem), max_size_in_bytes)); 
+
+
+
+
+
+
+
+[endsect]
+
+
 [endsect]
 
 [section:buffer_cast buffer_cast]
 
-[indexterm1 buffer_cast] 
-The `asio::buffer_cast` function is used to obtain a pointer to the underlying memory region associated with a buffer. 
+[indexterm1 asio.indexterm.buffer_cast..buffer_cast] 
+(Deprecated: Use the `data()` member function.) The `asio::buffer_cast` function is used to obtain a pointer to the underlying memory region associated with a buffer. 
 
       
   template<
@@ -52013,219 +44081,27 @@
 
 [section:buffer_copy buffer_copy]
 
-[indexterm1 buffer_copy] 
+[indexterm1 asio.indexterm.buffer_copy..buffer_copy] 
 The `asio::buffer_copy` function is used to copy bytes from a source buffer (or buffer sequence) to a target buffer (or buffer sequence). 
 
       
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
   std::size_t ``[link asio.reference.buffer_copy.overload1 buffer_copy]``(
-      const mutable_buffer & target,
-      const const_buffer & source);
+      const MutableBufferSequence & target,
+      const ConstBufferSequence & source);
   ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload1 more...]]``
 
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
   std::size_t ``[link asio.reference.buffer_copy.overload2 buffer_copy]``(
-      const mutable_buffer & target,
-      const const_buffers_1 & source);
+      const MutableBufferSequence & target,
+      const ConstBufferSequence & source,
+      std::size_t max_bytes_to_copy);
   ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload2 more...]]``
 
-  std::size_t ``[link asio.reference.buffer_copy.overload3 buffer_copy]``(
-      const mutable_buffer & target,
-      const mutable_buffer & source);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload3 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload4 buffer_copy]``(
-      const mutable_buffer & target,
-      const mutable_buffers_1 & source);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload4 more...]]``
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload5 buffer_copy]``(
-      const mutable_buffer & target,
-      const ConstBufferSequence & source,
-      typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload5 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload6 buffer_copy]``(
-      const mutable_buffers_1 & target,
-      const const_buffer & source);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload6 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload7 buffer_copy]``(
-      const mutable_buffers_1 & target,
-      const const_buffers_1 & source);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload7 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload8 buffer_copy]``(
-      const mutable_buffers_1 & target,
-      const mutable_buffer & source);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload8 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload9 buffer_copy]``(
-      const mutable_buffers_1 & target,
-      const mutable_buffers_1 & source);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload9 more...]]``
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload10 buffer_copy]``(
-      const mutable_buffers_1 & target,
-      const ConstBufferSequence & source,
-      typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload10 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload11 buffer_copy]``(
-      const MutableBufferSequence & target,
-      const const_buffer & source,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload11 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload12 buffer_copy]``(
-      const MutableBufferSequence & target,
-      const const_buffers_1 & source,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload12 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload13 buffer_copy]``(
-      const MutableBufferSequence & target,
-      const mutable_buffer & source,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload13 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload14 buffer_copy]``(
-      const MutableBufferSequence & target,
-      const mutable_buffers_1 & source,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload14 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload15 buffer_copy]``(
-      const MutableBufferSequence & target,
-      const ConstBufferSequence & source,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value &&is_const_buffer_sequence< ConstBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload15 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload16 buffer_copy]``(
-      const mutable_buffer & target,
-      const const_buffer & source,
-      std::size_t max_bytes_to_copy);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload16 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload17 buffer_copy]``(
-      const mutable_buffer & target,
-      const const_buffers_1 & source,
-      std::size_t max_bytes_to_copy);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload17 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload18 buffer_copy]``(
-      const mutable_buffer & target,
-      const mutable_buffer & source,
-      std::size_t max_bytes_to_copy);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload18 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload19 buffer_copy]``(
-      const mutable_buffer & target,
-      const mutable_buffers_1 & source,
-      std::size_t max_bytes_to_copy);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload19 more...]]``
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload20 buffer_copy]``(
-      const mutable_buffer & target,
-      const ConstBufferSequence & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload20 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload21 buffer_copy]``(
-      const mutable_buffers_1 & target,
-      const const_buffer & source,
-      std::size_t max_bytes_to_copy);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload21 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload22 buffer_copy]``(
-      const mutable_buffers_1 & target,
-      const const_buffers_1 & source,
-      std::size_t max_bytes_to_copy);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload22 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload23 buffer_copy]``(
-      const mutable_buffers_1 & target,
-      const mutable_buffer & source,
-      std::size_t max_bytes_to_copy);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload23 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_copy.overload24 buffer_copy]``(
-      const mutable_buffers_1 & target,
-      const mutable_buffers_1 & source,
-      std::size_t max_bytes_to_copy);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload24 more...]]``
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload25 buffer_copy]``(
-      const mutable_buffers_1 & target,
-      const ConstBufferSequence & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload25 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload26 buffer_copy]``(
-      const MutableBufferSequence & target,
-      const const_buffer & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload26 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload27 buffer_copy]``(
-      const MutableBufferSequence & target,
-      const const_buffers_1 & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload27 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload28 buffer_copy]``(
-      const MutableBufferSequence & target,
-      const mutable_buffer & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload28 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload29 buffer_copy]``(
-      const MutableBufferSequence & target,
-      const mutable_buffers_1 & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload29 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.buffer_copy.overload30 buffer_copy]``(
-      const MutableBufferSequence & target,
-      const ConstBufferSequence & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value &&is_const_buffer_sequence< ConstBufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_copy.overload30 more...]]``
-
 The `buffer_copy` function is available in two forms:
 
 
@@ -52256,669 +44132,7 @@
 ['Convenience header: ][^asio.hpp]
 
 
-[section:overload1 buffer_copy (1 of 30 overloads)]
-
-
-Copies bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffer & target,
-      const const_buffer & source);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer representing the memory region from which the bytes will be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload2 buffer_copy (2 of 30 overloads)]
-
-
-Copies bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffer & target,
-      const const_buffers_1 & source);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer representing the memory region from which the bytes will be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload3 buffer_copy (3 of 30 overloads)]
-
-
-Copies bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffer & target,
-      const mutable_buffer & source);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload4 buffer_copy (4 of 30 overloads)]
-
-
-Copies bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffer & target,
-      const mutable_buffers_1 & source);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload5 buffer_copy (5 of 30 overloads)]
-
-
-Copies bytes from a source buffer sequence to a target buffer. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t buffer_copy(
-      const mutable_buffer & target,
-      const ConstBufferSequence & source,
-      typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type *  = 0);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer sequence representing the memory regions from which the bytes will be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload6 buffer_copy (6 of 30 overloads)]
-
-
-Copies bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffers_1 & target,
-      const const_buffer & source);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer representing the memory region from which the bytes will be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload7 buffer_copy (7 of 30 overloads)]
-
-
-Copies bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffers_1 & target,
-      const const_buffers_1 & source);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer representing the memory region from which the bytes will be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload8 buffer_copy (8 of 30 overloads)]
-
-
-Copies bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffers_1 & target,
-      const mutable_buffer & source);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload9 buffer_copy (9 of 30 overloads)]
-
-
-Copies bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffers_1 & target,
-      const mutable_buffers_1 & source);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload10 buffer_copy (10 of 30 overloads)]
-
-
-Copies bytes from a source buffer sequence to a target buffer. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t buffer_copy(
-      const mutable_buffers_1 & target,
-      const ConstBufferSequence & source,
-      typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type *  = 0);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer sequence representing the memory regions from which the bytes will be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload11 buffer_copy (11 of 30 overloads)]
-
-
-Copies bytes from a source buffer to a target buffer sequence. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t buffer_copy(
-      const MutableBufferSequence & target,
-      const const_buffer & source,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer sequence representing the memory regions to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer representing the memory region from which the bytes will be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload12 buffer_copy (12 of 30 overloads)]
-
-
-Copies bytes from a source buffer to a target buffer sequence. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t buffer_copy(
-      const MutableBufferSequence & target,
-      const const_buffers_1 & source,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer sequence representing the memory regions to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer representing the memory region from which the bytes will be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload13 buffer_copy (13 of 30 overloads)]
-
-
-Copies bytes from a source buffer to a target buffer sequence. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t buffer_copy(
-      const MutableBufferSequence & target,
-      const mutable_buffer & source,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer sequence representing the memory regions to which the bytes will be copied.]]
-
-[[source][A modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload14 buffer_copy (14 of 30 overloads)]
-
-
-Copies bytes from a source buffer to a target buffer sequence. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t buffer_copy(
-      const MutableBufferSequence & target,
-      const mutable_buffers_1 & source,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer sequence representing the memory regions to which the bytes will be copied.]]
-
-[[source][A modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload15 buffer_copy (15 of 30 overloads)]
+[section:overload1 buffer_copy (1 of 2 overloads)]
 
 
 Copies bytes from a source buffer sequence to a target buffer sequence. 
@@ -52929,8 +44143,7 @@
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
   std::size_t buffer_copy(
       const MutableBufferSequence & target,
-      const ConstBufferSequence & source,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value &&is_const_buffer_sequence< ConstBufferSequence >::value >::type *  = 0);
+      const ConstBufferSequence & source);
 
 
 
@@ -52968,753 +44181,7 @@
 
 
 
-[section:overload16 buffer_copy (16 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffer & target,
-      const const_buffer & source,
-      std::size_t max_bytes_to_copy);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer representing the memory region from which the bytes will be copied.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload17 buffer_copy (17 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffer & target,
-      const const_buffers_1 & source,
-      std::size_t max_bytes_to_copy);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer representing the memory region from which the bytes will be copied.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload18 buffer_copy (18 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffer & target,
-      const mutable_buffer & source,
-      std::size_t max_bytes_to_copy);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload19 buffer_copy (19 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffer & target,
-      const mutable_buffers_1 & source,
-      std::size_t max_bytes_to_copy);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload20 buffer_copy (20 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer sequence to a target buffer. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t buffer_copy(
-      const mutable_buffer & target,
-      const ConstBufferSequence & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type *  = 0);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer sequence representing the memory regions from which the bytes will be copied.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload21 buffer_copy (21 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffers_1 & target,
-      const const_buffer & source,
-      std::size_t max_bytes_to_copy);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer representing the memory region from which the bytes will be copied.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload22 buffer_copy (22 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffers_1 & target,
-      const const_buffers_1 & source,
-      std::size_t max_bytes_to_copy);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer representing the memory region from which the bytes will be copied.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload23 buffer_copy (23 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffers_1 & target,
-      const mutable_buffer & source,
-      std::size_t max_bytes_to_copy);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload24 buffer_copy (24 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer to a target buffer. 
-
-
-  std::size_t buffer_copy(
-      const mutable_buffers_1 & target,
-      const mutable_buffers_1 & source,
-      std::size_t max_bytes_to_copy);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload25 buffer_copy (25 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer sequence to a target buffer. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t buffer_copy(
-      const mutable_buffers_1 & target,
-      const ConstBufferSequence & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type *  = 0);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer representing the memory region to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer sequence representing the memory regions from which the bytes will be copied.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload26 buffer_copy (26 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer to a target buffer sequence. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t buffer_copy(
-      const MutableBufferSequence & target,
-      const const_buffer & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer sequence representing the memory regions to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer representing the memory region from which the bytes will be copied.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload27 buffer_copy (27 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer to a target buffer sequence. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t buffer_copy(
-      const MutableBufferSequence & target,
-      const const_buffers_1 & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer sequence representing the memory regions to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer representing the memory region from which the bytes will be copied.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload28 buffer_copy (28 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer to a target buffer sequence. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t buffer_copy(
-      const MutableBufferSequence & target,
-      const mutable_buffer & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer sequence representing the memory regions to which the bytes will be copied.]]
-
-[[source][A modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload29 buffer_copy (29 of 30 overloads)]
-
-
-Copies a limited number of bytes from a source buffer to a target buffer sequence. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t buffer_copy(
-      const MutableBufferSequence & target,
-      const mutable_buffers_1 & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
-
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[target][A modifiable buffer sequence representing the memory regions to which the bytes will be copied.]]
-
-[[source][A modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes copied.
-
-
-[heading Remarks]
-      
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)` 
-
-
-* `buffer_size(source)` 
-
-
-* `max_bytes_to_copy` 
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions. 
-
-
-[endsect]
-
-
-
-[section:overload30 buffer_copy (30 of 30 overloads)]
+[section:overload2 buffer_copy (2 of 2 overloads)]
 
 
 Copies a limited number of bytes from a source buffer sequence to a target buffer sequence. 
@@ -53726,8 +44193,7 @@
   std::size_t buffer_copy(
       const MutableBufferSequence & target,
       const ConstBufferSequence & source,
-      std::size_t max_bytes_to_copy,
-      typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value &&is_const_buffer_sequence< ConstBufferSequence >::value >::type *  = 0);
+      std::size_t max_bytes_to_copy);
 
 
 
@@ -53771,34 +44237,31 @@
 
 [endsect]
 
-[section:buffer_size buffer_size]
+[section:buffer_sequence_begin buffer_sequence_begin]
 
-[indexterm1 buffer_size] 
-The `asio::buffer_size` function determines the total number of bytes in a buffer or buffer sequence. 
+[indexterm1 asio.indexterm.buffer_sequence_begin..buffer_sequence_begin] 
+The `asio::buffer_sequence_begin` function returns an iterator pointing to the first element in a buffer sequence. 
 
       
-  std::size_t ``[link asio.reference.buffer_size.overload1 buffer_size]``(
+  const mutable_buffer * ``[link asio.reference.buffer_sequence_begin.overload1 buffer_sequence_begin]``(
       const mutable_buffer & b);
-  ``  [''''&raquo;''' [link asio.reference.buffer_size.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.buffer_sequence_begin.overload1 more...]]``
 
-  std::size_t ``[link asio.reference.buffer_size.overload2 buffer_size]``(
-      const mutable_buffers_1 & b);
-  ``  [''''&raquo;''' [link asio.reference.buffer_size.overload2 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_size.overload3 buffer_size]``(
+  const const_buffer * ``[link asio.reference.buffer_sequence_begin.overload2 buffer_sequence_begin]``(
       const const_buffer & b);
-  ``  [''''&raquo;''' [link asio.reference.buffer_size.overload3 more...]]``
-
-  std::size_t ``[link asio.reference.buffer_size.overload4 buffer_size]``(
-      const const_buffers_1 & b);
-  ``  [''''&raquo;''' [link asio.reference.buffer_size.overload4 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.buffer_sequence_begin.overload2 more...]]``
 
   template<
-      typename BufferSequence>
-  std::size_t ``[link asio.reference.buffer_size.overload5 buffer_size]``(
-      const BufferSequence & b,
-      typename enable_if< is_const_buffer_sequence< BufferSequence >::value >::type *  = 0);
-  ``  [''''&raquo;''' [link asio.reference.buffer_size.overload5 more...]]``
+      typename C>
+  auto ``[link asio.reference.buffer_sequence_begin.overload3 buffer_sequence_begin]``(
+      C & c);
+  ``  [''''&raquo;''' [link asio.reference.buffer_sequence_begin.overload3 more...]]``
+
+  template<
+      typename C>
+  auto ``[link asio.reference.buffer_sequence_begin.overload4 buffer_sequence_begin]``(
+      const C & c);
+  ``  [''''&raquo;''' [link asio.reference.buffer_sequence_begin.overload4 more...]]``
 
 [heading Requirements]
 
@@ -53807,13 +44270,13 @@
 ['Convenience header: ][^asio.hpp]
 
 
-[section:overload1 buffer_size (1 of 5 overloads)]
+[section:overload1 buffer_sequence_begin (1 of 4 overloads)]
 
 
-Get the number of bytes in a modifiable buffer. 
+Get an iterator to the first element in a buffer sequence. 
 
 
-  std::size_t buffer_size(
+  const mutable_buffer * buffer_sequence_begin(
       const mutable_buffer & b);
 
 
@@ -53822,28 +44285,13 @@
 
 
 
-[section:overload2 buffer_size (2 of 5 overloads)]
+[section:overload2 buffer_sequence_begin (2 of 4 overloads)]
 
 
-Get the number of bytes in a modifiable buffer. 
+Get an iterator to the first element in a buffer sequence. 
 
 
-  std::size_t buffer_size(
-      const mutable_buffers_1 & b);
-
-
-
-[endsect]
-
-
-
-[section:overload3 buffer_size (3 of 5 overloads)]
-
-
-Get the number of bytes in a non-modifiable buffer. 
-
-
-  std::size_t buffer_size(
+  const const_buffer * buffer_sequence_begin(
       const const_buffer & b);
 
 
@@ -53852,14 +44300,16 @@
 
 
 
-[section:overload4 buffer_size (4 of 5 overloads)]
+[section:overload3 buffer_sequence_begin (3 of 4 overloads)]
 
 
-Get the number of bytes in a non-modifiable buffer. 
+Get an iterator to the first element in a buffer sequence. 
 
 
-  std::size_t buffer_size(
-      const const_buffers_1 & b);
+  template<
+      typename C>
+  auto buffer_sequence_begin(
+      C & c);
 
 
 
@@ -53867,27 +44317,164 @@
 
 
 
-[section:overload5 buffer_size (5 of 5 overloads)]
+[section:overload4 buffer_sequence_begin (4 of 4 overloads)]
 
 
+Get an iterator to the first element in a buffer sequence. 
+
+
+  template<
+      typename C>
+  auto buffer_sequence_begin(
+      const C & c);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:buffer_sequence_end buffer_sequence_end]
+
+[indexterm1 asio.indexterm.buffer_sequence_end..buffer_sequence_end] 
+The `asio::buffer_sequence_end` function returns an iterator pointing to one past the end element in a buffer sequence. 
+
+      
+  const mutable_buffer * ``[link asio.reference.buffer_sequence_end.overload1 buffer_sequence_end]``(
+      const mutable_buffer & b);
+  ``  [''''&raquo;''' [link asio.reference.buffer_sequence_end.overload1 more...]]``
+
+  const const_buffer * ``[link asio.reference.buffer_sequence_end.overload2 buffer_sequence_end]``(
+      const const_buffer & b);
+  ``  [''''&raquo;''' [link asio.reference.buffer_sequence_end.overload2 more...]]``
+
+  template<
+      typename C>
+  auto ``[link asio.reference.buffer_sequence_end.overload3 buffer_sequence_end]``(
+      C & c);
+  ``  [''''&raquo;''' [link asio.reference.buffer_sequence_end.overload3 more...]]``
+
+  template<
+      typename C>
+  auto ``[link asio.reference.buffer_sequence_end.overload4 buffer_sequence_end]``(
+      const C & c);
+  ``  [''''&raquo;''' [link asio.reference.buffer_sequence_end.overload4 more...]]``
+
+[heading Requirements]
+
+['Header: ][^asio/buffer.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[section:overload1 buffer_sequence_end (1 of 4 overloads)]
+
+
+Get an iterator to one past the end element in a buffer sequence. 
+
+
+  const mutable_buffer * buffer_sequence_end(
+      const mutable_buffer & b);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffer_sequence_end (2 of 4 overloads)]
+
+
+Get an iterator to one past the end element in a buffer sequence. 
+
+
+  const const_buffer * buffer_sequence_end(
+      const const_buffer & b);
+
+
+
+[endsect]
+
+
+
+[section:overload3 buffer_sequence_end (3 of 4 overloads)]
+
+
+Get an iterator to one past the end element in a buffer sequence. 
+
+
+  template<
+      typename C>
+  auto buffer_sequence_end(
+      C & c);
+
+
+
+[endsect]
+
+
+
+[section:overload4 buffer_sequence_end (4 of 4 overloads)]
+
+
+Get an iterator to one past the end element in a buffer sequence. 
+
+
+  template<
+      typename C>
+  auto buffer_sequence_end(
+      const C & c);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:buffer_size buffer_size]
+
+[indexterm1 asio.indexterm.buffer_size..buffer_size] 
 Get the total number of bytes in a buffer sequence. 
 
 
   template<
       typename BufferSequence>
   std::size_t buffer_size(
-      const BufferSequence & b,
-      typename enable_if< is_const_buffer_sequence< BufferSequence >::value >::type *  = 0);
+      const BufferSequence & b);
+
+
+The `buffer_size` function determines the total size of all buffers in the buffer sequence, as if computed as follows:
+
+
+
+   size_t total_size = 0;
+   auto i = asio::buffer_sequence_begin(buffers);
+   auto end = asio::buffer_sequence_end(buffers);
+   for (; i != end; ++i)
+   {
+     const_buffer b(*i);
+     total_size += b.size();
+   }
+   return total_size; 
+
+
 
 
 The `BufferSequence` template parameter may meet either of the `ConstBufferSequence` or `MutableBufferSequence` type requirements. 
 
+[heading Requirements]
 
-[endsect]
+['Header: ][^asio/buffer.hpp]
+
+['Convenience header: ][^asio.hpp]
 
 
 [endsect]
 
+
 [section:buffered_read_stream buffered_read_stream]
 
 
@@ -53906,6 +44493,13 @@
 
   [
 
+    [[link asio.reference.buffered_read_stream.executor_type [*executor_type]]]
+    [The type of the executor associated with the object. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.buffered_read_stream.lowest_layer_type [*lowest_layer_type]]]
     [The type of the lowest layer. ]
   
@@ -53957,13 +44551,18 @@
   ]
   
   [
+    [[link asio.reference.buffered_read_stream.get_executor [*get_executor]]]
+    [Get the executor associated with the object. ]
+  ]
+  
+  [
     [[link asio.reference.buffered_read_stream.get_io_context [*get_io_context]]]
-    [Get the io_context associated with the object. ]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
     [[link asio.reference.buffered_read_stream.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_io_context().) Get the io_context associated with the object. ]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
@@ -54038,13 +44637,13 @@
 
 [section:async_fill buffered_read_stream::async_fill]
 
-[indexterm2 async_fill..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.async_fill..async_fill..buffered_read_stream] 
 Start an asynchronous fill. 
 
 
   template<
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_fill(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_fill(
       ReadHandler && handler);
 
 
@@ -54055,14 +44654,14 @@
 
 [section:async_read_some buffered_read_stream::async_read_some]
 
-[indexterm2 async_read_some..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.async_read_some..async_read_some..buffered_read_stream] 
 Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
       const MutableBufferSequence & buffers,
       ReadHandler && handler);
 
@@ -54074,14 +44673,14 @@
 
 [section:async_write_some buffered_read_stream::async_write_some]
 
-[indexterm2 async_write_some..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.async_write_some..async_write_some..buffered_read_stream] 
 Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
       const ConstBufferSequence & buffers,
       WriteHandler && handler);
 
@@ -54092,7 +44691,7 @@
 
 [section:buffered_read_stream buffered_read_stream::buffered_read_stream]
 
-[indexterm2 buffered_read_stream..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.buffered_read_stream..buffered_read_stream..buffered_read_stream] 
 Construct, passing the specified argument to initialise the next layer. 
 
 
@@ -54148,14 +44747,14 @@
 
 [section:close buffered_read_stream::close]
 
-[indexterm2 close..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.close..close..buffered_read_stream] 
 Close the stream. 
 
 
   void ``[link asio.reference.buffered_read_stream.close.overload1 close]``();
   ``  [''''&raquo;''' [link asio.reference.buffered_read_stream.close.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.buffered_read_stream.close.overload2 close]``(
+  void ``[link asio.reference.buffered_read_stream.close.overload2 close]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.buffered_read_stream.close.overload2 more...]]``
 
@@ -54180,7 +44779,7 @@
 Close the stream. 
 
 
-  asio::error_code close(
+  void close(
       asio::error_code & ec);
 
 
@@ -54193,7 +44792,7 @@
 
 [section:default_buffer_size buffered_read_stream::default_buffer_size]
 
-[indexterm2 default_buffer_size..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.default_buffer_size..default_buffer_size..buffered_read_stream] 
 The default buffer size. 
 
 
@@ -54204,9 +44803,30 @@
 [endsect]
 
 
+
+[section:executor_type buffered_read_stream::executor_type]
+
+[indexterm2 asio.indexterm.buffered_read_stream.executor_type..executor_type..buffered_read_stream] 
+The type of the executor associated with the object. 
+
+
+  typedef lowest_layer_type::executor_type executor_type;
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/buffered_read_stream.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
 [section:fill buffered_read_stream::fill]
 
-[indexterm2 fill..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.fill..fill..buffered_read_stream] 
 Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure. 
 
 
@@ -54253,10 +44873,24 @@
 [endsect]
 
 
+[section:get_executor buffered_read_stream::get_executor]
+
+[indexterm2 asio.indexterm.buffered_read_stream.get_executor..get_executor..buffered_read_stream] 
+Get the executor associated with the object. 
+
+
+  executor_type get_executor();
+
+
+
+[endsect]
+
+
+
 [section:get_io_context buffered_read_stream::get_io_context]
 
-[indexterm2 get_io_context..buffered_read_stream] 
-Get the [link asio.reference.io_context `io_context`] associated with the object. 
+[indexterm2 asio.indexterm.buffered_read_stream.get_io_context..get_io_context..buffered_read_stream] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
   asio::io_context & get_io_context();
@@ -54269,8 +44903,8 @@
 
 [section:get_io_service buffered_read_stream::get_io_service]
 
-[indexterm2 get_io_service..buffered_read_stream] 
-(Deprecated: Use `get_io_context()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
+[indexterm2 asio.indexterm.buffered_read_stream.get_io_service..get_io_service..buffered_read_stream] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
   asio::io_context & get_io_service();
@@ -54282,7 +44916,7 @@
 
 [section:in_avail buffered_read_stream::in_avail]
 
-[indexterm2 in_avail..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.in_avail..in_avail..buffered_read_stream] 
 Determine the amount of data that may be read without blocking. 
 
 
@@ -54326,7 +44960,7 @@
 
 [section:lowest_layer buffered_read_stream::lowest_layer]
 
-[indexterm2 lowest_layer..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.lowest_layer..lowest_layer..buffered_read_stream] 
 Get a reference to the lowest layer. 
 
 
@@ -54373,7 +45007,7 @@
 
 [section:lowest_layer_type buffered_read_stream::lowest_layer_type]
 
-[indexterm2 lowest_layer_type..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.lowest_layer_type..lowest_layer_type..buffered_read_stream] 
 The type of the lowest layer. 
 
 
@@ -54394,7 +45028,7 @@
 
 [section:next_layer buffered_read_stream::next_layer]
 
-[indexterm2 next_layer..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.next_layer..next_layer..buffered_read_stream] 
 Get a reference to the next layer. 
 
 
@@ -54408,7 +45042,7 @@
 
 [section:next_layer_type buffered_read_stream::next_layer_type]
 
-[indexterm2 next_layer_type..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.next_layer_type..next_layer_type..buffered_read_stream] 
 The type of the next layer. 
 
 
@@ -54428,7 +45062,7 @@
 
 [section:peek buffered_read_stream::peek]
 
-[indexterm2 peek..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.peek..peek..buffered_read_stream] 
 Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure. 
 
 
@@ -54488,7 +45122,7 @@
 
 [section:read_some buffered_read_stream::read_some]
 
-[indexterm2 read_some..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.read_some..read_some..buffered_read_stream] 
 Read some data from the stream. Returns the number of bytes read. Throws an exception on failure. 
 
 
@@ -54548,7 +45182,7 @@
 
 [section:write_some buffered_read_stream::write_some]
 
-[indexterm2 write_some..buffered_read_stream] 
+[indexterm2 asio.indexterm.buffered_read_stream.write_some..write_some..buffered_read_stream] 
 Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure. 
 
 
@@ -54627,6 +45261,13 @@
 
   [
 
+    [[link asio.reference.buffered_stream.executor_type [*executor_type]]]
+    [The type of the executor associated with the object. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.buffered_stream.lowest_layer_type [*lowest_layer_type]]]
     [The type of the lowest layer. ]
   
@@ -54690,13 +45331,18 @@
   ]
   
   [
+    [[link asio.reference.buffered_stream.get_executor [*get_executor]]]
+    [Get the executor associated with the object. ]
+  ]
+  
+  [
     [[link asio.reference.buffered_stream.get_io_context [*get_io_context]]]
-    [Get the io_context associated with the object. ]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
     [[link asio.reference.buffered_stream.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_io_context().) Get the io_context associated with the object. ]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
@@ -54760,13 +45406,13 @@
 
 [section:async_fill buffered_stream::async_fill]
 
-[indexterm2 async_fill..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.async_fill..async_fill..buffered_stream] 
 Start an asynchronous fill. 
 
 
   template<
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_fill(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_fill(
       ReadHandler && handler);
 
 
@@ -54777,13 +45423,13 @@
 
 [section:async_flush buffered_stream::async_flush]
 
-[indexterm2 async_flush..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.async_flush..async_flush..buffered_stream] 
 Start an asynchronous flush. 
 
 
   template<
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_flush(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_flush(
       WriteHandler && handler);
 
 
@@ -54794,14 +45440,14 @@
 
 [section:async_read_some buffered_stream::async_read_some]
 
-[indexterm2 async_read_some..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.async_read_some..async_read_some..buffered_stream] 
 Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
       const MutableBufferSequence & buffers,
       ReadHandler && handler);
 
@@ -54813,14 +45459,14 @@
 
 [section:async_write_some buffered_stream::async_write_some]
 
-[indexterm2 async_write_some..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.async_write_some..async_write_some..buffered_stream] 
 Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
       const ConstBufferSequence & buffers,
       WriteHandler && handler);
 
@@ -54831,7 +45477,7 @@
 
 [section:buffered_stream buffered_stream::buffered_stream]
 
-[indexterm2 buffered_stream..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.buffered_stream..buffered_stream..buffered_stream] 
 Construct, passing the specified argument to initialise the next layer. 
 
 
@@ -54889,14 +45535,14 @@
 
 [section:close buffered_stream::close]
 
-[indexterm2 close..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.close..close..buffered_stream] 
 Close the stream. 
 
 
   void ``[link asio.reference.buffered_stream.close.overload1 close]``();
   ``  [''''&raquo;''' [link asio.reference.buffered_stream.close.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.buffered_stream.close.overload2 close]``(
+  void ``[link asio.reference.buffered_stream.close.overload2 close]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.buffered_stream.close.overload2 more...]]``
 
@@ -54921,7 +45567,7 @@
 Close the stream. 
 
 
-  asio::error_code close(
+  void close(
       asio::error_code & ec);
 
 
@@ -54931,9 +45577,30 @@
 
 [endsect]
 
+
+[section:executor_type buffered_stream::executor_type]
+
+[indexterm2 asio.indexterm.buffered_stream.executor_type..executor_type..buffered_stream] 
+The type of the executor associated with the object. 
+
+
+  typedef lowest_layer_type::executor_type executor_type;
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/buffered_stream.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
 [section:fill buffered_stream::fill]
 
-[indexterm2 fill..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.fill..fill..buffered_stream] 
 Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure. 
 
 
@@ -54981,7 +45648,7 @@
 
 [section:flush buffered_stream::flush]
 
-[indexterm2 flush..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.flush..flush..buffered_stream] 
 Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure. 
 
 
@@ -55028,10 +45695,24 @@
 [endsect]
 
 
+[section:get_executor buffered_stream::get_executor]
+
+[indexterm2 asio.indexterm.buffered_stream.get_executor..get_executor..buffered_stream] 
+Get the executor associated with the object. 
+
+
+  executor_type get_executor();
+
+
+
+[endsect]
+
+
+
 [section:get_io_context buffered_stream::get_io_context]
 
-[indexterm2 get_io_context..buffered_stream] 
-Get the [link asio.reference.io_context `io_context`] associated with the object. 
+[indexterm2 asio.indexterm.buffered_stream.get_io_context..get_io_context..buffered_stream] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
   asio::io_context & get_io_context();
@@ -55044,8 +45725,8 @@
 
 [section:get_io_service buffered_stream::get_io_service]
 
-[indexterm2 get_io_service..buffered_stream] 
-(Deprecated: Use `get_io_context()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
+[indexterm2 asio.indexterm.buffered_stream.get_io_service..get_io_service..buffered_stream] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
   asio::io_context & get_io_service();
@@ -55057,7 +45738,7 @@
 
 [section:in_avail buffered_stream::in_avail]
 
-[indexterm2 in_avail..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.in_avail..in_avail..buffered_stream] 
 Determine the amount of data that may be read without blocking. 
 
 
@@ -55101,7 +45782,7 @@
 
 [section:lowest_layer buffered_stream::lowest_layer]
 
-[indexterm2 lowest_layer..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.lowest_layer..lowest_layer..buffered_stream] 
 Get a reference to the lowest layer. 
 
 
@@ -55148,7 +45829,7 @@
 
 [section:lowest_layer_type buffered_stream::lowest_layer_type]
 
-[indexterm2 lowest_layer_type..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.lowest_layer_type..lowest_layer_type..buffered_stream] 
 The type of the lowest layer. 
 
 
@@ -55169,7 +45850,7 @@
 
 [section:next_layer buffered_stream::next_layer]
 
-[indexterm2 next_layer..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.next_layer..next_layer..buffered_stream] 
 Get a reference to the next layer. 
 
 
@@ -55183,7 +45864,7 @@
 
 [section:next_layer_type buffered_stream::next_layer_type]
 
-[indexterm2 next_layer_type..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.next_layer_type..next_layer_type..buffered_stream] 
 The type of the next layer. 
 
 
@@ -55203,7 +45884,7 @@
 
 [section:peek buffered_stream::peek]
 
-[indexterm2 peek..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.peek..peek..buffered_stream] 
 Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure. 
 
 
@@ -55263,7 +45944,7 @@
 
 [section:read_some buffered_stream::read_some]
 
-[indexterm2 read_some..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.read_some..read_some..buffered_stream] 
 Read some data from the stream. Returns the number of bytes read. Throws an exception on failure. 
 
 
@@ -55323,7 +46004,7 @@
 
 [section:write_some buffered_stream::write_some]
 
-[indexterm2 write_some..buffered_stream] 
+[indexterm2 asio.indexterm.buffered_stream.write_some..write_some..buffered_stream] 
 Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure. 
 
 
@@ -55402,6 +46083,13 @@
 
   [
 
+    [[link asio.reference.buffered_write_stream.executor_type [*executor_type]]]
+    [The type of the executor associated with the object. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.buffered_write_stream.lowest_layer_type [*lowest_layer_type]]]
     [The type of the lowest layer. ]
   
@@ -55453,13 +46141,18 @@
   ]
   
   [
+    [[link asio.reference.buffered_write_stream.get_executor [*get_executor]]]
+    [Get the executor associated with the object. ]
+  ]
+  
+  [
     [[link asio.reference.buffered_write_stream.get_io_context [*get_io_context]]]
-    [Get the io_context associated with the object. ]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
     [[link asio.reference.buffered_write_stream.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_io_context().) Get the io_context associated with the object. ]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
@@ -55534,13 +46227,13 @@
 
 [section:async_flush buffered_write_stream::async_flush]
 
-[indexterm2 async_flush..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.async_flush..async_flush..buffered_write_stream] 
 Start an asynchronous flush. 
 
 
   template<
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_flush(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_flush(
       WriteHandler && handler);
 
 
@@ -55551,14 +46244,14 @@
 
 [section:async_read_some buffered_write_stream::async_read_some]
 
-[indexterm2 async_read_some..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.async_read_some..async_read_some..buffered_write_stream] 
 Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
       const MutableBufferSequence & buffers,
       ReadHandler && handler);
 
@@ -55570,14 +46263,14 @@
 
 [section:async_write_some buffered_write_stream::async_write_some]
 
-[indexterm2 async_write_some..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.async_write_some..async_write_some..buffered_write_stream] 
 Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
       const ConstBufferSequence & buffers,
       WriteHandler && handler);
 
@@ -55588,7 +46281,7 @@
 
 [section:buffered_write_stream buffered_write_stream::buffered_write_stream]
 
-[indexterm2 buffered_write_stream..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.buffered_write_stream..buffered_write_stream..buffered_write_stream] 
 Construct, passing the specified argument to initialise the next layer. 
 
 
@@ -55644,14 +46337,14 @@
 
 [section:close buffered_write_stream::close]
 
-[indexterm2 close..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.close..close..buffered_write_stream] 
 Close the stream. 
 
 
   void ``[link asio.reference.buffered_write_stream.close.overload1 close]``();
   ``  [''''&raquo;''' [link asio.reference.buffered_write_stream.close.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.buffered_write_stream.close.overload2 close]``(
+  void ``[link asio.reference.buffered_write_stream.close.overload2 close]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.buffered_write_stream.close.overload2 more...]]``
 
@@ -55676,7 +46369,7 @@
 Close the stream. 
 
 
-  asio::error_code close(
+  void close(
       asio::error_code & ec);
 
 
@@ -55689,7 +46382,7 @@
 
 [section:default_buffer_size buffered_write_stream::default_buffer_size]
 
-[indexterm2 default_buffer_size..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.default_buffer_size..default_buffer_size..buffered_write_stream] 
 The default buffer size. 
 
 
@@ -55700,9 +46393,30 @@
 [endsect]
 
 
+
+[section:executor_type buffered_write_stream::executor_type]
+
+[indexterm2 asio.indexterm.buffered_write_stream.executor_type..executor_type..buffered_write_stream] 
+The type of the executor associated with the object. 
+
+
+  typedef lowest_layer_type::executor_type executor_type;
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/buffered_write_stream.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
 [section:flush buffered_write_stream::flush]
 
-[indexterm2 flush..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.flush..flush..buffered_write_stream] 
 Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure. 
 
 
@@ -55749,10 +46463,24 @@
 [endsect]
 
 
+[section:get_executor buffered_write_stream::get_executor]
+
+[indexterm2 asio.indexterm.buffered_write_stream.get_executor..get_executor..buffered_write_stream] 
+Get the executor associated with the object. 
+
+
+  executor_type get_executor();
+
+
+
+[endsect]
+
+
+
 [section:get_io_context buffered_write_stream::get_io_context]
 
-[indexterm2 get_io_context..buffered_write_stream] 
-Get the [link asio.reference.io_context `io_context`] associated with the object. 
+[indexterm2 asio.indexterm.buffered_write_stream.get_io_context..get_io_context..buffered_write_stream] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
   asio::io_context & get_io_context();
@@ -55765,8 +46493,8 @@
 
 [section:get_io_service buffered_write_stream::get_io_service]
 
-[indexterm2 get_io_service..buffered_write_stream] 
-(Deprecated: Use `get_io_context()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
+[indexterm2 asio.indexterm.buffered_write_stream.get_io_service..get_io_service..buffered_write_stream] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
   asio::io_context & get_io_service();
@@ -55778,7 +46506,7 @@
 
 [section:in_avail buffered_write_stream::in_avail]
 
-[indexterm2 in_avail..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.in_avail..in_avail..buffered_write_stream] 
 Determine the amount of data that may be read without blocking. 
 
 
@@ -55822,7 +46550,7 @@
 
 [section:lowest_layer buffered_write_stream::lowest_layer]
 
-[indexterm2 lowest_layer..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.lowest_layer..lowest_layer..buffered_write_stream] 
 Get a reference to the lowest layer. 
 
 
@@ -55869,7 +46597,7 @@
 
 [section:lowest_layer_type buffered_write_stream::lowest_layer_type]
 
-[indexterm2 lowest_layer_type..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.lowest_layer_type..lowest_layer_type..buffered_write_stream] 
 The type of the lowest layer. 
 
 
@@ -55890,7 +46618,7 @@
 
 [section:next_layer buffered_write_stream::next_layer]
 
-[indexterm2 next_layer..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.next_layer..next_layer..buffered_write_stream] 
 Get a reference to the next layer. 
 
 
@@ -55904,7 +46632,7 @@
 
 [section:next_layer_type buffered_write_stream::next_layer_type]
 
-[indexterm2 next_layer_type..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.next_layer_type..next_layer_type..buffered_write_stream] 
 The type of the next layer. 
 
 
@@ -55924,7 +46652,7 @@
 
 [section:peek buffered_write_stream::peek]
 
-[indexterm2 peek..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.peek..peek..buffered_write_stream] 
 Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure. 
 
 
@@ -55984,7 +46712,7 @@
 
 [section:read_some buffered_write_stream::read_some]
 
-[indexterm2 read_some..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.read_some..read_some..buffered_write_stream] 
 Read some data from the stream. Returns the number of bytes read. Throws an exception on failure. 
 
 
@@ -56044,7 +46772,7 @@
 
 [section:write_some buffered_write_stream::write_some]
 
-[indexterm2 write_some..buffered_write_stream] 
+[indexterm2 asio.indexterm.buffered_write_stream.write_some..write_some..buffered_write_stream] 
 Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure. 
 
 
@@ -56108,7 +46836,7 @@
 
 [section:buffers_begin buffers_begin]
 
-[indexterm1 buffers_begin] 
+[indexterm1 asio.indexterm.buffers_begin..buffers_begin] 
 Construct an iterator representing the beginning of the buffers' data. 
 
 
@@ -56131,7 +46859,7 @@
 
 [section:buffers_end buffers_end]
 
-[indexterm1 buffers_end] 
+[indexterm1 asio.indexterm.buffers_end..buffers_end] 
 Construct an iterator representing the end of the buffers' data. 
 
 
@@ -56319,7 +47047,7 @@
 
 [section:begin buffers_iterator::begin]
 
-[indexterm2 begin..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.begin..begin..buffers_iterator] 
 Construct an iterator representing the beginning of the buffers' data. 
 
 
@@ -56334,7 +47062,7 @@
 
 [section:buffers_iterator buffers_iterator::buffers_iterator]
 
-[indexterm2 buffers_iterator..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.buffers_iterator..buffers_iterator..buffers_iterator] 
 Default constructor. Creates an iterator in an undefined state. 
 
 
@@ -56348,7 +47076,7 @@
 
 [section:difference_type buffers_iterator::difference_type]
 
-[indexterm2 difference_type..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.difference_type..difference_type..buffers_iterator] 
 The type used for the distance between two iterators. 
 
 
@@ -56369,7 +47097,7 @@
 
 [section:end buffers_iterator::end]
 
-[indexterm2 end..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.end..end..buffers_iterator] 
 Construct an iterator representing the end of the buffers' data. 
 
 
@@ -56384,7 +47112,7 @@
 
 [section:iterator_category buffers_iterator::iterator_category]
 
-[indexterm2 iterator_category..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.iterator_category..iterator_category..buffers_iterator] 
 The iterator category. 
 
 
@@ -56405,7 +47133,7 @@
 
 [section:operator__star_ buffers_iterator::operator *]
 
-[indexterm2 operator *..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator__star_..operator *..buffers_iterator] 
 Dereference an iterator. 
 
 
@@ -56419,7 +47147,7 @@
 
 [section:operator_not__eq_ buffers_iterator::operator!=]
 
-[indexterm2 operator!=..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_not__eq_..operator!=..buffers_iterator] 
 Test two iterators for inequality. 
 
 
@@ -56440,7 +47168,7 @@
 
 [section:operator_plus_ buffers_iterator::operator+]
 
-[indexterm2 operator+..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_plus_..operator+..buffers_iterator] 
 Addition operator. 
 
 
@@ -56502,7 +47230,7 @@
 
 [section:operator_plus__plus_ buffers_iterator::operator++]
 
-[indexterm2 operator++..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_plus__plus_..operator++..buffers_iterator] 
 Increment operator (prefix). 
 
 
@@ -56551,7 +47279,7 @@
 
 [section:operator_plus__eq_ buffers_iterator::operator+=]
 
-[indexterm2 operator+=..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_plus__eq_..operator+=..buffers_iterator] 
 Addition operator. 
 
 
@@ -56565,7 +47293,7 @@
 
 [section:operator_minus_ buffers_iterator::operator-]
 
-[indexterm2 operator-..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_minus_..operator-..buffers_iterator] 
 Subtraction operator. 
 
 
@@ -56627,7 +47355,7 @@
 
 [section:operator_minus__minus_ buffers_iterator::operator--]
 
-[indexterm2 operator--..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_minus__minus_..operator--..buffers_iterator] 
 Decrement operator (prefix). 
 
 
@@ -56676,7 +47404,7 @@
 
 [section:operator_minus__eq_ buffers_iterator::operator-=]
 
-[indexterm2 operator-=..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_minus__eq_..operator-=..buffers_iterator] 
 Subtraction operator. 
 
 
@@ -56691,7 +47419,7 @@
 
 [section:operator_arrow_ buffers_iterator::operator->]
 
-[indexterm2 operator->..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_arrow_..operator->..buffers_iterator] 
 Dereference an iterator. 
 
 
@@ -56705,7 +47433,7 @@
 
 [section:operator_lt_ buffers_iterator::operator<]
 
-[indexterm2 operator<..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_lt_..operator<..buffers_iterator] 
 Compare two iterators. 
 
 
@@ -56727,7 +47455,7 @@
 
 [section:operator_lt__eq_ buffers_iterator::operator<=]
 
-[indexterm2 operator<=..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_lt__eq_..operator<=..buffers_iterator] 
 Compare two iterators. 
 
 
@@ -56749,7 +47477,7 @@
 
 [section:operator_eq__eq_ buffers_iterator::operator==]
 
-[indexterm2 operator==..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_eq__eq_..operator==..buffers_iterator] 
 Test two iterators for equality. 
 
 
@@ -56771,7 +47499,7 @@
 
 [section:operator_gt_ buffers_iterator::operator>]
 
-[indexterm2 operator>..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_gt_..operator>..buffers_iterator] 
 Compare two iterators. 
 
 
@@ -56793,7 +47521,7 @@
 
 [section:operator_gt__eq_ buffers_iterator::operator>=]
 
-[indexterm2 operator>=..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_gt__eq_..operator>=..buffers_iterator] 
 Compare two iterators. 
 
 
@@ -56815,7 +47543,7 @@
 
 [section:operator_lb__rb_ buffers_iterator::operator\[\]]
 
-[indexterm2 operator\[\]..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.operator_lb__rb_..operator\[\]..buffers_iterator] 
 Access an individual element. 
 
 
@@ -56830,7 +47558,7 @@
 
 [section:pointer buffers_iterator::pointer]
 
-[indexterm2 pointer..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.pointer..pointer..buffers_iterator] 
 The type of the result of applying `operator->()` to the iterator. 
 
 
@@ -56853,7 +47581,7 @@
 
 [section:reference buffers_iterator::reference]
 
-[indexterm2 reference..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.reference..reference..buffers_iterator] 
 The type of the result of applying `operator*()` to the iterator. 
 
 
@@ -56876,7 +47604,7 @@
 
 [section:value_type buffers_iterator::value_type]
 
-[indexterm2 value_type..buffers_iterator] 
+[indexterm2 asio.indexterm.buffers_iterator.value_type..value_type..buffers_iterator] 
 The type of the value pointed to by the iterator. 
 
 
@@ -56899,26 +47627,24 @@
 
 [section:connect connect]
 
-[indexterm1 connect] 
+[indexterm1 asio.indexterm.connect..connect] 
 Establishes a socket connection by trying each endpoint in a sequence. 
 
       
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.EndpointSequence EndpointSequence]``>
   Protocol::endpoint ``[link asio.reference.connect.overload1 connect]``(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       const EndpointSequence & endpoints,
       typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.connect.overload1 more...]]``
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.EndpointSequence EndpointSequence]``>
   Protocol::endpoint ``[link asio.reference.connect.overload2 connect]``(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       const EndpointSequence & endpoints,
       asio::error_code & ec,
       typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type *  = 0);
@@ -56926,20 +47652,18 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator>
   Iterator ``[link asio.reference.connect.overload3 connect]``(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       typename enable_if<!is_endpoint_sequence< Iterator >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.connect.overload3 more...]]``
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator>
   Iterator ``[link asio.reference.connect.overload4 connect]``(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       asio::error_code & ec,
       typename enable_if<!is_endpoint_sequence< Iterator >::value >::type *  = 0);
@@ -56947,20 +47671,18 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator>
   Iterator ``[link asio.reference.connect.overload5 connect]``(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       Iterator end);
   ``  [''''&raquo;''' [link asio.reference.connect.overload5 more...]]``
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator>
   Iterator ``[link asio.reference.connect.overload6 connect]``(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       Iterator end,
       asio::error_code & ec);
@@ -56968,11 +47690,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
-      typename ConnectCondition>
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
   Protocol::endpoint ``[link asio.reference.connect.overload7 connect]``(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       const EndpointSequence & endpoints,
       ConnectCondition connect_condition,
       typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type *  = 0);
@@ -56980,11 +47701,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
-      typename ConnectCondition>
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
   Protocol::endpoint ``[link asio.reference.connect.overload8 connect]``(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       const EndpointSequence & endpoints,
       ConnectCondition connect_condition,
       asio::error_code & ec,
@@ -56993,11 +47713,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
-      typename ConnectCondition>
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
   Iterator ``[link asio.reference.connect.overload9 connect]``(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       ConnectCondition connect_condition,
       typename enable_if<!is_endpoint_sequence< Iterator >::value >::type *  = 0);
@@ -57005,11 +47724,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
-      typename ConnectCondition>
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
   Iterator ``[link asio.reference.connect.overload10 connect]``(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       ConnectCondition connect_condition,
       asio::error_code & ec,
@@ -57018,11 +47736,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
-      typename ConnectCondition>
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
   Iterator ``[link asio.reference.connect.overload11 connect]``(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       Iterator end,
       ConnectCondition connect_condition);
@@ -57030,11 +47747,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
-      typename ConnectCondition>
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
   Iterator ``[link asio.reference.connect.overload12 connect]``(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       Iterator end,
       ConnectCondition connect_condition,
@@ -57056,10 +47772,9 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.EndpointSequence EndpointSequence]``>
   Protocol::endpoint connect(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       const EndpointSequence & endpoints,
       typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type *  = 0);
 
@@ -57121,10 +47836,9 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.EndpointSequence EndpointSequence]``>
   Protocol::endpoint connect(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       const EndpointSequence & endpoints,
       asio::error_code & ec,
       typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type *  = 0);
@@ -57184,10 +47898,9 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator>
   Iterator connect(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       typename enable_if<!is_endpoint_sequence< Iterator >::value >::type *  = 0);
 
@@ -57241,10 +47954,9 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator>
   Iterator connect(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       asio::error_code & ec,
       typename enable_if<!is_endpoint_sequence< Iterator >::value >::type *  = 0);
@@ -57291,10 +48003,9 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator>
   Iterator connect(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       Iterator end);
 
@@ -57359,10 +48070,9 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator>
   Iterator connect(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       Iterator end,
       asio::error_code & ec);
@@ -57425,11 +48135,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
-      typename ConnectCondition>
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
   Protocol::endpoint connect(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       const EndpointSequence & endpoints,
       ConnectCondition connect_condition,
       typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type *  = 0);
@@ -57517,11 +48226,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
-      typename ConnectCondition>
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
   Protocol::endpoint connect(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       const EndpointSequence & endpoints,
       ConnectCondition connect_condition,
       asio::error_code & ec,
@@ -57610,11 +48318,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
-      typename ConnectCondition>
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
   Iterator connect(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       ConnectCondition connect_condition,
       typename enable_if<!is_endpoint_sequence< Iterator >::value >::type *  = 0);
@@ -57677,11 +48384,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
-      typename ConnectCondition>
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
   Iterator connect(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       ConnectCondition connect_condition,
       asio::error_code & ec,
@@ -57737,11 +48443,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
-      typename ConnectCondition>
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
   Iterator connect(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       Iterator end,
       ConnectCondition connect_condition);
@@ -57832,11 +48537,10 @@
 
   template<
       typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
       typename Iterator,
-      typename ConnectCondition>
+      typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
   Iterator connect(
-      basic_socket< Protocol, SocketService > & s,
+      basic_socket< Protocol > & s,
       Iterator begin,
       Iterator end,
       ConnectCondition connect_condition,
@@ -57943,6 +48647,21 @@
      Construct a non-modifiable buffer from a modifiable one. ]
   ]
   
+  [
+    [[link asio.reference.const_buffer.data [*data]]]
+    [Get a pointer to the beginning of the memory range. ]
+  ]
+  
+  [
+    [[link asio.reference.const_buffer.operator_plus__eq_ [*operator+=]]]
+    [Move the start of the buffer by the specified number of bytes. ]
+  ]
+  
+  [
+    [[link asio.reference.const_buffer.size [*size]]]
+    [Get the size of the memory range. ]
+  ]
+  
 ]
 
 [heading Related Functions]
@@ -57963,18 +48682,18 @@
   
 
 
-The contents of a buffer may be accessed using the [link asio.reference.buffer_size `buffer_size`]  and [link asio.reference.buffer_cast `buffer_cast`]  functions:
+The contents of a buffer may be accessed using the `data()` and `size()` member functions:
 
 
 
    asio::const_buffer b1 = ...;
-   std::size_t s1 = asio::buffer_size(b1);
-   const unsigned char* p1 = asio::buffer_cast<const unsigned char*>(b1);
+   std::size_t s1 = b1.size();
+   const unsigned char* p1 = static_cast<const unsigned char*>(b1.data());
 
 
 
 
-The `asio::buffer_cast` function permits violations of type safety, so uses of it in application code should be carefully considered. 
+The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered. 
 
 [heading Requirements]
 
@@ -57984,7 +48703,7 @@
 
 [section:const_buffer const_buffer::const_buffer]
 
-[indexterm2 const_buffer..const_buffer] 
+[indexterm2 asio.indexterm.const_buffer.const_buffer..const_buffer..const_buffer] 
 Construct an empty buffer. 
 
 
@@ -58055,19 +48774,33 @@
 
 [endsect]
 
+
+[section:data const_buffer::data]
+
+[indexterm2 asio.indexterm.const_buffer.data..data..const_buffer] 
+Get a pointer to the beginning of the memory range. 
+
+
+  const void * data() const;
+
+
+
+[endsect]
+
+
 [section:operator_plus_ const_buffer::operator+]
 
-[indexterm2 operator+..const_buffer] 
+[indexterm2 asio.indexterm.const_buffer.operator_plus_..operator+..const_buffer] 
 Create a new non-modifiable buffer that is offset from the start of another. 
 
 
   const_buffer ``[link asio.reference.const_buffer.operator_plus_.overload1 operator+]``(
       const const_buffer & b,
-      std::size_t start);
+      std::size_t n);
   ``  [''''&raquo;''' [link asio.reference.const_buffer.operator_plus_.overload1 more...]]``
 
   const_buffer ``[link asio.reference.const_buffer.operator_plus_.overload2 operator+]``(
-      std::size_t start,
+      std::size_t n,
       const const_buffer & b);
   ``  [''''&raquo;''' [link asio.reference.const_buffer.operator_plus_.overload2 more...]]``
 
@@ -58080,7 +48813,7 @@
 
   const_buffer operator+(
       const const_buffer & b,
-      std::size_t start);
+      std::size_t n);
 
 
 
@@ -58095,7 +48828,7 @@
 
 
   const_buffer operator+(
-      std::size_t start,
+      std::size_t n,
       const const_buffer & b);
 
 
@@ -58106,12 +48839,41 @@
 [endsect]
 
 
+[section:operator_plus__eq_ const_buffer::operator+=]
+
+[indexterm2 asio.indexterm.const_buffer.operator_plus__eq_..operator+=..const_buffer] 
+Move the start of the buffer by the specified number of bytes. 
+
+
+  const_buffer & operator+=(
+      std::size_t n);
+
+
+
+[endsect]
+
+
+
+[section:size const_buffer::size]
+
+[indexterm2 asio.indexterm.const_buffer.size..size..const_buffer] 
+Get the size of the memory range. 
+
+
+  std::size_t size() const;
+
+
+
+[endsect]
+
+
+
 [endsect]
 
 [section:const_buffers_1 const_buffers_1]
 
 
-Adapts a single non-modifiable buffer so that it meets the requirements of the ConstBufferSequence concept. 
+(Deprecated: Use [link asio.reference.const_buffer `const_buffer`].) Adapts a single non-modifiable buffer so that it meets the requirements of the ConstBufferSequence concept. 
 
 
   class const_buffers_1 :
@@ -58155,10 +48917,25 @@
   ]
   
   [
+    [[link asio.reference.const_buffers_1.data [*data]]]
+    [Get a pointer to the beginning of the memory range. ]
+  ]
+  
+  [
     [[link asio.reference.const_buffers_1.end [*end]]]
     [Get a random-access iterator for one past the last element. ]
   ]
   
+  [
+    [[link asio.reference.const_buffers_1.operator_plus__eq_ [*operator+=]]]
+    [Move the start of the buffer by the specified number of bytes. ]
+  ]
+  
+  [
+    [[link asio.reference.const_buffers_1.size [*size]]]
+    [Get the size of the memory range. ]
+  ]
+  
 ]
 
 [heading Related Functions]
@@ -58181,7 +48958,7 @@
 
 [section:begin const_buffers_1::begin]
 
-[indexterm2 begin..const_buffers_1] 
+[indexterm2 asio.indexterm.const_buffers_1.begin..begin..const_buffers_1] 
 Get a random-access iterator to the first element. 
 
 
@@ -58194,7 +48971,7 @@
 
 [section:const_buffers_1 const_buffers_1::const_buffers_1]
 
-[indexterm2 const_buffers_1..const_buffers_1] 
+[indexterm2 asio.indexterm.const_buffers_1.const_buffers_1..const_buffers_1..const_buffers_1] 
 Construct to represent a given memory range. 
 
 
@@ -58247,7 +49024,7 @@
 
 [section:const_iterator const_buffers_1::const_iterator]
 
-[indexterm2 const_iterator..const_buffers_1] 
+[indexterm2 asio.indexterm.const_buffers_1.const_iterator..const_iterator..const_buffers_1] 
 A random-access iterator type that may be used to read elements. 
 
 
@@ -58266,9 +49043,26 @@
 
 
 
+[section:data const_buffers_1::data]
+
+
+['Inherited from const_buffer.]
+
+[indexterm2 asio.indexterm.const_buffers_1.data..data..const_buffers_1] 
+Get a pointer to the beginning of the memory range. 
+
+
+  const void * data() const;
+
+
+
+[endsect]
+
+
+
 [section:end const_buffers_1::end]
 
-[indexterm2 end..const_buffers_1] 
+[indexterm2 asio.indexterm.const_buffers_1.end..end..const_buffers_1] 
 Get a random-access iterator for one past the last element. 
 
 
@@ -58281,17 +49075,17 @@
 
 [section:operator_plus_ const_buffers_1::operator+]
 
-[indexterm2 operator+..const_buffers_1] 
+[indexterm2 asio.indexterm.const_buffers_1.operator_plus_..operator+..const_buffers_1] 
 Create a new non-modifiable buffer that is offset from the start of another. 
 
 
   const_buffer ``[link asio.reference.const_buffers_1.operator_plus_.overload1 operator+]``(
       const const_buffer & b,
-      std::size_t start);
+      std::size_t n);
   ``  [''''&raquo;''' [link asio.reference.const_buffers_1.operator_plus_.overload1 more...]]``
 
   const_buffer ``[link asio.reference.const_buffers_1.operator_plus_.overload2 operator+]``(
-      std::size_t start,
+      std::size_t n,
       const const_buffer & b);
   ``  [''''&raquo;''' [link asio.reference.const_buffers_1.operator_plus_.overload2 more...]]``
 
@@ -58307,7 +49101,7 @@
 
   const_buffer operator+(
       const const_buffer & b,
-      std::size_t start);
+      std::size_t n);
 
 
 
@@ -58325,7 +49119,7 @@
 
 
   const_buffer operator+(
-      std::size_t start,
+      std::size_t n,
       const const_buffer & b);
 
 
@@ -58336,9 +49130,44 @@
 [endsect]
 
 
+[section:operator_plus__eq_ const_buffers_1::operator+=]
+
+
+['Inherited from const_buffer.]
+
+[indexterm2 asio.indexterm.const_buffers_1.operator_plus__eq_..operator+=..const_buffers_1] 
+Move the start of the buffer by the specified number of bytes. 
+
+
+  const_buffer & operator+=(
+      std::size_t n);
+
+
+
+[endsect]
+
+
+
+[section:size const_buffers_1::size]
+
+
+['Inherited from const_buffer.]
+
+[indexterm2 asio.indexterm.const_buffers_1.size..size..const_buffers_1] 
+Get the size of the memory range. 
+
+
+  std::size_t size() const;
+
+
+
+[endsect]
+
+
+
 [section:value_type const_buffers_1::value_type]
 
-[indexterm2 value_type..const_buffers_1] 
+[indexterm2 asio.indexterm.const_buffers_1.value_type..value_type..const_buffers_1] 
 The type for each element in the list of buffers. 
 
 
@@ -58358,6 +49187,21 @@
      Construct a non-modifiable buffer from a modifiable one. ]
   ]
   
+  [
+    [[link asio.reference.const_buffer.data [*data]]]
+    [Get a pointer to the beginning of the memory range. ]
+  ]
+  
+  [
+    [[link asio.reference.const_buffer.operator_plus__eq_ [*operator+=]]]
+    [Move the start of the buffer by the specified number of bytes. ]
+  ]
+  
+  [
+    [[link asio.reference.const_buffer.size [*size]]]
+    [Get the size of the memory range. ]
+  ]
+  
 ]
 
 [heading Related Functions]
@@ -58378,18 +49222,18 @@
   
 
 
-The contents of a buffer may be accessed using the [link asio.reference.buffer_size `buffer_size`]  and [link asio.reference.buffer_cast `buffer_cast`]  functions:
+The contents of a buffer may be accessed using the `data()` and `size()` member functions:
 
 
 
    asio::const_buffer b1 = ...;
-   std::size_t s1 = asio::buffer_size(b1);
-   const unsigned char* p1 = asio::buffer_cast<const unsigned char*>(b1);
+   std::size_t s1 = b1.size();
+   const unsigned char* p1 = static_cast<const unsigned char*>(b1.data());
 
 
 
 
-The `asio::buffer_cast` function permits violations of type safety, so uses of it in application code should be carefully considered. 
+The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered. 
 
 
 [heading Requirements]
@@ -58722,7 +49566,7 @@
 
 [section:coroutine coroutine::coroutine]
 
-[indexterm2 coroutine..coroutine] 
+[indexterm2 asio.indexterm.coroutine.coroutine..coroutine..coroutine] 
 Constructs a coroutine in its initial state. 
 
 
@@ -58736,7 +49580,7 @@
 
 [section:is_child coroutine::is_child]
 
-[indexterm2 is_child..coroutine] 
+[indexterm2 asio.indexterm.coroutine.is_child..is_child..coroutine] 
 Returns true if the coroutine is the child of a fork. 
 
 
@@ -58750,7 +49594,7 @@
 
 [section:is_complete coroutine::is_complete]
 
-[indexterm2 is_complete..coroutine] 
+[indexterm2 asio.indexterm.coroutine.is_complete..is_complete..coroutine] 
 Returns true if the coroutine has reached its terminal state. 
 
 
@@ -58764,7 +49608,7 @@
 
 [section:is_parent coroutine::is_parent]
 
-[indexterm2 is_parent..coroutine] 
+[indexterm2 asio.indexterm.coroutine.is_parent..is_parent..coroutine] 
 Returns true if the coroutine is the parent of a fork. 
 
 
@@ -58778,1096 +49622,10 @@
 
 [endsect]
 
-[section:datagram_socket_service datagram_socket_service]
-
-
-Default service implementation for a datagram socket. 
-
-
-  template<
-      typename ``[link asio.reference.Protocol Protocol]``>
-  class datagram_socket_service :
-    public io_context::service
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.datagram_socket_service.endpoint_type [*endpoint_type]]]
-    [The endpoint type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.datagram_socket_service.implementation_type [*implementation_type]]]
-    [The type of a datagram socket. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.datagram_socket_service.native_handle_type [*native_handle_type]]]
-    [The native socket type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.datagram_socket_service.protocol_type [*protocol_type]]]
-    [The protocol type. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.datagram_socket_service.assign [*assign]]]
-    [Assign an existing native socket to a datagram socket. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.async_connect [*async_connect]]]
-    [Start an asynchronous connect. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.async_receive [*async_receive]]]
-    [Start an asynchronous receive. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.async_receive_from [*async_receive_from]]]
-    [Start an asynchronous receive that will get the endpoint of the sender. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.async_send [*async_send]]]
-    [Start an asynchronous send. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.async_send_to [*async_send_to]]]
-    [Start an asynchronous send. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.async_wait [*async_wait]]]
-    [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.at_mark [*at_mark]]]
-    [Determine whether the socket is at the out-of-band data mark. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.available [*available]]]
-    [Determine the number of bytes available for reading. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.bind [*bind]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.close [*close]]]
-    [Close a datagram socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.connect [*connect]]]
-    [Connect the datagram socket to the specified endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.construct [*construct]]]
-    [Construct a new datagram socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.converting_move_construct [*converting_move_construct]]]
-    [Move-construct a new datagram socket implementation from another protocol type. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.datagram_socket_service [*datagram_socket_service]]]
-    [Construct a new datagram socket service for the specified io_context. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.destroy [*destroy]]]
-    [Destroy a datagram socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.get_option [*get_option]]]
-    [Get a socket option. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.io_control [*io_control]]]
-    [Perform an IO control command on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.is_open [*is_open]]]
-    [Determine whether the socket is open. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.local_endpoint [*local_endpoint]]]
-    [Get the local endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.move_assign [*move_assign]]]
-    [Move-assign from another datagram socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.move_construct [*move_construct]]]
-    [Move-construct a new datagram socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.native_handle [*native_handle]]]
-    [Get the native socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.native_non_blocking [*native_non_blocking]]]
-    [Gets the non-blocking mode of the native socket implementation. 
-
-     Sets the non-blocking mode of the native socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.non_blocking [*non_blocking]]]
-    [Gets the non-blocking mode of the socket. 
-
-     Sets the non-blocking mode of the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.open [*open]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.receive [*receive]]]
-    [Receive some data from the peer. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.receive_from [*receive_from]]]
-    [Receive a datagram with the endpoint of the sender. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.remote_endpoint [*remote_endpoint]]]
-    [Get the remote endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.send [*send]]]
-    [Send the given data to the peer. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.send_to [*send_to]]]
-    [Send a datagram to the specified endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.set_option [*set_option]]]
-    [Set a socket option. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.shutdown [*shutdown]]]
-    [Disable sends or receives on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.datagram_socket_service.wait [*wait]]]
-    [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.datagram_socket_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/datagram_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:assign datagram_socket_service::assign]
-
-[indexterm2 assign..datagram_socket_service] 
-Assign an existing native socket to a datagram socket. 
-
-
-  asio::error_code assign(
-      implementation_type & impl,
-      const protocol_type & protocol,
-      const native_handle_type & native_socket,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:async_connect datagram_socket_service::async_connect]
-
-[indexterm2 async_connect..datagram_socket_service] 
-Start an asynchronous connect. 
-
-
-  template<
-      typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
-      implementation_type & impl,
-      const endpoint_type & peer_endpoint,
-      ConnectHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_receive datagram_socket_service::async_receive]
-
-[indexterm2 async_receive..datagram_socket_service] 
-Start an asynchronous receive. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      socket_base::message_flags flags,
-      ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_receive_from datagram_socket_service::async_receive_from]
-
-[indexterm2 async_receive_from..datagram_socket_service] 
-Start an asynchronous receive that will get the endpoint of the sender. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive_from(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      endpoint_type & sender_endpoint,
-      socket_base::message_flags flags,
-      ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_send datagram_socket_service::async_send]
-
-[indexterm2 async_send..datagram_socket_service] 
-Start an asynchronous send. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      socket_base::message_flags flags,
-      WriteHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_send_to datagram_socket_service::async_send_to]
-
-[indexterm2 async_send_to..datagram_socket_service] 
-Start an asynchronous send. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send_to(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      const endpoint_type & destination,
-      socket_base::message_flags flags,
-      WriteHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_wait datagram_socket_service::async_wait]
-
-[indexterm2 async_wait..datagram_socket_service] 
-Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  template<
-      typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      implementation_type & impl,
-      socket_base::wait_type w,
-      WaitHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:at_mark datagram_socket_service::at_mark]
-
-[indexterm2 at_mark..datagram_socket_service] 
-Determine whether the socket is at the out-of-band data mark. 
-
-
-  bool at_mark(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:available datagram_socket_service::available]
-
-[indexterm2 available..datagram_socket_service] 
-Determine the number of bytes available for reading. 
-
-
-  std::size_t available(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:bind datagram_socket_service::bind]
-
-[indexterm2 bind..datagram_socket_service] 
-
-  asio::error_code bind(
-      implementation_type & impl,
-      const endpoint_type & endpoint,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:cancel datagram_socket_service::cancel]
-
-[indexterm2 cancel..datagram_socket_service] 
-Cancel all asynchronous operations associated with the socket. 
-
-
-  asio::error_code cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:close datagram_socket_service::close]
-
-[indexterm2 close..datagram_socket_service] 
-Close a datagram socket implementation. 
-
-
-  asio::error_code close(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:connect datagram_socket_service::connect]
-
-[indexterm2 connect..datagram_socket_service] 
-Connect the datagram socket to the specified endpoint. 
-
-
-  asio::error_code connect(
-      implementation_type & impl,
-      const endpoint_type & peer_endpoint,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct datagram_socket_service::construct]
-
-[indexterm2 construct..datagram_socket_service] 
-Construct a new datagram socket implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:converting_move_construct datagram_socket_service::converting_move_construct]
-
-[indexterm2 converting_move_construct..datagram_socket_service] 
-Move-construct a new datagram socket implementation from another protocol type. 
-
-
-  template<
-      typename ``[link asio.reference.Protocol Protocol1]``>
-  void converting_move_construct(
-      implementation_type & impl,
-      typename datagram_socket_service< Protocol1 >::implementation_type & other_impl,
-      typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
-
-
-
-[endsect]
-
-
-
-[section:datagram_socket_service datagram_socket_service::datagram_socket_service]
-
-[indexterm2 datagram_socket_service..datagram_socket_service] 
-Construct a new datagram socket service for the specified [link asio.reference.io_context `io_context`]. 
-
-
-  datagram_socket_service(
-      asio::io_context & io_context);
-
-
-
-[endsect]
-
-
-
-[section:destroy datagram_socket_service::destroy]
-
-[indexterm2 destroy..datagram_socket_service] 
-Destroy a datagram socket implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:endpoint_type datagram_socket_service::endpoint_type]
-
-[indexterm2 endpoint_type..datagram_socket_service] 
-The endpoint type. 
-
-
-  typedef Protocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/datagram_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_io_context datagram_socket_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..datagram_socket_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service datagram_socket_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..datagram_socket_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:get_option datagram_socket_service::get_option]
-
-[indexterm2 get_option..datagram_socket_service] 
-Get a socket option. 
-
-
-  template<
-      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code get_option(
-      const implementation_type & impl,
-      GettableSocketOption & option,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:id datagram_socket_service::id]
-
-[indexterm2 id..datagram_socket_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type datagram_socket_service::implementation_type]
-
-[indexterm2 implementation_type..datagram_socket_service] 
-The type of a datagram socket. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/datagram_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:io_control datagram_socket_service::io_control]
-
-[indexterm2 io_control..datagram_socket_service] 
-Perform an IO control command on the socket. 
-
-
-  template<
-      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
-      implementation_type & impl,
-      IoControlCommand & command,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:is_open datagram_socket_service::is_open]
-
-[indexterm2 is_open..datagram_socket_service] 
-Determine whether the socket is open. 
-
-
-  bool is_open(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:local_endpoint datagram_socket_service::local_endpoint]
-
-[indexterm2 local_endpoint..datagram_socket_service] 
-Get the local endpoint. 
-
-
-  endpoint_type local_endpoint(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:move_assign datagram_socket_service::move_assign]
-
-[indexterm2 move_assign..datagram_socket_service] 
-Move-assign from another datagram socket implementation. 
-
-
-  void move_assign(
-      implementation_type & impl,
-      datagram_socket_service & other_service,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:move_construct datagram_socket_service::move_construct]
-
-[indexterm2 move_construct..datagram_socket_service] 
-Move-construct a new datagram socket implementation. 
-
-
-  void move_construct(
-      implementation_type & impl,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle datagram_socket_service::native_handle]
-
-[indexterm2 native_handle..datagram_socket_service] 
-Get the native socket implementation. 
-
-
-  native_handle_type native_handle(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle_type datagram_socket_service::native_handle_type]
-
-[indexterm2 native_handle_type..datagram_socket_service] 
-The native socket type. 
-
-
-  typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/datagram_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking datagram_socket_service::native_non_blocking]
-
-[indexterm2 native_non_blocking..datagram_socket_service] 
-Gets the non-blocking mode of the native socket implementation. 
-
-
-  bool ``[link asio.reference.datagram_socket_service.native_non_blocking.overload1 native_non_blocking]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.datagram_socket_service.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native socket implementation. 
-
-
-  asio::error_code ``[link asio.reference.datagram_socket_service.native_non_blocking.overload2 native_non_blocking]``(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.datagram_socket_service.native_non_blocking.overload2 more...]]``
-
-
-[section:overload1 datagram_socket_service::native_non_blocking (1 of 2 overloads)]
-
-
-Gets the non-blocking mode of the native socket implementation. 
-
-
-  bool native_non_blocking(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 datagram_socket_service::native_non_blocking (2 of 2 overloads)]
-
-
-Sets the non-blocking mode of the native socket implementation. 
-
-
-  asio::error_code native_non_blocking(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking datagram_socket_service::non_blocking]
-
-[indexterm2 non_blocking..datagram_socket_service] 
-Gets the non-blocking mode of the socket. 
-
-
-  bool ``[link asio.reference.datagram_socket_service.non_blocking.overload1 non_blocking]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.datagram_socket_service.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the socket. 
-
-
-  asio::error_code ``[link asio.reference.datagram_socket_service.non_blocking.overload2 non_blocking]``(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.datagram_socket_service.non_blocking.overload2 more...]]``
-
-
-[section:overload1 datagram_socket_service::non_blocking (1 of 2 overloads)]
-
-
-Gets the non-blocking mode of the socket. 
-
-
-  bool non_blocking(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 datagram_socket_service::non_blocking (2 of 2 overloads)]
-
-
-Sets the non-blocking mode of the socket. 
-
-
-  asio::error_code non_blocking(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:open datagram_socket_service::open]
-
-[indexterm2 open..datagram_socket_service] 
-
-  asio::error_code open(
-      implementation_type & impl,
-      const protocol_type & protocol,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:protocol_type datagram_socket_service::protocol_type]
-
-[indexterm2 protocol_type..datagram_socket_service] 
-The protocol type. 
-
-
-  typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/datagram_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:receive datagram_socket_service::receive]
-
-[indexterm2 receive..datagram_socket_service] 
-Receive some data from the peer. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t receive(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      socket_base::message_flags flags,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:receive_from datagram_socket_service::receive_from]
-
-[indexterm2 receive_from..datagram_socket_service] 
-Receive a datagram with the endpoint of the sender. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t receive_from(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      endpoint_type & sender_endpoint,
-      socket_base::message_flags flags,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:remote_endpoint datagram_socket_service::remote_endpoint]
-
-[indexterm2 remote_endpoint..datagram_socket_service] 
-Get the remote endpoint. 
-
-
-  endpoint_type remote_endpoint(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:send datagram_socket_service::send]
-
-[indexterm2 send..datagram_socket_service] 
-Send the given data to the peer. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t send(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      socket_base::message_flags flags,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:send_to datagram_socket_service::send_to]
-
-[indexterm2 send_to..datagram_socket_service] 
-Send a datagram to the specified endpoint. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t send_to(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      const endpoint_type & destination,
-      socket_base::message_flags flags,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:set_option datagram_socket_service::set_option]
-
-[indexterm2 set_option..datagram_socket_service] 
-Set a socket option. 
-
-
-  template<
-      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code set_option(
-      implementation_type & impl,
-      const SettableSocketOption & option,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:shutdown datagram_socket_service::shutdown]
-
-[indexterm2 shutdown..datagram_socket_service] 
-Disable sends or receives on the socket. 
-
-
-  asio::error_code shutdown(
-      implementation_type & impl,
-      socket_base::shutdown_type what,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:wait datagram_socket_service::wait]
-
-[indexterm2 wait..datagram_socket_service] 
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  asio::error_code wait(
-      implementation_type & impl,
-      socket_base::wait_type w,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
 
 [section:deadline_timer deadline_timer]
 
-[indexterm1 deadline_timer] 
+[indexterm1 asio.indexterm.deadline_timer..deadline_timer] 
 Typedef for the typical usage of timer. Uses a UTC clock. 
 
 
@@ -59894,20 +49652,6 @@
 
   [
 
-    [[link asio.reference.basic_deadline_timer.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_deadline_timer.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_deadline_timer.time_type [*time_type]]]
     [The time type. ]
   
@@ -59937,7 +49681,9 @@
 
      Constructor to set a particular expiry time as an absolute time. 
 
-     Constructor to set a particular expiry time relative to now. ]
+     Constructor to set a particular expiry time relative to now. 
+
+     Move-construct a basic_deadline_timer from another. ]
   ]
   
   [
@@ -59980,24 +49726,18 @@
   ]
   
   [
+    [[link asio.reference.basic_deadline_timer.operator_eq_ [*operator=]]]
+    [Move-assign a basic_deadline_timer from another. ]
+  ]
+  
+  [
     [[link asio.reference.basic_deadline_timer.wait [*wait]]]
     [Perform a blocking wait on the timer. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_deadline_timer.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_deadline_timer.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_deadline_timer._basic_deadline_timer [*~basic_deadline_timer]]]
+    [Destroys the timer. ]
   ]
   
 ]
@@ -60107,501 +49847,22 @@
 [endsect]
 
 
-[section:deadline_timer_service deadline_timer_service]
-
-
-Default service implementation for a timer. 
-
-
-  template<
-      typename TimeType,
-      typename ``[link asio.reference.TimeTraits TimeTraits]`` = asio::time_traits<TimeType>>
-  class deadline_timer_service :
-    public io_context::service
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.deadline_timer_service.duration_type [*duration_type]]]
-    [The duration type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.deadline_timer_service.implementation_type [*implementation_type]]]
-    [The implementation type of the deadline timer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.deadline_timer_service.time_type [*time_type]]]
-    [The time type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.deadline_timer_service.traits_type [*traits_type]]]
-    [The time traits type. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.deadline_timer_service.async_wait [*async_wait]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.deadline_timer_service.cancel [*cancel]]]
-    [Cancel any asynchronous wait operations associated with the timer. ]
-  ]
-  
-  [
-    [[link asio.reference.deadline_timer_service.cancel_one [*cancel_one]]]
-    [Cancels one asynchronous wait operation associated with the timer. ]
-  ]
-  
-  [
-    [[link asio.reference.deadline_timer_service.construct [*construct]]]
-    [Construct a new timer implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.deadline_timer_service.deadline_timer_service [*deadline_timer_service]]]
-    [Construct a new timer service for the specified io_context. ]
-  ]
-  
-  [
-    [[link asio.reference.deadline_timer_service.destroy [*destroy]]]
-    [Destroy a timer implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.deadline_timer_service.expires_at [*expires_at]]]
-    [Get the expiry time for the timer as an absolute time. 
-
-     Set the expiry time for the timer as an absolute time. ]
-  ]
-  
-  [
-    [[link asio.reference.deadline_timer_service.expires_from_now [*expires_from_now]]]
-    [Get the expiry time for the timer relative to now. 
-
-     Set the expiry time for the timer relative to now. ]
-  ]
-  
-  [
-    [[link asio.reference.deadline_timer_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.deadline_timer_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.deadline_timer_service.wait [*wait]]]
-    []
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.deadline_timer_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/deadline_timer_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:async_wait deadline_timer_service::async_wait]
-
-[indexterm2 async_wait..deadline_timer_service] 
-
-  template<
-      typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      implementation_type & impl,
-      WaitHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:cancel deadline_timer_service::cancel]
-
-[indexterm2 cancel..deadline_timer_service] 
-Cancel any asynchronous wait operations associated with the timer. 
-
-
-  std::size_t cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:cancel_one deadline_timer_service::cancel_one]
-
-[indexterm2 cancel_one..deadline_timer_service] 
-Cancels one asynchronous wait operation associated with the timer. 
-
-
-  std::size_t cancel_one(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct deadline_timer_service::construct]
-
-[indexterm2 construct..deadline_timer_service] 
-Construct a new timer implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:deadline_timer_service deadline_timer_service::deadline_timer_service]
-
-[indexterm2 deadline_timer_service..deadline_timer_service] 
-Construct a new timer service for the specified [link asio.reference.io_context `io_context`]. 
-
-
-  deadline_timer_service(
-      asio::io_context & io_context);
-
-
-
-[endsect]
-
-
-
-[section:destroy deadline_timer_service::destroy]
-
-[indexterm2 destroy..deadline_timer_service] 
-Destroy a timer implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:duration_type deadline_timer_service::duration_type]
-
-[indexterm2 duration_type..deadline_timer_service] 
-The duration type. 
-
-
-  typedef traits_type::duration_type duration_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/deadline_timer_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:expires_at deadline_timer_service::expires_at]
-
-[indexterm2 expires_at..deadline_timer_service] 
-Get the expiry time for the timer as an absolute time. 
-
-
-  time_type ``[link asio.reference.deadline_timer_service.expires_at.overload1 expires_at]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.deadline_timer_service.expires_at.overload1 more...]]``
-
-
-Set the expiry time for the timer as an absolute time. 
-
-
-  std::size_t ``[link asio.reference.deadline_timer_service.expires_at.overload2 expires_at]``(
-      implementation_type & impl,
-      const time_type & expiry_time,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.deadline_timer_service.expires_at.overload2 more...]]``
-
-
-[section:overload1 deadline_timer_service::expires_at (1 of 2 overloads)]
-
-
-Get the expiry time for the timer as an absolute time. 
-
-
-  time_type expires_at(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 deadline_timer_service::expires_at (2 of 2 overloads)]
-
-
-Set the expiry time for the timer as an absolute time. 
-
-
-  std::size_t expires_at(
-      implementation_type & impl,
-      const time_type & expiry_time,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:expires_from_now deadline_timer_service::expires_from_now]
-
-[indexterm2 expires_from_now..deadline_timer_service] 
-Get the expiry time for the timer relative to now. 
-
-
-  duration_type ``[link asio.reference.deadline_timer_service.expires_from_now.overload1 expires_from_now]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.deadline_timer_service.expires_from_now.overload1 more...]]``
-
-
-Set the expiry time for the timer relative to now. 
-
-
-  std::size_t ``[link asio.reference.deadline_timer_service.expires_from_now.overload2 expires_from_now]``(
-      implementation_type & impl,
-      const duration_type & expiry_time,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.deadline_timer_service.expires_from_now.overload2 more...]]``
-
-
-[section:overload1 deadline_timer_service::expires_from_now (1 of 2 overloads)]
-
-
-Get the expiry time for the timer relative to now. 
-
-
-  duration_type expires_from_now(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 deadline_timer_service::expires_from_now (2 of 2 overloads)]
-
-
-Set the expiry time for the timer relative to now. 
-
-
-  std::size_t expires_from_now(
-      implementation_type & impl,
-      const duration_type & expiry_time,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_io_context deadline_timer_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..deadline_timer_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service deadline_timer_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..deadline_timer_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:id deadline_timer_service::id]
-
-[indexterm2 id..deadline_timer_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type deadline_timer_service::implementation_type]
-
-[indexterm2 implementation_type..deadline_timer_service] 
-The implementation type of the deadline timer. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/deadline_timer_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:time_type deadline_timer_service::time_type]
-
-[indexterm2 time_type..deadline_timer_service] 
-The time type. 
-
-
-  typedef traits_type::time_type time_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/deadline_timer_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:traits_type deadline_timer_service::traits_type]
-
-[indexterm2 traits_type..deadline_timer_service] 
-The time traits type. 
-
-
-  typedef TimeTraits traits_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/deadline_timer_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:wait deadline_timer_service::wait]
-
-[indexterm2 wait..deadline_timer_service] 
-
-  void wait(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
 [section:defer defer]
 
-[indexterm1 defer] 
+[indexterm1 asio.indexterm.defer..defer] 
 Submits a completion token or function object for execution. 
 
     
   template<
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.defer.overload1 defer]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.defer.overload1 defer]``(
       CompletionToken && token);
   ``  [''''&raquo;''' [link asio.reference.defer.overload1 more...]]``
 
   template<
       typename ``[link asio.reference.Executor1 Executor]``,
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.defer.overload2 defer]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.defer.overload2 defer]``(
       const Executor & ex,
       CompletionToken && token,
       typename enable_if< is_executor< Executor >::value >::type *  = 0);
@@ -60610,7 +49871,7 @@
   template<
       typename ExecutionContext,
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.defer.overload3 defer]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.defer.overload3 defer]``(
       ExecutionContext & ctx,
       CompletionToken && token,
       typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type *  = 0);
@@ -60631,7 +49892,7 @@
 
   template<
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` defer(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` defer(
       CompletionToken && token);
 
 
@@ -60673,7 +49934,7 @@
   template<
       typename ``[link asio.reference.Executor1 Executor]``,
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` defer(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` defer(
       const Executor & ex,
       CompletionToken && token,
       typename enable_if< is_executor< Executor >::value >::type *  = 0);
@@ -60723,7 +49984,7 @@
   template<
       typename ExecutionContext,
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` defer(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` defer(
       ExecutionContext & ctx,
       CompletionToken && token,
       typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type *  = 0);
@@ -60744,20 +50005,20 @@
 
 [section:dispatch dispatch]
 
-[indexterm1 dispatch] 
+[indexterm1 asio.indexterm.dispatch..dispatch] 
 Submits a completion token or function object for execution. 
 
     
   template<
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.dispatch.overload1 dispatch]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.dispatch.overload1 dispatch]``(
       CompletionToken && token);
   ``  [''''&raquo;''' [link asio.reference.dispatch.overload1 more...]]``
 
   template<
       typename ``[link asio.reference.Executor1 Executor]``,
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.dispatch.overload2 dispatch]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.dispatch.overload2 dispatch]``(
       const Executor & ex,
       CompletionToken && token,
       typename enable_if< is_executor< Executor >::value >::type *  = 0);
@@ -60766,7 +50027,7 @@
   template<
       typename ExecutionContext,
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.dispatch.overload3 dispatch]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.dispatch.overload3 dispatch]``(
       ExecutionContext & ctx,
       CompletionToken && token,
       typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type *  = 0);
@@ -60787,7 +50048,7 @@
 
   template<
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` dispatch(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` dispatch(
       CompletionToken && token);
 
 
@@ -60829,7 +50090,7 @@
   template<
       typename ``[link asio.reference.Executor1 Executor]``,
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` dispatch(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` dispatch(
       const Executor & ex,
       CompletionToken && token,
       typename enable_if< is_executor< Executor >::value >::type *  = 0);
@@ -60879,7 +50140,7 @@
   template<
       typename ExecutionContext,
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` dispatch(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` dispatch(
       ExecutionContext & ctx,
       CompletionToken && token,
       typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type *  = 0);
@@ -60900,7 +50161,7 @@
 
 [section:dynamic_buffer dynamic_buffer]
 
-[indexterm1 dynamic_buffer] 
+[indexterm1 asio.indexterm.dynamic_buffer..dynamic_buffer] 
 The `asio::dynamic_buffer` function is used to create a dynamically resized buffer from a `std::basic_string` or `std::vector`. 
 
       
@@ -61051,7 +50312,7 @@
 [section:dynamic_string_buffer dynamic_string_buffer]
 
 
-Adapt a basic\_string to the DynamicBufferSequence requirements. 
+Adapt a basic\_string to the DynamicBuffer requirements. 
 
 
   template<
@@ -61140,7 +50401,7 @@
 
 [section:capacity dynamic_string_buffer::capacity]
 
-[indexterm2 capacity..dynamic_string_buffer] 
+[indexterm2 asio.indexterm.dynamic_string_buffer.capacity..capacity..dynamic_string_buffer] 
 Get the current capacity of the dynamic buffer. 
 
 
@@ -61161,7 +50422,7 @@
 
 [section:commit dynamic_string_buffer::commit]
 
-[indexterm2 commit..dynamic_string_buffer] 
+[indexterm2 asio.indexterm.dynamic_string_buffer.commit..commit..dynamic_string_buffer] 
 Move bytes from the output sequence to the input sequence. 
 
 
@@ -61195,52 +50456,39 @@
 
 [section:const_buffers_type dynamic_string_buffer::const_buffers_type]
 
-[indexterm2 const_buffers_type..dynamic_string_buffer] 
+[indexterm2 asio.indexterm.dynamic_string_buffer.const_buffers_type..const_buffers_type..dynamic_string_buffer] 
 The type used to represent the input sequence as a list of buffers. 
 
 
-  typedef const_buffers_1 const_buffers_type;
+  typedef const_buffer const_buffers_type;
 
 
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.const_buffers_1.const_iterator [*const_iterator]]]
-    [A random-access iterator type that may be used to read elements. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.const_buffers_1.value_type [*value_type]]]
-    [The type for each element in the list of buffers. ]
-  
-  ]
-
-]
-
 [heading Member Functions]
 [table
   [[Name][Description]]
 
   [
-    [[link asio.reference.const_buffers_1.begin [*begin]]]
-    [Get a random-access iterator to the first element. ]
-  ]
-  
-  [
-    [[link asio.reference.const_buffers_1.const_buffers_1 [*const_buffers_1]]]
-    [Construct to represent a given memory range. 
+    [[link asio.reference.const_buffer.const_buffer [*const_buffer]]]
+    [Construct an empty buffer. 
 
-     Construct to represent a single non-modifiable buffer. ]
+     Construct a buffer to represent a given memory range. 
+
+     Construct a non-modifiable buffer from a modifiable one. ]
   ]
   
   [
-    [[link asio.reference.const_buffers_1.end [*end]]]
-    [Get a random-access iterator for one past the last element. ]
+    [[link asio.reference.const_buffer.data [*data]]]
+    [Get a pointer to the beginning of the memory range. ]
+  ]
+  
+  [
+    [[link asio.reference.const_buffer.operator_plus__eq_ [*operator+=]]]
+    [Move the start of the buffer by the specified number of bytes. ]
+  ]
+  
+  [
+    [[link asio.reference.const_buffer.size [*size]]]
+    [Get the size of the memory range. ]
   ]
   
 ]
@@ -61250,12 +50498,32 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.const_buffers_1.operator_plus_ [*operator+]]]
+    [[link asio.reference.const_buffer.operator_plus_ [*operator+]]]
     [Create a new non-modifiable buffer that is offset from the start of another. ]
   ]
   
 ]
 
+The [link asio.reference.const_buffer `const_buffer`] class provides a safe representation of a buffer that cannot be modified. It does not own the underlying data, and so is cheap to copy or assign.
+
+
+[heading Accessing Buffer Contents]
+  
+
+
+The contents of a buffer may be accessed using the `data()` and `size()` member functions:
+
+
+
+   asio::const_buffer b1 = ...;
+   std::size_t s1 = b1.size();
+   const unsigned char* p1 = static_cast<const unsigned char*>(b1.data());
+
+
+
+
+The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered. 
+
 
 [heading Requirements]
 
@@ -61270,7 +50538,7 @@
 
 [section:consume dynamic_string_buffer::consume]
 
-[indexterm2 consume..dynamic_string_buffer] 
+[indexterm2 asio.indexterm.dynamic_string_buffer.consume..consume..dynamic_string_buffer] 
 Remove characters from the input sequence. 
 
 
@@ -61294,7 +50562,7 @@
 
 [section:data dynamic_string_buffer::data]
 
-[indexterm2 data..dynamic_string_buffer] 
+[indexterm2 asio.indexterm.dynamic_string_buffer.data..data..dynamic_string_buffer] 
 Get a list of buffers that represents the input sequence. 
 
 
@@ -61319,7 +50587,7 @@
 
 [section:dynamic_string_buffer dynamic_string_buffer::dynamic_string_buffer]
 
-[indexterm2 dynamic_string_buffer..dynamic_string_buffer] 
+[indexterm2 asio.indexterm.dynamic_string_buffer.dynamic_string_buffer..dynamic_string_buffer..dynamic_string_buffer] 
 Construct a dynamic buffer from a string. 
 
 
@@ -61386,7 +50654,7 @@
 
 [section:max_size dynamic_string_buffer::max_size]
 
-[indexterm2 max_size..dynamic_string_buffer] 
+[indexterm2 asio.indexterm.dynamic_string_buffer.max_size..max_size..dynamic_string_buffer] 
 Get the maximum size of the dynamic buffer. 
 
 
@@ -61407,52 +50675,37 @@
 
 [section:mutable_buffers_type dynamic_string_buffer::mutable_buffers_type]
 
-[indexterm2 mutable_buffers_type..dynamic_string_buffer] 
+[indexterm2 asio.indexterm.dynamic_string_buffer.mutable_buffers_type..mutable_buffers_type..dynamic_string_buffer] 
 The type used to represent the output sequence as a list of buffers. 
 
 
-  typedef mutable_buffers_1 mutable_buffers_type;
+  typedef mutable_buffer mutable_buffers_type;
 
 
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.mutable_buffers_1.const_iterator [*const_iterator]]]
-    [A random-access iterator type that may be used to read elements. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.mutable_buffers_1.value_type [*value_type]]]
-    [The type for each element in the list of buffers. ]
-  
-  ]
-
-]
-
 [heading Member Functions]
 [table
   [[Name][Description]]
 
   [
-    [[link asio.reference.mutable_buffers_1.begin [*begin]]]
-    [Get a random-access iterator to the first element. ]
+    [[link asio.reference.mutable_buffer.data [*data]]]
+    [Get a pointer to the beginning of the memory range. ]
   ]
   
   [
-    [[link asio.reference.mutable_buffers_1.end [*end]]]
-    [Get a random-access iterator for one past the last element. ]
-  ]
-  
-  [
-    [[link asio.reference.mutable_buffers_1.mutable_buffers_1 [*mutable_buffers_1]]]
-    [Construct to represent a given memory range. 
+    [[link asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
+    [Construct an empty buffer. 
 
-     Construct to represent a single modifiable buffer. ]
+     Construct a buffer to represent a given memory range. ]
+  ]
+  
+  [
+    [[link asio.reference.mutable_buffer.operator_plus__eq_ [*operator+=]]]
+    [Move the start of the buffer by the specified number of bytes. ]
+  ]
+  
+  [
+    [[link asio.reference.mutable_buffer.size [*size]]]
+    [Get the size of the memory range. ]
   ]
   
 ]
@@ -61462,12 +50715,32 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.mutable_buffers_1.operator_plus_ [*operator+]]]
+    [[link asio.reference.mutable_buffer.operator_plus_ [*operator+]]]
     [Create a new modifiable buffer that is offset from the start of another. ]
   ]
   
 ]
 
+The [link asio.reference.mutable_buffer `mutable_buffer`] class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
+
+
+[heading Accessing Buffer Contents]
+  
+
+
+The contents of a buffer may be accessed using the `data()` and `size()` member functions:
+
+
+
+   asio::mutable_buffer b1 = ...;
+   std::size_t s1 = b1.size();
+   unsigned char* p1 = static_cast<unsigned char*>(b1.data());
+
+
+
+
+The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered. 
+
 
 [heading Requirements]
 
@@ -61482,7 +50755,7 @@
 
 [section:prepare dynamic_string_buffer::prepare]
 
-[indexterm2 prepare..dynamic_string_buffer] 
+[indexterm2 asio.indexterm.dynamic_string_buffer.prepare..prepare..dynamic_string_buffer] 
 Get a list of buffers that represents the output sequence, with the given size. 
 
 
@@ -61521,7 +50794,7 @@
 
 [section:size dynamic_string_buffer::size]
 
-[indexterm2 size..dynamic_string_buffer] 
+[indexterm2 asio.indexterm.dynamic_string_buffer.size..size..dynamic_string_buffer] 
 Get the size of the input sequence. 
 
 
@@ -61538,7 +50811,7 @@
 [section:dynamic_vector_buffer dynamic_vector_buffer]
 
 
-Adapt a vector to the DynamicBufferSequence requirements. 
+Adapt a vector to the DynamicBuffer requirements. 
 
 
   template<
@@ -61626,7 +50899,7 @@
 
 [section:capacity dynamic_vector_buffer::capacity]
 
-[indexterm2 capacity..dynamic_vector_buffer] 
+[indexterm2 asio.indexterm.dynamic_vector_buffer.capacity..capacity..dynamic_vector_buffer] 
 Get the current capacity of the dynamic buffer. 
 
 
@@ -61647,7 +50920,7 @@
 
 [section:commit dynamic_vector_buffer::commit]
 
-[indexterm2 commit..dynamic_vector_buffer] 
+[indexterm2 asio.indexterm.dynamic_vector_buffer.commit..commit..dynamic_vector_buffer] 
 Move bytes from the output sequence to the input sequence. 
 
 
@@ -61681,52 +50954,39 @@
 
 [section:const_buffers_type dynamic_vector_buffer::const_buffers_type]
 
-[indexterm2 const_buffers_type..dynamic_vector_buffer] 
+[indexterm2 asio.indexterm.dynamic_vector_buffer.const_buffers_type..const_buffers_type..dynamic_vector_buffer] 
 The type used to represent the input sequence as a list of buffers. 
 
 
-  typedef const_buffers_1 const_buffers_type;
+  typedef const_buffer const_buffers_type;
 
 
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.const_buffers_1.const_iterator [*const_iterator]]]
-    [A random-access iterator type that may be used to read elements. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.const_buffers_1.value_type [*value_type]]]
-    [The type for each element in the list of buffers. ]
-  
-  ]
-
-]
-
 [heading Member Functions]
 [table
   [[Name][Description]]
 
   [
-    [[link asio.reference.const_buffers_1.begin [*begin]]]
-    [Get a random-access iterator to the first element. ]
-  ]
-  
-  [
-    [[link asio.reference.const_buffers_1.const_buffers_1 [*const_buffers_1]]]
-    [Construct to represent a given memory range. 
+    [[link asio.reference.const_buffer.const_buffer [*const_buffer]]]
+    [Construct an empty buffer. 
 
-     Construct to represent a single non-modifiable buffer. ]
+     Construct a buffer to represent a given memory range. 
+
+     Construct a non-modifiable buffer from a modifiable one. ]
   ]
   
   [
-    [[link asio.reference.const_buffers_1.end [*end]]]
-    [Get a random-access iterator for one past the last element. ]
+    [[link asio.reference.const_buffer.data [*data]]]
+    [Get a pointer to the beginning of the memory range. ]
+  ]
+  
+  [
+    [[link asio.reference.const_buffer.operator_plus__eq_ [*operator+=]]]
+    [Move the start of the buffer by the specified number of bytes. ]
+  ]
+  
+  [
+    [[link asio.reference.const_buffer.size [*size]]]
+    [Get the size of the memory range. ]
   ]
   
 ]
@@ -61736,12 +50996,32 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.const_buffers_1.operator_plus_ [*operator+]]]
+    [[link asio.reference.const_buffer.operator_plus_ [*operator+]]]
     [Create a new non-modifiable buffer that is offset from the start of another. ]
   ]
   
 ]
 
+The [link asio.reference.const_buffer `const_buffer`] class provides a safe representation of a buffer that cannot be modified. It does not own the underlying data, and so is cheap to copy or assign.
+
+
+[heading Accessing Buffer Contents]
+  
+
+
+The contents of a buffer may be accessed using the `data()` and `size()` member functions:
+
+
+
+   asio::const_buffer b1 = ...;
+   std::size_t s1 = b1.size();
+   const unsigned char* p1 = static_cast<const unsigned char*>(b1.data());
+
+
+
+
+The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered. 
+
 
 [heading Requirements]
 
@@ -61756,7 +51036,7 @@
 
 [section:consume dynamic_vector_buffer::consume]
 
-[indexterm2 consume..dynamic_vector_buffer] 
+[indexterm2 asio.indexterm.dynamic_vector_buffer.consume..consume..dynamic_vector_buffer] 
 Remove characters from the input sequence. 
 
 
@@ -61780,7 +51060,7 @@
 
 [section:data dynamic_vector_buffer::data]
 
-[indexterm2 data..dynamic_vector_buffer] 
+[indexterm2 asio.indexterm.dynamic_vector_buffer.data..data..dynamic_vector_buffer] 
 Get a list of buffers that represents the input sequence. 
 
 
@@ -61805,7 +51085,7 @@
 
 [section:dynamic_vector_buffer dynamic_vector_buffer::dynamic_vector_buffer]
 
-[indexterm2 dynamic_vector_buffer..dynamic_vector_buffer] 
+[indexterm2 asio.indexterm.dynamic_vector_buffer.dynamic_vector_buffer..dynamic_vector_buffer..dynamic_vector_buffer] 
 Construct a dynamic buffer from a string. 
 
 
@@ -61872,7 +51152,7 @@
 
 [section:max_size dynamic_vector_buffer::max_size]
 
-[indexterm2 max_size..dynamic_vector_buffer] 
+[indexterm2 asio.indexterm.dynamic_vector_buffer.max_size..max_size..dynamic_vector_buffer] 
 Get the maximum size of the dynamic buffer. 
 
 
@@ -61893,52 +51173,37 @@
 
 [section:mutable_buffers_type dynamic_vector_buffer::mutable_buffers_type]
 
-[indexterm2 mutable_buffers_type..dynamic_vector_buffer] 
+[indexterm2 asio.indexterm.dynamic_vector_buffer.mutable_buffers_type..mutable_buffers_type..dynamic_vector_buffer] 
 The type used to represent the output sequence as a list of buffers. 
 
 
-  typedef mutable_buffers_1 mutable_buffers_type;
+  typedef mutable_buffer mutable_buffers_type;
 
 
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.mutable_buffers_1.const_iterator [*const_iterator]]]
-    [A random-access iterator type that may be used to read elements. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.mutable_buffers_1.value_type [*value_type]]]
-    [The type for each element in the list of buffers. ]
-  
-  ]
-
-]
-
 [heading Member Functions]
 [table
   [[Name][Description]]
 
   [
-    [[link asio.reference.mutable_buffers_1.begin [*begin]]]
-    [Get a random-access iterator to the first element. ]
+    [[link asio.reference.mutable_buffer.data [*data]]]
+    [Get a pointer to the beginning of the memory range. ]
   ]
   
   [
-    [[link asio.reference.mutable_buffers_1.end [*end]]]
-    [Get a random-access iterator for one past the last element. ]
-  ]
-  
-  [
-    [[link asio.reference.mutable_buffers_1.mutable_buffers_1 [*mutable_buffers_1]]]
-    [Construct to represent a given memory range. 
+    [[link asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
+    [Construct an empty buffer. 
 
-     Construct to represent a single modifiable buffer. ]
+     Construct a buffer to represent a given memory range. ]
+  ]
+  
+  [
+    [[link asio.reference.mutable_buffer.operator_plus__eq_ [*operator+=]]]
+    [Move the start of the buffer by the specified number of bytes. ]
+  ]
+  
+  [
+    [[link asio.reference.mutable_buffer.size [*size]]]
+    [Get the size of the memory range. ]
   ]
   
 ]
@@ -61948,12 +51213,32 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.mutable_buffers_1.operator_plus_ [*operator+]]]
+    [[link asio.reference.mutable_buffer.operator_plus_ [*operator+]]]
     [Create a new modifiable buffer that is offset from the start of another. ]
   ]
   
 ]
 
+The [link asio.reference.mutable_buffer `mutable_buffer`] class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
+
+
+[heading Accessing Buffer Contents]
+  
+
+
+The contents of a buffer may be accessed using the `data()` and `size()` member functions:
+
+
+
+   asio::mutable_buffer b1 = ...;
+   std::size_t s1 = b1.size();
+   unsigned char* p1 = static_cast<unsigned char*>(b1.data());
+
+
+
+
+The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered. 
+
 
 [heading Requirements]
 
@@ -61968,7 +51253,7 @@
 
 [section:prepare dynamic_vector_buffer::prepare]
 
-[indexterm2 prepare..dynamic_vector_buffer] 
+[indexterm2 asio.indexterm.dynamic_vector_buffer.prepare..prepare..dynamic_vector_buffer] 
 Get a list of buffers that represents the output sequence, with the given size. 
 
 
@@ -62007,7 +51292,7 @@
 
 [section:size dynamic_vector_buffer::size]
 
-[indexterm2 size..dynamic_vector_buffer] 
+[indexterm2 asio.indexterm.dynamic_vector_buffer.size..size..dynamic_vector_buffer] 
 Get the size of the input sequence. 
 
 
@@ -62024,7 +51309,7 @@
 
 [section:error__addrinfo_category error::addrinfo_category]
 
-[indexterm1 error::addrinfo_category] 
+[indexterm1 asio.indexterm.error__addrinfo_category..error::addrinfo_category] 
 
   static const asio::error_category & addrinfo_category = asio::error::get_addrinfo_category();
 
@@ -62042,12 +51327,12 @@
 
 [section:error__addrinfo_errors error::addrinfo_errors]
 
-[indexterm1 error::addrinfo_errors] 
+[indexterm1 asio.indexterm.error__addrinfo_errors..error::addrinfo_errors] 
 
   enum addrinfo_errors
 
-[indexterm2 service_not_found..error::addrinfo_errors]
-[indexterm2 socket_type_not_supported..error::addrinfo_errors]
+[indexterm2 asio.indexterm.error__addrinfo_errors.service_not_found..service_not_found..error::addrinfo_errors]
+[indexterm2 asio.indexterm.error__addrinfo_errors.socket_type_not_supported..socket_type_not_supported..error::addrinfo_errors]
 
 [heading Values]
 [variablelist
@@ -62078,44 +51363,44 @@
 
 [section:error__basic_errors error::basic_errors]
 
-[indexterm1 error::basic_errors] 
+[indexterm1 asio.indexterm.error__basic_errors..error::basic_errors] 
 
   enum basic_errors
 
-[indexterm2 access_denied..error::basic_errors]
-[indexterm2 address_family_not_supported..error::basic_errors]
-[indexterm2 address_in_use..error::basic_errors]
-[indexterm2 already_connected..error::basic_errors]
-[indexterm2 already_started..error::basic_errors]
-[indexterm2 broken_pipe..error::basic_errors]
-[indexterm2 connection_aborted..error::basic_errors]
-[indexterm2 connection_refused..error::basic_errors]
-[indexterm2 connection_reset..error::basic_errors]
-[indexterm2 bad_descriptor..error::basic_errors]
-[indexterm2 fault..error::basic_errors]
-[indexterm2 host_unreachable..error::basic_errors]
-[indexterm2 in_progress..error::basic_errors]
-[indexterm2 interrupted..error::basic_errors]
-[indexterm2 invalid_argument..error::basic_errors]
-[indexterm2 message_size..error::basic_errors]
-[indexterm2 name_too_long..error::basic_errors]
-[indexterm2 network_down..error::basic_errors]
-[indexterm2 network_reset..error::basic_errors]
-[indexterm2 network_unreachable..error::basic_errors]
-[indexterm2 no_descriptors..error::basic_errors]
-[indexterm2 no_buffer_space..error::basic_errors]
-[indexterm2 no_memory..error::basic_errors]
-[indexterm2 no_permission..error::basic_errors]
-[indexterm2 no_protocol_option..error::basic_errors]
-[indexterm2 no_such_device..error::basic_errors]
-[indexterm2 not_connected..error::basic_errors]
-[indexterm2 not_socket..error::basic_errors]
-[indexterm2 operation_aborted..error::basic_errors]
-[indexterm2 operation_not_supported..error::basic_errors]
-[indexterm2 shut_down..error::basic_errors]
-[indexterm2 timed_out..error::basic_errors]
-[indexterm2 try_again..error::basic_errors]
-[indexterm2 would_block..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.access_denied..access_denied..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.address_family_not_supported..address_family_not_supported..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.address_in_use..address_in_use..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.already_connected..already_connected..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.already_started..already_started..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.broken_pipe..broken_pipe..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.connection_aborted..connection_aborted..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.connection_refused..connection_refused..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.connection_reset..connection_reset..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.bad_descriptor..bad_descriptor..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.fault..fault..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.host_unreachable..host_unreachable..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.in_progress..in_progress..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.interrupted..interrupted..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.invalid_argument..invalid_argument..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.message_size..message_size..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.name_too_long..name_too_long..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.network_down..network_down..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.network_reset..network_reset..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.network_unreachable..network_unreachable..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.no_descriptors..no_descriptors..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.no_buffer_space..no_buffer_space..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.no_memory..no_memory..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.no_permission..no_permission..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.no_protocol_option..no_protocol_option..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.no_such_device..no_such_device..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.not_connected..not_connected..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.not_socket..not_socket..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.operation_aborted..operation_aborted..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.operation_not_supported..operation_not_supported..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.shut_down..shut_down..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.timed_out..timed_out..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.try_again..try_again..error::basic_errors]
+[indexterm2 asio.indexterm.error__basic_errors.would_block..would_block..error::basic_errors]
 
 [heading Values]
 [variablelist
@@ -62306,7 +51591,7 @@
 
 [section:error__get_addrinfo_category error::get_addrinfo_category]
 
-[indexterm1 error::get_addrinfo_category] 
+[indexterm1 asio.indexterm.error__get_addrinfo_category..error::get_addrinfo_category] 
 
   const asio::error_category & get_addrinfo_category();
 
@@ -62324,7 +51609,7 @@
 
 [section:error__get_misc_category error::get_misc_category]
 
-[indexterm1 error::get_misc_category] 
+[indexterm1 asio.indexterm.error__get_misc_category..error::get_misc_category] 
 
   const asio::error_category & get_misc_category();
 
@@ -62342,7 +51627,7 @@
 
 [section:error__get_netdb_category error::get_netdb_category]
 
-[indexterm1 error::get_netdb_category] 
+[indexterm1 asio.indexterm.error__get_netdb_category..error::get_netdb_category] 
 
   const asio::error_category & get_netdb_category();
 
@@ -62360,7 +51645,7 @@
 
 [section:error__get_ssl_category error::get_ssl_category]
 
-[indexterm1 error::get_ssl_category] 
+[indexterm1 asio.indexterm.error__get_ssl_category..error::get_ssl_category] 
 
   const asio::error_category & get_ssl_category();
 
@@ -62378,7 +51663,7 @@
 
 [section:error__get_system_category error::get_system_category]
 
-[indexterm1 error::get_system_category] 
+[indexterm1 asio.indexterm.error__get_system_category..error::get_system_category] 
 
   const asio::error_category & get_system_category();
 
@@ -62395,7 +51680,7 @@
 
 [section:error__make_error_code error::make_error_code]
 
-[indexterm1 error::make_error_code] 
+[indexterm1 asio.indexterm.error__make_error_code..error::make_error_code] 
     
   asio::error_code ``[link asio.reference.error__make_error_code.overload1 make_error_code]``(
       basic_errors e);
@@ -62493,7 +51778,7 @@
 
 [section:error__misc_category error::misc_category]
 
-[indexterm1 error::misc_category] 
+[indexterm1 asio.indexterm.error__misc_category..error::misc_category] 
 
   static const asio::error_category & misc_category = asio::error::get_misc_category();
 
@@ -62511,14 +51796,14 @@
 
 [section:error__misc_errors error::misc_errors]
 
-[indexterm1 error::misc_errors] 
+[indexterm1 asio.indexterm.error__misc_errors..error::misc_errors] 
 
   enum misc_errors
 
-[indexterm2 already_open..error::misc_errors]
-[indexterm2 eof..error::misc_errors]
-[indexterm2 not_found..error::misc_errors]
-[indexterm2 fd_set_failure..error::misc_errors]
+[indexterm2 asio.indexterm.error__misc_errors.already_open..already_open..error::misc_errors]
+[indexterm2 asio.indexterm.error__misc_errors.eof..eof..error::misc_errors]
+[indexterm2 asio.indexterm.error__misc_errors.not_found..not_found..error::misc_errors]
+[indexterm2 asio.indexterm.error__misc_errors.fd_set_failure..fd_set_failure..error::misc_errors]
 
 [heading Values]
 [variablelist
@@ -62559,7 +51844,7 @@
 
 [section:error__netdb_category error::netdb_category]
 
-[indexterm1 error::netdb_category] 
+[indexterm1 asio.indexterm.error__netdb_category..error::netdb_category] 
 
   static const asio::error_category & netdb_category = asio::error::get_netdb_category();
 
@@ -62577,14 +51862,14 @@
 
 [section:error__netdb_errors error::netdb_errors]
 
-[indexterm1 error::netdb_errors] 
+[indexterm1 asio.indexterm.error__netdb_errors..error::netdb_errors] 
 
   enum netdb_errors
 
-[indexterm2 host_not_found..error::netdb_errors]
-[indexterm2 host_not_found_try_again..error::netdb_errors]
-[indexterm2 no_data..error::netdb_errors]
-[indexterm2 no_recovery..error::netdb_errors]
+[indexterm2 asio.indexterm.error__netdb_errors.host_not_found..host_not_found..error::netdb_errors]
+[indexterm2 asio.indexterm.error__netdb_errors.host_not_found_try_again..host_not_found_try_again..error::netdb_errors]
+[indexterm2 asio.indexterm.error__netdb_errors.no_data..no_data..error::netdb_errors]
+[indexterm2 asio.indexterm.error__netdb_errors.no_recovery..no_recovery..error::netdb_errors]
 
 [heading Values]
 [variablelist
@@ -62625,7 +51910,7 @@
 
 [section:error__ssl_category error::ssl_category]
 
-[indexterm1 error::ssl_category] 
+[indexterm1 asio.indexterm.error__ssl_category..error::ssl_category] 
 
   static const asio::error_category & ssl_category = asio::error::get_ssl_category();
 
@@ -62643,7 +51928,7 @@
 
 [section:error__ssl_errors error::ssl_errors]
 
-[indexterm1 error::ssl_errors] 
+[indexterm1 asio.indexterm.error__ssl_errors..error::ssl_errors] 
 
   enum ssl_errors
 
@@ -62661,7 +51946,7 @@
 
 [section:error__system_category error::system_category]
 
-[indexterm1 error::system_category] 
+[indexterm1 asio.indexterm.error__system_category..error::system_category] 
 
   static const asio::error_category & system_category = asio::error::get_system_category();
 
@@ -62726,7 +52011,7 @@
 
 [section:message error_category::message]
 
-[indexterm2 message..error_category] 
+[indexterm2 asio.indexterm.error_category.message..message..error_category] 
 Returns a string describing the error denoted by `value`. 
 
 
@@ -62741,7 +52026,7 @@
 
 [section:name error_category::name]
 
-[indexterm2 name..error_category] 
+[indexterm2 asio.indexterm.error_category.name..name..error_category] 
 Returns a string naming the error gategory. 
 
 
@@ -62755,7 +52040,7 @@
 
 [section:operator_not__eq_ error_category::operator!=]
 
-[indexterm2 operator!=..error_category] 
+[indexterm2 asio.indexterm.error_category.operator_not__eq_..operator!=..error_category] 
 Inequality operator to compare two error categories. 
 
 
@@ -62770,7 +52055,7 @@
 
 [section:operator_eq__eq_ error_category::operator==]
 
-[indexterm2 operator==..error_category] 
+[indexterm2 asio.indexterm.error_category.operator_eq__eq_..operator==..error_category] 
 Equality operator to compare two error categories. 
 
 
@@ -62785,7 +52070,7 @@
 
 [section:_error_category error_category::~error_category]
 
-[indexterm2 ~error_category..error_category] 
+[indexterm2 asio.indexterm.error_category._error_category..~error_category..error_category] 
 Destructor. 
 
 
@@ -62898,7 +52183,7 @@
 
 [section:category error_code::category]
 
-[indexterm2 category..error_code] 
+[indexterm2 asio.indexterm.error_code.category..category..error_code] 
 Get the error category. 
 
 
@@ -62911,7 +52196,7 @@
 
 [section:error_code error_code::error_code]
 
-[indexterm2 error_code..error_code] 
+[indexterm2 asio.indexterm.error_code.error_code..error_code..error_code] 
 Default constructor. 
 
 
@@ -62989,7 +52274,7 @@
 
 [section:message error_code::message]
 
-[indexterm2 message..error_code] 
+[indexterm2 asio.indexterm.error_code.message..message..error_code] 
 Get the message associated with the error. 
 
 
@@ -63003,7 +52288,7 @@
 
 [section:operator_unspecified_bool_type error_code::operator unspecified_bool_type]
 
-[indexterm2 operator unspecified_bool_type..error_code] 
+[indexterm2 asio.indexterm.error_code.operator_unspecified_bool_type..operator unspecified_bool_type..error_code] 
 Operator returns non-null if there is a non-success error code. 
 
 
@@ -63017,7 +52302,7 @@
 
 [section:operator_not_ error_code::operator!]
 
-[indexterm2 operator!..error_code] 
+[indexterm2 asio.indexterm.error_code.operator_not_..operator!..error_code] 
 Operator to test if the error represents success. 
 
 
@@ -63031,7 +52316,7 @@
 
 [section:operator_not__eq_ error_code::operator!=]
 
-[indexterm2 operator!=..error_code] 
+[indexterm2 asio.indexterm.error_code.operator_not__eq_..operator!=..error_code] 
 Inequality operator to compare two error objects. 
 
 
@@ -63053,7 +52338,7 @@
 
 [section:operator_eq__eq_ error_code::operator==]
 
-[indexterm2 operator==..error_code] 
+[indexterm2 asio.indexterm.error_code.operator_eq__eq_..operator==..error_code] 
 Equality operator to compare two error objects. 
 
 
@@ -63075,7 +52360,7 @@
 
 [section:unspecified_bool_true error_code::unspecified_bool_true]
 
-[indexterm2 unspecified_bool_true..error_code] 
+[indexterm2 asio.indexterm.error_code.unspecified_bool_true..unspecified_bool_true..error_code] 
 
   static void unspecified_bool_true(
       unspecified_bool_type_t );
@@ -63088,7 +52373,7 @@
 
 [section:unspecified_bool_type error_code::unspecified_bool_type]
 
-[indexterm2 unspecified_bool_type..error_code] 
+[indexterm2 asio.indexterm.error_code.unspecified_bool_type..unspecified_bool_type..error_code] 
 
   typedef void(*) unspecified_bool_type;
 
@@ -63107,7 +52392,7 @@
 
 [section:value error_code::value]
 
-[indexterm2 value..error_code] 
+[indexterm2 asio.indexterm.error_code.value..value..error_code] 
 Get the error value. 
 
 
@@ -63190,7 +52475,7 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.execution_context.destroy_context [*destroy_context]]]
+    [[link asio.reference.execution_context.destroy [*destroy]]]
     [Destroys all services in the context. ]
   ]
   
@@ -63200,7 +52485,7 @@
   ]
   
   [
-    [[link asio.reference.execution_context.shutdown_context [*shutdown_context]]]
+    [[link asio.reference.execution_context.shutdown [*shutdown]]]
     [Shuts down all services in the context. ]
   ]
   
@@ -63265,7 +52550,7 @@
 
 Class [link asio.reference.execution_context `execution_context`] may be used only as a base class for concrete execution context types. The `io_context` is an example of such a derived type.
 
-On destruction, a class that is derived from [link asio.reference.execution_context `execution_context`] must perform `execution_context::shutdown_context()` followed by `execution_context::destroy_context()`.
+On destruction, a class that is derived from [link asio.reference.execution_context `execution_context`] must perform `execution_context::shutdown()` followed by `execution_context::destroy()`.
 
 This destruction sequence permits programs to simplify their resource management by using `shared_ptr<>`. Where an object's lifetime is tied to the lifetime of a connection (or some other sequence of asynchronous operations), a `shared_ptr` to the object would be bound into the handlers for all asynchronous operations associated with it. This works as follows:
 
@@ -63273,7 +52558,7 @@
 * When a single connection ends, all associated asynchronous operations complete. The corresponding handler objects are destroyed, and all `shared_ptr` references to the objects are destroyed.
 
 
-* To shut down the whole program, the [link asio.reference.io_context `io_context`] function stop() is called to terminate any run() calls as soon as possible. The [link asio.reference.io_context `io_context`] destructor calls `shutdown_context()` and `destroy_context()` to destroy all pending handlers, causing all `shared_ptr` references to all connection objects to be destroyed. 
+* To shut down the whole program, the [link asio.reference.io_context `io_context`] function stop() is called to terminate any run() calls as soon as possible. The [link asio.reference.io_context `io_context`] destructor calls `shutdown()` and `destroy()` to destroy all pending handlers, causing all `shared_ptr` references to all connection objects to be destroyed. 
 
 
 
@@ -63286,7 +52571,7 @@
 
 [section:add_service execution_context::add_service]
 
-[indexterm2 add_service..execution_context] 
+[indexterm2 asio.indexterm.execution_context.add_service..add_service..execution_context] 
 (Deprecated: Use `make_service()`.) Add a service object to the [link asio.reference.execution_context `execution_context`]. 
 
 
@@ -63340,13 +52625,13 @@
 
 
 
-[section:destroy_context execution_context::destroy_context]
+[section:destroy execution_context::destroy]
 
-[indexterm2 destroy_context..execution_context] 
+[indexterm2 asio.indexterm.execution_context.destroy..destroy..execution_context] 
 Destroys all services in the context. 
 
 
-  void destroy_context();
+  void destroy();
 
 
 This function is implemented as follows:
@@ -63363,7 +52648,7 @@
 
 [section:execution_context execution_context::execution_context]
 
-[indexterm2 execution_context..execution_context] 
+[indexterm2 asio.indexterm.execution_context.execution_context..execution_context..execution_context] 
 Constructor. 
 
 
@@ -63377,15 +52662,15 @@
 
 [section:fork_event execution_context::fork_event]
 
-[indexterm2 fork_event..execution_context] 
+[indexterm2 asio.indexterm.execution_context.fork_event..fork_event..execution_context] 
 Fork-related event notifications. 
 
 
   enum fork_event
 
-[indexterm2 fork_prepare..execution_context]
-[indexterm2 fork_parent..execution_context]
-[indexterm2 fork_child..execution_context]
+[indexterm2 asio.indexterm.execution_context.fork_event.fork_prepare..fork_prepare..execution_context]
+[indexterm2 asio.indexterm.execution_context.fork_event.fork_parent..fork_parent..execution_context]
+[indexterm2 asio.indexterm.execution_context.fork_event.fork_child..fork_child..execution_context]
 
 [heading Values]
 [variablelist
@@ -63415,7 +52700,7 @@
 
 [section:has_service execution_context::has_service]
 
-[indexterm2 has_service..execution_context] 
+[indexterm2 asio.indexterm.execution_context.has_service..has_service..execution_context] 
 Determine if an [link asio.reference.execution_context `execution_context`] contains a specified service type. 
 
 
@@ -63457,7 +52742,7 @@
 
 [section:make_service execution_context::make_service]
 
-[indexterm2 make_service..execution_context] 
+[indexterm2 asio.indexterm.execution_context.make_service..make_service..execution_context] 
 Creates a service object and adds it to the [link asio.reference.execution_context `execution_context`]. 
 
 
@@ -63508,7 +52793,7 @@
 
 [section:notify_fork execution_context::notify_fork]
 
-[indexterm2 notify_fork..execution_context] 
+[indexterm2 asio.indexterm.execution_context.notify_fork..notify_fork..execution_context] 
 Notify the [link asio.reference.execution_context `execution_context`] of a fork-related event. 
 
 
@@ -63563,7 +52848,7 @@
 
 [heading Remarks]
       
-For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, performs `svc->fork_service();`. When processing the fork\_prepare event, services are visited in reverse order of the beginning of service object lifetime. Otherwise, services are visited in order of the beginning of service object lifetime. 
+For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, performs `svc->notify_fork();`. When processing the fork\_prepare event, services are visited in reverse order of the beginning of service object lifetime. Otherwise, services are visited in order of the beginning of service object lifetime. 
 
 
 
@@ -63572,19 +52857,19 @@
 
 
 
-[section:shutdown_context execution_context::shutdown_context]
+[section:shutdown execution_context::shutdown]
 
-[indexterm2 shutdown_context..execution_context] 
+[indexterm2 asio.indexterm.execution_context.shutdown..shutdown..execution_context] 
 Shuts down all services in the context. 
 
 
-  void shutdown_context();
+  void shutdown();
 
 
 This function is implemented as follows:
 
 
-* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown_service()`. 
+* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown()`. 
 
 
 
@@ -63594,7 +52879,7 @@
 
 [section:use_service execution_context::use_service]
 
-[indexterm2 use_service..execution_context] 
+[indexterm2 asio.indexterm.execution_context.use_service..use_service..execution_context] 
 Obtain the service object corresponding to the given type. 
 
 
@@ -63704,7 +52989,7 @@
 
 [section:_execution_context execution_context::~execution_context]
 
-[indexterm2 ~execution_context..execution_context] 
+[indexterm2 asio.indexterm.execution_context._execution_context..~execution_context..execution_context] 
 Destructor. 
 
 
@@ -63748,7 +53033,7 @@
 
 [section:id execution_context::id::id]
 
-[indexterm2 id..execution_context::id] 
+[indexterm2 asio.indexterm.execution_context__id.id..id..execution_context::id] 
 Constructor. 
 
 
@@ -63804,12 +53089,12 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.execution_context__service.fork_service [*fork_service]]]
+    [[link asio.reference.execution_context__service.notify_fork [*notify_fork]]]
     [Handle notification of a fork-related event to perform any necessary housekeeping. ]
   ]
   
   [
-    [[link asio.reference.execution_context__service.shutdown_service [*shutdown_service]]]
+    [[link asio.reference.execution_context__service.shutdown [*shutdown]]]
     [Destroy all user-defined handler objects owned by the service. ]
   ]
   
@@ -63824,7 +53109,7 @@
 
 [section:context execution_context::service::context]
 
-[indexterm2 context..execution_context::service] 
+[indexterm2 asio.indexterm.execution_context__service.context..context..execution_context::service] 
 Get the context object that owns the service. 
 
 
@@ -63838,7 +53123,7 @@
 
 [section:service execution_context::service::service]
 
-[indexterm2 service..execution_context::service] 
+[indexterm2 asio.indexterm.execution_context__service.service..service..execution_context::service] 
 Constructor. 
 
 
@@ -63865,7 +53150,7 @@
 
 [section:_service execution_context::service::~service]
 
-[indexterm2 ~service..execution_context::service] 
+[indexterm2 asio.indexterm.execution_context__service._service..~service..execution_context::service] 
 Destructor. 
 
 
@@ -63877,13 +53162,13 @@
 
 
 
-[section:fork_service execution_context::service::fork_service]
+[section:notify_fork execution_context::service::notify_fork]
 
-[indexterm2 fork_service..execution_context::service] 
+[indexterm2 asio.indexterm.execution_context__service.notify_fork..notify_fork..execution_context::service] 
 Handle notification of a fork-related event to perform any necessary housekeeping. 
 
 
-  virtual void fork_service(
+  virtual void notify_fork(
       execution_context::fork_event event);
 
 
@@ -63894,13 +53179,13 @@
 
 
 
-[section:shutdown_service execution_context::service::shutdown_service]
+[section:shutdown execution_context::service::shutdown]
 
-[indexterm2 shutdown_service..execution_context::service] 
+[indexterm2 asio.indexterm.execution_context__service.shutdown..shutdown..execution_context::service] 
 Destroy all user-defined handler objects owned by the service. 
 
 
-  void shutdown_service();
+  void shutdown();
 
 
 
@@ -64051,11 +53336,11 @@
 
 [section:context executor::context]
 
-[indexterm2 context..executor] 
+[indexterm2 asio.indexterm.executor.context..context..executor] 
 Obtain the underlying execution context. 
 
 
-  execution_context & context();
+  execution_context & context() const;
 
 
 
@@ -64065,7 +53350,7 @@
 
 [section:defer executor::defer]
 
-[indexterm2 defer..executor] 
+[indexterm2 asio.indexterm.executor.defer..defer..executor] 
 Request the executor to invoke the given function object. 
 
 
@@ -64074,7 +53359,7 @@
       typename Allocator>
   void defer(
       Function && f,
-      const Allocator & a);
+      const Allocator & a) const;
 
 
 This function is used to ask the executor to execute the given function object. The function object is executed according to the rules of the target executor object.
@@ -64104,7 +53389,7 @@
 
 [section:dispatch executor::dispatch]
 
-[indexterm2 dispatch..executor] 
+[indexterm2 asio.indexterm.executor.dispatch..dispatch..executor] 
 Request the executor to invoke the given function object. 
 
 
@@ -64113,7 +53398,7 @@
       typename Allocator>
   void dispatch(
       Function && f,
-      const Allocator & a);
+      const Allocator & a) const;
 
 
 This function is used to ask the executor to execute the given function object. The function object is executed according to the rules of the target executor object.
@@ -64142,7 +53427,7 @@
 
 [section:executor executor::executor]
 
-[indexterm2 executor..executor] 
+[indexterm2 asio.indexterm.executor.executor..executor..executor] 
 Default constructor. 
 
 
@@ -64297,11 +53582,11 @@
 
 [section:on_work_finished executor::on_work_finished]
 
-[indexterm2 on_work_finished..executor] 
+[indexterm2 asio.indexterm.executor.on_work_finished..on_work_finished..executor] 
 Inform the executor that some work is no longer outstanding. 
 
 
-  void on_work_finished();
+  void on_work_finished() const;
 
 
 
@@ -64311,11 +53596,11 @@
 
 [section:on_work_started executor::on_work_started]
 
-[indexterm2 on_work_started..executor] 
+[indexterm2 asio.indexterm.executor.on_work_started..on_work_started..executor] 
 Inform the executor that it has some outstanding work to do. 
 
 
-  void on_work_started();
+  void on_work_started() const;
 
 
 
@@ -64325,7 +53610,7 @@
 
 [section:operator_unspecified_bool_type executor::operator unspecified_bool_type]
 
-[indexterm2 operator unspecified_bool_type..executor] 
+[indexterm2 asio.indexterm.executor.operator_unspecified_bool_type..operator unspecified_bool_type..executor] 
 Operator to test if the executor contains a valid target. 
 
 
@@ -64339,7 +53624,7 @@
 
 [section:operator_not__eq_ executor::operator!=]
 
-[indexterm2 operator!=..executor] 
+[indexterm2 asio.indexterm.executor.operator_not__eq_..operator!=..executor] 
 Compare two executors for inequality. 
 
 
@@ -64360,7 +53645,7 @@
 
 [section:operator_eq_ executor::operator=]
 
-[indexterm2 operator=..executor] 
+[indexterm2 asio.indexterm.executor.operator_eq_..operator=..executor] 
 Assignment operator. 
 
 
@@ -64457,7 +53742,7 @@
 
 [section:operator_eq__eq_ executor::operator==]
 
-[indexterm2 operator==..executor] 
+[indexterm2 asio.indexterm.executor.operator_eq__eq_..operator==..executor] 
 Compare two executors for equality. 
 
 
@@ -64479,7 +53764,7 @@
 
 [section:post executor::post]
 
-[indexterm2 post..executor] 
+[indexterm2 asio.indexterm.executor.post..post..executor] 
 Request the executor to invoke the given function object. 
 
 
@@ -64488,7 +53773,7 @@
       typename Allocator>
   void post(
       Function && f,
-      const Allocator & a);
+      const Allocator & a) const;
 
 
 This function is used to ask the executor to execute the given function object. The function object is executed according to the rules of the target executor object.
@@ -64517,7 +53802,7 @@
 
 [section:target executor::target]
 
-[indexterm2 target..executor] 
+[indexterm2 asio.indexterm.executor.target..target..executor] 
 Obtain a pointer to the target executor object. 
 
 
@@ -64582,7 +53867,7 @@
 
 [section:target_type executor::target_type]
 
-[indexterm2 target_type..executor] 
+[indexterm2 asio.indexterm.executor.target_type..target_type..executor] 
 Obtain type information for the target executor object. 
 
 
@@ -64603,7 +53888,7 @@
 
 [section:unspecified_bool_true executor::unspecified_bool_true]
 
-[indexterm2 unspecified_bool_true..executor] 
+[indexterm2 asio.indexterm.executor.unspecified_bool_true..unspecified_bool_true..executor] 
 
   static void unspecified_bool_true(
       unspecified_bool_type_t );
@@ -64616,7 +53901,7 @@
 
 [section:unspecified_bool_type executor::unspecified_bool_type]
 
-[indexterm2 unspecified_bool_type..executor] 
+[indexterm2 asio.indexterm.executor.unspecified_bool_type..unspecified_bool_type..executor] 
 
   typedef void(*) unspecified_bool_type;
 
@@ -64635,7 +53920,7 @@
 
 [section:_executor executor::~executor]
 
-[indexterm2 ~executor..executor] 
+[indexterm2 asio.indexterm.executor._executor..~executor..executor] 
 Destructor. 
 
 
@@ -64668,7 +53953,7 @@
 
 [section:executor_arg executor_arg]
 
-[indexterm1 executor_arg] 
+[indexterm1 asio.indexterm.executor_arg..executor_arg] 
 A special value, similar to std::nothrow, used to disambiguate constructors that accept executor arguments. 
 
 
@@ -64718,7 +54003,7 @@
 
 [section:executor_arg_t executor_arg_t::executor_arg_t]
 
-[indexterm2 executor_arg_t..executor_arg_t] 
+[indexterm2 asio.indexterm.executor_arg_t.executor_arg_t..executor_arg_t..executor_arg_t] 
 Constructor. 
 
 
@@ -64848,7 +54133,7 @@
 
 [section:argument_type executor_binder::argument_type]
 
-[indexterm2 argument_type..executor_binder] 
+[indexterm2 asio.indexterm.executor_binder.argument_type..argument_type..executor_binder] 
 The type of the function's argument. 
 
 
@@ -64881,7 +54166,7 @@
 
 [section:executor_binder executor_binder::executor_binder]
 
-[indexterm2 executor_binder..executor_binder] 
+[indexterm2 asio.indexterm.executor_binder.executor_binder..executor_binder..executor_binder] 
 Construct an executor wrapper for the specified object. 
 
 
@@ -65147,7 +54432,7 @@
 
 [section:executor_type executor_binder::executor_type]
 
-[indexterm2 executor_type..executor_binder] 
+[indexterm2 asio.indexterm.executor_binder.executor_type..executor_type..executor_binder] 
 The type of the associated executor. 
 
 
@@ -65168,7 +54453,7 @@
 
 [section:first_argument_type executor_binder::first_argument_type]
 
-[indexterm2 first_argument_type..executor_binder] 
+[indexterm2 asio.indexterm.executor_binder.first_argument_type..first_argument_type..executor_binder] 
 The type of the function's first argument. 
 
 
@@ -65201,7 +54486,7 @@
 
 [section:get executor_binder::get]
 
-[indexterm2 get..executor_binder] 
+[indexterm2 asio.indexterm.executor_binder.get..get..executor_binder] 
 Obtain a reference to the target object. 
 
 
@@ -65244,7 +54529,7 @@
 
 [section:get_executor executor_binder::get_executor]
 
-[indexterm2 get_executor..executor_binder] 
+[indexterm2 asio.indexterm.executor_binder.get_executor..get_executor..executor_binder] 
 Obtain the associated executor. 
 
 
@@ -65257,7 +54542,7 @@
 
 [section:operator_lp__rp_ executor_binder::operator()]
 
-[indexterm2 operator()..executor_binder] 
+[indexterm2 asio.indexterm.executor_binder.operator_lp__rp_..operator()..executor_binder] 
 
   template<
       typename... Args>
@@ -65306,7 +54591,7 @@
 
 [section:result_type executor_binder::result_type]
 
-[indexterm2 result_type..executor_binder] 
+[indexterm2 asio.indexterm.executor_binder.result_type..result_type..executor_binder] 
 The return type if a function. 
 
 
@@ -65340,7 +54625,7 @@
 
 [section:second_argument_type executor_binder::second_argument_type]
 
-[indexterm2 second_argument_type..executor_binder] 
+[indexterm2 asio.indexterm.executor_binder.second_argument_type..second_argument_type..executor_binder] 
 The type of the function's second argument. 
 
 
@@ -65374,7 +54659,7 @@
 
 [section:target_type executor_binder::target_type]
 
-[indexterm2 target_type..executor_binder] 
+[indexterm2 asio.indexterm.executor_binder.target_type..target_type..executor_binder] 
 The type of the target object. 
 
 
@@ -65395,7 +54680,7 @@
 
 [section:_executor_binder executor_binder::~executor_binder]
 
-[indexterm2 ~executor_binder..executor_binder] 
+[indexterm2 asio.indexterm.executor_binder._executor_binder..~executor_binder..executor_binder] 
 Destructor. 
 
 
@@ -65477,7 +54762,7 @@
 
 [section:executor_type executor_work_guard::executor_type]
 
-[indexterm2 executor_type..executor_work_guard] 
+[indexterm2 asio.indexterm.executor_work_guard.executor_type..executor_type..executor_work_guard] 
 The underlying executor type. 
 
 
@@ -65497,7 +54782,7 @@
 
 [section:executor_work_guard executor_work_guard::executor_work_guard]
 
-[indexterm2 executor_work_guard..executor_work_guard] 
+[indexterm2 asio.indexterm.executor_work_guard.executor_work_guard..executor_work_guard..executor_work_guard] 
 Constructs a `executor_work_guard` object for the specified executor. 
 
 
@@ -65573,7 +54858,7 @@
 
 [section:get_executor executor_work_guard::get_executor]
 
-[indexterm2 get_executor..executor_work_guard] 
+[indexterm2 asio.indexterm.executor_work_guard.get_executor..get_executor..executor_work_guard] 
 Obtain the associated executor. 
 
 
@@ -65587,7 +54872,7 @@
 
 [section:owns_work executor_work_guard::owns_work]
 
-[indexterm2 owns_work..executor_work_guard] 
+[indexterm2 asio.indexterm.executor_work_guard.owns_work..owns_work..executor_work_guard] 
 Whether the [link asio.reference.executor_work_guard `executor_work_guard`] object owns some outstanding work. 
 
 
@@ -65601,7 +54886,7 @@
 
 [section:reset executor_work_guard::reset]
 
-[indexterm2 reset..executor_work_guard] 
+[indexterm2 asio.indexterm.executor_work_guard.reset..reset..executor_work_guard] 
 Indicate that the work is no longer outstanding. 
 
 
@@ -65615,7 +54900,7 @@
 
 [section:_executor_work_guard executor_work_guard::~executor_work_guard]
 
-[indexterm2 ~executor_work_guard..executor_work_guard] 
+[indexterm2 asio.indexterm.executor_work_guard._executor_work_guard..~executor_work_guard..executor_work_guard] 
 Destructor. 
 
 
@@ -65770,7 +55055,7 @@
 
 [section:basic_endpoint generic::basic_endpoint::basic_endpoint]
 
-[indexterm2 basic_endpoint..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.basic_endpoint..basic_endpoint..generic::basic_endpoint] 
 Default constructor. 
 
 
@@ -65873,7 +55158,7 @@
 
 [section:capacity generic::basic_endpoint::capacity]
 
-[indexterm2 capacity..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.capacity..capacity..generic::basic_endpoint] 
 Get the capacity of the endpoint in the native type. 
 
 
@@ -65886,7 +55171,7 @@
 
 [section:data generic::basic_endpoint::data]
 
-[indexterm2 data..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.data..data..generic::basic_endpoint] 
 Get the underlying endpoint in the native type. 
 
 
@@ -65929,7 +55214,7 @@
 
 [section:data_type generic::basic_endpoint::data_type]
 
-[indexterm2 data_type..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.data_type..data_type..generic::basic_endpoint] 
 The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. 
 
 
@@ -65950,7 +55235,7 @@
 
 [section:operator_not__eq_ generic::basic_endpoint::operator!=]
 
-[indexterm2 operator!=..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.operator_not__eq_..operator!=..generic::basic_endpoint] 
 Compare two endpoints for inequality. 
 
 
@@ -65972,7 +55257,7 @@
 
 [section:operator_lt_ generic::basic_endpoint::operator<]
 
-[indexterm2 operator<..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.operator_lt_..operator<..generic::basic_endpoint] 
 Compare endpoints for ordering. 
 
 
@@ -65994,7 +55279,7 @@
 
 [section:operator_lt__eq_ generic::basic_endpoint::operator<=]
 
-[indexterm2 operator<=..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.operator_lt__eq_..operator<=..generic::basic_endpoint] 
 Compare endpoints for ordering. 
 
 
@@ -66016,7 +55301,7 @@
 
 [section:operator_eq_ generic::basic_endpoint::operator=]
 
-[indexterm2 operator=..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.operator_eq_..operator=..generic::basic_endpoint] 
 Assign from another endpoint. 
 
 
@@ -66031,7 +55316,7 @@
 
 [section:operator_eq__eq_ generic::basic_endpoint::operator==]
 
-[indexterm2 operator==..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.operator_eq__eq_..operator==..generic::basic_endpoint] 
 Compare two endpoints for equality. 
 
 
@@ -66053,7 +55338,7 @@
 
 [section:operator_gt_ generic::basic_endpoint::operator>]
 
-[indexterm2 operator>..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.operator_gt_..operator>..generic::basic_endpoint] 
 Compare endpoints for ordering. 
 
 
@@ -66075,7 +55360,7 @@
 
 [section:operator_gt__eq_ generic::basic_endpoint::operator>=]
 
-[indexterm2 operator>=..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.operator_gt__eq_..operator>=..generic::basic_endpoint] 
 Compare endpoints for ordering. 
 
 
@@ -66097,7 +55382,7 @@
 
 [section:protocol generic::basic_endpoint::protocol]
 
-[indexterm2 protocol..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.protocol..protocol..generic::basic_endpoint] 
 The protocol associated with the endpoint. 
 
 
@@ -66111,7 +55396,7 @@
 
 [section:protocol_type generic::basic_endpoint::protocol_type]
 
-[indexterm2 protocol_type..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.protocol_type..protocol_type..generic::basic_endpoint] 
 The protocol type associated with the endpoint. 
 
 
@@ -66132,7 +55417,7 @@
 
 [section:resize generic::basic_endpoint::resize]
 
-[indexterm2 resize..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.resize..resize..generic::basic_endpoint] 
 Set the underlying size of the endpoint in the native type. 
 
 
@@ -66147,7 +55432,7 @@
 
 [section:size generic::basic_endpoint::size]
 
-[indexterm2 size..generic::basic_endpoint] 
+[indexterm2 asio.indexterm.generic__basic_endpoint.size..size..generic::basic_endpoint] 
 Get the underlying size of the endpoint in the native type. 
 
 
@@ -66269,7 +55554,7 @@
 
 [section:datagram_protocol generic::datagram_protocol::datagram_protocol]
 
-[indexterm2 datagram_protocol..generic::datagram_protocol] 
+[indexterm2 asio.indexterm.generic__datagram_protocol.datagram_protocol..datagram_protocol..generic::datagram_protocol] 
 Construct a protocol object for a specific address family and protocol. 
 
 
@@ -66338,7 +55623,7 @@
 
 [section:endpoint generic::datagram_protocol::endpoint]
 
-[indexterm2 endpoint..generic::datagram_protocol] 
+[indexterm2 asio.indexterm.generic__datagram_protocol.endpoint..endpoint..generic::datagram_protocol] 
 The type of an endpoint. 
 
 
@@ -66479,7 +55764,7 @@
 
 [section:family generic::datagram_protocol::family]
 
-[indexterm2 family..generic::datagram_protocol] 
+[indexterm2 asio.indexterm.generic__datagram_protocol.family..family..generic::datagram_protocol] 
 Obtain an identifier for the protocol family. 
 
 
@@ -66493,7 +55778,7 @@
 
 [section:operator_not__eq_ generic::datagram_protocol::operator!=]
 
-[indexterm2 operator!=..generic::datagram_protocol] 
+[indexterm2 asio.indexterm.generic__datagram_protocol.operator_not__eq_..operator!=..generic::datagram_protocol] 
 Compare two protocols for inequality. 
 
 
@@ -66515,7 +55800,7 @@
 
 [section:operator_eq__eq_ generic::datagram_protocol::operator==]
 
-[indexterm2 operator==..generic::datagram_protocol] 
+[indexterm2 asio.indexterm.generic__datagram_protocol.operator_eq__eq_..operator==..generic::datagram_protocol] 
 Compare two protocols for equality. 
 
 
@@ -66537,7 +55822,7 @@
 
 [section:protocol generic::datagram_protocol::protocol]
 
-[indexterm2 protocol..generic::datagram_protocol] 
+[indexterm2 asio.indexterm.generic__datagram_protocol.protocol..protocol..generic::datagram_protocol] 
 Obtain an identifier for the protocol. 
 
 
@@ -66551,7 +55836,7 @@
 
 [section:socket generic::datagram_protocol::socket]
 
-[indexterm2 socket..generic::datagram_protocol] 
+[indexterm2 asio.indexterm.generic__datagram_protocol.socket..socket..generic::datagram_protocol] 
 The generic socket type. 
 
 
@@ -66613,13 +55898,6 @@
 
   [
 
-    [[link asio.reference.basic_datagram_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -66697,13 +55975,6 @@
 
   [
 
-    [[link asio.reference.basic_datagram_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_datagram_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -66915,20 +56186,9 @@
     [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_datagram_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_datagram_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_datagram_socket._basic_datagram_socket [*~basic_datagram_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -66939,6 +56199,11 @@
 
   [
     [[link asio.reference.basic_datagram_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_datagram_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -66989,7 +56254,7 @@
 
 [section:type generic::datagram_protocol::type]
 
-[indexterm2 type..generic::datagram_protocol] 
+[indexterm2 asio.indexterm.generic__datagram_protocol.type..type..generic::datagram_protocol] 
 Obtain an identifier for the type of the protocol. 
 
 
@@ -67112,7 +56377,7 @@
 
 [section:endpoint generic::raw_protocol::endpoint]
 
-[indexterm2 endpoint..generic::raw_protocol] 
+[indexterm2 asio.indexterm.generic__raw_protocol.endpoint..endpoint..generic::raw_protocol] 
 The type of an endpoint. 
 
 
@@ -67253,7 +56518,7 @@
 
 [section:family generic::raw_protocol::family]
 
-[indexterm2 family..generic::raw_protocol] 
+[indexterm2 asio.indexterm.generic__raw_protocol.family..family..generic::raw_protocol] 
 Obtain an identifier for the protocol family. 
 
 
@@ -67267,7 +56532,7 @@
 
 [section:operator_not__eq_ generic::raw_protocol::operator!=]
 
-[indexterm2 operator!=..generic::raw_protocol] 
+[indexterm2 asio.indexterm.generic__raw_protocol.operator_not__eq_..operator!=..generic::raw_protocol] 
 Compare two protocols for inequality. 
 
 
@@ -67289,7 +56554,7 @@
 
 [section:operator_eq__eq_ generic::raw_protocol::operator==]
 
-[indexterm2 operator==..generic::raw_protocol] 
+[indexterm2 asio.indexterm.generic__raw_protocol.operator_eq__eq_..operator==..generic::raw_protocol] 
 Compare two protocols for equality. 
 
 
@@ -67311,7 +56576,7 @@
 
 [section:protocol generic::raw_protocol::protocol]
 
-[indexterm2 protocol..generic::raw_protocol] 
+[indexterm2 asio.indexterm.generic__raw_protocol.protocol..protocol..generic::raw_protocol] 
 Obtain an identifier for the protocol. 
 
 
@@ -67324,7 +56589,7 @@
 
 [section:raw_protocol generic::raw_protocol::raw_protocol]
 
-[indexterm2 raw_protocol..generic::raw_protocol] 
+[indexterm2 asio.indexterm.generic__raw_protocol.raw_protocol..raw_protocol..generic::raw_protocol] 
 Construct a protocol object for a specific address family and protocol. 
 
 
@@ -67393,7 +56658,7 @@
 
 [section:socket generic::raw_protocol::socket]
 
-[indexterm2 socket..generic::raw_protocol] 
+[indexterm2 asio.indexterm.generic__raw_protocol.socket..socket..generic::raw_protocol] 
 The generic socket type. 
 
 
@@ -67455,13 +56720,6 @@
 
   [
 
-    [[link asio.reference.basic_raw_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_raw_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -67539,13 +56797,6 @@
 
   [
 
-    [[link asio.reference.basic_raw_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_raw_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -67757,20 +57008,9 @@
     [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_raw_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_raw_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_raw_socket._basic_raw_socket [*~basic_raw_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -67781,6 +57021,11 @@
 
   [
     [[link asio.reference.basic_raw_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_raw_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -67831,7 +57076,7 @@
 
 [section:type generic::raw_protocol::type]
 
-[indexterm2 type..generic::raw_protocol] 
+[indexterm2 asio.indexterm.generic__raw_protocol.type..type..generic::raw_protocol] 
 Obtain an identifier for the type of the protocol. 
 
 
@@ -67949,7 +57194,7 @@
 
 [section:endpoint generic::seq_packet_protocol::endpoint]
 
-[indexterm2 endpoint..generic::seq_packet_protocol] 
+[indexterm2 asio.indexterm.generic__seq_packet_protocol.endpoint..endpoint..generic::seq_packet_protocol] 
 The type of an endpoint. 
 
 
@@ -68090,7 +57335,7 @@
 
 [section:family generic::seq_packet_protocol::family]
 
-[indexterm2 family..generic::seq_packet_protocol] 
+[indexterm2 asio.indexterm.generic__seq_packet_protocol.family..family..generic::seq_packet_protocol] 
 Obtain an identifier for the protocol family. 
 
 
@@ -68104,7 +57349,7 @@
 
 [section:operator_not__eq_ generic::seq_packet_protocol::operator!=]
 
-[indexterm2 operator!=..generic::seq_packet_protocol] 
+[indexterm2 asio.indexterm.generic__seq_packet_protocol.operator_not__eq_..operator!=..generic::seq_packet_protocol] 
 Compare two protocols for inequality. 
 
 
@@ -68126,7 +57371,7 @@
 
 [section:operator_eq__eq_ generic::seq_packet_protocol::operator==]
 
-[indexterm2 operator==..generic::seq_packet_protocol] 
+[indexterm2 asio.indexterm.generic__seq_packet_protocol.operator_eq__eq_..operator==..generic::seq_packet_protocol] 
 Compare two protocols for equality. 
 
 
@@ -68148,7 +57393,7 @@
 
 [section:protocol generic::seq_packet_protocol::protocol]
 
-[indexterm2 protocol..generic::seq_packet_protocol] 
+[indexterm2 asio.indexterm.generic__seq_packet_protocol.protocol..protocol..generic::seq_packet_protocol] 
 Obtain an identifier for the protocol. 
 
 
@@ -68161,7 +57406,7 @@
 
 [section:seq_packet_protocol generic::seq_packet_protocol::seq_packet_protocol]
 
-[indexterm2 seq_packet_protocol..generic::seq_packet_protocol] 
+[indexterm2 asio.indexterm.generic__seq_packet_protocol.seq_packet_protocol..seq_packet_protocol..generic::seq_packet_protocol] 
 Construct a protocol object for a specific address family and protocol. 
 
 
@@ -68230,7 +57475,7 @@
 
 [section:socket generic::seq_packet_protocol::socket]
 
-[indexterm2 socket..generic::seq_packet_protocol] 
+[indexterm2 asio.indexterm.generic__seq_packet_protocol.socket..socket..generic::seq_packet_protocol] 
 The generic socket type. 
 
 
@@ -68292,13 +57537,6 @@
 
   [
 
-    [[link asio.reference.basic_seq_packet_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_seq_packet_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -68376,13 +57614,6 @@
 
   [
 
-    [[link asio.reference.basic_seq_packet_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_seq_packet_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -68576,20 +57807,9 @@
     [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_seq_packet_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_seq_packet_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_seq_packet_socket._basic_seq_packet_socket [*~basic_seq_packet_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -68600,6 +57820,11 @@
 
   [
     [[link asio.reference.basic_seq_packet_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_seq_packet_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -68650,7 +57875,7 @@
 
 [section:type generic::seq_packet_protocol::type]
 
-[indexterm2 type..generic::seq_packet_protocol] 
+[indexterm2 asio.indexterm.generic__seq_packet_protocol.type..type..generic::seq_packet_protocol] 
 Obtain an identifier for the type of the protocol. 
 
 
@@ -68780,7 +58005,7 @@
 
 [section:endpoint generic::stream_protocol::endpoint]
 
-[indexterm2 endpoint..generic::stream_protocol] 
+[indexterm2 asio.indexterm.generic__stream_protocol.endpoint..endpoint..generic::stream_protocol] 
 The type of an endpoint. 
 
 
@@ -68921,7 +58146,7 @@
 
 [section:family generic::stream_protocol::family]
 
-[indexterm2 family..generic::stream_protocol] 
+[indexterm2 asio.indexterm.generic__stream_protocol.family..family..generic::stream_protocol] 
 Obtain an identifier for the protocol family. 
 
 
@@ -68935,7 +58160,7 @@
 
 [section:iostream generic::stream_protocol::iostream]
 
-[indexterm2 iostream..generic::stream_protocol] 
+[indexterm2 asio.indexterm.generic__stream_protocol.iostream..iostream..generic::stream_protocol] 
 The generic socket iostream type. 
 
 
@@ -68948,6 +58173,13 @@
 
   [
 
+    [[link asio.reference.basic_socket_iostream.clock_type [*clock_type]]]
+    [The clock type. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.basic_socket_iostream.duration [*duration]]]
     [The duration type. ]
   
@@ -68969,6 +58201,13 @@
 
   [
 
+    [[link asio.reference.basic_socket_iostream.protocol_type [*protocol_type]]]
+    [The protocol type. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.basic_socket_iostream.time_point [*time_point]]]
     [The time type. ]
   
@@ -68991,6 +58230,10 @@
     [[link asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
     [Construct a basic_socket_iostream without establishing a connection. 
 
+     Construct a basic_socket_iostream from the supplied socket. 
+
+     Move-construct a basic_socket_iostream from another. 
+
      Establish a connection to an endpoint corresponding to a resolver query. ]
   ]
   
@@ -69034,10 +58277,20 @@
   ]
   
   [
+    [[link asio.reference.basic_socket_iostream.operator_eq_ [*operator=]]]
+    [Move-assign a basic_socket_iostream from another. ]
+  ]
+  
+  [
     [[link asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
     [Return a pointer to the underlying streambuf. ]
   ]
   
+  [
+    [[link asio.reference.basic_socket_iostream.socket [*socket]]]
+    [Get a reference to the underlying socket. ]
+  ]
+  
 ]
 
 
@@ -69054,7 +58307,7 @@
 
 [section:operator_not__eq_ generic::stream_protocol::operator!=]
 
-[indexterm2 operator!=..generic::stream_protocol] 
+[indexterm2 asio.indexterm.generic__stream_protocol.operator_not__eq_..operator!=..generic::stream_protocol] 
 Compare two protocols for inequality. 
 
 
@@ -69076,7 +58329,7 @@
 
 [section:operator_eq__eq_ generic::stream_protocol::operator==]
 
-[indexterm2 operator==..generic::stream_protocol] 
+[indexterm2 asio.indexterm.generic__stream_protocol.operator_eq__eq_..operator==..generic::stream_protocol] 
 Compare two protocols for equality. 
 
 
@@ -69098,7 +58351,7 @@
 
 [section:protocol generic::stream_protocol::protocol]
 
-[indexterm2 protocol..generic::stream_protocol] 
+[indexterm2 asio.indexterm.generic__stream_protocol.protocol..protocol..generic::stream_protocol] 
 Obtain an identifier for the protocol. 
 
 
@@ -69112,7 +58365,7 @@
 
 [section:socket generic::stream_protocol::socket]
 
-[indexterm2 socket..generic::stream_protocol] 
+[indexterm2 asio.indexterm.generic__stream_protocol.socket..socket..generic::stream_protocol] 
 The generic socket type. 
 
 
@@ -69174,13 +58427,6 @@
 
   [
 
-    [[link asio.reference.basic_stream_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -69258,13 +58504,6 @@
 
   [
 
-    [[link asio.reference.basic_stream_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -69478,20 +58717,9 @@
     [Write some data to the socket. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_stream_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_stream_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_stream_socket._basic_stream_socket [*~basic_stream_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -69502,6 +58730,11 @@
 
   [
     [[link asio.reference.basic_stream_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_stream_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -69552,7 +58785,7 @@
 
 [section:stream_protocol generic::stream_protocol::stream_protocol]
 
-[indexterm2 stream_protocol..generic::stream_protocol] 
+[indexterm2 asio.indexterm.generic__stream_protocol.stream_protocol..stream_protocol..generic::stream_protocol] 
 Construct a protocol object for a specific address family and protocol. 
 
 
@@ -69621,7 +58854,7 @@
 
 [section:type generic::stream_protocol::type]
 
-[indexterm2 type..generic::stream_protocol] 
+[indexterm2 asio.indexterm.generic__stream_protocol.type..type..generic::stream_protocol] 
 Obtain an identifier for the type of the protocol. 
 
 
@@ -69637,7 +58870,7 @@
 
 [section:get_associated_allocator get_associated_allocator]
 
-[indexterm1 get_associated_allocator] 
+[indexterm1 asio.indexterm.get_associated_allocator..get_associated_allocator] 
 Helper function to obtain an object's associated allocator. 
 
     
@@ -69715,7 +58948,7 @@
 
 [section:get_associated_executor get_associated_executor]
 
-[indexterm1 get_associated_executor] 
+[indexterm1 asio.indexterm.get_associated_executor..get_associated_executor] 
 Helper function to obtain an object's associated executor. 
 
     
@@ -69832,7 +59065,7 @@
 [section:handler_type handler_type]
 
 
-Default handler type traits provided for all completion token types. 
+(Deprecated: Use two-parameter version of [link asio.reference.async_result `async_result`].) Default handler type traits provided for all completion token types. 
 
 
   template<
@@ -69868,7 +59101,7 @@
 
 [section:type handler_type::type]
 
-[indexterm2 type..handler_type] 
+[indexterm2 asio.indexterm.handler_type.type..type..handler_type] 
 The handler type for the specific signature. 
 
 
@@ -69892,7 +59125,7 @@
 
 [section:has_service has_service]
 
-[indexterm1 has_service] 
+[indexterm1 asio.indexterm.has_service..has_service] 
 
   template<
       typename ``[link asio.reference.Service Service]``>
@@ -69932,7 +59165,7 @@
 
 [section:high_resolution_timer high_resolution_timer]
 
-[indexterm1 high_resolution_timer] 
+[indexterm1 asio.indexterm.high_resolution_timer..high_resolution_timer] 
 Typedef for a timer based on the high resolution clock. 
 
 
@@ -69966,20 +59199,6 @@
 
   [
 
-    [[link asio.reference.basic_waitable_timer.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_waitable_timer.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_waitable_timer.time_point [*time_point]]]
     [The time point type of the clock. ]
   
@@ -70016,12 +59235,16 @@
   
   [
     [[link asio.reference.basic_waitable_timer.cancel [*cancel]]]
-    [Cancel any asynchronous operations that are waiting on the timer. ]
+    [Cancel any asynchronous operations that are waiting on the timer. 
+
+     (Deprecated: Use non-error_code overload.) Cancel any asynchronous operations that are waiting on the timer. ]
   ]
   
   [
     [[link asio.reference.basic_waitable_timer.cancel_one [*cancel_one]]]
-    [Cancels one asynchronous operation that is waiting on the timer. ]
+    [Cancels one asynchronous operation that is waiting on the timer. 
+
+     (Deprecated: Use non-error_code overload.) Cancels one asynchronous operation that is waiting on the timer. ]
   ]
   
   [
@@ -70033,7 +59256,9 @@
     [[link asio.reference.basic_waitable_timer.expires_at [*expires_at]]]
     [(Deprecated: Use expiry().) Get the timer's expiry time as an absolute time. 
 
-     Set the timer's expiry time as an absolute time. ]
+     Set the timer's expiry time as an absolute time. 
+
+     (Deprecated: Use non-error_code overload.) Set the timer's expiry time as an absolute time. ]
   ]
   
   [
@@ -70073,20 +59298,9 @@
     [Perform a blocking wait on the timer. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_waitable_timer.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_waitable_timer.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_waitable_timer._basic_waitable_timer [*~basic_waitable_timer]]]
+    [Destroys the timer. ]
   ]
   
 ]
@@ -70237,7 +59451,7 @@
 
 [section:invalid_service_owner invalid_service_owner::invalid_service_owner]
 
-[indexterm2 invalid_service_owner..invalid_service_owner] 
+[indexterm2 asio.indexterm.invalid_service_owner.invalid_service_owner..invalid_service_owner..invalid_service_owner] 
 
   invalid_service_owner();
 
@@ -70293,6 +59507,13 @@
 
   [
 
+    [[link asio.reference.io_context.count_type [*count_type]]]
+    [The type used to count the number of handlers executed by the context. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.io_context.fork_event [*fork_event]]]
     [Fork-related event notifications. ]
   
@@ -70326,12 +59547,16 @@
   
   [
     [[link asio.reference.io_context.poll [*poll]]]
-    [Run the io_context object's event processing loop to execute ready handlers. ]
+    [Run the io_context object's event processing loop to execute ready handlers. 
+
+     (Deprecated: Use non-error_code overload.) Run the io_context object's event processing loop to execute ready handlers. ]
   ]
   
   [
     [[link asio.reference.io_context.poll_one [*poll_one]]]
-    [Run the io_context object's event processing loop to execute one ready handler. ]
+    [Run the io_context object's event processing loop to execute one ready handler. 
+
+     (Deprecated: Use non-error_code overload.) Run the io_context object's event processing loop to execute one ready handler. ]
   ]
   
   [
@@ -70351,12 +59576,36 @@
   
   [
     [[link asio.reference.io_context.run [*run]]]
-    [Run the io_context object's event processing loop. ]
+    [Run the io_context object's event processing loop. 
+
+     (Deprecated: Use non-error_code overload.) Run the io_context object's event processing loop. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.run_for [*run_for]]]
+    [Run the io_context object's event processing loop for a specified duration. ]
   ]
   
   [
     [[link asio.reference.io_context.run_one [*run_one]]]
-    [Run the io_context object's event processing loop to execute at most one handler. ]
+    [Run the io_context object's event processing loop to execute at most one handler. 
+
+     (Deprecated: Use non-error_code overlaod.) Run the io_context object's event processing loop to execute at most one handler. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.run_one_for [*run_one_for]]]
+    [Run the io_context object's event processing loop for a specified duration to execute at most one handler. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.run_one_until [*run_one_until]]]
+    [Run the io_context object's event processing loop until a specified time to execute at most one handler. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.run_until [*run_until]]]
+    [Run the io_context object's event processing loop until a specified time. ]
   ]
   
   [
@@ -70386,12 +59635,12 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.io_context.destroy_context [*destroy_context]]]
+    [[link asio.reference.io_context.destroy [*destroy]]]
     [Destroys all services in the context. ]
   ]
   
   [
-    [[link asio.reference.io_context.shutdown_context [*shutdown_context]]]
+    [[link asio.reference.io_context.shutdown [*shutdown]]]
     [Shuts down all services in the context. ]
   ]
   
@@ -70489,12 +59738,13 @@
   
 
 
-Some applications may need to prevent an [link asio.reference.io_context `io_context`] object's `run()` call from returning when there is no more work to do. For example, the [link asio.reference.io_context `io_context`] may be being run in a background thread that is launched prior to the application's asynchronous operations. The `run()` call may be kept running by creating an object of type [link asio.reference.io_context__work `io_context::work`]:
+Some applications may need to prevent an [link asio.reference.io_context `io_context`] object's `run()` call from returning when there is no more work to do. For example, the [link asio.reference.io_context `io_context`] may be being run in a background thread that is launched prior to the application's asynchronous operations. The `run()` call may be kept running by creating an object of type asio::executor\_work\_guard<io\_context::executor\_type>:
 
 
 
    asio::io_context io_context;
-   asio::io_context::work work(io_context);
+   asio::executor_work_guard<asio::io_context::executor_type>
+     = asio::make_work_guard(io_context);
    ... 
 
 
@@ -70502,13 +59752,13 @@
 
 To effect a shutdown, the application will then need to call the [link asio.reference.io_context `io_context`] object's `stop()` member function. This will cause the [link asio.reference.io_context `io_context`] `run()` call to return as soon as possible, abandoning unfinished operations and without permitting ready handlers to be dispatched.
 
-Alternatively, if the application requires that all operations and handlers be allowed to finish normally, the work object may be explicitly destroyed.
+Alternatively, if the application requires that all operations and handlers be allowed to finish normally, the work object may be explicitly reset.
 
 
 
    asio::io_context io_context;
-   auto_ptr<asio::io_context::work> work(
-       new asio::io_context::work(io_context));
+   asio::executor_work_guard<asio::io_context::executor_type>
+     = asio::make_work_guard(io_context);
    ...
    work.reset(); // Allow run() to exit. 
 
@@ -70527,7 +59777,7 @@
 
 ['Inherited from execution_context.]
 
-[indexterm2 add_service..io_context] 
+[indexterm2 asio.indexterm.io_context.add_service..add_service..io_context] 
 (Deprecated: Use `make_service()`.) Add a service object to the [link asio.reference.execution_context `execution_context`]. 
 
 
@@ -70581,16 +59831,37 @@
 
 
 
-[section:destroy_context io_context::destroy_context]
+[section:count_type io_context::count_type]
+
+[indexterm2 asio.indexterm.io_context.count_type..count_type..io_context] 
+The type used to count the number of handlers executed by the context. 
+
+
+  typedef std::size_t count_type;
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/io_context.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
+
+[section:destroy io_context::destroy]
 
 
 ['Inherited from execution_context.]
 
-[indexterm2 destroy_context..io_context] 
+[indexterm2 asio.indexterm.io_context.destroy..destroy..io_context] 
 Destroys all services in the context. 
 
 
-  void destroy_context();
+  void destroy();
 
 
 This function is implemented as follows:
@@ -70607,13 +59878,13 @@
 
 [section:dispatch io_context::dispatch]
 
-[indexterm2 dispatch..io_context] 
+[indexterm2 asio.indexterm.io_context.dispatch..dispatch..io_context] 
 (Deprecated: Use [link asio.reference.dispatch `dispatch`].) Request the [link asio.reference.io_context `io_context`] to invoke the given handler. 
 
 
   template<
       typename ``[link asio.reference.CompletionHandler CompletionHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` dispatch(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` dispatch(
       CompletionHandler && handler);
 
 
@@ -70658,15 +59929,15 @@
 
 ['Inherited from execution_context.]
 
-[indexterm2 fork_event..io_context] 
+[indexterm2 asio.indexterm.io_context.fork_event..fork_event..io_context] 
 Fork-related event notifications. 
 
 
   enum fork_event
 
-[indexterm2 fork_prepare..io_context]
-[indexterm2 fork_parent..io_context]
-[indexterm2 fork_child..io_context]
+[indexterm2 asio.indexterm.io_context.fork_event.fork_prepare..fork_prepare..io_context]
+[indexterm2 asio.indexterm.io_context.fork_event.fork_parent..fork_parent..io_context]
+[indexterm2 asio.indexterm.io_context.fork_event.fork_child..fork_child..io_context]
 
 [heading Values]
 [variablelist
@@ -70696,7 +59967,7 @@
 
 [section:get_executor io_context::get_executor]
 
-[indexterm2 get_executor..io_context] 
+[indexterm2 asio.indexterm.io_context.get_executor..get_executor..io_context] 
 Obtains the executor associated with the [link asio.reference.io_context `io_context`]. 
 
 
@@ -70713,7 +59984,7 @@
 
 ['Inherited from execution_context.]
 
-[indexterm2 has_service..io_context] 
+[indexterm2 asio.indexterm.io_context.has_service..has_service..io_context] 
 Determine if an [link asio.reference.execution_context `execution_context`] contains a specified service type. 
 
 
@@ -70754,7 +60025,7 @@
 
 [section:io_context io_context::io_context]
 
-[indexterm2 io_context..io_context] 
+[indexterm2 asio.indexterm.io_context.io_context..io_context..io_context] 
 Constructor. 
 
 
@@ -70762,7 +60033,7 @@
   ``  [''''&raquo;''' [link asio.reference.io_context.io_context.overload1 more...]]``
 
   explicit ``[link asio.reference.io_context.io_context.overload2 io_context]``(
-      std::size_t concurrency_hint);
+      int concurrency_hint);
   ``  [''''&raquo;''' [link asio.reference.io_context.io_context.overload2 more...]]``
 
 
@@ -70787,7 +60058,7 @@
 
 
   io_context(
-      std::size_t concurrency_hint);
+      int concurrency_hint);
 
 
 Construct with a hint about the required level of concurrency.
@@ -70816,7 +60087,7 @@
 
 ['Inherited from execution_context.]
 
-[indexterm2 make_service..io_context] 
+[indexterm2 asio.indexterm.io_context.make_service..make_service..io_context] 
 Creates a service object and adds it to the [link asio.reference.execution_context `execution_context`]. 
 
 
@@ -70870,7 +60141,7 @@
 
 ['Inherited from execution_context.]
 
-[indexterm2 notify_fork..io_context] 
+[indexterm2 asio.indexterm.io_context.notify_fork..notify_fork..io_context] 
 Notify the [link asio.reference.execution_context `execution_context`] of a fork-related event. 
 
 
@@ -70925,7 +60196,7 @@
 
 [heading Remarks]
       
-For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, performs `svc->fork_service();`. When processing the fork\_prepare event, services are visited in reverse order of the beginning of service object lifetime. Otherwise, services are visited in order of the beginning of service object lifetime. 
+For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, performs `svc->notify_fork();`. When processing the fork\_prepare event, services are visited in reverse order of the beginning of service object lifetime. Otherwise, services are visited in order of the beginning of service object lifetime. 
 
 
 
@@ -70935,14 +60206,18 @@
 
 [section:poll io_context::poll]
 
-[indexterm2 poll..io_context] 
+[indexterm2 asio.indexterm.io_context.poll..poll..io_context] 
 Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute ready handlers. 
 
 
-  std::size_t ``[link asio.reference.io_context.poll.overload1 poll]``();
+  count_type ``[link asio.reference.io_context.poll.overload1 poll]``();
   ``  [''''&raquo;''' [link asio.reference.io_context.poll.overload1 more...]]``
 
-  std::size_t ``[link asio.reference.io_context.poll.overload2 poll]``(
+
+(Deprecated: Use non-error\_code overload.) Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute ready handlers. 
+
+
+  count_type ``[link asio.reference.io_context.poll.overload2 poll]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.io_context.poll.overload2 more...]]``
 
@@ -70953,7 +60228,7 @@
 Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute ready handlers. 
 
 
-  std::size_t poll();
+  count_type poll();
 
 
 The `poll()` function runs handlers that are ready to run, without blocking, until the [link asio.reference.io_context `io_context`] has been stopped or there are no more ready handlers.
@@ -70961,17 +60236,7 @@
 
 [heading Return Value]
       
-The number of handlers that were executed.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
+The number of handlers that were executed. 
 
 
 
@@ -70983,10 +60248,10 @@
 [section:overload2 io_context::poll (2 of 2 overloads)]
 
 
-Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute ready handlers. 
+(Deprecated: Use non-error\_code overload.) Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute ready handlers. 
 
 
-  std::size_t poll(
+  count_type poll(
       asio::error_code & ec);
 
 
@@ -71017,14 +60282,18 @@
 
 [section:poll_one io_context::poll_one]
 
-[indexterm2 poll_one..io_context] 
+[indexterm2 asio.indexterm.io_context.poll_one..poll_one..io_context] 
 Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute one ready handler. 
 
 
-  std::size_t ``[link asio.reference.io_context.poll_one.overload1 poll_one]``();
+  count_type ``[link asio.reference.io_context.poll_one.overload1 poll_one]``();
   ``  [''''&raquo;''' [link asio.reference.io_context.poll_one.overload1 more...]]``
 
-  std::size_t ``[link asio.reference.io_context.poll_one.overload2 poll_one]``(
+
+(Deprecated: Use non-error\_code overload.) Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute one ready handler. 
+
+
+  count_type ``[link asio.reference.io_context.poll_one.overload2 poll_one]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.io_context.poll_one.overload2 more...]]``
 
@@ -71035,7 +60304,7 @@
 Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute one ready handler. 
 
 
-  std::size_t poll_one();
+  count_type poll_one();
 
 
 The `poll_one()` function runs at most one handler that is ready to run, without blocking.
@@ -71043,17 +60312,7 @@
 
 [heading Return Value]
       
-The number of handlers that were executed.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
+The number of handlers that were executed. 
 
 
 
@@ -71065,10 +60324,10 @@
 [section:overload2 io_context::poll_one (2 of 2 overloads)]
 
 
-Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute one ready handler. 
+(Deprecated: Use non-error\_code overload.) Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute one ready handler. 
 
 
-  std::size_t poll_one(
+  count_type poll_one(
       asio::error_code & ec);
 
 
@@ -71100,13 +60359,13 @@
 
 [section:post io_context::post]
 
-[indexterm2 post..io_context] 
+[indexterm2 asio.indexterm.io_context.post..post..io_context] 
 (Deprecated: Use [link asio.reference.post `post`].) Request the [link asio.reference.io_context `io_context`] to invoke the given handler and return immediately. 
 
 
   template<
       typename ``[link asio.reference.CompletionHandler CompletionHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` post(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` post(
       CompletionHandler && handler);
 
 
@@ -71148,7 +60407,7 @@
 
 [section:reset io_context::reset]
 
-[indexterm2 reset..io_context] 
+[indexterm2 asio.indexterm.io_context.reset..reset..io_context] 
 (Deprecated: Use `restart()`.) Reset the [link asio.reference.io_context `io_context`] in preparation for a subsequent `run()` invocation. 
 
 
@@ -71166,7 +60425,7 @@
 
 [section:restart io_context::restart]
 
-[indexterm2 restart..io_context] 
+[indexterm2 asio.indexterm.io_context.restart..restart..io_context] 
 Restart the [link asio.reference.io_context `io_context`] in preparation for a subsequent `run()` invocation. 
 
 
@@ -71183,14 +60442,18 @@
 
 [section:run io_context::run]
 
-[indexterm2 run..io_context] 
+[indexterm2 asio.indexterm.io_context.run..run..io_context] 
 Run the [link asio.reference.io_context `io_context`] object's event processing loop. 
 
 
-  std::size_t ``[link asio.reference.io_context.run.overload1 run]``();
+  count_type ``[link asio.reference.io_context.run.overload1 run]``();
   ``  [''''&raquo;''' [link asio.reference.io_context.run.overload1 more...]]``
 
-  std::size_t ``[link asio.reference.io_context.run.overload2 run]``(
+
+(Deprecated: Use non-error\_code overload.) Run the [link asio.reference.io_context `io_context`] object's event processing loop. 
+
+
+  count_type ``[link asio.reference.io_context.run.overload2 run]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.io_context.run.overload2 more...]]``
 
@@ -71201,7 +60464,7 @@
 Run the [link asio.reference.io_context `io_context`] object's event processing loop. 
 
 
-  std::size_t run();
+  count_type run();
 
 
 The `run()` function blocks until all work has finished and there are no more handlers to be dispatched, or until the [link asio.reference.io_context `io_context`] has been stopped.
@@ -71216,16 +60479,6 @@
 The number of handlers that were executed.
 
 
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
 [heading Remarks]
       
 The `run()` function must not be called from a thread that is currently calling one of `run()`, `run_one()`, `poll()` or `poll_one()` on the same [link asio.reference.io_context `io_context`] object.
@@ -71240,10 +60493,10 @@
 [section:overload2 io_context::run (2 of 2 overloads)]
 
 
-Run the [link asio.reference.io_context `io_context`] object's event processing loop. 
+(Deprecated: Use non-error\_code overload.) Run the [link asio.reference.io_context `io_context`] object's event processing loop. 
 
 
-  std::size_t run(
+  count_type run(
       asio::error_code & ec);
 
 
@@ -71281,16 +60534,57 @@
 
 [endsect]
 
+
+[section:run_for io_context::run_for]
+
+[indexterm2 asio.indexterm.io_context.run_for..run_for..io_context] 
+Run the [link asio.reference.io_context `io_context`] object's event processing loop for a specified duration. 
+
+
+  template<
+      typename Rep,
+      typename Period>
+  std::size_t run_for(
+      const chrono::duration< Rep, Period > & rel_time);
+
+
+The `run_for()` function blocks until all work has finished and there are no more handlers to be dispatched, until the [link asio.reference.io_context `io_context`] has been stopped, or until the specified duration has elapsed.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[rel_time][The duration for which the call may block.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of handlers that were executed. 
+
+
+
+
+[endsect]
+
+
 [section:run_one io_context::run_one]
 
-[indexterm2 run_one..io_context] 
+[indexterm2 asio.indexterm.io_context.run_one..run_one..io_context] 
 Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute at most one handler. 
 
 
-  std::size_t ``[link asio.reference.io_context.run_one.overload1 run_one]``();
+  count_type ``[link asio.reference.io_context.run_one.overload1 run_one]``();
   ``  [''''&raquo;''' [link asio.reference.io_context.run_one.overload1 more...]]``
 
-  std::size_t ``[link asio.reference.io_context.run_one.overload2 run_one]``(
+
+(Deprecated: Use non-error\_code overlaod.) Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute at most one handler. 
+
+
+  count_type ``[link asio.reference.io_context.run_one.overload2 run_one]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.io_context.run_one.overload2 more...]]``
 
@@ -71301,7 +60595,7 @@
 Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute at most one handler. 
 
 
-  std::size_t run_one();
+  count_type run_one();
 
 
 The `run_one()` function blocks until one handler has been dispatched, or until the [link asio.reference.io_context `io_context`] has been stopped.
@@ -71309,17 +60603,7 @@
 
 [heading Return Value]
       
-The number of handlers that were executed. A zero return value implies that the [link asio.reference.io_context `io_context`] object is stopped (the `stopped()` function returns `true`). Subsequent calls to `run()`, `run_one()`, `poll()` or `poll_one()` will return immediately unless there is a prior call to `restart()`.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
+The number of handlers that were executed. A zero return value implies that the [link asio.reference.io_context `io_context`] object is stopped (the `stopped()` function returns `true`). Subsequent calls to `run()`, `run_one()`, `poll()` or `poll_one()` will return immediately unless there is a prior call to `restart()`. 
 
 
 
@@ -71331,10 +60615,10 @@
 [section:overload2 io_context::run_one (2 of 2 overloads)]
 
 
-Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute at most one handler. 
+(Deprecated: Use non-error\_code overlaod.) Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute at most one handler. 
 
 
-  std::size_t run_one(
+  count_type run_one(
       asio::error_code & ec);
 
 
@@ -71356,22 +60640,133 @@
 [endsect]
 
 
-[section:shutdown_context io_context::shutdown_context]
+[section:run_one_for io_context::run_one_for]
+
+[indexterm2 asio.indexterm.io_context.run_one_for..run_one_for..io_context] 
+Run the [link asio.reference.io_context `io_context`] object's event processing loop for a specified duration to execute at most one handler. 
+
+
+  template<
+      typename Rep,
+      typename Period>
+  std::size_t run_one_for(
+      const chrono::duration< Rep, Period > & rel_time);
+
+
+The `run_one_for()` function blocks until one handler has been dispatched, until the [link asio.reference.io_context `io_context`] has been stopped, or until the specified duration has elapsed.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[rel_time][The duration for which the call may block.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of handlers that were executed. 
+
+
+
+
+[endsect]
+
+
+
+[section:run_one_until io_context::run_one_until]
+
+[indexterm2 asio.indexterm.io_context.run_one_until..run_one_until..io_context] 
+Run the [link asio.reference.io_context `io_context`] object's event processing loop until a specified time to execute at most one handler. 
+
+
+  template<
+      typename Clock,
+      typename Duration>
+  std::size_t run_one_until(
+      const chrono::time_point< Clock, Duration > & abs_time);
+
+
+The `run_one_until()` function blocks until one handler has been dispatched, until the [link asio.reference.io_context `io_context`] has been stopped, or until the specified time has been reached.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[abs_time][The time point until which the call may block.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of handlers that were executed. 
+
+
+
+
+[endsect]
+
+
+
+[section:run_until io_context::run_until]
+
+[indexterm2 asio.indexterm.io_context.run_until..run_until..io_context] 
+Run the [link asio.reference.io_context `io_context`] object's event processing loop until a specified time. 
+
+
+  template<
+      typename Clock,
+      typename Duration>
+  std::size_t run_until(
+      const chrono::time_point< Clock, Duration > & abs_time);
+
+
+The `run_until()` function blocks until all work has finished and there are no more handlers to be dispatched, until the [link asio.reference.io_context `io_context`] has been stopped, or until the specified time has been reached.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[abs_time][The time point until which the call may block.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of handlers that were executed. 
+
+
+
+
+[endsect]
+
+
+
+[section:shutdown io_context::shutdown]
 
 
 ['Inherited from execution_context.]
 
-[indexterm2 shutdown_context..io_context] 
+[indexterm2 asio.indexterm.io_context.shutdown..shutdown..io_context] 
 Shuts down all services in the context. 
 
 
-  void shutdown_context();
+  void shutdown();
 
 
 This function is implemented as follows:
 
 
-* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown_service()`. 
+* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown()`. 
 
 
 
@@ -71382,7 +60777,7 @@
 
 [section:stop io_context::stop]
 
-[indexterm2 stop..io_context] 
+[indexterm2 asio.indexterm.io_context.stop..stop..io_context] 
 Stop the [link asio.reference.io_context `io_context`] object's event processing loop. 
 
 
@@ -71398,7 +60793,7 @@
 
 [section:stopped io_context::stopped]
 
-[indexterm2 stopped..io_context] 
+[indexterm2 asio.indexterm.io_context.stopped..stopped..io_context] 
 Determine whether the [link asio.reference.io_context `io_context`] object has been stopped. 
 
 
@@ -71420,7 +60815,7 @@
 
 [section:use_service io_context::use_service]
 
-[indexterm2 use_service..io_context] 
+[indexterm2 asio.indexterm.io_context.use_service..use_service..io_context] 
 
   template<
       typename ``[link asio.reference.Service Service]``>
@@ -71533,7 +60928,7 @@
 
 [section:wrap io_context::wrap]
 
-[indexterm2 wrap..io_context] 
+[indexterm2 asio.indexterm.io_context.wrap..wrap..io_context] 
 (Deprecated: Use [link asio.reference.bind_executor `bind_executor`].) Create a new handler that automatically dispatches the wrapped handler on the [link asio.reference.io_context `io_context`]. 
 
 
@@ -71593,7 +60988,7 @@
 
 [section:_io_context io_context::~io_context]
 
-[indexterm2 ~io_context..io_context] 
+[indexterm2 asio.indexterm.io_context._io_context..~io_context..io_context] 
 Destructor. 
 
 
@@ -71603,7 +60998,7 @@
 On destruction, the [link asio.reference.io_context `io_context`] performs the following sequence of operations:
 
 
-* For each service object `svc` in the [link asio.reference.io_context `io_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown_service()`.
+* For each service object `svc` in the [link asio.reference.io_context `io_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown()`.
 
 
 * Uninvoked handler objects that were scheduled for deferred invocation on the [link asio.reference.io_context `io_context`], or any associated strand, are destroyed.
@@ -71706,11 +61101,11 @@
 
 [section:context io_context::executor_type::context]
 
-[indexterm2 context..io_context::executor_type] 
+[indexterm2 asio.indexterm.io_context__executor_type.context..context..io_context::executor_type] 
 Obtain the underlying execution context. 
 
 
-  io_context & context();
+  io_context & context() const;
 
 
 
@@ -71720,7 +61115,7 @@
 
 [section:defer io_context::executor_type::defer]
 
-[indexterm2 defer..io_context::executor_type] 
+[indexterm2 asio.indexterm.io_context__executor_type.defer..defer..io_context::executor_type] 
 Request the [link asio.reference.io_context `io_context`] to invoke the given function object. 
 
 
@@ -71729,7 +61124,7 @@
       typename Allocator>
   void defer(
       Function && f,
-      const Allocator & a);
+      const Allocator & a) const;
 
 
 This function is used to ask the [link asio.reference.io_context `io_context`] to execute the given function object. The function object will never be executed inside `defer()`. Instead, it will be scheduled to run on the [link asio.reference.io_context `io_context`].
@@ -71761,7 +61156,7 @@
 
 [section:dispatch io_context::executor_type::dispatch]
 
-[indexterm2 dispatch..io_context::executor_type] 
+[indexterm2 asio.indexterm.io_context__executor_type.dispatch..dispatch..io_context::executor_type] 
 Request the [link asio.reference.io_context `io_context`] to invoke the given function object. 
 
 
@@ -71770,7 +61165,7 @@
       typename Allocator>
   void dispatch(
       Function && f,
-      const Allocator & a);
+      const Allocator & a) const;
 
 
 This function is used to ask the [link asio.reference.io_context `io_context`] to execute the given function object. If the current thread is running the [link asio.reference.io_context `io_context`], `dispatch()` executes the function before returning. Otherwise, the function will be scheduled to run on the [link asio.reference.io_context `io_context`].
@@ -71800,11 +61195,11 @@
 
 [section:on_work_finished io_context::executor_type::on_work_finished]
 
-[indexterm2 on_work_finished..io_context::executor_type] 
+[indexterm2 asio.indexterm.io_context__executor_type.on_work_finished..on_work_finished..io_context::executor_type] 
 Inform the [link asio.reference.io_context `io_context`] that some work is no longer outstanding. 
 
 
-  void on_work_finished();
+  void on_work_finished() const;
 
 
 This function is used to inform the [link asio.reference.io_context `io_context`] that some work has finished. Once the count of unfinished work reaches zero, the [link asio.reference.io_context `io_context`] is stopped and the `run()` and `run_one()` functions may exit. 
@@ -71816,11 +61211,11 @@
 
 [section:on_work_started io_context::executor_type::on_work_started]
 
-[indexterm2 on_work_started..io_context::executor_type] 
+[indexterm2 asio.indexterm.io_context__executor_type.on_work_started..on_work_started..io_context::executor_type] 
 Inform the [link asio.reference.io_context `io_context`] that it has some outstanding work to do. 
 
 
-  void on_work_started();
+  void on_work_started() const;
 
 
 This function is used to inform the [link asio.reference.io_context `io_context`] that some work has begun. This ensures that the io\_context's `run()` and `run_one()` functions do not exit while the work is underway. 
@@ -71832,7 +61227,7 @@
 
 [section:operator_not__eq_ io_context::executor_type::operator!=]
 
-[indexterm2 operator!=..io_context::executor_type] 
+[indexterm2 asio.indexterm.io_context__executor_type.operator_not__eq_..operator!=..io_context::executor_type] 
 Compare two executors for inequality. 
 
 
@@ -71856,7 +61251,7 @@
 
 [section:operator_eq__eq_ io_context::executor_type::operator==]
 
-[indexterm2 operator==..io_context::executor_type] 
+[indexterm2 asio.indexterm.io_context__executor_type.operator_eq__eq_..operator==..io_context::executor_type] 
 Compare two executors for equality. 
 
 
@@ -71880,7 +61275,7 @@
 
 [section:post io_context::executor_type::post]
 
-[indexterm2 post..io_context::executor_type] 
+[indexterm2 asio.indexterm.io_context__executor_type.post..post..io_context::executor_type] 
 Request the [link asio.reference.io_context `io_context`] to invoke the given function object. 
 
 
@@ -71889,7 +61284,7 @@
       typename Allocator>
   void post(
       Function && f,
-      const Allocator & a);
+      const Allocator & a) const;
 
 
 This function is used to ask the [link asio.reference.io_context `io_context`] to execute the given function object. The function object will never be executed inside `post()`. Instead, it will be scheduled to run on the [link asio.reference.io_context `io_context`].
@@ -71919,7 +61314,7 @@
 
 [section:running_in_this_thread io_context::executor_type::running_in_this_thread]
 
-[indexterm2 running_in_this_thread..io_context::executor_type] 
+[indexterm2 asio.indexterm.io_context__executor_type.running_in_this_thread..running_in_this_thread..io_context::executor_type] 
 Determine whether the [link asio.reference.io_context `io_context`] is running in the current thread. 
 
 
@@ -71990,7 +61385,7 @@
 
 [section:get_io_context io_context::service::get_io_context]
 
-[indexterm2 get_io_context..io_context::service] 
+[indexterm2 asio.indexterm.io_context__service.get_io_context..get_io_context..io_context::service] 
 Get the [link asio.reference.io_context `io_context`] object that owns the service. 
 
 
@@ -72004,7 +61399,7 @@
 
 [section:get_io_service io_context::service::get_io_service]
 
-[indexterm2 get_io_service..io_context::service] 
+[indexterm2 asio.indexterm.io_context__service.get_io_service..get_io_service..io_context::service] 
 Get the [link asio.reference.io_context `io_context`] object that owns the service. 
 
 
@@ -72018,7 +61413,7 @@
 
 [section:service io_context::service::service]
 
-[indexterm2 service..io_context::service] 
+[indexterm2 asio.indexterm.io_context__service.service..service..io_context::service] 
 Constructor. 
 
 
@@ -72045,7 +61440,7 @@
 
 [section:_service io_context::service::~service]
 
-[indexterm2 ~service..io_context::service] 
+[indexterm2 asio.indexterm.io_context__service._service..~service..io_context::service] 
 Destructor. 
 
 
@@ -72224,7 +61619,7 @@
 
 [section:context io_context::strand::context]
 
-[indexterm2 context..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.context..context..io_context::strand] 
 Obtain the underlying execution context. 
 
 
@@ -72238,7 +61633,7 @@
 
 [section:defer io_context::strand::defer]
 
-[indexterm2 defer..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.defer..defer..io_context::strand] 
 Request the strand to invoke the given function object. 
 
 
@@ -72276,7 +61671,7 @@
 
 [section:dispatch io_context::strand::dispatch]
 
-[indexterm2 dispatch..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.dispatch..dispatch..io_context::strand] 
 Request the strand to invoke the given function object. 
 
 
@@ -72294,7 +61689,7 @@
 
   template<
       typename ``[link asio.reference.CompletionHandler CompletionHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.io_context__strand.dispatch.overload2 dispatch]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.io_context__strand.dispatch.overload2 dispatch]``(
       CompletionHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.io_context__strand.dispatch.overload2 more...]]``
 
@@ -72346,7 +61741,7 @@
 
   template<
       typename ``[link asio.reference.CompletionHandler CompletionHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` dispatch(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` dispatch(
       CompletionHandler && handler);
 
 
@@ -72381,7 +61776,7 @@
 
 [section:get_io_context io_context::strand::get_io_context]
 
-[indexterm2 get_io_context..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.get_io_context..get_io_context..io_context::strand] 
 (Deprecated: Use `context()`.) Get the [link asio.reference.io_context `io_context`] associated with the strand. 
 
 
@@ -72404,7 +61799,7 @@
 
 [section:get_io_service io_context::strand::get_io_service]
 
-[indexterm2 get_io_service..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.get_io_service..get_io_service..io_context::strand] 
 (Deprecated: Use `context()`.) Get the [link asio.reference.io_context `io_context`] associated with the strand. 
 
 
@@ -72427,7 +61822,7 @@
 
 [section:on_work_finished io_context::strand::on_work_finished]
 
-[indexterm2 on_work_finished..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.on_work_finished..on_work_finished..io_context::strand] 
 Inform the strand that some work is no longer outstanding. 
 
 
@@ -72443,7 +61838,7 @@
 
 [section:on_work_started io_context::strand::on_work_started]
 
-[indexterm2 on_work_started..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.on_work_started..on_work_started..io_context::strand] 
 Inform the strand that it has some outstanding work to do. 
 
 
@@ -72459,7 +61854,7 @@
 
 [section:operator_not__eq_ io_context::strand::operator!=]
 
-[indexterm2 operator!=..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.operator_not__eq_..operator!=..io_context::strand] 
 Compare two strands for inequality. 
 
 
@@ -72483,7 +61878,7 @@
 
 [section:operator_eq__eq_ io_context::strand::operator==]
 
-[indexterm2 operator==..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.operator_eq__eq_..operator==..io_context::strand] 
 Compare two strands for equality. 
 
 
@@ -72506,7 +61901,7 @@
 
 [section:post io_context::strand::post]
 
-[indexterm2 post..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.post..post..io_context::strand] 
 Request the strand to invoke the given function object. 
 
 
@@ -72524,7 +61919,7 @@
 
   template<
       typename ``[link asio.reference.CompletionHandler CompletionHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.io_context__strand.post.overload2 post]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.io_context__strand.post.overload2 post]``(
       CompletionHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.io_context__strand.post.overload2 more...]]``
 
@@ -72576,7 +61971,7 @@
 
   template<
       typename ``[link asio.reference.CompletionHandler CompletionHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` post(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` post(
       CompletionHandler && handler);
 
 
@@ -72609,7 +62004,7 @@
 
 [section:running_in_this_thread io_context::strand::running_in_this_thread]
 
-[indexterm2 running_in_this_thread..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.running_in_this_thread..running_in_this_thread..io_context::strand] 
 Determine whether the strand is running in the current thread. 
 
 
@@ -72630,7 +62025,7 @@
 
 [section:strand io_context::strand::strand]
 
-[indexterm2 strand..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.strand..strand..io_context::strand] 
 Constructor. 
 
 
@@ -72659,7 +62054,7 @@
 
 [section:wrap io_context::strand::wrap]
 
-[indexterm2 wrap..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand.wrap..wrap..io_context::strand] 
 (Deprecated: Use [link asio.reference.bind_executor `bind_executor`].) Create a new handler that automatically dispatches the wrapped handler on the strand. 
 
 
@@ -72719,7 +62114,7 @@
 
 [section:_strand io_context::strand::~strand]
 
-[indexterm2 ~strand..io_context::strand] 
+[indexterm2 asio.indexterm.io_context__strand._strand..~strand..io_context::strand] 
 Destructor. 
 
 
@@ -72787,7 +62182,7 @@
 
 [section:get_io_context io_context::work::get_io_context]
 
-[indexterm2 get_io_context..io_context::work] 
+[indexterm2 asio.indexterm.io_context__work.get_io_context..get_io_context..io_context::work] 
 Get the [link asio.reference.io_context `io_context`] associated with the work. 
 
 
@@ -72801,7 +62196,7 @@
 
 [section:get_io_service io_context::work::get_io_service]
 
-[indexterm2 get_io_service..io_context::work] 
+[indexterm2 asio.indexterm.io_context__work.get_io_service..get_io_service..io_context::work] 
 (Deprecated: Use `get_io_context()`.) Get the [link asio.reference.io_context `io_context`] associated with the work. 
 
 
@@ -72814,7 +62209,7 @@
 
 [section:work io_context::work::work]
 
-[indexterm2 work..io_context::work] 
+[indexterm2 asio.indexterm.io_context__work.work..work..io_context::work] 
 Constructor notifies the [link asio.reference.io_context `io_context`] that work is starting. 
 
 
@@ -72869,7 +62264,7 @@
 
 [section:_work io_context::work::~work]
 
-[indexterm2 ~work..io_context::work] 
+[indexterm2 asio.indexterm.io_context__work._work..~work..io_context::work] 
 Destructor notifies the [link asio.reference.io_context `io_context`] that the work is complete. 
 
 
@@ -72885,6 +62280,319 @@
 
 [endsect]
 
+
+[section:io_service io_service]
+
+[indexterm1 asio.indexterm.io_service..io_service] 
+Typedef for backwards compatibility. 
+
+
+  typedef io_context io_service;
+
+
+[heading Types]
+[table
+  [[Name][Description]]
+
+  [
+
+    [[link asio.reference.io_context__executor_type [*executor_type]]]
+    [Executor used to submit functions to an io_context. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.io_context__service [*service]]]
+    [Base class for all io_context services. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.io_context__strand [*strand]]]
+    [Provides serialised handler execution. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.io_context__work [*work]]]
+    [(Deprecated: Use executor_work_guard.) Class to inform the io_context when it has work to do. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.io_context.count_type [*count_type]]]
+    [The type used to count the number of handlers executed by the context. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.io_context.fork_event [*fork_event]]]
+    [Fork-related event notifications. ]
+  
+  ]
+
+]
+
+[heading Member Functions]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.io_context.dispatch [*dispatch]]]
+    [(Deprecated: Use asio::dispatch().) Request the io_context to invoke the given handler. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.get_executor [*get_executor]]]
+    [Obtains the executor associated with the io_context. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.io_context [*io_context]]]
+    [Constructor. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.notify_fork [*notify_fork]]]
+    [Notify the execution_context of a fork-related event. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.poll [*poll]]]
+    [Run the io_context object's event processing loop to execute ready handlers. 
+
+     (Deprecated: Use non-error_code overload.) Run the io_context object's event processing loop to execute ready handlers. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.poll_one [*poll_one]]]
+    [Run the io_context object's event processing loop to execute one ready handler. 
+
+     (Deprecated: Use non-error_code overload.) Run the io_context object's event processing loop to execute one ready handler. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.post [*post]]]
+    [(Deprecated: Use asio::post().) Request the io_context to invoke the given handler and return immediately. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.reset [*reset]]]
+    [(Deprecated: Use restart().) Reset the io_context in preparation for a subsequent run() invocation. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.restart [*restart]]]
+    [Restart the io_context in preparation for a subsequent run() invocation. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.run [*run]]]
+    [Run the io_context object's event processing loop. 
+
+     (Deprecated: Use non-error_code overload.) Run the io_context object's event processing loop. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.run_for [*run_for]]]
+    [Run the io_context object's event processing loop for a specified duration. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.run_one [*run_one]]]
+    [Run the io_context object's event processing loop to execute at most one handler. 
+
+     (Deprecated: Use non-error_code overlaod.) Run the io_context object's event processing loop to execute at most one handler. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.run_one_for [*run_one_for]]]
+    [Run the io_context object's event processing loop for a specified duration to execute at most one handler. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.run_one_until [*run_one_until]]]
+    [Run the io_context object's event processing loop until a specified time to execute at most one handler. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.run_until [*run_until]]]
+    [Run the io_context object's event processing loop until a specified time. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.stop [*stop]]]
+    [Stop the io_context object's event processing loop. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.stopped [*stopped]]]
+    [Determine whether the io_context object has been stopped. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.wrap [*wrap]]]
+    [(Deprecated: Use asio::bind_executor().) Create a new handler that automatically dispatches the wrapped handler on the io_context. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context._io_context [*~io_context]]]
+    [Destructor. ]
+  ]
+  
+]
+
+[heading Protected Member Functions]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.io_context.destroy [*destroy]]]
+    [Destroys all services in the context. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.shutdown [*shutdown]]]
+    [Shuts down all services in the context. ]
+  ]
+  
+]
+
+[heading Friends]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.io_context.add_service [*add_service]]]
+    [(Deprecated: Use make_service().) Add a service object to the execution_context. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.has_service [*has_service]]]
+    [Determine if an execution_context contains a specified service type. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.make_service [*make_service]]]
+    [Creates a service object and adds it to the execution_context. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context.use_service [*use_service]]]
+    [
+
+     Obtain the service object corresponding to the given type. ]
+  ]
+  
+]
+
+The [link asio.reference.io_context `io_context`] class provides the core I/O functionality for users of the asynchronous I/O objects, including:
+
+
+* `asio::ip::tcp::socket` 
+
+* `asio::ip::tcp::acceptor` 
+
+* `asio::ip::udp::socket` 
+
+* [link asio.reference.deadline_timer `deadline_timer`].
+
+The [link asio.reference.io_context `io_context`] class also includes facilities intended for developers of custom asynchronous services.
+
+
+[heading Thread Safety]
+  
+['Distinct] ['objects:] Safe.
+
+['Shared] ['objects:] Safe, with the specific exceptions of the `restart()` and `notify_fork()` functions. Calling `restart()` while there are unfinished `run()`, `run_one()`, `poll()` or `poll_one()` calls results in undefined behaviour. The `notify_fork()` function should not be called while any [link asio.reference.io_context `io_context`] function, or any function on an I/O object that is associated with the [link asio.reference.io_context `io_context`], is being called in another thread.
+
+
+
+[heading Synchronous and asynchronous operations]
+  
+
+
+Synchronous operations on I/O objects implicitly run the [link asio.reference.io_context `io_context`] object for an individual operation. The [link asio.reference.io_context `io_context`] functions `run()`, `run_one()`, `poll()` or `poll_one()` must be called for the [link asio.reference.io_context `io_context`] to perform asynchronous operations on behalf of a C++ program. Notification that an asynchronous operation has completed is delivered by invocation of the associated handler. Handlers are invoked only by a thread that is currently calling any overload of `run()`, `run_one()`, `poll()` or `poll_one()` for the [link asio.reference.io_context `io_context`].
+
+
+[heading Effect of exceptions thrown from handlers]
+  
+
+
+If an exception is thrown from a handler, the exception is allowed to propagate through the throwing thread's invocation of `run()`, `run_one()`, `poll()` or `poll_one()`. No other threads that are calling any of these functions are affected. It is then the responsibility of the application to catch the exception.
+
+After the exception has been caught, the `run()`, `run_one()`, `poll()` or `poll_one()` call may be restarted ['without] the need for an intervening call to `restart()`. This allows the thread to rejoin the [link asio.reference.io_context `io_context`] object's thread pool without impacting any other threads in the pool.
+
+For example:
+
+
+
+   asio::io_context io_context;
+   ...
+   for (;;)
+   {
+     try
+     {
+       io_context.run();
+       break; // run() exited normally
+     }
+     catch (my_exception& e)
+     {
+       // Deal with exception as appropriate.
+     }
+   }
+
+
+
+
+
+[heading Stopping the io_context from running out of work]
+  
+
+
+Some applications may need to prevent an [link asio.reference.io_context `io_context`] object's `run()` call from returning when there is no more work to do. For example, the [link asio.reference.io_context `io_context`] may be being run in a background thread that is launched prior to the application's asynchronous operations. The `run()` call may be kept running by creating an object of type asio::executor\_work\_guard<io\_context::executor\_type>:
+
+
+
+   asio::io_context io_context;
+   asio::executor_work_guard<asio::io_context::executor_type>
+     = asio::make_work_guard(io_context);
+   ... 
+
+
+
+
+To effect a shutdown, the application will then need to call the [link asio.reference.io_context `io_context`] object's `stop()` member function. This will cause the [link asio.reference.io_context `io_context`] `run()` call to return as soon as possible, abandoning unfinished operations and without permitting ready handlers to be dispatched.
+
+Alternatively, if the application requires that all operations and handlers be allowed to finish normally, the work object may be explicitly reset.
+
+
+
+   asio::io_context io_context;
+   asio::executor_work_guard<asio::io_context::executor_type>
+     = asio::make_work_guard(io_context);
+   ...
+   work.reset(); // Allow run() to exit. 
+
+
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/io_service.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
 [section:ip__address ip::address]
 
 
@@ -73038,7 +62746,7 @@
 
 [section:address ip::address::address]
 
-[indexterm2 address..ip::address] 
+[indexterm2 asio.indexterm.ip__address.address..address..ip::address] 
 Default constructor. 
 
 
@@ -73132,7 +62840,7 @@
 
 [section:from_string ip::address::from_string]
 
-[indexterm2 from_string..ip::address] 
+[indexterm2 asio.indexterm.ip__address.from_string..from_string..ip::address] 
 (Deprecated: Use `make_address()`.) Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation. 
 
 
@@ -73221,7 +62929,7 @@
 
 [section:is_loopback ip::address::is_loopback]
 
-[indexterm2 is_loopback..ip::address] 
+[indexterm2 asio.indexterm.ip__address.is_loopback..is_loopback..ip::address] 
 Determine whether the address is a loopback address. 
 
 
@@ -73235,7 +62943,7 @@
 
 [section:is_multicast ip::address::is_multicast]
 
-[indexterm2 is_multicast..ip::address] 
+[indexterm2 asio.indexterm.ip__address.is_multicast..is_multicast..ip::address] 
 Determine whether the address is a multicast address. 
 
 
@@ -73249,7 +62957,7 @@
 
 [section:is_unspecified ip::address::is_unspecified]
 
-[indexterm2 is_unspecified..ip::address] 
+[indexterm2 asio.indexterm.ip__address.is_unspecified..is_unspecified..ip::address] 
 Determine whether the address is unspecified. 
 
 
@@ -73263,7 +62971,7 @@
 
 [section:is_v4 ip::address::is_v4]
 
-[indexterm2 is_v4..ip::address] 
+[indexterm2 asio.indexterm.ip__address.is_v4..is_v4..ip::address] 
 Get whether the address is an IP version 4 address. 
 
 
@@ -73277,7 +62985,7 @@
 
 [section:is_v6 ip::address::is_v6]
 
-[indexterm2 is_v6..ip::address] 
+[indexterm2 asio.indexterm.ip__address.is_v6..is_v6..ip::address] 
 Get whether the address is an IP version 6 address. 
 
 
@@ -73290,7 +62998,7 @@
 
 [section:make_address ip::address::make_address]
 
-[indexterm2 make_address..ip::address] 
+[indexterm2 asio.indexterm.ip__address.make_address..make_address..ip::address] 
 Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation. 
 
 
@@ -73312,8 +63020,17 @@
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ip__address.make_address.overload4 more...]]``
 
+  address ``[link asio.reference.ip__address.make_address.overload5 make_address]``(
+      string_view str);
+  ``  [''''&raquo;''' [link asio.reference.ip__address.make_address.overload5 more...]]``
 
-[section:overload1 ip::address::make_address (1 of 4 overloads)]
+  address ``[link asio.reference.ip__address.make_address.overload6 make_address]``(
+      string_view str,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.ip__address.make_address.overload6 more...]]``
+
+
+[section:overload1 ip::address::make_address (1 of 6 overloads)]
 
 
 Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation. 
@@ -73328,7 +63045,7 @@
 
 
 
-[section:overload2 ip::address::make_address (2 of 4 overloads)]
+[section:overload2 ip::address::make_address (2 of 6 overloads)]
 
 
 Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation. 
@@ -73344,7 +63061,7 @@
 
 
 
-[section:overload3 ip::address::make_address (3 of 4 overloads)]
+[section:overload3 ip::address::make_address (3 of 6 overloads)]
 
 
 Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation. 
@@ -73359,7 +63076,7 @@
 
 
 
-[section:overload4 ip::address::make_address (4 of 4 overloads)]
+[section:overload4 ip::address::make_address (4 of 6 overloads)]
 
 
 Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation. 
@@ -73374,12 +63091,43 @@
 [endsect]
 
 
+
+[section:overload5 ip::address::make_address (5 of 6 overloads)]
+
+
+Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation. 
+
+
+  address make_address(
+      string_view str);
+
+
+
+[endsect]
+
+
+
+[section:overload6 ip::address::make_address (6 of 6 overloads)]
+
+
+Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation. 
+
+
+  address make_address(
+      string_view str,
+      asio::error_code & ec);
+
+
+
+[endsect]
+
+
 [endsect]
 
 
 [section:operator_not__eq_ ip::address::operator!=]
 
-[indexterm2 operator!=..ip::address] 
+[indexterm2 asio.indexterm.ip__address.operator_not__eq_..operator!=..ip::address] 
 Compare two addresses for inequality. 
 
 
@@ -73401,7 +63149,7 @@
 
 [section:operator_lt_ ip::address::operator<]
 
-[indexterm2 operator<..ip::address] 
+[indexterm2 asio.indexterm.ip__address.operator_lt_..operator<..ip::address] 
 Compare addresses for ordering. 
 
 
@@ -73423,7 +63171,7 @@
 
 [section:operator_lt__lt_ ip::address::operator<<]
 
-[indexterm2 operator<<..ip::address] 
+[indexterm2 asio.indexterm.ip__address.operator_lt__lt_..operator<<..ip::address] 
 Output an address as a string. 
 
 
@@ -73463,7 +63211,7 @@
 
 [section:operator_lt__eq_ ip::address::operator<=]
 
-[indexterm2 operator<=..ip::address] 
+[indexterm2 asio.indexterm.ip__address.operator_lt__eq_..operator<=..ip::address] 
 Compare addresses for ordering. 
 
 
@@ -73484,7 +63232,7 @@
 
 [section:operator_eq_ ip::address::operator=]
 
-[indexterm2 operator=..ip::address] 
+[indexterm2 asio.indexterm.ip__address.operator_eq_..operator=..ip::address] 
 Assign from another address. 
 
 
@@ -73558,7 +63306,7 @@
 
 [section:operator_eq__eq_ ip::address::operator==]
 
-[indexterm2 operator==..ip::address] 
+[indexterm2 asio.indexterm.ip__address.operator_eq__eq_..operator==..ip::address] 
 Compare two addresses for equality. 
 
 
@@ -73580,7 +63328,7 @@
 
 [section:operator_gt_ ip::address::operator>]
 
-[indexterm2 operator>..ip::address] 
+[indexterm2 asio.indexterm.ip__address.operator_gt_..operator>..ip::address] 
 Compare addresses for ordering. 
 
 
@@ -73602,7 +63350,7 @@
 
 [section:operator_gt__eq_ ip::address::operator>=]
 
-[indexterm2 operator>=..ip::address] 
+[indexterm2 asio.indexterm.ip__address.operator_gt__eq_..operator>=..ip::address] 
 Compare addresses for ordering. 
 
 
@@ -73623,7 +63371,7 @@
 
 [section:to_string ip::address::to_string]
 
-[indexterm2 to_string..ip::address] 
+[indexterm2 asio.indexterm.ip__address.to_string..to_string..ip::address] 
 Get the address as a string. 
 
 
@@ -73672,7 +63420,7 @@
 
 [section:to_v4 ip::address::to_v4]
 
-[indexterm2 to_v4..ip::address] 
+[indexterm2 asio.indexterm.ip__address.to_v4..to_v4..ip::address] 
 Get the address as an IP version 4 address. 
 
 
@@ -73686,7 +63434,7 @@
 
 [section:to_v6 ip::address::to_v6]
 
-[indexterm2 to_v6..ip::address] 
+[indexterm2 asio.indexterm.ip__address.to_v6..to_v6..ip::address] 
 Get the address as an IP version 6 address. 
 
 
@@ -73916,7 +63664,7 @@
 
 [section:address_v4 ip::address_v4::address_v4]
 
-[indexterm2 address_v4..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.address_v4..address_v4..ip::address_v4] 
 Default constructor. 
 
 
@@ -74011,7 +63759,7 @@
 
 [section:any ip::address_v4::any]
 
-[indexterm2 any..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.any..any..ip::address_v4] 
 Obtain an address object that represents any address. 
 
 
@@ -74024,7 +63772,7 @@
 
 [section:broadcast ip::address_v4::broadcast]
 
-[indexterm2 broadcast..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.broadcast..broadcast..ip::address_v4] 
 Obtain an address object that represents the broadcast address. 
 
 
@@ -74075,7 +63823,7 @@
 
 [section:bytes_type ip::address_v4::bytes_type]
 
-[indexterm2 bytes_type..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.bytes_type..bytes_type..ip::address_v4] 
 The type used to represent an address as an array of bytes. 
 
 
@@ -74102,7 +63850,7 @@
 
 [section:from_string ip::address_v4::from_string]
 
-[indexterm2 from_string..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.from_string..from_string..ip::address_v4] 
 (Deprecated: Use `make_address_v4()`.) Create an address from an IP address string in dotted decimal form. 
 
 
@@ -74191,7 +63939,7 @@
 
 [section:is_class_a ip::address_v4::is_class_a]
 
-[indexterm2 is_class_a..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.is_class_a..is_class_a..ip::address_v4] 
 (Deprecated: Use [link asio.reference.ip__network_v4 `ip::network_v4`] class.) Determine whether the address is a class A address. 
 
 
@@ -74205,7 +63953,7 @@
 
 [section:is_class_b ip::address_v4::is_class_b]
 
-[indexterm2 is_class_b..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.is_class_b..is_class_b..ip::address_v4] 
 (Deprecated: Use [link asio.reference.ip__network_v4 `ip::network_v4`] class.) Determine whether the address is a class B address. 
 
 
@@ -74219,7 +63967,7 @@
 
 [section:is_class_c ip::address_v4::is_class_c]
 
-[indexterm2 is_class_c..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.is_class_c..is_class_c..ip::address_v4] 
 (Deprecated: Use [link asio.reference.ip__network_v4 `ip::network_v4`] class.) Determine whether the address is a class C address. 
 
 
@@ -74233,7 +63981,7 @@
 
 [section:is_loopback ip::address_v4::is_loopback]
 
-[indexterm2 is_loopback..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.is_loopback..is_loopback..ip::address_v4] 
 Determine whether the address is a loopback address. 
 
 
@@ -74247,7 +63995,7 @@
 
 [section:is_multicast ip::address_v4::is_multicast]
 
-[indexterm2 is_multicast..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.is_multicast..is_multicast..ip::address_v4] 
 Determine whether the address is a multicast address. 
 
 
@@ -74261,7 +64009,7 @@
 
 [section:is_unspecified ip::address_v4::is_unspecified]
 
-[indexterm2 is_unspecified..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.is_unspecified..is_unspecified..ip::address_v4] 
 Determine whether the address is unspecified. 
 
 
@@ -74275,7 +64023,7 @@
 
 [section:loopback ip::address_v4::loopback]
 
-[indexterm2 loopback..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.loopback..loopback..ip::address_v4] 
 Obtain an address object that represents the loopback address. 
 
 
@@ -74288,7 +64036,7 @@
 
 [section:make_address_v4 ip::address_v4::make_address_v4]
 
-[indexterm2 make_address_v4..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.make_address_v4..make_address_v4..ip::address_v4] 
 Create an IPv4 address from raw bytes in network order. 
 
 
@@ -74326,17 +64074,26 @@
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload6 more...]]``
 
+  address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload7 make_address_v4]``(
+      string_view str);
+  ``  [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload7 more...]]``
+
+  address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload8 make_address_v4]``(
+      string_view str,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload8 more...]]``
+
 
 Create an IPv4 address from a IPv4-mapped IPv6 address. 
 
 
-  address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload7 make_address_v4]``(
+  address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload9 make_address_v4]``(
       v4_mapped_t ,
       const address_v6 & v6_addr);
-  ``  [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload7 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload9 more...]]``
 
 
-[section:overload1 ip::address_v4::make_address_v4 (1 of 7 overloads)]
+[section:overload1 ip::address_v4::make_address_v4 (1 of 9 overloads)]
 
 
 Create an IPv4 address from raw bytes in network order. 
@@ -74351,7 +64108,7 @@
 
 
 
-[section:overload2 ip::address_v4::make_address_v4 (2 of 7 overloads)]
+[section:overload2 ip::address_v4::make_address_v4 (2 of 9 overloads)]
 
 
 Create an IPv4 address from an unsigned integer in host byte order. 
@@ -74366,7 +64123,7 @@
 
 
 
-[section:overload3 ip::address_v4::make_address_v4 (3 of 7 overloads)]
+[section:overload3 ip::address_v4::make_address_v4 (3 of 9 overloads)]
 
 
 Create an IPv4 address from an IP address string in dotted decimal form. 
@@ -74381,7 +64138,7 @@
 
 
 
-[section:overload4 ip::address_v4::make_address_v4 (4 of 7 overloads)]
+[section:overload4 ip::address_v4::make_address_v4 (4 of 9 overloads)]
 
 
 Create an IPv4 address from an IP address string in dotted decimal form. 
@@ -74397,7 +64154,7 @@
 
 
 
-[section:overload5 ip::address_v4::make_address_v4 (5 of 7 overloads)]
+[section:overload5 ip::address_v4::make_address_v4 (5 of 9 overloads)]
 
 
 Create an IPv4 address from an IP address string in dotted decimal form. 
@@ -74412,7 +64169,7 @@
 
 
 
-[section:overload6 ip::address_v4::make_address_v4 (6 of 7 overloads)]
+[section:overload6 ip::address_v4::make_address_v4 (6 of 9 overloads)]
 
 
 Create an IPv4 address from an IP address string in dotted decimal form. 
@@ -74428,7 +64185,38 @@
 
 
 
-[section:overload7 ip::address_v4::make_address_v4 (7 of 7 overloads)]
+[section:overload7 ip::address_v4::make_address_v4 (7 of 9 overloads)]
+
+
+Create an IPv4 address from an IP address string in dotted decimal form. 
+
+
+  address_v4 make_address_v4(
+      string_view str);
+
+
+
+[endsect]
+
+
+
+[section:overload8 ip::address_v4::make_address_v4 (8 of 9 overloads)]
+
+
+Create an IPv4 address from an IP address string in dotted decimal form. 
+
+
+  address_v4 make_address_v4(
+      string_view str,
+      asio::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload9 ip::address_v4::make_address_v4 (9 of 9 overloads)]
 
 
 Create an IPv4 address from a IPv4-mapped IPv6 address. 
@@ -74447,7 +64235,7 @@
 
 [section:make_network_v4 ip::address_v4::make_network_v4]
 
-[indexterm2 make_network_v4..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.make_network_v4..make_network_v4..ip::address_v4] 
 Create an IPv4 network from an address and prefix length. 
 
 
@@ -74502,7 +64290,7 @@
 
 [section:netmask ip::address_v4::netmask]
 
-[indexterm2 netmask..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.netmask..netmask..ip::address_v4] 
 (Deprecated: Use [link asio.reference.ip__network_v4 `ip::network_v4`] class.) Obtain the netmask that corresponds to the address, based on its address class. 
 
 
@@ -74517,7 +64305,7 @@
 
 [section:operator_not__eq_ ip::address_v4::operator!=]
 
-[indexterm2 operator!=..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.operator_not__eq_..operator!=..ip::address_v4] 
 Compare two addresses for inequality. 
 
 
@@ -74539,7 +64327,7 @@
 
 [section:operator_lt_ ip::address_v4::operator<]
 
-[indexterm2 operator<..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.operator_lt_..operator<..ip::address_v4] 
 Compare addresses for ordering. 
 
 
@@ -74560,7 +64348,7 @@
 
 [section:operator_lt__lt_ ip::address_v4::operator<<]
 
-[indexterm2 operator<<..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.operator_lt__lt_..operator<<..ip::address_v4] 
 Output an address as a string. 
 
 
@@ -74669,7 +64457,7 @@
 
 [section:operator_lt__eq_ ip::address_v4::operator<=]
 
-[indexterm2 operator<=..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.operator_lt__eq_..operator<=..ip::address_v4] 
 Compare addresses for ordering. 
 
 
@@ -74691,7 +64479,7 @@
 
 [section:operator_eq_ ip::address_v4::operator=]
 
-[indexterm2 operator=..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.operator_eq_..operator=..ip::address_v4] 
 Assign from another address. 
 
 
@@ -74706,7 +64494,7 @@
 
 [section:operator_eq__eq_ ip::address_v4::operator==]
 
-[indexterm2 operator==..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.operator_eq__eq_..operator==..ip::address_v4] 
 Compare two addresses for equality. 
 
 
@@ -74728,7 +64516,7 @@
 
 [section:operator_gt_ ip::address_v4::operator>]
 
-[indexterm2 operator>..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.operator_gt_..operator>..ip::address_v4] 
 Compare addresses for ordering. 
 
 
@@ -74750,7 +64538,7 @@
 
 [section:operator_gt__eq_ ip::address_v4::operator>=]
 
-[indexterm2 operator>=..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.operator_gt__eq_..operator>=..ip::address_v4] 
 Compare addresses for ordering. 
 
 
@@ -74772,7 +64560,7 @@
 
 [section:to_bytes ip::address_v4::to_bytes]
 
-[indexterm2 to_bytes..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.to_bytes..to_bytes..ip::address_v4] 
 Get the address in bytes, in network byte order. 
 
 
@@ -74785,7 +64573,7 @@
 
 [section:to_string ip::address_v4::to_string]
 
-[indexterm2 to_string..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.to_string..to_string..ip::address_v4] 
 Get the address as a string in dotted decimal format. 
 
 
@@ -74834,7 +64622,7 @@
 
 [section:to_uint ip::address_v4::to_uint]
 
-[indexterm2 to_uint..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.to_uint..to_uint..ip::address_v4] 
 Get the address as an unsigned integer in host byte order. 
 
 
@@ -74848,7 +64636,7 @@
 
 [section:to_ulong ip::address_v4::to_ulong]
 
-[indexterm2 to_ulong..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.to_ulong..to_ulong..ip::address_v4] 
 Get the address as an unsigned long in host byte order. 
 
 
@@ -74862,7 +64650,7 @@
 
 [section:uint_type ip::address_v4::uint_type]
 
-[indexterm2 uint_type..ip::address_v4] 
+[indexterm2 asio.indexterm.ip__address_v4.uint_type..uint_type..ip::address_v4] 
 The type used to represent an address as an unsigned integer. 
 
 
@@ -74886,7 +64674,7 @@
 
 [section:ip__address_v4_iterator ip::address_v4_iterator]
 
-[indexterm1 ip::address_v4_iterator] 
+[indexterm1 asio.indexterm.ip__address_v4_iterator..ip::address_v4_iterator] 
 An input iterator that can be used for traversing IPv4 addresses. 
 
 
@@ -75106,7 +64894,7 @@
 
 [section:ip__address_v4_range ip::address_v4_range]
 
-[indexterm1 ip::address_v4_range] 
+[indexterm1 asio.indexterm.ip__address_v4_range..ip::address_v4_range] 
 Represents a range of IPv4 addresses. 
 
 
@@ -75556,7 +65344,7 @@
 
 [section:address_v6 ip::address_v6::address_v6]
 
-[indexterm2 address_v6..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.address_v6..address_v6..ip::address_v6] 
 Default constructor. 
 
 
@@ -75630,7 +65418,7 @@
 
 [section:any ip::address_v6::any]
 
-[indexterm2 any..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.any..any..ip::address_v6] 
 Obtain an address object that represents any address. 
 
 
@@ -75644,7 +65432,7 @@
 
 [section:bytes_type ip::address_v6::bytes_type]
 
-[indexterm2 bytes_type..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.bytes_type..bytes_type..ip::address_v6] 
 The type used to represent an address as an array of bytes. 
 
 
@@ -75671,7 +65459,7 @@
 
 [section:from_string ip::address_v6::from_string]
 
-[indexterm2 from_string..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.from_string..from_string..ip::address_v6] 
 (Deprecated: Use `make_address_v6()`.) Create an IPv6 address from an IP address string. 
 
 
@@ -75760,7 +65548,7 @@
 
 [section:is_link_local ip::address_v6::is_link_local]
 
-[indexterm2 is_link_local..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.is_link_local..is_link_local..ip::address_v6] 
 Determine whether the address is link local. 
 
 
@@ -75774,7 +65562,7 @@
 
 [section:is_loopback ip::address_v6::is_loopback]
 
-[indexterm2 is_loopback..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.is_loopback..is_loopback..ip::address_v6] 
 Determine whether the address is a loopback address. 
 
 
@@ -75788,7 +65576,7 @@
 
 [section:is_multicast ip::address_v6::is_multicast]
 
-[indexterm2 is_multicast..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.is_multicast..is_multicast..ip::address_v6] 
 Determine whether the address is a multicast address. 
 
 
@@ -75802,7 +65590,7 @@
 
 [section:is_multicast_global ip::address_v6::is_multicast_global]
 
-[indexterm2 is_multicast_global..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.is_multicast_global..is_multicast_global..ip::address_v6] 
 Determine whether the address is a global multicast address. 
 
 
@@ -75816,7 +65604,7 @@
 
 [section:is_multicast_link_local ip::address_v6::is_multicast_link_local]
 
-[indexterm2 is_multicast_link_local..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.is_multicast_link_local..is_multicast_link_local..ip::address_v6] 
 Determine whether the address is a link-local multicast address. 
 
 
@@ -75830,7 +65618,7 @@
 
 [section:is_multicast_node_local ip::address_v6::is_multicast_node_local]
 
-[indexterm2 is_multicast_node_local..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.is_multicast_node_local..is_multicast_node_local..ip::address_v6] 
 Determine whether the address is a node-local multicast address. 
 
 
@@ -75844,7 +65632,7 @@
 
 [section:is_multicast_org_local ip::address_v6::is_multicast_org_local]
 
-[indexterm2 is_multicast_org_local..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.is_multicast_org_local..is_multicast_org_local..ip::address_v6] 
 Determine whether the address is a org-local multicast address. 
 
 
@@ -75858,7 +65646,7 @@
 
 [section:is_multicast_site_local ip::address_v6::is_multicast_site_local]
 
-[indexterm2 is_multicast_site_local..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.is_multicast_site_local..is_multicast_site_local..ip::address_v6] 
 Determine whether the address is a site-local multicast address. 
 
 
@@ -75872,7 +65660,7 @@
 
 [section:is_site_local ip::address_v6::is_site_local]
 
-[indexterm2 is_site_local..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.is_site_local..is_site_local..ip::address_v6] 
 Determine whether the address is site local. 
 
 
@@ -75886,7 +65674,7 @@
 
 [section:is_unspecified ip::address_v6::is_unspecified]
 
-[indexterm2 is_unspecified..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.is_unspecified..is_unspecified..ip::address_v6] 
 Determine whether the address is unspecified. 
 
 
@@ -75900,7 +65688,7 @@
 
 [section:is_v4_compatible ip::address_v6::is_v4_compatible]
 
-[indexterm2 is_v4_compatible..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.is_v4_compatible..is_v4_compatible..ip::address_v6] 
 (Deprecated: No replacement.) Determine whether the address is an IPv4-compatible address. 
 
 
@@ -75914,7 +65702,7 @@
 
 [section:is_v4_mapped ip::address_v6::is_v4_mapped]
 
-[indexterm2 is_v4_mapped..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.is_v4_mapped..is_v4_mapped..ip::address_v6] 
 Determine whether the address is a mapped IPv4 address. 
 
 
@@ -75928,7 +65716,7 @@
 
 [section:loopback ip::address_v6::loopback]
 
-[indexterm2 loopback..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.loopback..loopback..ip::address_v6] 
 Obtain an address object that represents the loopback address. 
 
 
@@ -75941,7 +65729,7 @@
 
 [section:make_address_v6 ip::address_v6::make_address_v6]
 
-[indexterm2 make_address_v6..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.make_address_v6..make_address_v6..ip::address_v6] 
 Create an IPv6 address from raw bytes and scope ID. 
 
 
@@ -75976,17 +65764,26 @@
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload5 more...]]``
 
+  address_v6 ``[link asio.reference.ip__address_v6.make_address_v6.overload6 make_address_v6]``(
+      string_view str);
+  ``  [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload6 more...]]``
+
+  address_v6 ``[link asio.reference.ip__address_v6.make_address_v6.overload7 make_address_v6]``(
+      string_view str,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload7 more...]]``
+
 
 Create an IPv4-mapped IPv6 address from an IPv4 address. 
 
 
-  address_v6 ``[link asio.reference.ip__address_v6.make_address_v6.overload6 make_address_v6]``(
+  address_v6 ``[link asio.reference.ip__address_v6.make_address_v6.overload8 make_address_v6]``(
       v4_mapped_t ,
       const address_v4 & v4_addr);
-  ``  [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload6 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload8 more...]]``
 
 
-[section:overload1 ip::address_v6::make_address_v6 (1 of 6 overloads)]
+[section:overload1 ip::address_v6::make_address_v6 (1 of 8 overloads)]
 
 
 Create an IPv6 address from raw bytes and scope ID. 
@@ -76002,7 +65799,7 @@
 
 
 
-[section:overload2 ip::address_v6::make_address_v6 (2 of 6 overloads)]
+[section:overload2 ip::address_v6::make_address_v6 (2 of 8 overloads)]
 
 
 Create an IPv6 address from an IP address string. 
@@ -76017,7 +65814,7 @@
 
 
 
-[section:overload3 ip::address_v6::make_address_v6 (3 of 6 overloads)]
+[section:overload3 ip::address_v6::make_address_v6 (3 of 8 overloads)]
 
 
 Create an IPv6 address from an IP address string. 
@@ -76033,7 +65830,7 @@
 
 
 
-[section:overload4 ip::address_v6::make_address_v6 (4 of 6 overloads)]
+[section:overload4 ip::address_v6::make_address_v6 (4 of 8 overloads)]
 
 
 Createan IPv6 address from an IP address string. 
@@ -76048,7 +65845,7 @@
 
 
 
-[section:overload5 ip::address_v6::make_address_v6 (5 of 6 overloads)]
+[section:overload5 ip::address_v6::make_address_v6 (5 of 8 overloads)]
 
 
 Create an IPv6 address from an IP address string. 
@@ -76064,7 +65861,38 @@
 
 
 
-[section:overload6 ip::address_v6::make_address_v6 (6 of 6 overloads)]
+[section:overload6 ip::address_v6::make_address_v6 (6 of 8 overloads)]
+
+
+Create an IPv6 address from an IP address string. 
+
+
+  address_v6 make_address_v6(
+      string_view str);
+
+
+
+[endsect]
+
+
+
+[section:overload7 ip::address_v6::make_address_v6 (7 of 8 overloads)]
+
+
+Create an IPv6 address from an IP address string. 
+
+
+  address_v6 make_address_v6(
+      string_view str,
+      asio::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload8 ip::address_v6::make_address_v6 (8 of 8 overloads)]
 
 
 Create an IPv4-mapped IPv6 address from an IPv4 address. 
@@ -76084,7 +65912,7 @@
 
 [section:make_network_v6 ip::address_v6::make_network_v6]
 
-[indexterm2 make_network_v6..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.make_network_v6..make_network_v6..ip::address_v6] 
 Create an IPv6 network from an address and prefix length. 
 
 
@@ -76100,7 +65928,7 @@
 
 [section:operator_not__eq_ ip::address_v6::operator!=]
 
-[indexterm2 operator!=..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.operator_not__eq_..operator!=..ip::address_v6] 
 Compare two addresses for inequality. 
 
 
@@ -76122,7 +65950,7 @@
 
 [section:operator_lt_ ip::address_v6::operator<]
 
-[indexterm2 operator<..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.operator_lt_..operator<..ip::address_v6] 
 Compare addresses for ordering. 
 
 
@@ -76143,7 +65971,7 @@
 
 [section:operator_lt__lt_ ip::address_v6::operator<<]
 
-[indexterm2 operator<<..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.operator_lt__lt_..operator<<..ip::address_v6] 
 Output an address as a string. 
 
 
@@ -76252,7 +66080,7 @@
 
 [section:operator_lt__eq_ ip::address_v6::operator<=]
 
-[indexterm2 operator<=..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.operator_lt__eq_..operator<=..ip::address_v6] 
 Compare addresses for ordering. 
 
 
@@ -76274,7 +66102,7 @@
 
 [section:operator_eq_ ip::address_v6::operator=]
 
-[indexterm2 operator=..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.operator_eq_..operator=..ip::address_v6] 
 Assign from another address. 
 
 
@@ -76289,7 +66117,7 @@
 
 [section:operator_eq__eq_ ip::address_v6::operator==]
 
-[indexterm2 operator==..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.operator_eq__eq_..operator==..ip::address_v6] 
 Compare two addresses for equality. 
 
 
@@ -76311,7 +66139,7 @@
 
 [section:operator_gt_ ip::address_v6::operator>]
 
-[indexterm2 operator>..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.operator_gt_..operator>..ip::address_v6] 
 Compare addresses for ordering. 
 
 
@@ -76333,7 +66161,7 @@
 
 [section:operator_gt__eq_ ip::address_v6::operator>=]
 
-[indexterm2 operator>=..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.operator_gt__eq_..operator>=..ip::address_v6] 
 Compare addresses for ordering. 
 
 
@@ -76354,7 +66182,7 @@
 
 [section:scope_id ip::address_v6::scope_id]
 
-[indexterm2 scope_id..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.scope_id..scope_id..ip::address_v6] 
 The scope ID of the address. 
 
 
@@ -76403,7 +66231,7 @@
 
 [section:to_bytes ip::address_v6::to_bytes]
 
-[indexterm2 to_bytes..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.to_bytes..to_bytes..ip::address_v6] 
 Get the address in bytes, in network byte order. 
 
 
@@ -76416,7 +66244,7 @@
 
 [section:to_string ip::address_v6::to_string]
 
-[indexterm2 to_string..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.to_string..to_string..ip::address_v6] 
 Get the address as a string. 
 
 
@@ -76465,7 +66293,7 @@
 
 [section:to_v4 ip::address_v6::to_v4]
 
-[indexterm2 to_v4..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.to_v4..to_v4..ip::address_v6] 
 (Deprecated: Use `make_address_v4()`.) Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address. 
 
 
@@ -76479,7 +66307,7 @@
 
 [section:v4_compatible ip::address_v6::v4_compatible]
 
-[indexterm2 v4_compatible..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.v4_compatible..v4_compatible..ip::address_v6] 
 (Deprecated: No replacement.) Create an IPv4-compatible IPv6 address. 
 
 
@@ -76494,7 +66322,7 @@
 
 [section:v4_mapped ip::address_v6::v4_mapped]
 
-[indexterm2 v4_mapped..ip::address_v6] 
+[indexterm2 asio.indexterm.ip__address_v6.v4_mapped..v4_mapped..ip::address_v6] 
 (Deprecated: Use `make_address_v6()`.) Create an IPv4-mapped IPv6 address. 
 
 
@@ -76512,7 +66340,7 @@
 
 [section:ip__address_v6_iterator ip::address_v6_iterator]
 
-[indexterm1 ip::address_v6_iterator] 
+[indexterm1 asio.indexterm.ip__address_v6_iterator..ip::address_v6_iterator] 
 An input iterator that can be used for traversing IPv6 addresses. 
 
 
@@ -76749,7 +66577,7 @@
 
 [section:ip__address_v6_range ip::address_v6_range]
 
-[indexterm1 ip::address_v6_range] 
+[indexterm1 asio.indexterm.ip__address_v6_range..ip::address_v6_range] 
 Represents a range of IPv6 addresses. 
 
 
@@ -77022,7 +66850,7 @@
 
 [section:bad_address_cast ip::bad_address_cast::bad_address_cast]
 
-[indexterm2 bad_address_cast..ip::bad_address_cast] 
+[indexterm2 asio.indexterm.ip__bad_address_cast.bad_address_cast..bad_address_cast..ip::bad_address_cast] 
 Default constructor. 
 
 
@@ -77036,7 +66864,7 @@
 
 [section:what ip::bad_address_cast::what]
 
-[indexterm2 what..ip::bad_address_cast] 
+[indexterm2 asio.indexterm.ip__bad_address_cast.what..what..ip::bad_address_cast] 
 Get the message associated with the exception. 
 
 
@@ -77050,7 +66878,7 @@
 
 [section:_bad_address_cast ip::bad_address_cast::~bad_address_cast]
 
-[indexterm2 ~bad_address_cast..ip::bad_address_cast] 
+[indexterm2 asio.indexterm.ip__bad_address_cast._bad_address_cast..~bad_address_cast..ip::bad_address_cast] 
 Destructor. 
 
 
@@ -77192,7 +67020,7 @@
 
 [section:basic_address_iterator ip::basic_address_iterator< address_v4 >::basic_address_iterator]
 
-[indexterm2 basic_address_iterator..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.basic_address_iterator..basic_address_iterator..ip::basic_address_iterator< address_v4 >] 
 Construct an iterator that points to the specified address. 
 
 
@@ -77243,7 +67071,7 @@
 
 [section:difference_type ip::basic_address_iterator< address_v4 >::difference_type]
 
-[indexterm2 difference_type..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.difference_type..difference_type..ip::basic_address_iterator< address_v4 >] 
 Distance between two iterators. 
 
 
@@ -77264,7 +67092,7 @@
 
 [section:iterator_category ip::basic_address_iterator< address_v4 >::iterator_category]
 
-[indexterm2 iterator_category..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.iterator_category..iterator_category..ip::basic_address_iterator< address_v4 >] 
 Denotes that the iterator satisfies the input iterator requirements. 
 
 
@@ -77285,7 +67113,7 @@
 
 [section:operator__star_ ip::basic_address_iterator< address_v4 >::operator *]
 
-[indexterm2 operator *..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator__star_..operator *..ip::basic_address_iterator< address_v4 >] 
 Dereference the iterator. 
 
 
@@ -77299,7 +67127,7 @@
 
 [section:operator_not__eq_ ip::basic_address_iterator< address_v4 >::operator!=]
 
-[indexterm2 operator!=..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator_not__eq_..operator!=..ip::basic_address_iterator< address_v4 >] 
 Compare two addresses for inequality. 
 
 
@@ -77320,7 +67148,7 @@
 
 [section:operator_plus__plus_ ip::basic_address_iterator< address_v4 >::operator++]
 
-[indexterm2 operator++..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator_plus__plus_..operator++..ip::basic_address_iterator< address_v4 >] 
 Pre-increment operator. 
 
 
@@ -77368,7 +67196,7 @@
 
 [section:operator_minus__minus_ ip::basic_address_iterator< address_v4 >::operator--]
 
-[indexterm2 operator--..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator_minus__minus_..operator--..ip::basic_address_iterator< address_v4 >] 
 Pre-decrement operator. 
 
 
@@ -77417,7 +67245,7 @@
 
 [section:operator_arrow_ ip::basic_address_iterator< address_v4 >::operator->]
 
-[indexterm2 operator->..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator_arrow_..operator->..ip::basic_address_iterator< address_v4 >] 
 Dereference the iterator. 
 
 
@@ -77431,7 +67259,7 @@
 
 [section:operator_eq_ ip::basic_address_iterator< address_v4 >::operator=]
 
-[indexterm2 operator=..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator_eq_..operator=..ip::basic_address_iterator< address_v4 >] 
 Assignment operator. 
 
 
@@ -77446,7 +67274,7 @@
 
 [section:operator_eq__eq_ ip::basic_address_iterator< address_v4 >::operator==]
 
-[indexterm2 operator==..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator_eq__eq_..operator==..ip::basic_address_iterator< address_v4 >] 
 Compare two addresses for equality. 
 
 
@@ -77468,7 +67296,7 @@
 
 [section:pointer ip::basic_address_iterator< address_v4 >::pointer]
 
-[indexterm2 pointer..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.pointer..pointer..ip::basic_address_iterator< address_v4 >] 
 The type of a pointer to an element pointed to by the iterator. 
 
 
@@ -77489,7 +67317,7 @@
 
 [section:reference ip::basic_address_iterator< address_v4 >::reference]
 
-[indexterm2 reference..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.reference..reference..ip::basic_address_iterator< address_v4 >] 
 The type of a reference to an element pointed to by the iterator. 
 
 
@@ -77709,7 +67537,7 @@
 
 [section:value_type ip::basic_address_iterator< address_v4 >::value_type]
 
-[indexterm2 value_type..ip::basic_address_iterator< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.value_type..value_type..ip::basic_address_iterator< address_v4 >] 
 The type of the elements pointed to by the iterator. 
 
 
@@ -78057,7 +67885,7 @@
 
 [section:basic_address_iterator ip::basic_address_iterator< address_v6 >::basic_address_iterator]
 
-[indexterm2 basic_address_iterator..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.basic_address_iterator..basic_address_iterator..ip::basic_address_iterator< address_v6 >] 
 Construct an iterator that points to the specified address. 
 
 
@@ -78108,7 +67936,7 @@
 
 [section:difference_type ip::basic_address_iterator< address_v6 >::difference_type]
 
-[indexterm2 difference_type..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.difference_type..difference_type..ip::basic_address_iterator< address_v6 >] 
 Distance between two iterators. 
 
 
@@ -78129,7 +67957,7 @@
 
 [section:iterator_category ip::basic_address_iterator< address_v6 >::iterator_category]
 
-[indexterm2 iterator_category..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.iterator_category..iterator_category..ip::basic_address_iterator< address_v6 >] 
 Denotes that the iterator satisfies the input iterator requirements. 
 
 
@@ -78150,7 +67978,7 @@
 
 [section:operator__star_ ip::basic_address_iterator< address_v6 >::operator *]
 
-[indexterm2 operator *..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator__star_..operator *..ip::basic_address_iterator< address_v6 >] 
 Dereference the iterator. 
 
 
@@ -78164,7 +67992,7 @@
 
 [section:operator_not__eq_ ip::basic_address_iterator< address_v6 >::operator!=]
 
-[indexterm2 operator!=..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator_not__eq_..operator!=..ip::basic_address_iterator< address_v6 >] 
 Compare two addresses for inequality. 
 
 
@@ -78185,7 +68013,7 @@
 
 [section:operator_plus__plus_ ip::basic_address_iterator< address_v6 >::operator++]
 
-[indexterm2 operator++..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator_plus__plus_..operator++..ip::basic_address_iterator< address_v6 >] 
 Pre-increment operator. 
 
 
@@ -78233,7 +68061,7 @@
 
 [section:operator_minus__minus_ ip::basic_address_iterator< address_v6 >::operator--]
 
-[indexterm2 operator--..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator_minus__minus_..operator--..ip::basic_address_iterator< address_v6 >] 
 Pre-decrement operator. 
 
 
@@ -78282,7 +68110,7 @@
 
 [section:operator_arrow_ ip::basic_address_iterator< address_v6 >::operator->]
 
-[indexterm2 operator->..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator_arrow_..operator->..ip::basic_address_iterator< address_v6 >] 
 Dereference the iterator. 
 
 
@@ -78296,7 +68124,7 @@
 
 [section:operator_eq_ ip::basic_address_iterator< address_v6 >::operator=]
 
-[indexterm2 operator=..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator_eq_..operator=..ip::basic_address_iterator< address_v6 >] 
 Assignment operator. 
 
 
@@ -78311,7 +68139,7 @@
 
 [section:operator_eq__eq_ ip::basic_address_iterator< address_v6 >::operator==]
 
-[indexterm2 operator==..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator_eq__eq_..operator==..ip::basic_address_iterator< address_v6 >] 
 Compare two addresses for equality. 
 
 
@@ -78333,7 +68161,7 @@
 
 [section:pointer ip::basic_address_iterator< address_v6 >::pointer]
 
-[indexterm2 pointer..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.pointer..pointer..ip::basic_address_iterator< address_v6 >] 
 The type of a pointer to an element pointed to by the iterator. 
 
 
@@ -78354,7 +68182,7 @@
 
 [section:reference ip::basic_address_iterator< address_v6 >::reference]
 
-[indexterm2 reference..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.reference..reference..ip::basic_address_iterator< address_v6 >] 
 The type of a reference to an element pointed to by the iterator. 
 
 
@@ -78591,7 +68419,7 @@
 
 [section:value_type ip::basic_address_iterator< address_v6 >::value_type]
 
-[indexterm2 value_type..ip::basic_address_iterator< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.value_type..value_type..ip::basic_address_iterator< address_v6 >] 
 The type of the elements pointed to by the iterator. 
 
 
@@ -78913,7 +68741,7 @@
 
 [section:basic_address_range ip::basic_address_range< address_v4 >::basic_address_range]
 
-[indexterm2 basic_address_range..ip::basic_address_range< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.basic_address_range..basic_address_range..ip::basic_address_range< address_v4 >] 
 Construct an empty range. 
 
 
@@ -78987,7 +68815,7 @@
 
 [section:begin ip::basic_address_range< address_v4 >::begin]
 
-[indexterm2 begin..ip::basic_address_range< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.begin..begin..ip::basic_address_range< address_v4 >] 
 Obtain an iterator that points to the start of the range. 
 
 
@@ -79001,7 +68829,7 @@
 
 [section:empty ip::basic_address_range< address_v4 >::empty]
 
-[indexterm2 empty..ip::basic_address_range< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.empty..empty..ip::basic_address_range< address_v4 >] 
 Determine whether the range is empty. 
 
 
@@ -79015,7 +68843,7 @@
 
 [section:end ip::basic_address_range< address_v4 >::end]
 
-[indexterm2 end..ip::basic_address_range< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.end..end..ip::basic_address_range< address_v4 >] 
 Obtain an iterator that points to the end of the range. 
 
 
@@ -79029,7 +68857,7 @@
 
 [section:find ip::basic_address_range< address_v4 >::find]
 
-[indexterm2 find..ip::basic_address_range< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.find..find..ip::basic_address_range< address_v4 >] 
 Find an address in the range. 
 
 
@@ -79044,7 +68872,7 @@
 
 [section:iterator ip::basic_address_range< address_v4 >::iterator]
 
-[indexterm2 iterator..ip::basic_address_range< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.iterator..iterator..ip::basic_address_range< address_v4 >] 
 The type of an iterator that points into the range. 
 
 
@@ -79264,7 +69092,7 @@
 
 [section:operator_eq_ ip::basic_address_range< address_v4 >::operator=]
 
-[indexterm2 operator=..ip::basic_address_range< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.operator_eq_..operator=..ip::basic_address_range< address_v4 >] 
 Assignment operator. 
 
 
@@ -79279,7 +69107,7 @@
 
 [section:size ip::basic_address_range< address_v4 >::size]
 
-[indexterm2 size..ip::basic_address_range< address_v4 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.size..size..ip::basic_address_range< address_v4 >] 
 Return the size of the range. 
 
 
@@ -79373,7 +69201,7 @@
 
 [section:basic_address_range ip::basic_address_range< address_v6 >::basic_address_range]
 
-[indexterm2 basic_address_range..ip::basic_address_range< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.basic_address_range..basic_address_range..ip::basic_address_range< address_v6 >] 
 Construct an empty range. 
 
 
@@ -79447,7 +69275,7 @@
 
 [section:begin ip::basic_address_range< address_v6 >::begin]
 
-[indexterm2 begin..ip::basic_address_range< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.begin..begin..ip::basic_address_range< address_v6 >] 
 Obtain an iterator that points to the start of the range. 
 
 
@@ -79461,7 +69289,7 @@
 
 [section:empty ip::basic_address_range< address_v6 >::empty]
 
-[indexterm2 empty..ip::basic_address_range< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.empty..empty..ip::basic_address_range< address_v6 >] 
 Determine whether the range is empty. 
 
 
@@ -79475,7 +69303,7 @@
 
 [section:end ip::basic_address_range< address_v6 >::end]
 
-[indexterm2 end..ip::basic_address_range< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.end..end..ip::basic_address_range< address_v6 >] 
 Obtain an iterator that points to the end of the range. 
 
 
@@ -79489,7 +69317,7 @@
 
 [section:find ip::basic_address_range< address_v6 >::find]
 
-[indexterm2 find..ip::basic_address_range< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.find..find..ip::basic_address_range< address_v6 >] 
 Find an address in the range. 
 
 
@@ -79504,7 +69332,7 @@
 
 [section:iterator ip::basic_address_range< address_v6 >::iterator]
 
-[indexterm2 iterator..ip::basic_address_range< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.iterator..iterator..ip::basic_address_range< address_v6 >] 
 The type of an iterator that points into the range. 
 
 
@@ -79741,7 +69569,7 @@
 
 [section:operator_eq_ ip::basic_address_range< address_v6 >::operator=]
 
-[indexterm2 operator=..ip::basic_address_range< address_v6 >] 
+[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.operator_eq_..operator=..ip::basic_address_range< address_v6 >] 
 Assignment operator. 
 
 
@@ -79919,7 +69747,7 @@
 
 [section:address ip::basic_endpoint::address]
 
-[indexterm2 address..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.address..address..ip::basic_endpoint] 
 Get the IP address associated with the endpoint. 
 
 
@@ -79967,7 +69795,7 @@
 
 [section:basic_endpoint ip::basic_endpoint::basic_endpoint]
 
-[indexterm2 basic_endpoint..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.basic_endpoint..basic_endpoint..ip::basic_endpoint] 
 Default constructor. 
 
 
@@ -80106,7 +69934,7 @@
 
 [section:capacity ip::basic_endpoint::capacity]
 
-[indexterm2 capacity..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.capacity..capacity..ip::basic_endpoint] 
 Get the capacity of the endpoint in the native type. 
 
 
@@ -80119,7 +69947,7 @@
 
 [section:data ip::basic_endpoint::data]
 
-[indexterm2 data..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.data..data..ip::basic_endpoint] 
 Get the underlying endpoint in the native type. 
 
 
@@ -80162,7 +69990,7 @@
 
 [section:data_type ip::basic_endpoint::data_type]
 
-[indexterm2 data_type..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.data_type..data_type..ip::basic_endpoint] 
 The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. 
 
 
@@ -80183,7 +70011,7 @@
 
 [section:operator_not__eq_ ip::basic_endpoint::operator!=]
 
-[indexterm2 operator!=..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.operator_not__eq_..operator!=..ip::basic_endpoint] 
 Compare two endpoints for inequality. 
 
 
@@ -80205,7 +70033,7 @@
 
 [section:operator_lt_ ip::basic_endpoint::operator<]
 
-[indexterm2 operator<..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.operator_lt_..operator<..ip::basic_endpoint] 
 Compare endpoints for ordering. 
 
 
@@ -80227,7 +70055,7 @@
 
 [section:operator_lt__lt_ ip::basic_endpoint::operator<<]
 
-[indexterm2 operator<<..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.operator_lt__lt_..operator<<..ip::basic_endpoint] 
 Output an endpoint as a string. 
 
 
@@ -80264,7 +70092,7 @@
 
 [section:operator_lt__eq_ ip::basic_endpoint::operator<=]
 
-[indexterm2 operator<=..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.operator_lt__eq_..operator<=..ip::basic_endpoint] 
 Compare endpoints for ordering. 
 
 
@@ -80285,7 +70113,7 @@
 
 [section:operator_eq_ ip::basic_endpoint::operator=]
 
-[indexterm2 operator=..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.operator_eq_..operator=..ip::basic_endpoint] 
 Assign from another endpoint. 
 
 
@@ -80336,7 +70164,7 @@
 
 [section:operator_eq__eq_ ip::basic_endpoint::operator==]
 
-[indexterm2 operator==..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.operator_eq__eq_..operator==..ip::basic_endpoint] 
 Compare two endpoints for equality. 
 
 
@@ -80358,7 +70186,7 @@
 
 [section:operator_gt_ ip::basic_endpoint::operator>]
 
-[indexterm2 operator>..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.operator_gt_..operator>..ip::basic_endpoint] 
 Compare endpoints for ordering. 
 
 
@@ -80380,7 +70208,7 @@
 
 [section:operator_gt__eq_ ip::basic_endpoint::operator>=]
 
-[indexterm2 operator>=..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.operator_gt__eq_..operator>=..ip::basic_endpoint] 
 Compare endpoints for ordering. 
 
 
@@ -80401,7 +70229,7 @@
 
 [section:port ip::basic_endpoint::port]
 
-[indexterm2 port..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.port..port..ip::basic_endpoint] 
 Get the port associated with the endpoint. The port number is always in the host's byte order. 
 
 
@@ -80450,7 +70278,7 @@
 
 [section:protocol ip::basic_endpoint::protocol]
 
-[indexterm2 protocol..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.protocol..protocol..ip::basic_endpoint] 
 The protocol associated with the endpoint. 
 
 
@@ -80464,7 +70292,7 @@
 
 [section:protocol_type ip::basic_endpoint::protocol_type]
 
-[indexterm2 protocol_type..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.protocol_type..protocol_type..ip::basic_endpoint] 
 The protocol type associated with the endpoint. 
 
 
@@ -80485,7 +70313,7 @@
 
 [section:resize ip::basic_endpoint::resize]
 
-[indexterm2 resize..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.resize..resize..ip::basic_endpoint] 
 Set the underlying size of the endpoint in the native type. 
 
 
@@ -80500,7 +70328,7 @@
 
 [section:size ip::basic_endpoint::size]
 
-[indexterm2 size..ip::basic_endpoint] 
+[indexterm2 asio.indexterm.ip__basic_endpoint.size..size..ip::basic_endpoint] 
 Get the underlying size of the endpoint in the native type. 
 
 
@@ -80521,10 +70349,8 @@
 
 
   template<
-      typename ``[link asio.reference.InternetProtocol InternetProtocol]``,
-      typename ``[link asio.reference.ResolverService ResolverService]`` = resolver_service<InternetProtocol>>
+      typename ``[link asio.reference.InternetProtocol InternetProtocol]``>
   class basic_resolver :
-    public basic_io_object< ResolverService >,
     public ip::resolver_base
 
 
@@ -80555,13 +70381,6 @@
 
   [
 
-    [[link asio.reference.ip__basic_resolver.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.ip__basic_resolver.iterator [*iterator]]]
     [(Deprecated.) The iterator type. ]
   
@@ -80588,13 +70407,6 @@
   
   ]
 
-  [
-
-    [[link asio.reference.ip__basic_resolver.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -80612,7 +70424,9 @@
   
   [
     [[link asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
-    [Constructor. ]
+    [Constructor. 
+
+     Move-construct a basic_resolver from another. ]
   ]
   
   [
@@ -80636,6 +70450,11 @@
   ]
   
   [
+    [[link asio.reference.ip__basic_resolver.operator_eq_ [*operator=]]]
+    [Move-assign a basic_resolver from another. ]
+  ]
+  
+  [
     [[link asio.reference.ip__basic_resolver.resolve [*resolve]]]
     [(Deprecated.) Perform forward resolution of a query to a list of entries. 
 
@@ -80644,20 +70463,9 @@
      Perform reverse resolution of an endpoint to a list of entries. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.ip__basic_resolver.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.ip__basic_resolver._basic_resolver [*~basic_resolver]]]
+    [Destroys the resolver. ]
   ]
   
 ]
@@ -80726,7 +70534,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 address_configured..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.address_configured..address_configured..ip::basic_resolver] 
 Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. 
 
 
@@ -80743,7 +70551,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 all_matching..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.all_matching..all_matching..ip::basic_resolver] 
 If used with v4\_mapped, return all matching IPv6 and IPv4 addresses. 
 
 
@@ -80756,13 +70564,13 @@
 
 [section:async_resolve ip::basic_resolver::async_resolve]
 
-[indexterm2 async_resolve..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.async_resolve..async_resolve..ip::basic_resolver] 
 (Deprecated.) Asynchronously perform forward resolution of a query to a list of entries. 
 
 
   template<
       typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload1 async_resolve]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload1 async_resolve]``(
       const query & q,
       ResolveHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.async_resolve.overload1 more...]]``
@@ -80773,36 +70581,36 @@
 
   template<
       typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload2 async_resolve]``(
-      const std::string & host,
-      const std::string & service,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload2 async_resolve]``(
+      string_view host,
+      string_view service,
       ResolveHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.async_resolve.overload2 more...]]``
 
   template<
       typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload3 async_resolve]``(
-      const std::string & host,
-      const std::string & service,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload3 async_resolve]``(
+      string_view host,
+      string_view service,
       resolver_base::flags resolve_flags,
       ResolveHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.async_resolve.overload3 more...]]``
 
   template<
       typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload4 async_resolve]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload4 async_resolve]``(
       const protocol_type & protocol,
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       ResolveHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.async_resolve.overload4 more...]]``
 
   template<
       typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload5 async_resolve]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload5 async_resolve]``(
       const protocol_type & protocol,
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       resolver_base::flags resolve_flags,
       ResolveHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.async_resolve.overload5 more...]]``
@@ -80813,7 +70621,7 @@
 
   template<
       typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload6 async_resolve]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload6 async_resolve]``(
       const endpoint_type & e,
       ResolveHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.async_resolve.overload6 more...]]``
@@ -80827,7 +70635,7 @@
 
   template<
       typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_resolve(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_resolve(
       const query & q,
       ResolveHandler && handler);
 
@@ -80868,9 +70676,9 @@
 
   template<
       typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_resolve(
-      const std::string & host,
-      const std::string & service,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_resolve(
+      string_view host,
+      string_view service,
       ResolveHandler && handler);
 
 
@@ -80919,9 +70727,9 @@
 
   template<
       typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_resolve(
-      const std::string & host,
-      const std::string & service,
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_resolve(
+      string_view host,
+      string_view service,
       resolver_base::flags resolve_flags,
       ResolveHandler && handler);
 
@@ -80973,10 +70781,10 @@
 
   template<
       typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_resolve(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_resolve(
       const protocol_type & protocol,
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       ResolveHandler && handler);
 
 
@@ -81027,10 +70835,10 @@
 
   template<
       typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_resolve(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_resolve(
       const protocol_type & protocol,
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       resolver_base::flags resolve_flags,
       ResolveHandler && handler);
 
@@ -81084,7 +70892,7 @@
 
   template<
       typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_resolve(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_resolve(
       const endpoint_type & e,
       ResolveHandler && handler);
 
@@ -81118,10 +70926,28 @@
 
 [endsect]
 
-
 [section:basic_resolver ip::basic_resolver::basic_resolver]
 
-[indexterm2 basic_resolver..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.basic_resolver..basic_resolver..ip::basic_resolver] 
+Constructor. 
+
+
+  explicit ``[link asio.reference.ip__basic_resolver.basic_resolver.overload1 basic_resolver]``(
+      asio::io_context & io_context);
+  ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.basic_resolver.overload1 more...]]``
+
+
+Move-construct a [link asio.reference.ip__basic_resolver `ip::basic_resolver`] from another. 
+
+
+  ``[link asio.reference.ip__basic_resolver.basic_resolver.overload2 basic_resolver]``(
+      basic_resolver && other);
+  ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.basic_resolver.overload2 more...]]``
+
+
+[section:overload1 ip::basic_resolver::basic_resolver (1 of 2 overloads)]
+
+
 Constructor. 
 
 
@@ -81137,7 +70963,7 @@
 
 [variablelist
   
-[[io_context][The [link asio.reference.io_context `io_context`] object that the resolver will use to dispatch handlers for any asynchronous operations performed on the timer. ]]
+[[io_context][The [link asio.reference.io_context `io_context`] object that the resolver will use to dispatch handlers for any asynchronous operations performed on the resolver. ]]
 
 ]
 
@@ -81148,9 +70974,45 @@
 
 
 
+[section:overload2 ip::basic_resolver::basic_resolver (2 of 2 overloads)]
+
+
+Move-construct a [link asio.reference.ip__basic_resolver `ip::basic_resolver`] from another. 
+
+
+  basic_resolver(
+      basic_resolver && other);
+
+
+This constructor moves a resolver from one object to another.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.ip__basic_resolver `ip::basic_resolver`] object from which the move will occur.]]
+
+]
+
+
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `basic_resolver(io_context&) constructor`. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
 [section:cancel ip::basic_resolver::cancel]
 
-[indexterm2 cancel..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.cancel..cancel..ip::basic_resolver] 
 Cancel any asynchronous operations that are waiting on the resolver. 
 
 
@@ -81169,7 +71031,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 canonical_name..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.canonical_name..canonical_name..ip::basic_resolver] 
 Determine the canonical name of the host specified in the query. 
 
 
@@ -81183,7 +71045,7 @@
 
 [section:endpoint_type ip::basic_resolver::endpoint_type]
 
-[indexterm2 endpoint_type..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.endpoint_type..endpoint_type..ip::basic_resolver] 
 The endpoint type. 
 
 
@@ -81204,14 +71066,11 @@
 
 [section:executor_type ip::basic_resolver::executor_type]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 executor_type..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.executor_type..executor_type..ip::basic_resolver] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -81288,7 +71147,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 flags..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.flags..flags..ip::basic_resolver] 
 A bitmask type (C++ Std [lib.bitmask.types]). 
 
 
@@ -81309,10 +71168,7 @@
 
 [section:get_executor ip::basic_resolver::get_executor]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.get_executor..get_executor..ip::basic_resolver] 
 Get the executor associated with the object. 
 
 
@@ -81323,61 +71179,10 @@
 [endsect]
 
 
-[section:get_implementation ip::basic_resolver::get_implementation]
-
-[indexterm2 get_implementation..ip::basic_resolver] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.ip__basic_resolver.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.ip__basic_resolver.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.get_implementation.overload2 more...]]``
-
-
-[section:overload1 ip::basic_resolver::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
 
 [section:get_io_context ip::basic_resolver::get_io_context]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.get_io_context..get_io_context..ip::basic_resolver] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -81400,10 +71205,7 @@
 
 [section:get_io_service ip::basic_resolver::get_io_service]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.get_io_service..get_io_service..ip::basic_resolver] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -81423,82 +71225,10 @@
 [endsect]
 
 
-[section:get_service ip::basic_resolver::get_service]
-
-[indexterm2 get_service..ip::basic_resolver] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.ip__basic_resolver.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.ip__basic_resolver.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.get_service.overload2 more...]]``
-
-
-[section:overload1 ip::basic_resolver::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type ip::basic_resolver::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..ip::basic_resolver] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 
 [section:iterator ip::basic_resolver::iterator]
 
-[indexterm2 iterator..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.iterator..iterator..ip::basic_resolver] 
 (Deprecated.) The iterator type. 
 
 
@@ -81673,7 +71403,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 numeric_host..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.numeric_host..numeric_host..ip::basic_resolver] 
 Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. 
 
 
@@ -81690,7 +71420,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 numeric_service..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.numeric_service..numeric_service..ip::basic_resolver] 
 Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. 
 
 
@@ -81702,12 +71432,46 @@
 
 
 
+[section:operator_eq_ ip::basic_resolver::operator=]
+
+[indexterm2 asio.indexterm.ip__basic_resolver.operator_eq_..operator=..ip::basic_resolver] 
+Move-assign a [link asio.reference.ip__basic_resolver `ip::basic_resolver`] from another. 
+
+
+  basic_resolver & operator=(
+      basic_resolver && other);
+
+
+This assignment operator moves a resolver from one object to another. Cancels any outstanding asynchronous operations associated with the target object.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.ip__basic_resolver `ip::basic_resolver`] object from which the move will occur.]]
+
+]
+
+
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `basic_resolver(io_context&) constructor`. 
+
+
+
+
+[endsect]
+
+
+
 [section:passive ip::basic_resolver::passive]
 
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 passive..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.passive..passive..ip::basic_resolver] 
 Indicate that returned endpoint is intended for use as a locally bound socket endpoint. 
 
 
@@ -81721,7 +71485,7 @@
 
 [section:protocol_type ip::basic_resolver::protocol_type]
 
-[indexterm2 protocol_type..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.protocol_type..protocol_type..ip::basic_resolver] 
 The protocol type. 
 
 
@@ -81742,7 +71506,7 @@
 
 [section:query ip::basic_resolver::query]
 
-[indexterm2 query..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.query..query..ip::basic_resolver] 
 (Deprecated.) The query type. 
 
 
@@ -81866,7 +71630,7 @@
 
 [section:resolve ip::basic_resolver::resolve]
 
-[indexterm2 resolve..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.resolve..resolve..ip::basic_resolver] 
 (Deprecated.) Perform forward resolution of a query to a list of entries. 
 
 
@@ -81884,53 +71648,53 @@
 
 
   results_type ``[link asio.reference.ip__basic_resolver.resolve.overload3 resolve]``(
-      const std::string & host,
-      const std::string & service);
+      string_view host,
+      string_view service);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload3 more...]]``
 
   results_type ``[link asio.reference.ip__basic_resolver.resolve.overload4 resolve]``(
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload4 more...]]``
 
   results_type ``[link asio.reference.ip__basic_resolver.resolve.overload5 resolve]``(
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       resolver_base::flags resolve_flags);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload5 more...]]``
 
   results_type ``[link asio.reference.ip__basic_resolver.resolve.overload6 resolve]``(
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       resolver_base::flags resolve_flags,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload6 more...]]``
 
   results_type ``[link asio.reference.ip__basic_resolver.resolve.overload7 resolve]``(
       const protocol_type & protocol,
-      const std::string & host,
-      const std::string & service);
+      string_view host,
+      string_view service);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload7 more...]]``
 
   results_type ``[link asio.reference.ip__basic_resolver.resolve.overload8 resolve]``(
       const protocol_type & protocol,
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload8 more...]]``
 
   results_type ``[link asio.reference.ip__basic_resolver.resolve.overload9 resolve]``(
       const protocol_type & protocol,
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       resolver_base::flags resolve_flags);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload9 more...]]``
 
   results_type ``[link asio.reference.ip__basic_resolver.resolve.overload10 resolve]``(
       const protocol_type & protocol,
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       resolver_base::flags resolve_flags,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload10 more...]]``
@@ -82037,8 +71801,8 @@
 
 
   results_type resolve(
-      const std::string & host,
-      const std::string & service);
+      string_view host,
+      string_view service);
 
 
 This function is used to resolve host and service names into a list of endpoint entries.
@@ -82089,8 +71853,8 @@
 
 
   results_type resolve(
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       asio::error_code & ec);
 
 
@@ -82134,8 +71898,8 @@
 
 
   results_type resolve(
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       resolver_base::flags resolve_flags);
 
 
@@ -82189,8 +71953,8 @@
 
 
   results_type resolve(
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       resolver_base::flags resolve_flags,
       asio::error_code & ec);
 
@@ -82238,8 +72002,8 @@
 
   results_type resolve(
       const protocol_type & protocol,
-      const std::string & host,
-      const std::string & service);
+      string_view host,
+      string_view service);
 
 
 This function is used to resolve host and service names into a list of endpoint entries.
@@ -82293,8 +72057,8 @@
 
   results_type resolve(
       const protocol_type & protocol,
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       asio::error_code & ec);
 
 
@@ -82341,8 +72105,8 @@
 
   results_type resolve(
       const protocol_type & protocol,
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       resolver_base::flags resolve_flags);
 
 
@@ -82399,8 +72163,8 @@
 
   results_type resolve(
       const protocol_type & protocol,
-      const std::string & host,
-      const std::string & service,
+      string_view host,
+      string_view service,
       resolver_base::flags resolve_flags,
       asio::error_code & ec);
 
@@ -82527,7 +72291,7 @@
 
 [section:results_type ip::basic_resolver::results_type]
 
-[indexterm2 results_type..ip::basic_resolver] 
+[indexterm2 asio.indexterm.ip__basic_resolver.results_type..results_type..ip::basic_resolver] 
 The results type. 
 
 
@@ -82784,41 +72548,33 @@
 
 
 
-[section:service_type ip::basic_resolver::service_type]
+[section:v4_mapped ip::basic_resolver::v4_mapped]
 
 
-['Inherited from basic_io_object.]
+['Inherited from ip::resolver_base.]
 
-[indexterm2 service_type..ip::basic_resolver] 
-The type of the service that will be used to provide I/O operations. 
+[indexterm2 asio.indexterm.ip__basic_resolver.v4_mapped..v4_mapped..ip::basic_resolver] 
+If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. 
 
 
-  typedef ResolverService service_type;
+  static const flags v4_mapped = implementation_defined;
 
 
 
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
 [endsect]
 
 
 
-[section:v4_mapped ip::basic_resolver::v4_mapped]
+[section:_basic_resolver ip::basic_resolver::~basic_resolver]
+
+[indexterm2 asio.indexterm.ip__basic_resolver._basic_resolver..~basic_resolver..ip::basic_resolver] 
+Destroys the resolver. 
 
 
-['Inherited from ip::resolver_base.]
-
-[indexterm2 v4_mapped..ip::basic_resolver] 
-If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. 
+  ~basic_resolver();
 
 
-  static const flags v4_mapped = implementation_defined;
-
+This function destroys the resolver, cancelling any outstanding asynchronous wait operations associated with the resolver as if by calling `cancel`. 
 
 
 [endsect]
@@ -82910,7 +72666,7 @@
 
 [section:basic_resolver_entry ip::basic_resolver_entry::basic_resolver_entry]
 
-[indexterm2 basic_resolver_entry..ip::basic_resolver_entry] 
+[indexterm2 asio.indexterm.ip__basic_resolver_entry.basic_resolver_entry..basic_resolver_entry..ip::basic_resolver_entry] 
 Default constructor. 
 
 
@@ -82923,8 +72679,8 @@
 
   ``[link asio.reference.ip__basic_resolver_entry.basic_resolver_entry.overload2 basic_resolver_entry]``(
       const endpoint_type & ep,
-      const std::string & host,
-      const std::string & service);
+      string_view host,
+      string_view service);
   ``  [''''&raquo;''' [link asio.reference.ip__basic_resolver_entry.basic_resolver_entry.overload2 more...]]``
 
 
@@ -82950,8 +72706,8 @@
 
   basic_resolver_entry(
       const endpoint_type & ep,
-      const std::string & host,
-      const std::string & service);
+      string_view host,
+      string_view service);
 
 
 
@@ -82963,7 +72719,7 @@
 
 [section:endpoint ip::basic_resolver_entry::endpoint]
 
-[indexterm2 endpoint..ip::basic_resolver_entry] 
+[indexterm2 asio.indexterm.ip__basic_resolver_entry.endpoint..endpoint..ip::basic_resolver_entry] 
 Get the endpoint associated with the entry. 
 
 
@@ -82977,7 +72733,7 @@
 
 [section:endpoint_type ip::basic_resolver_entry::endpoint_type]
 
-[indexterm2 endpoint_type..ip::basic_resolver_entry] 
+[indexterm2 asio.indexterm.ip__basic_resolver_entry.endpoint_type..endpoint_type..ip::basic_resolver_entry] 
 The endpoint type associated with the endpoint entry. 
 
 
@@ -82997,7 +72753,7 @@
 
 [section:host_name ip::basic_resolver_entry::host_name]
 
-[indexterm2 host_name..ip::basic_resolver_entry] 
+[indexterm2 asio.indexterm.ip__basic_resolver_entry.host_name..host_name..ip::basic_resolver_entry] 
 Get the host name associated with the entry. 
 
 
@@ -83046,7 +72802,7 @@
 
 [section:operator_endpoint_type ip::basic_resolver_entry::operator endpoint_type]
 
-[indexterm2 operator endpoint_type..ip::basic_resolver_entry] 
+[indexterm2 asio.indexterm.ip__basic_resolver_entry.operator_endpoint_type..operator endpoint_type..ip::basic_resolver_entry] 
 Convert to the endpoint associated with the entry. 
 
 
@@ -83060,7 +72816,7 @@
 
 [section:protocol_type ip::basic_resolver_entry::protocol_type]
 
-[indexterm2 protocol_type..ip::basic_resolver_entry] 
+[indexterm2 asio.indexterm.ip__basic_resolver_entry.protocol_type..protocol_type..ip::basic_resolver_entry] 
 The protocol type associated with the endpoint entry. 
 
 
@@ -83080,7 +72836,7 @@
 
 [section:service_name ip::basic_resolver_entry::service_name]
 
-[indexterm2 service_name..ip::basic_resolver_entry] 
+[indexterm2 asio.indexterm.ip__basic_resolver_entry.service_name..service_name..ip::basic_resolver_entry] 
 Get the service name associated with the entry. 
 
 
@@ -83299,7 +73055,7 @@
 
 [section:basic_resolver_iterator ip::basic_resolver_iterator::basic_resolver_iterator]
 
-[indexterm2 basic_resolver_iterator..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.basic_resolver_iterator..basic_resolver_iterator..ip::basic_resolver_iterator] 
 Default constructor creates an end iterator. 
 
 
@@ -83371,7 +73127,7 @@
 
 [section:dereference ip::basic_resolver_iterator::dereference]
 
-[indexterm2 dereference..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.dereference..dereference..ip::basic_resolver_iterator] 
 
   const basic_resolver_entry< InternetProtocol > & dereference() const;
 
@@ -83383,7 +73139,7 @@
 
 [section:difference_type ip::basic_resolver_iterator::difference_type]
 
-[indexterm2 difference_type..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.difference_type..difference_type..ip::basic_resolver_iterator] 
 The type used for the distance between two iterators. 
 
 
@@ -83404,7 +73160,7 @@
 
 [section:equal ip::basic_resolver_iterator::equal]
 
-[indexterm2 equal..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.equal..equal..ip::basic_resolver_iterator] 
 
   bool equal(
       const basic_resolver_iterator & other) const;
@@ -83417,7 +73173,7 @@
 
 [section:increment ip::basic_resolver_iterator::increment]
 
-[indexterm2 increment..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.increment..increment..ip::basic_resolver_iterator] 
 
   void increment();
 
@@ -83429,7 +73185,7 @@
 
 [section:index_ ip::basic_resolver_iterator::index_]
 
-[indexterm2 index_..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.index_..index_..ip::basic_resolver_iterator] 
 
   std::size_t index_;
 
@@ -83441,7 +73197,7 @@
 
 [section:iterator_category ip::basic_resolver_iterator::iterator_category]
 
-[indexterm2 iterator_category..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.iterator_category..iterator_category..ip::basic_resolver_iterator] 
 The iterator category. 
 
 
@@ -83462,7 +73218,7 @@
 
 [section:operator__star_ ip::basic_resolver_iterator::operator *]
 
-[indexterm2 operator *..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.operator__star_..operator *..ip::basic_resolver_iterator] 
 Dereference an iterator. 
 
 
@@ -83476,7 +73232,7 @@
 
 [section:operator_not__eq_ ip::basic_resolver_iterator::operator!=]
 
-[indexterm2 operator!=..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.operator_not__eq_..operator!=..ip::basic_resolver_iterator] 
 Test two iterators for inequality. 
 
 
@@ -83497,7 +73253,7 @@
 
 [section:operator_plus__plus_ ip::basic_resolver_iterator::operator++]
 
-[indexterm2 operator++..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.operator_plus__plus_..operator++..ip::basic_resolver_iterator] 
 Increment operator (prefix). 
 
 
@@ -83546,7 +73302,7 @@
 
 [section:operator_arrow_ ip::basic_resolver_iterator::operator->]
 
-[indexterm2 operator->..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.operator_arrow_..operator->..ip::basic_resolver_iterator] 
 Dereference an iterator. 
 
 
@@ -83559,7 +73315,7 @@
 
 [section:operator_eq_ ip::basic_resolver_iterator::operator=]
 
-[indexterm2 operator=..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.operator_eq_..operator=..ip::basic_resolver_iterator] 
 Assignment operator. 
 
 
@@ -83610,7 +73366,7 @@
 
 [section:operator_eq__eq_ ip::basic_resolver_iterator::operator==]
 
-[indexterm2 operator==..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.operator_eq__eq_..operator==..ip::basic_resolver_iterator] 
 Test two iterators for equality. 
 
 
@@ -83632,7 +73388,7 @@
 
 [section:pointer ip::basic_resolver_iterator::pointer]
 
-[indexterm2 pointer..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.pointer..pointer..ip::basic_resolver_iterator] 
 The type of the result of applying `operator->()` to the iterator. 
 
 
@@ -83653,7 +73409,7 @@
 
 [section:reference ip::basic_resolver_iterator::reference]
 
-[indexterm2 reference..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.reference..reference..ip::basic_resolver_iterator] 
 The type of the result of applying `operator*()` to the iterator. 
 
 
@@ -83738,7 +73494,7 @@
 
 [section:value_type ip::basic_resolver_iterator::value_type]
 
-[indexterm2 value_type..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.value_type..value_type..ip::basic_resolver_iterator] 
 The type of the value pointed to by the iterator. 
 
 
@@ -83823,7 +73579,7 @@
 
 [section:values_ ip::basic_resolver_iterator::values_]
 
-[indexterm2 values_..ip::basic_resolver_iterator] 
+[indexterm2 asio.indexterm.ip__basic_resolver_iterator.values_..values_..ip::basic_resolver_iterator] 
 
   values_ptr_type values_;
 
@@ -83963,7 +73719,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 address_configured..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.address_configured..address_configured..ip::basic_resolver_query] 
 Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. 
 
 
@@ -83980,7 +73736,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 all_matching..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.all_matching..all_matching..ip::basic_resolver_query] 
 If used with v4\_mapped, return all matching IPv6 and IPv4 addresses. 
 
 
@@ -83993,7 +73749,7 @@
 
 [section:basic_resolver_query ip::basic_resolver_query::basic_resolver_query]
 
-[indexterm2 basic_resolver_query..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.basic_resolver_query..basic_resolver_query..ip::basic_resolver_query] 
 Construct with specified service name for any protocol. 
 
 
@@ -84201,7 +73957,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 canonical_name..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.canonical_name..canonical_name..ip::basic_resolver_query] 
 Determine the canonical name of the host specified in the query. 
 
 
@@ -84218,7 +73974,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 flags..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.flags..flags..ip::basic_resolver_query] 
 A bitmask type (C++ Std [lib.bitmask.types]). 
 
 
@@ -84239,7 +73995,7 @@
 
 [section:hints ip::basic_resolver_query::hints]
 
-[indexterm2 hints..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.hints..hints..ip::basic_resolver_query] 
 Get the hints associated with the query. 
 
 
@@ -84253,7 +74009,7 @@
 
 [section:host_name ip::basic_resolver_query::host_name]
 
-[indexterm2 host_name..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.host_name..host_name..ip::basic_resolver_query] 
 Get the host name associated with the query. 
 
 
@@ -84270,7 +74026,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 numeric_host..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.numeric_host..numeric_host..ip::basic_resolver_query] 
 Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. 
 
 
@@ -84287,7 +74043,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 numeric_service..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.numeric_service..numeric_service..ip::basic_resolver_query] 
 Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. 
 
 
@@ -84304,7 +74060,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 passive..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.passive..passive..ip::basic_resolver_query] 
 Indicate that returned endpoint is intended for use as a locally bound socket endpoint. 
 
 
@@ -84318,7 +74074,7 @@
 
 [section:protocol_type ip::basic_resolver_query::protocol_type]
 
-[indexterm2 protocol_type..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.protocol_type..protocol_type..ip::basic_resolver_query] 
 The protocol type associated with the endpoint query. 
 
 
@@ -84339,7 +74095,7 @@
 
 [section:service_name ip::basic_resolver_query::service_name]
 
-[indexterm2 service_name..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.service_name..service_name..ip::basic_resolver_query] 
 Get the service name associated with the query. 
 
 
@@ -84356,7 +74112,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 v4_mapped..ip::basic_resolver_query] 
+[indexterm2 asio.indexterm.ip__basic_resolver_query.v4_mapped..v4_mapped..ip::basic_resolver_query] 
 If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. 
 
 
@@ -84628,7 +74384,7 @@
 
 [section:basic_resolver_results ip::basic_resolver_results::basic_resolver_results]
 
-[indexterm2 basic_resolver_results..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.basic_resolver_results..basic_resolver_results..ip::basic_resolver_results] 
 Default constructor creates an empty range. 
 
 
@@ -84700,7 +74456,7 @@
 
 [section:begin ip::basic_resolver_results::begin]
 
-[indexterm2 begin..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.begin..begin..ip::basic_resolver_results] 
 Obtain a begin iterator for the results range. 
 
 
@@ -84714,7 +74470,7 @@
 
 [section:cbegin ip::basic_resolver_results::cbegin]
 
-[indexterm2 cbegin..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.cbegin..cbegin..ip::basic_resolver_results] 
 Obtain a begin iterator for the results range. 
 
 
@@ -84728,7 +74484,7 @@
 
 [section:cend ip::basic_resolver_results::cend]
 
-[indexterm2 cend..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.cend..cend..ip::basic_resolver_results] 
 Obtain an end iterator for the results range. 
 
 
@@ -84742,7 +74498,7 @@
 
 [section:const_iterator ip::basic_resolver_results::const_iterator]
 
-[indexterm2 const_iterator..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.const_iterator..const_iterator..ip::basic_resolver_results] 
 The type of an iterator into the range. 
 
 
@@ -84914,7 +74670,7 @@
 
 [section:const_reference ip::basic_resolver_results::const_reference]
 
-[indexterm2 const_reference..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.const_reference..const_reference..ip::basic_resolver_results] 
 The type of a const reference to a value in the range. 
 
 
@@ -85002,7 +74758,7 @@
 
 ['Inherited from ip::basic_resolver.]
 
-[indexterm2 dereference..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.dereference..dereference..ip::basic_resolver_results] 
 
   const basic_resolver_entry< InternetProtocol > & dereference() const;
 
@@ -85014,7 +74770,7 @@
 
 [section:difference_type ip::basic_resolver_results::difference_type]
 
-[indexterm2 difference_type..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.difference_type..difference_type..ip::basic_resolver_results] 
 Type used to represent the distance between two iterators in the range. 
 
 
@@ -85035,7 +74791,7 @@
 
 [section:empty ip::basic_resolver_results::empty]
 
-[indexterm2 empty..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.empty..empty..ip::basic_resolver_results] 
 Determine whether the results range is empty. 
 
 
@@ -85049,7 +74805,7 @@
 
 [section:end ip::basic_resolver_results::end]
 
-[indexterm2 end..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.end..end..ip::basic_resolver_results] 
 Obtain an end iterator for the results range. 
 
 
@@ -85063,7 +74819,7 @@
 
 [section:endpoint_type ip::basic_resolver_results::endpoint_type]
 
-[indexterm2 endpoint_type..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.endpoint_type..endpoint_type..ip::basic_resolver_results] 
 The endpoint type associated with the results. 
 
 
@@ -85087,7 +74843,7 @@
 
 ['Inherited from ip::basic_resolver.]
 
-[indexterm2 equal..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.equal..equal..ip::basic_resolver_results] 
 
   bool equal(
       const basic_resolver_iterator & other) const;
@@ -85103,7 +74859,7 @@
 
 ['Inherited from ip::basic_resolver.]
 
-[indexterm2 increment..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.increment..increment..ip::basic_resolver_results] 
 
   void increment();
 
@@ -85118,7 +74874,7 @@
 
 ['Inherited from ip::basic_resolver.]
 
-[indexterm2 index_..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.index_..index_..ip::basic_resolver_results] 
 
   std::size_t index_;
 
@@ -85130,7 +74886,7 @@
 
 [section:iterator ip::basic_resolver_results::iterator]
 
-[indexterm2 iterator..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.iterator..iterator..ip::basic_resolver_results] 
 The type of an iterator into the range. 
 
 
@@ -85305,7 +75061,7 @@
 
 ['Inherited from ip::basic_resolver.]
 
-[indexterm2 iterator_category..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.iterator_category..iterator_category..ip::basic_resolver_results] 
 The iterator category. 
 
 
@@ -85326,7 +75082,7 @@
 
 [section:max_size ip::basic_resolver_results::max_size]
 
-[indexterm2 max_size..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.max_size..max_size..ip::basic_resolver_results] 
 Get the maximum number of entries permitted in a results range. 
 
 
@@ -85343,7 +75099,7 @@
 
 ['Inherited from ip::basic_resolver.]
 
-[indexterm2 operator *..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.operator__star_..operator *..ip::basic_resolver_results] 
 Dereference an iterator. 
 
 
@@ -85356,7 +75112,7 @@
 
 [section:operator_not__eq_ ip::basic_resolver_results::operator!=]
 
-[indexterm2 operator!=..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.operator_not__eq_..operator!=..ip::basic_resolver_results] 
 Test two iterators for inequality. 
 
 
@@ -85421,7 +75177,7 @@
 
 [section:operator_plus__plus_ ip::basic_resolver_results::operator++]
 
-[indexterm2 operator++..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.operator_plus__plus_..operator++..ip::basic_resolver_results] 
 Increment operator (prefix). 
 
 
@@ -85479,7 +75235,7 @@
 
 ['Inherited from ip::basic_resolver.]
 
-[indexterm2 operator->..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.operator_arrow_..operator->..ip::basic_resolver_results] 
 Dereference an iterator. 
 
 
@@ -85492,7 +75248,7 @@
 
 [section:operator_eq_ ip::basic_resolver_results::operator=]
 
-[indexterm2 operator=..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.operator_eq_..operator=..ip::basic_resolver_results] 
 Assignment operator. 
 
 
@@ -85542,7 +75298,7 @@
 
 [section:operator_eq__eq_ ip::basic_resolver_results::operator==]
 
-[indexterm2 operator==..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.operator_eq__eq_..operator==..ip::basic_resolver_results] 
 Test two iterators for equality. 
 
 
@@ -85611,7 +75367,7 @@
 
 ['Inherited from ip::basic_resolver.]
 
-[indexterm2 pointer..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.pointer..pointer..ip::basic_resolver_results] 
 The type of the result of applying `operator->()` to the iterator. 
 
 
@@ -85632,7 +75388,7 @@
 
 [section:protocol_type ip::basic_resolver_results::protocol_type]
 
-[indexterm2 protocol_type..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.protocol_type..protocol_type..ip::basic_resolver_results] 
 The protocol type associated with the results. 
 
 
@@ -85653,7 +75409,7 @@
 
 [section:reference ip::basic_resolver_results::reference]
 
-[indexterm2 reference..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.reference..reference..ip::basic_resolver_results] 
 The type of a non-const reference to a value in the range. 
 
 
@@ -85738,7 +75494,7 @@
 
 [section:size ip::basic_resolver_results::size]
 
-[indexterm2 size..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.size..size..ip::basic_resolver_results] 
 Get the number of entries in the results range. 
 
 
@@ -85752,7 +75508,7 @@
 
 [section:size_type ip::basic_resolver_results::size_type]
 
-[indexterm2 size_type..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.size_type..size_type..ip::basic_resolver_results] 
 Type used to represent a count of the elements in the range. 
 
 
@@ -85773,7 +75529,7 @@
 
 [section:swap ip::basic_resolver_results::swap]
 
-[indexterm2 swap..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.swap..swap..ip::basic_resolver_results] 
 Swap the results range with another. 
 
 
@@ -85788,7 +75544,7 @@
 
 [section:value_type ip::basic_resolver_results::value_type]
 
-[indexterm2 value_type..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.value_type..value_type..ip::basic_resolver_results] 
 The type of a value in the results range. 
 
 
@@ -85876,7 +75632,7 @@
 
 ['Inherited from ip::basic_resolver.]
 
-[indexterm2 values_..ip::basic_resolver_results] 
+[indexterm2 asio.indexterm.ip__basic_resolver_results.values_..values_..ip::basic_resolver_results] 
 
   values_ptr_type values_;
 
@@ -85890,7 +75646,7 @@
 
 [section:ip__host_name ip::host_name]
 
-[indexterm1 ip::host_name] 
+[indexterm1 asio.indexterm.ip__host_name..ip::host_name] 
 Get the current host name. 
 
     
@@ -86042,7 +75798,7 @@
 
 [section:endpoint ip::icmp::endpoint]
 
-[indexterm2 endpoint..ip::icmp] 
+[indexterm2 asio.indexterm.ip__icmp.endpoint..endpoint..ip::icmp] 
 The type of a ICMP endpoint. 
 
 
@@ -86207,7 +75963,7 @@
 
 [section:family ip::icmp::family]
 
-[indexterm2 family..ip::icmp] 
+[indexterm2 asio.indexterm.ip__icmp.family..family..ip::icmp] 
 Obtain an identifier for the protocol family. 
 
 
@@ -86221,7 +75977,7 @@
 
 [section:operator_not__eq_ ip::icmp::operator!=]
 
-[indexterm2 operator!=..ip::icmp] 
+[indexterm2 asio.indexterm.ip__icmp.operator_not__eq_..operator!=..ip::icmp] 
 Compare two protocols for inequality. 
 
 
@@ -86243,7 +75999,7 @@
 
 [section:operator_eq__eq_ ip::icmp::operator==]
 
-[indexterm2 operator==..ip::icmp] 
+[indexterm2 asio.indexterm.ip__icmp.operator_eq__eq_..operator==..ip::icmp] 
 Compare two protocols for equality. 
 
 
@@ -86265,7 +76021,7 @@
 
 [section:protocol ip::icmp::protocol]
 
-[indexterm2 protocol..ip::icmp] 
+[indexterm2 asio.indexterm.ip__icmp.protocol..protocol..ip::icmp] 
 Obtain an identifier for the protocol. 
 
 
@@ -86279,7 +76035,7 @@
 
 [section:resolver ip::icmp::resolver]
 
-[indexterm2 resolver..ip::icmp] 
+[indexterm2 asio.indexterm.ip__icmp.resolver..resolver..ip::icmp] 
 The ICMP resolver type. 
 
 
@@ -86313,13 +76069,6 @@
 
   [
 
-    [[link asio.reference.ip__basic_resolver.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.ip__basic_resolver.iterator [*iterator]]]
     [(Deprecated.) The iterator type. ]
   
@@ -86346,13 +76095,6 @@
   
   ]
 
-  [
-
-    [[link asio.reference.ip__basic_resolver.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -86370,7 +76112,9 @@
   
   [
     [[link asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
-    [Constructor. ]
+    [Constructor. 
+
+     Move-construct a basic_resolver from another. ]
   ]
   
   [
@@ -86394,6 +76138,11 @@
   ]
   
   [
+    [[link asio.reference.ip__basic_resolver.operator_eq_ [*operator=]]]
+    [Move-assign a basic_resolver from another. ]
+  ]
+  
+  [
     [[link asio.reference.ip__basic_resolver.resolve [*resolve]]]
     [(Deprecated.) Perform forward resolution of a query to a list of entries. 
 
@@ -86402,20 +76151,9 @@
      Perform reverse resolution of an endpoint to a list of entries. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.ip__basic_resolver.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.ip__basic_resolver._basic_resolver [*~basic_resolver]]]
+    [Destroys the resolver. ]
   ]
   
 ]
@@ -86486,7 +76224,7 @@
 
 [section:socket ip::icmp::socket]
 
-[indexterm2 socket..ip::icmp] 
+[indexterm2 asio.indexterm.ip__icmp.socket..socket..ip::icmp] 
 The ICMP socket type. 
 
 
@@ -86548,13 +76286,6 @@
 
   [
 
-    [[link asio.reference.basic_raw_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_raw_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -86632,13 +76363,6 @@
 
   [
 
-    [[link asio.reference.basic_raw_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_raw_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -86850,20 +76574,9 @@
     [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_raw_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_raw_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_raw_socket._basic_raw_socket [*~basic_raw_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -86874,6 +76587,11 @@
 
   [
     [[link asio.reference.basic_raw_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_raw_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -86924,7 +76642,7 @@
 
 [section:type ip::icmp::type]
 
-[indexterm2 type..ip::icmp] 
+[indexterm2 asio.indexterm.ip__icmp.type..type..ip::icmp] 
 Obtain an identifier for the type of the protocol. 
 
 
@@ -86938,7 +76656,7 @@
 
 [section:v4 ip::icmp::v4]
 
-[indexterm2 v4..ip::icmp] 
+[indexterm2 asio.indexterm.ip__icmp.v4..v4..ip::icmp] 
 Construct to represent the IPv4 ICMP protocol. 
 
 
@@ -86952,7 +76670,7 @@
 
 [section:v6 ip::icmp::v6]
 
-[indexterm2 v6..ip::icmp] 
+[indexterm2 asio.indexterm.ip__icmp.v6..v6..ip::icmp] 
 Construct to represent the IPv6 ICMP protocol. 
 
 
@@ -86969,7 +76687,7 @@
 
 [section:ip__multicast__enable_loopback ip::multicast::enable_loopback]
 
-[indexterm1 ip::multicast::enable_loopback] 
+[indexterm1 asio.indexterm.ip__multicast__enable_loopback..ip::multicast::enable_loopback] 
 Socket option determining whether outgoing multicast packets will be received on the same socket if it is a member of the multicast group. 
 
 
@@ -87020,7 +76738,7 @@
 
 [section:ip__multicast__hops ip::multicast::hops]
 
-[indexterm1 ip::multicast::hops] 
+[indexterm1 asio.indexterm.ip__multicast__hops..ip::multicast::hops] 
 Socket option for time-to-live associated with outgoing multicast packets. 
 
 
@@ -87071,7 +76789,7 @@
 
 [section:ip__multicast__join_group ip::multicast::join_group]
 
-[indexterm1 ip::multicast::join_group] 
+[indexterm1 asio.indexterm.ip__multicast__join_group..ip::multicast::join_group] 
 Socket option to join a multicast group on a specified interface. 
 
 
@@ -87112,7 +76830,7 @@
 
 [section:ip__multicast__leave_group ip::multicast::leave_group]
 
-[indexterm1 ip::multicast::leave_group] 
+[indexterm1 asio.indexterm.ip__multicast__leave_group..ip::multicast::leave_group] 
 Socket option to leave a multicast group on a specified interface. 
 
 
@@ -87153,7 +76871,7 @@
 
 [section:ip__multicast__outbound_interface ip::multicast::outbound_interface]
 
-[indexterm1 ip::multicast::outbound_interface] 
+[indexterm1 asio.indexterm.ip__multicast__outbound_interface..ip::multicast::outbound_interface] 
 Socket option for local interface to use for outgoing multicast packets. 
 
 
@@ -87294,9 +77012,7 @@
 
   [
     [[link asio.reference.ip__network_v4.make_network_v4 [*make_network_v4]]]
-    [Create an IPv4 network from a string containing IP address and prefix length. 
-
-     Create an IPv4 address from an IP address string in dotted decimal form. ]
+    [Create an IPv4 network from a string containing IP address and prefix length. ]
   ]
   
 ]
@@ -87321,7 +77037,7 @@
 
 [section:address ip::network_v4::address]
 
-[indexterm2 address..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.address..address..ip::network_v4] 
 Obtain the address object specified when the network object was created. 
 
 
@@ -87335,7 +77051,7 @@
 
 [section:broadcast ip::network_v4::broadcast]
 
-[indexterm2 broadcast..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.broadcast..broadcast..ip::network_v4] 
 Obtain an address object that represents the network's broadcast address. 
 
 
@@ -87349,7 +77065,7 @@
 
 [section:canonical ip::network_v4::canonical]
 
-[indexterm2 canonical..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.canonical..canonical..ip::network_v4] 
 Obtain the true network address, omitting any host bits. 
 
 
@@ -87363,7 +77079,7 @@
 
 [section:hosts ip::network_v4::hosts]
 
-[indexterm2 hosts..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.hosts..hosts..ip::network_v4] 
 Obtain an address range corresponding to the hosts in the network. 
 
 
@@ -87377,7 +77093,7 @@
 
 [section:is_host ip::network_v4::is_host]
 
-[indexterm2 is_host..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.is_host..is_host..ip::network_v4] 
 Test if network is a valid host address. 
 
 
@@ -87391,7 +77107,7 @@
 
 [section:is_subnet_of ip::network_v4::is_subnet_of]
 
-[indexterm2 is_subnet_of..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.is_subnet_of..is_subnet_of..ip::network_v4] 
 Test if a network is a real subnet of another network. 
 
 
@@ -87405,7 +77121,7 @@
 
 [section:make_network_v4 ip::network_v4::make_network_v4]
 
-[indexterm2 make_network_v4..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.make_network_v4..make_network_v4..ip::network_v4] 
 Create an IPv4 network from a string containing IP address and prefix length. 
 
 
@@ -87413,10 +77129,6 @@
       const char * str);
   ``  [''''&raquo;''' [link asio.reference.ip__network_v4.make_network_v4.overload1 more...]]``
 
-
-Create an IPv4 address from an IP address string in dotted decimal form. 
-
-
   network_v4 ``[link asio.reference.ip__network_v4.make_network_v4.overload2 make_network_v4]``(
       const char * str,
       asio::error_code & ec);
@@ -87431,8 +77143,17 @@
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ip__network_v4.make_network_v4.overload4 more...]]``
 
+  network_v4 ``[link asio.reference.ip__network_v4.make_network_v4.overload5 make_network_v4]``(
+      string_view str);
+  ``  [''''&raquo;''' [link asio.reference.ip__network_v4.make_network_v4.overload5 more...]]``
 
-[section:overload1 ip::network_v4::make_network_v4 (1 of 4 overloads)]
+  network_v4 ``[link asio.reference.ip__network_v4.make_network_v4.overload6 make_network_v4]``(
+      string_view str,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.ip__network_v4.make_network_v4.overload6 more...]]``
+
+
+[section:overload1 ip::network_v4::make_network_v4 (1 of 6 overloads)]
 
 
 Create an IPv4 network from a string containing IP address and prefix length. 
@@ -87447,10 +77168,10 @@
 
 
 
-[section:overload2 ip::network_v4::make_network_v4 (2 of 4 overloads)]
+[section:overload2 ip::network_v4::make_network_v4 (2 of 6 overloads)]
 
 
-Create an IPv4 address from an IP address string in dotted decimal form. 
+Create an IPv4 network from a string containing IP address and prefix length. 
 
 
   network_v4 make_network_v4(
@@ -87463,10 +77184,10 @@
 
 
 
-[section:overload3 ip::network_v4::make_network_v4 (3 of 4 overloads)]
+[section:overload3 ip::network_v4::make_network_v4 (3 of 6 overloads)]
 
 
-Create an IPv4 address from an IP address string in dotted decimal form. 
+Create an IPv4 network from a string containing IP address and prefix length. 
 
 
   network_v4 make_network_v4(
@@ -87478,10 +77199,10 @@
 
 
 
-[section:overload4 ip::network_v4::make_network_v4 (4 of 4 overloads)]
+[section:overload4 ip::network_v4::make_network_v4 (4 of 6 overloads)]
 
 
-Create an IPv4 address from an IP address string in dotted decimal form. 
+Create an IPv4 network from a string containing IP address and prefix length. 
 
 
   network_v4 make_network_v4(
@@ -87493,12 +77214,43 @@
 [endsect]
 
 
+
+[section:overload5 ip::network_v4::make_network_v4 (5 of 6 overloads)]
+
+
+Create an IPv4 network from a string containing IP address and prefix length. 
+
+
+  network_v4 make_network_v4(
+      string_view str);
+
+
+
+[endsect]
+
+
+
+[section:overload6 ip::network_v4::make_network_v4 (6 of 6 overloads)]
+
+
+Create an IPv4 network from a string containing IP address and prefix length. 
+
+
+  network_v4 make_network_v4(
+      string_view str,
+      asio::error_code & ec);
+
+
+
+[endsect]
+
+
 [endsect]
 
 
 [section:netmask ip::network_v4::netmask]
 
-[indexterm2 netmask..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.netmask..netmask..ip::network_v4] 
 Obtain the netmask that was specified when the network object was created. 
 
 
@@ -87512,7 +77264,7 @@
 
 [section:network ip::network_v4::network]
 
-[indexterm2 network..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.network..network..ip::network_v4] 
 Obtain an address object that represents the network address. 
 
 
@@ -87525,7 +77277,7 @@
 
 [section:network_v4 ip::network_v4::network_v4]
 
-[indexterm2 network_v4..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.network_v4..network_v4..ip::network_v4] 
 Default constructor. 
 
 
@@ -87624,7 +77376,7 @@
 
 [section:operator_not__eq_ ip::network_v4::operator!=]
 
-[indexterm2 operator!=..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.operator_not__eq_..operator!=..ip::network_v4] 
 Compare two networks for inequality. 
 
 
@@ -87646,7 +77398,7 @@
 
 [section:operator_eq_ ip::network_v4::operator=]
 
-[indexterm2 operator=..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.operator_eq_..operator=..ip::network_v4] 
 Assign from another network. 
 
 
@@ -87661,7 +77413,7 @@
 
 [section:operator_eq__eq_ ip::network_v4::operator==]
 
-[indexterm2 operator==..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.operator_eq__eq_..operator==..ip::network_v4] 
 Compare two networks for equality. 
 
 
@@ -87683,7 +77435,7 @@
 
 [section:prefix_length ip::network_v4::prefix_length]
 
-[indexterm2 prefix_length..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.prefix_length..prefix_length..ip::network_v4] 
 Obtain the prefix length that was specified when the network object was created. 
 
 
@@ -87696,7 +77448,7 @@
 
 [section:to_string ip::network_v4::to_string]
 
-[indexterm2 to_string..ip::network_v4] 
+[indexterm2 asio.indexterm.ip__network_v4.to_string..to_string..ip::network_v4] 
 Get the network as an address in dotted decimal format. 
 
 
@@ -87832,9 +77584,7 @@
 
   [
     [[link asio.reference.ip__network_v6.make_network_v6 [*make_network_v6]]]
-    [Create an IPv6 network from a string containing IP address and prefix length. 
-
-     Create an IPv6 address from an IP address string in dotted decimal form. ]
+    [Create an IPv6 network from a string containing IP address and prefix length. ]
   ]
   
 ]
@@ -87859,7 +77609,7 @@
 
 [section:address ip::network_v6::address]
 
-[indexterm2 address..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.address..address..ip::network_v6] 
 Obtain the address object specified when the network object was created. 
 
 
@@ -87873,7 +77623,7 @@
 
 [section:canonical ip::network_v6::canonical]
 
-[indexterm2 canonical..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.canonical..canonical..ip::network_v6] 
 Obtain the true network address, omitting any host bits. 
 
 
@@ -87887,7 +77637,7 @@
 
 [section:hosts ip::network_v6::hosts]
 
-[indexterm2 hosts..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.hosts..hosts..ip::network_v6] 
 Obtain an address range corresponding to the hosts in the network. 
 
 
@@ -87901,7 +77651,7 @@
 
 [section:is_host ip::network_v6::is_host]
 
-[indexterm2 is_host..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.is_host..is_host..ip::network_v6] 
 Test if network is a valid host address. 
 
 
@@ -87915,7 +77665,7 @@
 
 [section:is_subnet_of ip::network_v6::is_subnet_of]
 
-[indexterm2 is_subnet_of..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.is_subnet_of..is_subnet_of..ip::network_v6] 
 Test if a network is a real subnet of another network. 
 
 
@@ -87929,7 +77679,7 @@
 
 [section:make_network_v6 ip::network_v6::make_network_v6]
 
-[indexterm2 make_network_v6..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.make_network_v6..make_network_v6..ip::network_v6] 
 Create an IPv6 network from a string containing IP address and prefix length. 
 
 
@@ -87937,10 +77687,6 @@
       const char * str);
   ``  [''''&raquo;''' [link asio.reference.ip__network_v6.make_network_v6.overload1 more...]]``
 
-
-Create an IPv6 address from an IP address string in dotted decimal form. 
-
-
   network_v6 ``[link asio.reference.ip__network_v6.make_network_v6.overload2 make_network_v6]``(
       const char * str,
       asio::error_code & ec);
@@ -87955,8 +77701,17 @@
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ip__network_v6.make_network_v6.overload4 more...]]``
 
+  network_v6 ``[link asio.reference.ip__network_v6.make_network_v6.overload5 make_network_v6]``(
+      string_view str);
+  ``  [''''&raquo;''' [link asio.reference.ip__network_v6.make_network_v6.overload5 more...]]``
 
-[section:overload1 ip::network_v6::make_network_v6 (1 of 4 overloads)]
+  network_v6 ``[link asio.reference.ip__network_v6.make_network_v6.overload6 make_network_v6]``(
+      string_view str,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.ip__network_v6.make_network_v6.overload6 more...]]``
+
+
+[section:overload1 ip::network_v6::make_network_v6 (1 of 6 overloads)]
 
 
 Create an IPv6 network from a string containing IP address and prefix length. 
@@ -87971,10 +77726,10 @@
 
 
 
-[section:overload2 ip::network_v6::make_network_v6 (2 of 4 overloads)]
+[section:overload2 ip::network_v6::make_network_v6 (2 of 6 overloads)]
 
 
-Create an IPv6 address from an IP address string in dotted decimal form. 
+Create an IPv6 network from a string containing IP address and prefix length. 
 
 
   network_v6 make_network_v6(
@@ -87987,10 +77742,10 @@
 
 
 
-[section:overload3 ip::network_v6::make_network_v6 (3 of 4 overloads)]
+[section:overload3 ip::network_v6::make_network_v6 (3 of 6 overloads)]
 
 
-Create an IPv6 address from an IP address string in dotted decimal form. 
+Create an IPv6 network from a string containing IP address and prefix length. 
 
 
   network_v6 make_network_v6(
@@ -88002,10 +77757,10 @@
 
 
 
-[section:overload4 ip::network_v6::make_network_v6 (4 of 4 overloads)]
+[section:overload4 ip::network_v6::make_network_v6 (4 of 6 overloads)]
 
 
-Create an IPv6 address from an IP address string in dotted decimal form. 
+Create an IPv6 network from a string containing IP address and prefix length. 
 
 
   network_v6 make_network_v6(
@@ -88017,12 +77772,43 @@
 [endsect]
 
 
+
+[section:overload5 ip::network_v6::make_network_v6 (5 of 6 overloads)]
+
+
+Create an IPv6 network from a string containing IP address and prefix length. 
+
+
+  network_v6 make_network_v6(
+      string_view str);
+
+
+
+[endsect]
+
+
+
+[section:overload6 ip::network_v6::make_network_v6 (6 of 6 overloads)]
+
+
+Create an IPv6 network from a string containing IP address and prefix length. 
+
+
+  network_v6 make_network_v6(
+      string_view str,
+      asio::error_code & ec);
+
+
+
+[endsect]
+
+
 [endsect]
 
 
 [section:network ip::network_v6::network]
 
-[indexterm2 network..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.network..network..ip::network_v6] 
 Obtain an address object that represents the network address. 
 
 
@@ -88035,7 +77821,7 @@
 
 [section:network_v6 ip::network_v6::network_v6]
 
-[indexterm2 network_v6..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.network_v6..network_v6..ip::network_v6] 
 Default constructor. 
 
 
@@ -88109,7 +77895,7 @@
 
 [section:operator_not__eq_ ip::network_v6::operator!=]
 
-[indexterm2 operator!=..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.operator_not__eq_..operator!=..ip::network_v6] 
 Compare two networks for inequality. 
 
 
@@ -88131,7 +77917,7 @@
 
 [section:operator_eq_ ip::network_v6::operator=]
 
-[indexterm2 operator=..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.operator_eq_..operator=..ip::network_v6] 
 Assign from another network. 
 
 
@@ -88146,7 +77932,7 @@
 
 [section:operator_eq__eq_ ip::network_v6::operator==]
 
-[indexterm2 operator==..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.operator_eq__eq_..operator==..ip::network_v6] 
 Compare two networks for equality. 
 
 
@@ -88168,7 +77954,7 @@
 
 [section:prefix_length ip::network_v6::prefix_length]
 
-[indexterm2 prefix_length..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.prefix_length..prefix_length..ip::network_v6] 
 Obtain the prefix length that was specified when the network object was created. 
 
 
@@ -88181,7 +77967,7 @@
 
 [section:to_string ip::network_v6::to_string]
 
-[indexterm2 to_string..ip::network_v6] 
+[indexterm2 asio.indexterm.ip__network_v6.to_string..to_string..ip::network_v6] 
 Get the network as an address in dotted decimal format. 
 
 
@@ -88309,7 +78095,7 @@
 
 [section:address_configured ip::resolver_base::address_configured]
 
-[indexterm2 address_configured..ip::resolver_base] 
+[indexterm2 asio.indexterm.ip__resolver_base.address_configured..address_configured..ip::resolver_base] 
 Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. 
 
 
@@ -88323,7 +78109,7 @@
 
 [section:all_matching ip::resolver_base::all_matching]
 
-[indexterm2 all_matching..ip::resolver_base] 
+[indexterm2 asio.indexterm.ip__resolver_base.all_matching..all_matching..ip::resolver_base] 
 If used with v4\_mapped, return all matching IPv6 and IPv4 addresses. 
 
 
@@ -88337,7 +78123,7 @@
 
 [section:canonical_name ip::resolver_base::canonical_name]
 
-[indexterm2 canonical_name..ip::resolver_base] 
+[indexterm2 asio.indexterm.ip__resolver_base.canonical_name..canonical_name..ip::resolver_base] 
 Determine the canonical name of the host specified in the query. 
 
 
@@ -88351,7 +78137,7 @@
 
 [section:flags ip::resolver_base::flags]
 
-[indexterm2 flags..ip::resolver_base] 
+[indexterm2 asio.indexterm.ip__resolver_base.flags..flags..ip::resolver_base] 
 A bitmask type (C++ Std [lib.bitmask.types]). 
 
 
@@ -88372,7 +78158,7 @@
 
 [section:numeric_host ip::resolver_base::numeric_host]
 
-[indexterm2 numeric_host..ip::resolver_base] 
+[indexterm2 asio.indexterm.ip__resolver_base.numeric_host..numeric_host..ip::resolver_base] 
 Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. 
 
 
@@ -88386,7 +78172,7 @@
 
 [section:numeric_service ip::resolver_base::numeric_service]
 
-[indexterm2 numeric_service..ip::resolver_base] 
+[indexterm2 asio.indexterm.ip__resolver_base.numeric_service..numeric_service..ip::resolver_base] 
 Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. 
 
 
@@ -88400,7 +78186,7 @@
 
 [section:passive ip::resolver_base::passive]
 
-[indexterm2 passive..ip::resolver_base] 
+[indexterm2 asio.indexterm.ip__resolver_base.passive..passive..ip::resolver_base] 
 Indicate that returned endpoint is intended for use as a locally bound socket endpoint. 
 
 
@@ -88414,7 +78200,7 @@
 
 [section:v4_mapped ip::resolver_base::v4_mapped]
 
-[indexterm2 v4_mapped..ip::resolver_base] 
+[indexterm2 asio.indexterm.ip__resolver_base.v4_mapped..v4_mapped..ip::resolver_base] 
 If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. 
 
 
@@ -88428,7 +78214,7 @@
 
 [section:_resolver_base ip::resolver_base::~resolver_base]
 
-[indexterm2 ~resolver_base..ip::resolver_base] 
+[indexterm2 asio.indexterm.ip__resolver_base._resolver_base..~resolver_base..ip::resolver_base] 
 Protected destructor to prevent deletion through this type. 
 
 
@@ -88529,7 +78315,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 address_configured..ip::resolver_query_base] 
+[indexterm2 asio.indexterm.ip__resolver_query_base.address_configured..address_configured..ip::resolver_query_base] 
 Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. 
 
 
@@ -88546,7 +78332,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 all_matching..ip::resolver_query_base] 
+[indexterm2 asio.indexterm.ip__resolver_query_base.all_matching..all_matching..ip::resolver_query_base] 
 If used with v4\_mapped, return all matching IPv6 and IPv4 addresses. 
 
 
@@ -88563,7 +78349,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 canonical_name..ip::resolver_query_base] 
+[indexterm2 asio.indexterm.ip__resolver_query_base.canonical_name..canonical_name..ip::resolver_query_base] 
 Determine the canonical name of the host specified in the query. 
 
 
@@ -88580,7 +78366,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 flags..ip::resolver_query_base] 
+[indexterm2 asio.indexterm.ip__resolver_query_base.flags..flags..ip::resolver_query_base] 
 A bitmask type (C++ Std [lib.bitmask.types]). 
 
 
@@ -88604,7 +78390,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 numeric_host..ip::resolver_query_base] 
+[indexterm2 asio.indexterm.ip__resolver_query_base.numeric_host..numeric_host..ip::resolver_query_base] 
 Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. 
 
 
@@ -88621,7 +78407,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 numeric_service..ip::resolver_query_base] 
+[indexterm2 asio.indexterm.ip__resolver_query_base.numeric_service..numeric_service..ip::resolver_query_base] 
 Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. 
 
 
@@ -88638,7 +78424,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 passive..ip::resolver_query_base] 
+[indexterm2 asio.indexterm.ip__resolver_query_base.passive..passive..ip::resolver_query_base] 
 Indicate that returned endpoint is intended for use as a locally bound socket endpoint. 
 
 
@@ -88655,7 +78441,7 @@
 
 ['Inherited from ip::resolver_base.]
 
-[indexterm2 v4_mapped..ip::resolver_query_base] 
+[indexterm2 asio.indexterm.ip__resolver_query_base.v4_mapped..v4_mapped..ip::resolver_query_base] 
 If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. 
 
 
@@ -88669,7 +78455,7 @@
 
 [section:_resolver_query_base ip::resolver_query_base::~resolver_query_base]
 
-[indexterm2 ~resolver_query_base..ip::resolver_query_base] 
+[indexterm2 asio.indexterm.ip__resolver_query_base._resolver_query_base..~resolver_query_base..ip::resolver_query_base] 
 Protected destructor to prevent deletion through this type. 
 
 
@@ -88683,987 +78469,6 @@
 
 [endsect]
 
-[section:ip__resolver_service ip::resolver_service]
-
-
-Default service implementation for a resolver. 
-
-
-  template<
-      typename ``[link asio.reference.InternetProtocol InternetProtocol]``>
-  class resolver_service :
-    public io_context::service
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.ip__resolver_service.endpoint_type [*endpoint_type]]]
-    [The endpoint type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__resolver_service.implementation_type [*implementation_type]]]
-    [The type of a resolver implementation. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__resolver_service.iterator_type [*iterator_type]]]
-    [The iterator type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__resolver_service.protocol_type [*protocol_type]]]
-    [The protocol type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__resolver_service.query_type [*query_type]]]
-    [The query type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__resolver_service.results_type [*results_type]]]
-    [The results type. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.ip__resolver_service.async_resolve [*async_resolve]]]
-    [Asynchronously resolve a query to a list of entries. 
-
-     Asynchronously resolve an endpoint to a list of entries. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__resolver_service.cancel [*cancel]]]
-    [Cancel pending asynchronous operations. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__resolver_service.construct [*construct]]]
-    [Construct a new resolver implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__resolver_service.destroy [*destroy]]]
-    [Destroy a resolver implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__resolver_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__resolver_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__resolver_service.resolve [*resolve]]]
-    [Resolve a query to a list of entries. 
-
-     Resolve an endpoint to a list of entries. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__resolver_service.resolver_service [*resolver_service]]]
-    [Construct a new resolver service for the specified io_context. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.ip__resolver_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/ip/resolver_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:async_resolve ip::resolver_service::async_resolve]
-
-[indexterm2 async_resolve..ip::resolver_service] 
-Asynchronously resolve a query to a list of entries. 
-
-
-  template<
-      typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.ip__resolver_service.async_resolve.overload1 async_resolve]``(
-      implementation_type & impl,
-      const query_type & query,
-      ResolveHandler && handler);
-  ``  [''''&raquo;''' [link asio.reference.ip__resolver_service.async_resolve.overload1 more...]]``
-
-
-Asynchronously resolve an endpoint to a list of entries. 
-
-
-  template<
-      typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.ip__resolver_service.async_resolve.overload2 async_resolve]``(
-      implementation_type & impl,
-      const endpoint_type & endpoint,
-      ResolveHandler && handler);
-  ``  [''''&raquo;''' [link asio.reference.ip__resolver_service.async_resolve.overload2 more...]]``
-
-
-[section:overload1 ip::resolver_service::async_resolve (1 of 2 overloads)]
-
-
-Asynchronously resolve a query to a list of entries. 
-
-
-  template<
-      typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_resolve(
-      implementation_type & impl,
-      const query_type & query,
-      ResolveHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::resolver_service::async_resolve (2 of 2 overloads)]
-
-
-Asynchronously resolve an endpoint to a list of entries. 
-
-
-  template<
-      typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_resolve(
-      implementation_type & impl,
-      const endpoint_type & endpoint,
-      ResolveHandler && handler);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:cancel ip::resolver_service::cancel]
-
-[indexterm2 cancel..ip::resolver_service] 
-Cancel pending asynchronous operations. 
-
-
-  void cancel(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:construct ip::resolver_service::construct]
-
-[indexterm2 construct..ip::resolver_service] 
-Construct a new resolver implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:destroy ip::resolver_service::destroy]
-
-[indexterm2 destroy..ip::resolver_service] 
-Destroy a resolver implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:endpoint_type ip::resolver_service::endpoint_type]
-
-[indexterm2 endpoint_type..ip::resolver_service] 
-The endpoint type. 
-
-
-  typedef InternetProtocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/resolver_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_io_context ip::resolver_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..ip::resolver_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service ip::resolver_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..ip::resolver_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:id ip::resolver_service::id]
-
-[indexterm2 id..ip::resolver_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type ip::resolver_service::implementation_type]
-
-[indexterm2 implementation_type..ip::resolver_service] 
-The type of a resolver implementation. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/resolver_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:iterator_type ip::resolver_service::iterator_type]
-
-[indexterm2 iterator_type..ip::resolver_service] 
-The iterator type. 
-
-
-  typedef basic_resolver_iterator< InternetProtocol > iterator_type;
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_iterator.difference_type [*difference_type]]]
-    [The type used for the distance between two iterators. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_iterator.iterator_category [*iterator_category]]]
-    [The iterator category. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_iterator.pointer [*pointer]]]
-    [The type of the result of applying operator->() to the iterator. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_iterator.reference [*reference]]]
-    [The type of the result of applying operator*() to the iterator. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_iterator.value_type [*value_type]]]
-    [The type of the value pointed to by the iterator. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator [*basic_resolver_iterator]]]
-    [Default constructor creates an end iterator. 
-
-     Copy constructor. 
-
-     Move constructor. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_iterator.operator__star_ [*operator *]]]
-    [Dereference an iterator. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_iterator.operator_plus__plus_ [*operator++]]]
-    [Increment operator (prefix). 
-
-     Increment operator (postfix). ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_iterator.operator_arrow_ [*operator->]]]
-    [Dereference an iterator. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_iterator.operator_eq_ [*operator=]]]
-    [Assignment operator. 
-
-     Move-assignment operator. ]
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.ip__basic_resolver_iterator.dereference [*dereference]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_iterator.equal [*equal]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_iterator.increment [*increment]]]
-    []
-  ]
-  
-]
-
-[heading Protected Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.ip__basic_resolver_iterator.index_ [*index_]]]
-    []
-  ]
-
-  [
-    [[link asio.reference.ip__basic_resolver_iterator.values_ [*values_]]]
-    []
-  ]
-
-]
-
-[heading Friends]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.ip__basic_resolver_iterator.operator_not__eq_ [*operator!=]]]
-    [Test two iterators for inequality. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_iterator.operator_eq__eq_ [*operator==]]]
-    [Test two iterators for equality. ]
-  ]
-  
-]
-
-The [link asio.reference.ip__basic_resolver_iterator `ip::basic_resolver_iterator`] class template is used to define iterators over the results returned by a resolver.
-
-The iterator's value\_type, obtained when the iterator is dereferenced, is: 
-
-   const basic_resolver_entry<InternetProtocol> 
-
-
-
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe. 
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/resolver_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:protocol_type ip::resolver_service::protocol_type]
-
-[indexterm2 protocol_type..ip::resolver_service] 
-The protocol type. 
-
-
-  typedef InternetProtocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/resolver_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:query_type ip::resolver_service::query_type]
-
-[indexterm2 query_type..ip::resolver_service] 
-The query type. 
-
-
-  typedef basic_resolver_query< InternetProtocol > query_type;
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_query.flags [*flags]]]
-    [A bitmask type (C++ Std \[lib.bitmask.types\]). ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_query.protocol_type [*protocol_type]]]
-    [The protocol type associated with the endpoint query. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.ip__basic_resolver_query.basic_resolver_query [*basic_resolver_query]]]
-    [Construct with specified service name for any protocol. 
-
-     Construct with specified service name for a given protocol. 
-
-     Construct with specified host name and service name for any protocol. 
-
-     Construct with specified host name and service name for a given protocol. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_query.hints [*hints]]]
-    [Get the hints associated with the query. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_query.host_name [*host_name]]]
-    [Get the host name associated with the query. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_query.service_name [*service_name]]]
-    [Get the service name associated with the query. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.ip__basic_resolver_query.address_configured [*address_configured]]]
-    [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
-  ]
-
-  [
-    [[link asio.reference.ip__basic_resolver_query.all_matching [*all_matching]]]
-    [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
-  ]
-
-  [
-    [[link asio.reference.ip__basic_resolver_query.canonical_name [*canonical_name]]]
-    [Determine the canonical name of the host specified in the query. ]
-  ]
-
-  [
-    [[link asio.reference.ip__basic_resolver_query.numeric_host [*numeric_host]]]
-    [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
-  ]
-
-  [
-    [[link asio.reference.ip__basic_resolver_query.numeric_service [*numeric_service]]]
-    [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
-  ]
-
-  [
-    [[link asio.reference.ip__basic_resolver_query.passive [*passive]]]
-    [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
-  ]
-
-  [
-    [[link asio.reference.ip__basic_resolver_query.v4_mapped [*v4_mapped]]]
-    [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
-  ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_query `ip::basic_resolver_query`] class template describes a query that can be passed to a resolver.
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe. 
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/resolver_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:resolve ip::resolver_service::resolve]
-
-[indexterm2 resolve..ip::resolver_service] 
-Resolve a query to a list of entries. 
-
-
-  results_type ``[link asio.reference.ip__resolver_service.resolve.overload1 resolve]``(
-      implementation_type & impl,
-      const query_type & query,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.ip__resolver_service.resolve.overload1 more...]]``
-
-
-Resolve an endpoint to a list of entries. 
-
-
-  results_type ``[link asio.reference.ip__resolver_service.resolve.overload2 resolve]``(
-      implementation_type & impl,
-      const endpoint_type & endpoint,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.ip__resolver_service.resolve.overload2 more...]]``
-
-
-[section:overload1 ip::resolver_service::resolve (1 of 2 overloads)]
-
-
-Resolve a query to a list of entries. 
-
-
-  results_type resolve(
-      implementation_type & impl,
-      const query_type & query,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::resolver_service::resolve (2 of 2 overloads)]
-
-
-Resolve an endpoint to a list of entries. 
-
-
-  results_type resolve(
-      implementation_type & impl,
-      const endpoint_type & endpoint,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:resolver_service ip::resolver_service::resolver_service]
-
-[indexterm2 resolver_service..ip::resolver_service] 
-Construct a new resolver service for the specified [link asio.reference.io_context `io_context`]. 
-
-
-  resolver_service(
-      asio::io_context & io_context);
-
-
-
-[endsect]
-
-
-
-[section:results_type ip::resolver_service::results_type]
-
-[indexterm2 results_type..ip::resolver_service] 
-The results type. 
-
-
-  typedef basic_resolver_results< InternetProtocol > results_type;
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_results.const_iterator [*const_iterator]]]
-    [The type of an iterator into the range. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_results.const_reference [*const_reference]]]
-    [The type of a const reference to a value in the range. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_results.difference_type [*difference_type]]]
-    [Type used to represent the distance between two iterators in the range. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_results.endpoint_type [*endpoint_type]]]
-    [The endpoint type associated with the results. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_results.iterator [*iterator]]]
-    [The type of an iterator into the range. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_results.iterator_category [*iterator_category]]]
-    [The iterator category. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_results.pointer [*pointer]]]
-    [The type of the result of applying operator->() to the iterator. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_results.protocol_type [*protocol_type]]]
-    [The protocol type associated with the results. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_results.reference [*reference]]]
-    [The type of a non-const reference to a value in the range. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_results.size_type [*size_type]]]
-    [Type used to represent a count of the elements in the range. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.ip__basic_resolver_results.value_type [*value_type]]]
-    [The type of a value in the results range. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.ip__basic_resolver_results.basic_resolver_results [*basic_resolver_results]]]
-    [Default constructor creates an empty range. 
-
-     Copy constructor. 
-
-     Move constructor. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.begin [*begin]]]
-    [Obtain a begin iterator for the results range. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.cbegin [*cbegin]]]
-    [Obtain a begin iterator for the results range. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.cend [*cend]]]
-    [Obtain an end iterator for the results range. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.empty [*empty]]]
-    [Determine whether the results range is empty. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.end [*end]]]
-    [Obtain an end iterator for the results range. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.max_size [*max_size]]]
-    [Get the maximum number of entries permitted in a results range. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.operator__star_ [*operator *]]]
-    [Dereference an iterator. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.operator_plus__plus_ [*operator++]]]
-    [Increment operator (prefix). 
-
-     Increment operator (postfix). ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.operator_arrow_ [*operator->]]]
-    [Dereference an iterator. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.operator_eq_ [*operator=]]]
-    [Assignment operator. 
-
-     Move-assignment operator. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.size [*size]]]
-    [Get the number of entries in the results range. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.swap [*swap]]]
-    [Swap the results range with another. ]
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.ip__basic_resolver_results.dereference [*dereference]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.equal [*equal]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.increment [*increment]]]
-    []
-  ]
-  
-]
-
-[heading Protected Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.ip__basic_resolver_results.index_ [*index_]]]
-    []
-  ]
-
-  [
-    [[link asio.reference.ip__basic_resolver_results.values_ [*values_]]]
-    []
-  ]
-
-]
-
-[heading Friends]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.ip__basic_resolver_results.operator_not__eq_ [*operator!=]]]
-    [Test two iterators for inequality. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver_results.operator_eq__eq_ [*operator==]]]
-    [Test two iterators for equality. ]
-  ]
-  
-]
-
-The [link asio.reference.ip__basic_resolver_results `ip::basic_resolver_results`] class template is used to define a range over the results returned by a resolver.
-
-The iterator's value\_type, obtained when a results iterator is dereferenced, is:
-
-   const basic_resolver_entry<InternetProtocol> 
-
-
-
-
-
-[heading Remarks]
-      
-For backward compatibility, [link asio.reference.ip__basic_resolver_results `ip::basic_resolver_results`] is derived from [link asio.reference.ip__basic_resolver_iterator `ip::basic_resolver_iterator`]. This derivation is deprecated.
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe. 
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/resolver_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
 [section:ip__tcp ip::tcp]
 
 
@@ -89789,7 +78594,7 @@
 
 [section:acceptor ip::tcp::acceptor]
 
-[indexterm2 acceptor..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.acceptor..acceptor..ip::tcp] 
 The TCP acceptor type. 
 
 
@@ -89851,13 +78656,6 @@
 
   [
 
-    [[link asio.reference.basic_socket_acceptor.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket_acceptor.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -89928,13 +78726,6 @@
 
   [
 
-    [[link asio.reference.basic_socket_acceptor.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket_acceptor.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -90086,20 +78877,9 @@
     [Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_socket_acceptor.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_acceptor.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_socket_acceptor._basic_socket_acceptor [*~basic_socket_acceptor]]]
+    [Destroys the acceptor. ]
   ]
   
 ]
@@ -90110,6 +78890,11 @@
 
   [
     [[link asio.reference.basic_socket_acceptor.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_socket_acceptor.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -90175,7 +78960,7 @@
 
 [section:endpoint ip::tcp::endpoint]
 
-[indexterm2 endpoint..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.endpoint..endpoint..ip::tcp] 
 The type of a TCP endpoint. 
 
 
@@ -90340,7 +79125,7 @@
 
 [section:family ip::tcp::family]
 
-[indexterm2 family..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.family..family..ip::tcp] 
 Obtain an identifier for the protocol family. 
 
 
@@ -90354,7 +79139,7 @@
 
 [section:iostream ip::tcp::iostream]
 
-[indexterm2 iostream..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.iostream..iostream..ip::tcp] 
 The TCP iostream type. 
 
 
@@ -90367,6 +79152,13 @@
 
   [
 
+    [[link asio.reference.basic_socket_iostream.clock_type [*clock_type]]]
+    [The clock type. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.basic_socket_iostream.duration [*duration]]]
     [The duration type. ]
   
@@ -90388,6 +79180,13 @@
 
   [
 
+    [[link asio.reference.basic_socket_iostream.protocol_type [*protocol_type]]]
+    [The protocol type. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.basic_socket_iostream.time_point [*time_point]]]
     [The time type. ]
   
@@ -90410,6 +79209,10 @@
     [[link asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
     [Construct a basic_socket_iostream without establishing a connection. 
 
+     Construct a basic_socket_iostream from the supplied socket. 
+
+     Move-construct a basic_socket_iostream from another. 
+
      Establish a connection to an endpoint corresponding to a resolver query. ]
   ]
   
@@ -90453,10 +79256,20 @@
   ]
   
   [
+    [[link asio.reference.basic_socket_iostream.operator_eq_ [*operator=]]]
+    [Move-assign a basic_socket_iostream from another. ]
+  ]
+  
+  [
     [[link asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
     [Return a pointer to the underlying streambuf. ]
   ]
   
+  [
+    [[link asio.reference.basic_socket_iostream.socket [*socket]]]
+    [Get a reference to the underlying socket. ]
+  ]
+  
 ]
 
 
@@ -90473,7 +79286,7 @@
 
 [section:no_delay ip::tcp::no_delay]
 
-[indexterm2 no_delay..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.no_delay..no_delay..ip::tcp] 
 Socket option for disabling the Nagle algorithm. 
 
 
@@ -90524,7 +79337,7 @@
 
 [section:operator_not__eq_ ip::tcp::operator!=]
 
-[indexterm2 operator!=..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.operator_not__eq_..operator!=..ip::tcp] 
 Compare two protocols for inequality. 
 
 
@@ -90546,7 +79359,7 @@
 
 [section:operator_eq__eq_ ip::tcp::operator==]
 
-[indexterm2 operator==..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.operator_eq__eq_..operator==..ip::tcp] 
 Compare two protocols for equality. 
 
 
@@ -90568,7 +79381,7 @@
 
 [section:protocol ip::tcp::protocol]
 
-[indexterm2 protocol..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.protocol..protocol..ip::tcp] 
 Obtain an identifier for the protocol. 
 
 
@@ -90582,7 +79395,7 @@
 
 [section:resolver ip::tcp::resolver]
 
-[indexterm2 resolver..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.resolver..resolver..ip::tcp] 
 The TCP resolver type. 
 
 
@@ -90616,13 +79429,6 @@
 
   [
 
-    [[link asio.reference.ip__basic_resolver.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.ip__basic_resolver.iterator [*iterator]]]
     [(Deprecated.) The iterator type. ]
   
@@ -90649,13 +79455,6 @@
   
   ]
 
-  [
-
-    [[link asio.reference.ip__basic_resolver.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -90673,7 +79472,9 @@
   
   [
     [[link asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
-    [Constructor. ]
+    [Constructor. 
+
+     Move-construct a basic_resolver from another. ]
   ]
   
   [
@@ -90697,6 +79498,11 @@
   ]
   
   [
+    [[link asio.reference.ip__basic_resolver.operator_eq_ [*operator=]]]
+    [Move-assign a basic_resolver from another. ]
+  ]
+  
+  [
     [[link asio.reference.ip__basic_resolver.resolve [*resolve]]]
     [(Deprecated.) Perform forward resolution of a query to a list of entries. 
 
@@ -90705,20 +79511,9 @@
      Perform reverse resolution of an endpoint to a list of entries. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.ip__basic_resolver.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.ip__basic_resolver._basic_resolver [*~basic_resolver]]]
+    [Destroys the resolver. ]
   ]
   
 ]
@@ -90789,7 +79584,7 @@
 
 [section:socket ip::tcp::socket]
 
-[indexterm2 socket..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.socket..socket..ip::tcp] 
 The TCP socket type. 
 
 
@@ -90851,13 +79646,6 @@
 
   [
 
-    [[link asio.reference.basic_stream_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -90935,13 +79723,6 @@
 
   [
 
-    [[link asio.reference.basic_stream_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -91155,20 +79936,9 @@
     [Write some data to the socket. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_stream_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_stream_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_stream_socket._basic_stream_socket [*~basic_stream_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -91179,6 +79949,11 @@
 
   [
     [[link asio.reference.basic_stream_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_stream_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -91230,7 +80005,7 @@
 
 [section:type ip::tcp::type]
 
-[indexterm2 type..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.type..type..ip::tcp] 
 Obtain an identifier for the type of the protocol. 
 
 
@@ -91244,7 +80019,7 @@
 
 [section:v4 ip::tcp::v4]
 
-[indexterm2 v4..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.v4..v4..ip::tcp] 
 Construct to represent the IPv4 TCP protocol. 
 
 
@@ -91258,7 +80033,7 @@
 
 [section:v6 ip::tcp::v6]
 
-[indexterm2 v6..ip::tcp] 
+[indexterm2 asio.indexterm.ip__tcp.v6..v6..ip::tcp] 
 Construct to represent the IPv6 TCP protocol. 
 
 
@@ -91376,7 +80151,7 @@
 
 [section:endpoint ip::udp::endpoint]
 
-[indexterm2 endpoint..ip::udp] 
+[indexterm2 asio.indexterm.ip__udp.endpoint..endpoint..ip::udp] 
 The type of a UDP endpoint. 
 
 
@@ -91541,7 +80316,7 @@
 
 [section:family ip::udp::family]
 
-[indexterm2 family..ip::udp] 
+[indexterm2 asio.indexterm.ip__udp.family..family..ip::udp] 
 Obtain an identifier for the protocol family. 
 
 
@@ -91555,7 +80330,7 @@
 
 [section:operator_not__eq_ ip::udp::operator!=]
 
-[indexterm2 operator!=..ip::udp] 
+[indexterm2 asio.indexterm.ip__udp.operator_not__eq_..operator!=..ip::udp] 
 Compare two protocols for inequality. 
 
 
@@ -91577,7 +80352,7 @@
 
 [section:operator_eq__eq_ ip::udp::operator==]
 
-[indexterm2 operator==..ip::udp] 
+[indexterm2 asio.indexterm.ip__udp.operator_eq__eq_..operator==..ip::udp] 
 Compare two protocols for equality. 
 
 
@@ -91599,7 +80374,7 @@
 
 [section:protocol ip::udp::protocol]
 
-[indexterm2 protocol..ip::udp] 
+[indexterm2 asio.indexterm.ip__udp.protocol..protocol..ip::udp] 
 Obtain an identifier for the protocol. 
 
 
@@ -91613,7 +80388,7 @@
 
 [section:resolver ip::udp::resolver]
 
-[indexterm2 resolver..ip::udp] 
+[indexterm2 asio.indexterm.ip__udp.resolver..resolver..ip::udp] 
 The UDP resolver type. 
 
 
@@ -91647,13 +80422,6 @@
 
   [
 
-    [[link asio.reference.ip__basic_resolver.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.ip__basic_resolver.iterator [*iterator]]]
     [(Deprecated.) The iterator type. ]
   
@@ -91680,13 +80448,6 @@
   
   ]
 
-  [
-
-    [[link asio.reference.ip__basic_resolver.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -91704,7 +80465,9 @@
   
   [
     [[link asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
-    [Constructor. ]
+    [Constructor. 
+
+     Move-construct a basic_resolver from another. ]
   ]
   
   [
@@ -91728,6 +80491,11 @@
   ]
   
   [
+    [[link asio.reference.ip__basic_resolver.operator_eq_ [*operator=]]]
+    [Move-assign a basic_resolver from another. ]
+  ]
+  
+  [
     [[link asio.reference.ip__basic_resolver.resolve [*resolve]]]
     [(Deprecated.) Perform forward resolution of a query to a list of entries. 
 
@@ -91736,20 +80504,9 @@
      Perform reverse resolution of an endpoint to a list of entries. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.ip__basic_resolver.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.ip__basic_resolver.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.ip__basic_resolver._basic_resolver [*~basic_resolver]]]
+    [Destroys the resolver. ]
   ]
   
 ]
@@ -91820,7 +80577,7 @@
 
 [section:socket ip::udp::socket]
 
-[indexterm2 socket..ip::udp] 
+[indexterm2 asio.indexterm.ip__udp.socket..socket..ip::udp] 
 The UDP socket type. 
 
 
@@ -91882,13 +80639,6 @@
 
   [
 
-    [[link asio.reference.basic_datagram_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -91966,13 +80716,6 @@
 
   [
 
-    [[link asio.reference.basic_datagram_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_datagram_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -92184,20 +80927,9 @@
     [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_datagram_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_datagram_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_datagram_socket._basic_datagram_socket [*~basic_datagram_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -92208,6 +80940,11 @@
 
   [
     [[link asio.reference.basic_datagram_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_datagram_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -92258,7 +80995,7 @@
 
 [section:type ip::udp::type]
 
-[indexterm2 type..ip::udp] 
+[indexterm2 asio.indexterm.ip__udp.type..type..ip::udp] 
 Obtain an identifier for the type of the protocol. 
 
 
@@ -92272,7 +81009,7 @@
 
 [section:v4 ip::udp::v4]
 
-[indexterm2 v4..ip::udp] 
+[indexterm2 asio.indexterm.ip__udp.v4..v4..ip::udp] 
 Construct to represent the IPv4 UDP protocol. 
 
 
@@ -92286,7 +81023,7 @@
 
 [section:v6 ip::udp::v6]
 
-[indexterm2 v6..ip::udp] 
+[indexterm2 asio.indexterm.ip__udp.v6..v6..ip::udp] 
 Construct to represent the IPv6 UDP protocol. 
 
 
@@ -92303,7 +81040,7 @@
 
 [section:ip__unicast__hops ip::unicast::hops]
 
-[indexterm1 ip::unicast::hops] 
+[indexterm1 asio.indexterm.ip__unicast__hops..ip::unicast::hops] 
 Socket option for time-to-live associated with outgoing unicast packets. 
 
 
@@ -92354,13 +81091,13 @@
 
 [section:ip__v4_mapped_t ip::v4_mapped_t]
 
-[indexterm1 ip::v4_mapped_t] 
+[indexterm1 asio.indexterm.ip__v4_mapped_t..ip::v4_mapped_t] 
 Tag type used for distinguishing overloads that deal in IPv4-mapped IPv6 addresses. 
 
 
   enum v4_mapped_t
 
-[indexterm2 v4_mapped..ip::v4_mapped_t]
+[indexterm2 asio.indexterm.ip__v4_mapped_t.v4_mapped..v4_mapped..ip::v4_mapped_t]
 
 [heading Values]
 [variablelist
@@ -92386,7 +81123,7 @@
 
 [section:ip__v6_only ip::v6_only]
 
-[indexterm1 ip::v6_only] 
+[indexterm1 asio.indexterm.ip__v6_only..ip::v6_only] 
 Socket option for determining whether an IPv6 socket supports IPv6 communication only. 
 
 
@@ -92454,15 +81191,15 @@
 
 [endsect]
 
-[section:is_dynamic_buffer_sequence is_dynamic_buffer_sequence]
+[section:is_dynamic_buffer is_dynamic_buffer]
 
 
-Trait to determine whether a type satisfies the DynamicBufferSequence requirements. 
+Trait to determine whether a type satisfies the DynamicBuffer requirements. 
 
 
   template<
       typename T>
-  struct is_dynamic_buffer_sequence
+  struct is_dynamic_buffer
 
 
 [heading Requirements]
@@ -92505,7 +81242,7 @@
 
 [section:value is_endpoint_sequence::value]
 
-[indexterm2 value..is_endpoint_sequence] 
+[indexterm2 asio.indexterm.is_endpoint_sequence.value..value..is_endpoint_sequence] 
 The value member is true if the type may be used as an endpoint sequence. 
 
 
@@ -92530,7 +81267,7 @@
   struct is_executor
 
 
-Meets the UnaryTypeTrait requirements. The asio library implementation provides a definition that is derived from false\_type. A program may specialise this template to derive from true\_type for a user-defined type T that meets the Executor requirements. 
+Class template `is_executor` is a UnaryTypeTrait that is derived from `true_type` if the type `T` meets the syntactic requirements for Executor, otherwise `false_type`. 
 
 [heading Requirements]
 
@@ -92572,7 +81309,7 @@
 
 [section:value is_match_condition::value]
 
-[indexterm2 value..is_match_condition] 
+[indexterm2 asio.indexterm.is_match_condition.value..value..is_match_condition] 
 The value member is true if the type may be used as a match condition. 
 
 
@@ -92637,7 +81374,7 @@
 
 [section:value is_read_buffered::value]
 
-[indexterm2 value..is_read_buffered] 
+[indexterm2 asio.indexterm.is_read_buffered.value..value..is_read_buffered] 
 The value member is true only if the Stream type supports buffering of read data. 
 
 
@@ -92682,7 +81419,7 @@
 
 [section:value is_write_buffered::value]
 
-[indexterm2 value..is_write_buffered] 
+[indexterm2 asio.indexterm.is_write_buffered.value..value..is_write_buffered] 
 The value member is true only if the Stream type supports buffering of written data. 
 
 
@@ -92846,7 +81583,7 @@
 
 [section:basic_endpoint local::basic_endpoint::basic_endpoint]
 
-[indexterm2 basic_endpoint..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.basic_endpoint..basic_endpoint..local::basic_endpoint] 
 Default constructor. 
 
 
@@ -92937,7 +81674,7 @@
 
 [section:capacity local::basic_endpoint::capacity]
 
-[indexterm2 capacity..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.capacity..capacity..local::basic_endpoint] 
 Get the capacity of the endpoint in the native type. 
 
 
@@ -92950,7 +81687,7 @@
 
 [section:data local::basic_endpoint::data]
 
-[indexterm2 data..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.data..data..local::basic_endpoint] 
 Get the underlying endpoint in the native type. 
 
 
@@ -92993,7 +81730,7 @@
 
 [section:data_type local::basic_endpoint::data_type]
 
-[indexterm2 data_type..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.data_type..data_type..local::basic_endpoint] 
 The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. 
 
 
@@ -93014,7 +81751,7 @@
 
 [section:operator_not__eq_ local::basic_endpoint::operator!=]
 
-[indexterm2 operator!=..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.operator_not__eq_..operator!=..local::basic_endpoint] 
 Compare two endpoints for inequality. 
 
 
@@ -93036,7 +81773,7 @@
 
 [section:operator_lt_ local::basic_endpoint::operator<]
 
-[indexterm2 operator<..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.operator_lt_..operator<..local::basic_endpoint] 
 Compare endpoints for ordering. 
 
 
@@ -93058,7 +81795,7 @@
 
 [section:operator_lt__lt_ local::basic_endpoint::operator<<]
 
-[indexterm2 operator<<..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.operator_lt__lt_..operator<<..local::basic_endpoint] 
 Output an endpoint as a string. 
 
 
@@ -93095,7 +81832,7 @@
 
 [section:operator_lt__eq_ local::basic_endpoint::operator<=]
 
-[indexterm2 operator<=..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.operator_lt__eq_..operator<=..local::basic_endpoint] 
 Compare endpoints for ordering. 
 
 
@@ -93117,7 +81854,7 @@
 
 [section:operator_eq_ local::basic_endpoint::operator=]
 
-[indexterm2 operator=..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.operator_eq_..operator=..local::basic_endpoint] 
 Assign from another endpoint. 
 
 
@@ -93132,7 +81869,7 @@
 
 [section:operator_eq__eq_ local::basic_endpoint::operator==]
 
-[indexterm2 operator==..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.operator_eq__eq_..operator==..local::basic_endpoint] 
 Compare two endpoints for equality. 
 
 
@@ -93154,7 +81891,7 @@
 
 [section:operator_gt_ local::basic_endpoint::operator>]
 
-[indexterm2 operator>..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.operator_gt_..operator>..local::basic_endpoint] 
 Compare endpoints for ordering. 
 
 
@@ -93176,7 +81913,7 @@
 
 [section:operator_gt__eq_ local::basic_endpoint::operator>=]
 
-[indexterm2 operator>=..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.operator_gt__eq_..operator>=..local::basic_endpoint] 
 Compare endpoints for ordering. 
 
 
@@ -93197,7 +81934,7 @@
 
 [section:path local::basic_endpoint::path]
 
-[indexterm2 path..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.path..path..local::basic_endpoint] 
 Get the path associated with the endpoint. 
 
 
@@ -93265,7 +82002,7 @@
 
 [section:protocol local::basic_endpoint::protocol]
 
-[indexterm2 protocol..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.protocol..protocol..local::basic_endpoint] 
 The protocol associated with the endpoint. 
 
 
@@ -93279,7 +82016,7 @@
 
 [section:protocol_type local::basic_endpoint::protocol_type]
 
-[indexterm2 protocol_type..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.protocol_type..protocol_type..local::basic_endpoint] 
 The protocol type associated with the endpoint. 
 
 
@@ -93300,7 +82037,7 @@
 
 [section:resize local::basic_endpoint::resize]
 
-[indexterm2 resize..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.resize..resize..local::basic_endpoint] 
 Set the underlying size of the endpoint in the native type. 
 
 
@@ -93315,7 +82052,7 @@
 
 [section:size local::basic_endpoint::size]
 
-[indexterm2 size..local::basic_endpoint] 
+[indexterm2 asio.indexterm.local__basic_endpoint.size..size..local::basic_endpoint] 
 Get the underlying size of the endpoint in the native type. 
 
 
@@ -93331,26 +82068,22 @@
 
 [section:local__connect_pair local::connect_pair]
 
-[indexterm1 local::connect_pair] 
+[indexterm1 asio.indexterm.local__connect_pair..local::connect_pair] 
 Create a pair of connected sockets. 
 
     
   template<
-      typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService1]``,
-      typename ``[link asio.reference.SocketService SocketService2]``>
+      typename ``[link asio.reference.Protocol Protocol]``>
   void ``[link asio.reference.local__connect_pair.overload1 connect_pair]``(
-      basic_socket< Protocol, SocketService1 > & socket1,
-      basic_socket< Protocol, SocketService2 > & socket2);
+      basic_socket< Protocol > & socket1,
+      basic_socket< Protocol > & socket2);
   ``  [''''&raquo;''' [link asio.reference.local__connect_pair.overload1 more...]]``
 
   template<
-      typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService1]``,
-      typename ``[link asio.reference.SocketService SocketService2]``>
-  asio::error_code ``[link asio.reference.local__connect_pair.overload2 connect_pair]``(
-      basic_socket< Protocol, SocketService1 > & socket1,
-      basic_socket< Protocol, SocketService2 > & socket2,
+      typename ``[link asio.reference.Protocol Protocol]``>
+  void ``[link asio.reference.local__connect_pair.overload2 connect_pair]``(
+      basic_socket< Protocol > & socket1,
+      basic_socket< Protocol > & socket2,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.local__connect_pair.overload2 more...]]``
 
@@ -93368,12 +82101,10 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService1]``,
-      typename ``[link asio.reference.SocketService SocketService2]``>
+      typename ``[link asio.reference.Protocol Protocol]``>
   void connect_pair(
-      basic_socket< Protocol, SocketService1 > & socket1,
-      basic_socket< Protocol, SocketService2 > & socket2);
+      basic_socket< Protocol > & socket1,
+      basic_socket< Protocol > & socket2);
 
 
 
@@ -93388,12 +82119,10 @@
 
 
   template<
-      typename ``[link asio.reference.Protocol Protocol]``,
-      typename ``[link asio.reference.SocketService SocketService1]``,
-      typename ``[link asio.reference.SocketService SocketService2]``>
-  asio::error_code connect_pair(
-      basic_socket< Protocol, SocketService1 > & socket1,
-      basic_socket< Protocol, SocketService2 > & socket2,
+      typename ``[link asio.reference.Protocol Protocol]``>
+  void connect_pair(
+      basic_socket< Protocol > & socket1,
+      basic_socket< Protocol > & socket2,
       asio::error_code & ec);
 
 
@@ -93474,7 +82203,7 @@
 
 [section:endpoint local::datagram_protocol::endpoint]
 
-[indexterm2 endpoint..local::datagram_protocol] 
+[indexterm2 asio.indexterm.local__datagram_protocol.endpoint..endpoint..local::datagram_protocol] 
 The type of a UNIX domain endpoint. 
 
 
@@ -93626,7 +82355,7 @@
 
 [section:family local::datagram_protocol::family]
 
-[indexterm2 family..local::datagram_protocol] 
+[indexterm2 asio.indexterm.local__datagram_protocol.family..family..local::datagram_protocol] 
 Obtain an identifier for the protocol family. 
 
 
@@ -93640,7 +82369,7 @@
 
 [section:protocol local::datagram_protocol::protocol]
 
-[indexterm2 protocol..local::datagram_protocol] 
+[indexterm2 asio.indexterm.local__datagram_protocol.protocol..protocol..local::datagram_protocol] 
 Obtain an identifier for the protocol. 
 
 
@@ -93654,7 +82383,7 @@
 
 [section:socket local::datagram_protocol::socket]
 
-[indexterm2 socket..local::datagram_protocol] 
+[indexterm2 asio.indexterm.local__datagram_protocol.socket..socket..local::datagram_protocol] 
 The UNIX domain socket type. 
 
 
@@ -93716,13 +82445,6 @@
 
   [
 
-    [[link asio.reference.basic_datagram_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -93800,13 +82522,6 @@
 
   [
 
-    [[link asio.reference.basic_datagram_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_datagram_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -94018,20 +82733,9 @@
     [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_datagram_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_datagram_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_datagram_socket._basic_datagram_socket [*~basic_datagram_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -94042,6 +82746,11 @@
 
   [
     [[link asio.reference.basic_datagram_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_datagram_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -94092,7 +82801,7 @@
 
 [section:type local::datagram_protocol::type]
 
-[indexterm2 type..local::datagram_protocol] 
+[indexterm2 asio.indexterm.local__datagram_protocol.type..type..local::datagram_protocol] 
 Obtain an identifier for the type of the protocol. 
 
 
@@ -94191,7 +82900,7 @@
 
 [section:acceptor local::stream_protocol::acceptor]
 
-[indexterm2 acceptor..local::stream_protocol] 
+[indexterm2 asio.indexterm.local__stream_protocol.acceptor..acceptor..local::stream_protocol] 
 The UNIX domain acceptor type. 
 
 
@@ -94253,13 +82962,6 @@
 
   [
 
-    [[link asio.reference.basic_socket_acceptor.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket_acceptor.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -94330,13 +83032,6 @@
 
   [
 
-    [[link asio.reference.basic_socket_acceptor.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_socket_acceptor.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -94488,20 +83183,9 @@
     [Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_socket_acceptor.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_socket_acceptor.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_socket_acceptor._basic_socket_acceptor [*~basic_socket_acceptor]]]
+    [Destroys the acceptor. ]
   ]
   
 ]
@@ -94512,6 +83196,11 @@
 
   [
     [[link asio.reference.basic_socket_acceptor.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_socket_acceptor.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -94577,7 +83266,7 @@
 
 [section:endpoint local::stream_protocol::endpoint]
 
-[indexterm2 endpoint..local::stream_protocol] 
+[indexterm2 asio.indexterm.local__stream_protocol.endpoint..endpoint..local::stream_protocol] 
 The type of a UNIX domain endpoint. 
 
 
@@ -94729,7 +83418,7 @@
 
 [section:family local::stream_protocol::family]
 
-[indexterm2 family..local::stream_protocol] 
+[indexterm2 asio.indexterm.local__stream_protocol.family..family..local::stream_protocol] 
 Obtain an identifier for the protocol family. 
 
 
@@ -94743,7 +83432,7 @@
 
 [section:iostream local::stream_protocol::iostream]
 
-[indexterm2 iostream..local::stream_protocol] 
+[indexterm2 asio.indexterm.local__stream_protocol.iostream..iostream..local::stream_protocol] 
 The UNIX domain iostream type. 
 
 
@@ -94756,6 +83445,13 @@
 
   [
 
+    [[link asio.reference.basic_socket_iostream.clock_type [*clock_type]]]
+    [The clock type. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.basic_socket_iostream.duration [*duration]]]
     [The duration type. ]
   
@@ -94777,6 +83473,13 @@
 
   [
 
+    [[link asio.reference.basic_socket_iostream.protocol_type [*protocol_type]]]
+    [The protocol type. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.basic_socket_iostream.time_point [*time_point]]]
     [The time type. ]
   
@@ -94799,6 +83502,10 @@
     [[link asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
     [Construct a basic_socket_iostream without establishing a connection. 
 
+     Construct a basic_socket_iostream from the supplied socket. 
+
+     Move-construct a basic_socket_iostream from another. 
+
      Establish a connection to an endpoint corresponding to a resolver query. ]
   ]
   
@@ -94842,10 +83549,20 @@
   ]
   
   [
+    [[link asio.reference.basic_socket_iostream.operator_eq_ [*operator=]]]
+    [Move-assign a basic_socket_iostream from another. ]
+  ]
+  
+  [
     [[link asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
     [Return a pointer to the underlying streambuf. ]
   ]
   
+  [
+    [[link asio.reference.basic_socket_iostream.socket [*socket]]]
+    [Get a reference to the underlying socket. ]
+  ]
+  
 ]
 
 
@@ -94862,7 +83579,7 @@
 
 [section:protocol local::stream_protocol::protocol]
 
-[indexterm2 protocol..local::stream_protocol] 
+[indexterm2 asio.indexterm.local__stream_protocol.protocol..protocol..local::stream_protocol] 
 Obtain an identifier for the protocol. 
 
 
@@ -94876,7 +83593,7 @@
 
 [section:socket local::stream_protocol::socket]
 
-[indexterm2 socket..local::stream_protocol] 
+[indexterm2 asio.indexterm.local__stream_protocol.socket..socket..local::stream_protocol] 
 The UNIX domain socket type. 
 
 
@@ -94938,13 +83655,6 @@
 
   [
 
-    [[link asio.reference.basic_stream_socket.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
@@ -95022,13 +83732,6 @@
 
   [
 
-    [[link asio.reference.basic_stream_socket.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
@@ -95242,20 +83945,9 @@
     [Write some data to the socket. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_stream_socket.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_stream_socket.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_stream_socket._basic_stream_socket [*~basic_stream_socket]]]
+    [Destroys the socket. ]
   ]
   
 ]
@@ -95266,6 +83958,11 @@
 
   [
     [[link asio.reference.basic_stream_socket.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.basic_stream_socket.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -95317,7 +84014,7 @@
 
 [section:type local::stream_protocol::type]
 
-[indexterm2 type..local::stream_protocol] 
+[indexterm2 asio.indexterm.local__stream_protocol.type..type..local::stream_protocol] 
 Obtain an identifier for the type of the protocol. 
 
 
@@ -95333,7 +84030,7 @@
 
 [section:make_work_guard make_work_guard]
 
-[indexterm1 make_work_guard] 
+[indexterm1 asio.indexterm.make_work_guard..make_work_guard] 
 Create an [link asio.reference.executor_work_guard `executor_work_guard`]  object. 
 
     
@@ -95492,12 +84189,27 @@
   [[Name][Description]]
 
   [
+    [[link asio.reference.mutable_buffer.data [*data]]]
+    [Get a pointer to the beginning of the memory range. ]
+  ]
+  
+  [
     [[link asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
     [Construct an empty buffer. 
 
      Construct a buffer to represent a given memory range. ]
   ]
   
+  [
+    [[link asio.reference.mutable_buffer.operator_plus__eq_ [*operator+=]]]
+    [Move the start of the buffer by the specified number of bytes. ]
+  ]
+  
+  [
+    [[link asio.reference.mutable_buffer.size [*size]]]
+    [Get the size of the memory range. ]
+  ]
+  
 ]
 
 [heading Related Functions]
@@ -95518,18 +84230,18 @@
   
 
 
-The contents of a buffer may be accessed using the [link asio.reference.buffer_size `buffer_size`]  and [link asio.reference.buffer_cast `buffer_cast`]  functions:
+The contents of a buffer may be accessed using the `data()` and `size()` member functions:
 
 
 
    asio::mutable_buffer b1 = ...;
-   std::size_t s1 = asio::buffer_size(b1);
-   unsigned char* p1 = asio::buffer_cast<unsigned char*>(b1);
+   std::size_t s1 = b1.size();
+   unsigned char* p1 = static_cast<unsigned char*>(b1.data());
 
 
 
 
-The `asio::buffer_cast` function permits violations of type safety, so uses of it in application code should be carefully considered. 
+The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered. 
 
 [heading Requirements]
 
@@ -95537,9 +84249,23 @@
 
 ['Convenience header: ][^asio.hpp]
 
+
+[section:data mutable_buffer::data]
+
+[indexterm2 asio.indexterm.mutable_buffer.data..data..mutable_buffer] 
+Get a pointer to the beginning of the memory range. 
+
+
+  void * data() const;
+
+
+
+[endsect]
+
+
 [section:mutable_buffer mutable_buffer::mutable_buffer]
 
-[indexterm2 mutable_buffer..mutable_buffer] 
+[indexterm2 asio.indexterm.mutable_buffer.mutable_buffer..mutable_buffer..mutable_buffer] 
 Construct an empty buffer. 
 
 
@@ -95589,17 +84315,17 @@
 
 [section:operator_plus_ mutable_buffer::operator+]
 
-[indexterm2 operator+..mutable_buffer] 
+[indexterm2 asio.indexterm.mutable_buffer.operator_plus_..operator+..mutable_buffer] 
 Create a new modifiable buffer that is offset from the start of another. 
 
 
   mutable_buffer ``[link asio.reference.mutable_buffer.operator_plus_.overload1 operator+]``(
       const mutable_buffer & b,
-      std::size_t start);
+      std::size_t n);
   ``  [''''&raquo;''' [link asio.reference.mutable_buffer.operator_plus_.overload1 more...]]``
 
   mutable_buffer ``[link asio.reference.mutable_buffer.operator_plus_.overload2 operator+]``(
-      std::size_t start,
+      std::size_t n,
       const mutable_buffer & b);
   ``  [''''&raquo;''' [link asio.reference.mutable_buffer.operator_plus_.overload2 more...]]``
 
@@ -95612,7 +84338,7 @@
 
   mutable_buffer operator+(
       const mutable_buffer & b,
-      std::size_t start);
+      std::size_t n);
 
 
 
@@ -95627,7 +84353,7 @@
 
 
   mutable_buffer operator+(
-      std::size_t start,
+      std::size_t n,
       const mutable_buffer & b);
 
 
@@ -95638,12 +84364,41 @@
 [endsect]
 
 
+[section:operator_plus__eq_ mutable_buffer::operator+=]
+
+[indexterm2 asio.indexterm.mutable_buffer.operator_plus__eq_..operator+=..mutable_buffer] 
+Move the start of the buffer by the specified number of bytes. 
+
+
+  mutable_buffer & operator+=(
+      std::size_t n);
+
+
+
+[endsect]
+
+
+
+[section:size mutable_buffer::size]
+
+[indexterm2 asio.indexterm.mutable_buffer.size..size..mutable_buffer] 
+Get the size of the memory range. 
+
+
+  std::size_t size() const;
+
+
+
+[endsect]
+
+
+
 [endsect]
 
 [section:mutable_buffers_1 mutable_buffers_1]
 
 
-Adapts a single modifiable buffer so that it meets the requirements of the MutableBufferSequence concept. 
+(Deprecated: Use [link asio.reference.mutable_buffer `mutable_buffer`].) Adapts a single modifiable buffer so that it meets the requirements of the MutableBufferSequence concept. 
 
 
   class mutable_buffers_1 :
@@ -95680,6 +84435,11 @@
   ]
   
   [
+    [[link asio.reference.mutable_buffers_1.data [*data]]]
+    [Get a pointer to the beginning of the memory range. ]
+  ]
+  
+  [
     [[link asio.reference.mutable_buffers_1.end [*end]]]
     [Get a random-access iterator for one past the last element. ]
   ]
@@ -95691,6 +84451,16 @@
      Construct to represent a single modifiable buffer. ]
   ]
   
+  [
+    [[link asio.reference.mutable_buffers_1.operator_plus__eq_ [*operator+=]]]
+    [Move the start of the buffer by the specified number of bytes. ]
+  ]
+  
+  [
+    [[link asio.reference.mutable_buffers_1.size [*size]]]
+    [Get the size of the memory range. ]
+  ]
+  
 ]
 
 [heading Related Functions]
@@ -95713,7 +84483,7 @@
 
 [section:begin mutable_buffers_1::begin]
 
-[indexterm2 begin..mutable_buffers_1] 
+[indexterm2 asio.indexterm.mutable_buffers_1.begin..begin..mutable_buffers_1] 
 Get a random-access iterator to the first element. 
 
 
@@ -95727,7 +84497,7 @@
 
 [section:const_iterator mutable_buffers_1::const_iterator]
 
-[indexterm2 const_iterator..mutable_buffers_1] 
+[indexterm2 asio.indexterm.mutable_buffers_1.const_iterator..const_iterator..mutable_buffers_1] 
 A random-access iterator type that may be used to read elements. 
 
 
@@ -95746,9 +84516,26 @@
 
 
 
+[section:data mutable_buffers_1::data]
+
+
+['Inherited from mutable_buffer.]
+
+[indexterm2 asio.indexterm.mutable_buffers_1.data..data..mutable_buffers_1] 
+Get a pointer to the beginning of the memory range. 
+
+
+  void * data() const;
+
+
+
+[endsect]
+
+
+
 [section:end mutable_buffers_1::end]
 
-[indexterm2 end..mutable_buffers_1] 
+[indexterm2 asio.indexterm.mutable_buffers_1.end..end..mutable_buffers_1] 
 Get a random-access iterator for one past the last element. 
 
 
@@ -95761,7 +84548,7 @@
 
 [section:mutable_buffers_1 mutable_buffers_1::mutable_buffers_1]
 
-[indexterm2 mutable_buffers_1..mutable_buffers_1] 
+[indexterm2 asio.indexterm.mutable_buffers_1.mutable_buffers_1..mutable_buffers_1..mutable_buffers_1] 
 Construct to represent a given memory range. 
 
 
@@ -95813,17 +84600,17 @@
 
 [section:operator_plus_ mutable_buffers_1::operator+]
 
-[indexterm2 operator+..mutable_buffers_1] 
+[indexterm2 asio.indexterm.mutable_buffers_1.operator_plus_..operator+..mutable_buffers_1] 
 Create a new modifiable buffer that is offset from the start of another. 
 
 
   mutable_buffer ``[link asio.reference.mutable_buffers_1.operator_plus_.overload1 operator+]``(
       const mutable_buffer & b,
-      std::size_t start);
+      std::size_t n);
   ``  [''''&raquo;''' [link asio.reference.mutable_buffers_1.operator_plus_.overload1 more...]]``
 
   mutable_buffer ``[link asio.reference.mutable_buffers_1.operator_plus_.overload2 operator+]``(
-      std::size_t start,
+      std::size_t n,
       const mutable_buffer & b);
   ``  [''''&raquo;''' [link asio.reference.mutable_buffers_1.operator_plus_.overload2 more...]]``
 
@@ -95839,7 +84626,7 @@
 
   mutable_buffer operator+(
       const mutable_buffer & b,
-      std::size_t start);
+      std::size_t n);
 
 
 
@@ -95857,7 +84644,7 @@
 
 
   mutable_buffer operator+(
-      std::size_t start,
+      std::size_t n,
       const mutable_buffer & b);
 
 
@@ -95868,9 +84655,44 @@
 [endsect]
 
 
+[section:operator_plus__eq_ mutable_buffers_1::operator+=]
+
+
+['Inherited from mutable_buffer.]
+
+[indexterm2 asio.indexterm.mutable_buffers_1.operator_plus__eq_..operator+=..mutable_buffers_1] 
+Move the start of the buffer by the specified number of bytes. 
+
+
+  mutable_buffer & operator+=(
+      std::size_t n);
+
+
+
+[endsect]
+
+
+
+[section:size mutable_buffers_1::size]
+
+
+['Inherited from mutable_buffer.]
+
+[indexterm2 asio.indexterm.mutable_buffers_1.size..size..mutable_buffers_1] 
+Get the size of the memory range. 
+
+
+  std::size_t size() const;
+
+
+
+[endsect]
+
+
+
 [section:value_type mutable_buffers_1::value_type]
 
-[indexterm2 value_type..mutable_buffers_1] 
+[indexterm2 asio.indexterm.mutable_buffers_1.value_type..value_type..mutable_buffers_1] 
 The type for each element in the list of buffers. 
 
 
@@ -95882,12 +84704,27 @@
   [[Name][Description]]
 
   [
+    [[link asio.reference.mutable_buffer.data [*data]]]
+    [Get a pointer to the beginning of the memory range. ]
+  ]
+  
+  [
     [[link asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
     [Construct an empty buffer. 
 
      Construct a buffer to represent a given memory range. ]
   ]
   
+  [
+    [[link asio.reference.mutable_buffer.operator_plus__eq_ [*operator+=]]]
+    [Move the start of the buffer by the specified number of bytes. ]
+  ]
+  
+  [
+    [[link asio.reference.mutable_buffer.size [*size]]]
+    [Get the size of the memory range. ]
+  ]
+  
 ]
 
 [heading Related Functions]
@@ -95908,18 +84745,18 @@
   
 
 
-The contents of a buffer may be accessed using the [link asio.reference.buffer_size `buffer_size`]  and [link asio.reference.buffer_cast `buffer_cast`]  functions:
+The contents of a buffer may be accessed using the `data()` and `size()` member functions:
 
 
 
    asio::mutable_buffer b1 = ...;
-   std::size_t s1 = asio::buffer_size(b1);
-   unsigned char* p1 = asio::buffer_cast<unsigned char*>(b1);
+   std::size_t s1 = b1.size();
+   unsigned char* p1 = static_cast<unsigned char*>(b1.data());
 
 
 
 
-The `asio::buffer_cast` function permits violations of type safety, so uses of it in application code should be carefully considered. 
+The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered. 
 
 
 [heading Requirements]
@@ -95989,7 +84826,7 @@
 
 [section:begin null_buffers::begin]
 
-[indexterm2 begin..null_buffers] 
+[indexterm2 asio.indexterm.null_buffers.begin..begin..null_buffers] 
 Get a random-access iterator to the first element. 
 
 
@@ -96003,7 +84840,7 @@
 
 [section:const_iterator null_buffers::const_iterator]
 
-[indexterm2 const_iterator..null_buffers] 
+[indexterm2 asio.indexterm.null_buffers.const_iterator..const_iterator..null_buffers] 
 A random-access iterator type that may be used to read elements. 
 
 
@@ -96024,7 +84861,7 @@
 
 [section:end null_buffers::end]
 
-[indexterm2 end..null_buffers] 
+[indexterm2 asio.indexterm.null_buffers.end..end..null_buffers] 
 Get a random-access iterator for one past the last element. 
 
 
@@ -96038,7 +84875,7 @@
 
 [section:value_type null_buffers::value_type]
 
-[indexterm2 value_type..null_buffers] 
+[indexterm2 asio.indexterm.null_buffers.value_type..value_type..null_buffers] 
 The type for each element in the list of buffers. 
 
 
@@ -96050,12 +84887,27 @@
   [[Name][Description]]
 
   [
+    [[link asio.reference.mutable_buffer.data [*data]]]
+    [Get a pointer to the beginning of the memory range. ]
+  ]
+  
+  [
     [[link asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
     [Construct an empty buffer. 
 
      Construct a buffer to represent a given memory range. ]
   ]
   
+  [
+    [[link asio.reference.mutable_buffer.operator_plus__eq_ [*operator+=]]]
+    [Move the start of the buffer by the specified number of bytes. ]
+  ]
+  
+  [
+    [[link asio.reference.mutable_buffer.size [*size]]]
+    [Get the size of the memory range. ]
+  ]
+  
 ]
 
 [heading Related Functions]
@@ -96076,18 +84928,18 @@
   
 
 
-The contents of a buffer may be accessed using the [link asio.reference.buffer_size `buffer_size`]  and [link asio.reference.buffer_cast `buffer_cast`]  functions:
+The contents of a buffer may be accessed using the `data()` and `size()` member functions:
 
 
 
    asio::mutable_buffer b1 = ...;
-   std::size_t s1 = asio::buffer_size(b1);
-   unsigned char* p1 = asio::buffer_cast<unsigned char*>(b1);
+   std::size_t s1 = b1.size();
+   unsigned char* p1 = static_cast<unsigned char*>(b1.data());
 
 
 
 
-The `asio::buffer_cast` function permits violations of type safety, so uses of it in application code should be carefully considered. 
+The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered. 
 
 
 [heading Requirements]
@@ -96106,7 +84958,7 @@
 
 [section:operator_lt__lt_ operator<<]
 
-[indexterm1 operator<<] 
+[indexterm1 asio.indexterm.operator_lt__lt_..operator<<] 
 Output an error code. 
 
 
@@ -96128,394 +84980,10 @@
 [endsect]
 
 
-[section:package package]
-
-[indexterm1 package] 
-Wrap a function object in a packaged task. 
-
-    
-  template<
-      typename Function>
-  packaged_token< typename decay< Function >::type, std::allocator< void > > ``[link asio.reference.package.overload1 package]``(
-      Function && function);
-  ``  [''''&raquo;''' [link asio.reference.package.overload1 more...]]``
-
-  template<
-      typename Function,
-      typename Allocator>
-  packaged_token< typename decay< Function >::type, Allocator > ``[link asio.reference.package.overload2 package]``(
-      Function && function,
-      const Allocator & a);
-  ``  [''''&raquo;''' [link asio.reference.package.overload2 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/package.hpp]
-
-['Convenience header: ]None
-
-
-[section:overload1 package (1 of 2 overloads)]
-
-
-Wrap a function object in a packaged task. 
-
-
-  template<
-      typename Function>
-  packaged_token< typename decay< Function >::type, std::allocator< void > > package(
-      Function && function);
-
-
-The `package` function is used to adapt a function object as a packaged task. When this adapter is passed as a completion token to an asynchronous operation, the result of the function object is retuned via a std::future.
-
-
-[heading Example]
-  
-
-
-
-
-   std::future<std::size_t> fut =
-     my_socket.async_read_some(buffer,
-       package([](asio::error_code ec, std::size_t n)
-         {
-           return ec ? 0 : n;
-         }));
-   ...
-   std::size_t n = fut.get(); 
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 package (2 of 2 overloads)]
-
-
-Wrap a function object in a packaged task. 
-
-
-  template<
-      typename Function,
-      typename Allocator>
-  packaged_token< typename decay< Function >::type, Allocator > package(
-      Function && function,
-      const Allocator & a);
-
-
-The `package` function is used to adapt a function object as a packaged task. When this adapter is passed as a completion token to an asynchronous operation, the result of the function object is retuned via a std::future.
-
-
-[heading Example]
-  
-
-
-
-
-   std::future<std::size_t> fut =
-     my_socket.async_read_some(buffer,
-       package([](asio::error_code ec, std::size_t n)
-         {
-           return ec ? 0 : n;
-         }));
-   ...
-   std::size_t n = fut.get(); 
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:packaged_handler packaged_handler]
-
-
-A packaged\_task with an associated allocator. 
-
-
-  template<
-      typename Signature,
-      typename Allocator>
-  class packaged_handler
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.packaged_handler.allocator_type [*allocator_type]]]
-    [The allocator type. The allocator is used when constructing the std::promise object for a given asynchronous operation. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.packaged_handler.get_allocator [*get_allocator]]]
-    [Obtain allocator. ]
-  ]
-  
-  [
-    [[link asio.reference.packaged_handler.packaged_handler [*packaged_handler]]]
-    [Construct from a packaged token. 
-
-     Move construct from another packaged handler. ]
-  ]
-  
-]
-
-[heading Requirements]
-
-['Header: ][^asio/package.hpp]
-
-['Convenience header: ]None
-
-
-[section:allocator_type packaged_handler::allocator_type]
-
-[indexterm2 allocator_type..packaged_handler] 
-The allocator type. The allocator is used when constructing the `std::promise` object for a given asynchronous operation. 
-
-
-  typedef Allocator allocator_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/package.hpp]
-
-['Convenience header: ]None
-
-
-[endsect]
-
-
-
-[section:get_allocator packaged_handler::get_allocator]
-
-[indexterm2 get_allocator..packaged_handler] 
-Obtain allocator. 
-
-
-  allocator_type get_allocator() const;
-
-
-
-[endsect]
-
-
-[section:packaged_handler packaged_handler::packaged_handler]
-
-[indexterm2 packaged_handler..packaged_handler] 
-Construct from a packaged token. 
-
-
-  template<
-      typename Function>
-  ``[link asio.reference.packaged_handler.packaged_handler.overload1 packaged_handler]``(
-      packaged_token< Function, Allocator > && token);
-  ``  [''''&raquo;''' [link asio.reference.packaged_handler.packaged_handler.overload1 more...]]``
-
-
-Move construct from another packaged handler. 
-
-
-  ``[link asio.reference.packaged_handler.packaged_handler.overload2 packaged_handler]``(
-      packaged_handler && other);
-  ``  [''''&raquo;''' [link asio.reference.packaged_handler.packaged_handler.overload2 more...]]``
-
-
-[section:overload1 packaged_handler::packaged_handler (1 of 2 overloads)]
-
-
-Construct from a packaged token. 
-
-
-  template<
-      typename Function>
-  packaged_handler(
-      packaged_token< Function, Allocator > && token);
-
-
-
-[endsect]
-
-
-
-[section:overload2 packaged_handler::packaged_handler (2 of 2 overloads)]
-
-
-Move construct from another packaged handler. 
-
-
-  packaged_handler(
-      packaged_handler && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:packaged_token packaged_token]
-
-
-Class to enable lazy construction of a packaged\_task from a completion token. 
-
-
-  template<
-      typename Function,
-      typename Allocator = std::allocator<void>>
-  class packaged_token
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.packaged_token.allocator_type [*allocator_type]]]
-    [The allocator type. The allocator is used when constructing the std::promise object for a given asynchronous operation. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.packaged_token.get_allocator [*get_allocator]]]
-    [Obtain allocator. ]
-  ]
-  
-  [
-    [[link asio.reference.packaged_token.packaged_token [*packaged_token]]]
-    [Construct using specified allocator. ]
-  ]
-  
-]
-
-The [link asio.reference.packaged_token `packaged_token`] class is used to adapt a function object as a packaged task. When this adapter is passed as a completion token to an asynchronous operation, the result of the function object is retuned via a std::future.
-
-Use the [link asio.reference.package `package`]  function rather than using this class directly. 
-
-[heading Requirements]
-
-['Header: ][^asio/package.hpp]
-
-['Convenience header: ]None
-
-
-[section:allocator_type packaged_token::allocator_type]
-
-[indexterm2 allocator_type..packaged_token] 
-The allocator type. The allocator is used when constructing the `std::promise` object for a given asynchronous operation. 
-
-
-  typedef Allocator allocator_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/package.hpp]
-
-['Convenience header: ]None
-
-
-[endsect]
-
-
-
-[section:get_allocator packaged_token::get_allocator]
-
-[indexterm2 get_allocator..packaged_token] 
-Obtain allocator. 
-
-
-  allocator_type get_allocator() const;
-
-
-
-[endsect]
-
-
-[section:packaged_token packaged_token::packaged_token]
-
-[indexterm2 packaged_token..packaged_token] 
-Construct using specified allocator. 
-
-
-  explicit ``[link asio.reference.packaged_token.packaged_token.overload1 packaged_token]``(
-      Function f);
-  ``  [''''&raquo;''' [link asio.reference.packaged_token.packaged_token.overload1 more...]]``
-
-  ``[link asio.reference.packaged_token.packaged_token.overload2 packaged_token]``(
-      Function f,
-      const Allocator & allocator);
-  ``  [''''&raquo;''' [link asio.reference.packaged_token.packaged_token.overload2 more...]]``
-
-
-[section:overload1 packaged_token::packaged_token (1 of 2 overloads)]
-
-
-Construct using specified allocator. 
-
-
-  packaged_token(
-      Function f);
-
-
-
-[endsect]
-
-
-
-[section:overload2 packaged_token::packaged_token (2 of 2 overloads)]
-
-
-Construct using specified allocator. 
-
-
-  packaged_token(
-      Function f,
-      const Allocator & allocator);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
 
 [section:placeholders__bytes_transferred placeholders::bytes_transferred]
 
-[indexterm1 placeholders::bytes_transferred] 
+[indexterm1 asio.indexterm.placeholders__bytes_transferred..placeholders::bytes_transferred] 
 An argument placeholder, for use with boost::bind(), that corresponds to the bytes\_transferred argument of a handler for asynchronous functions such as `asio::basic_stream_socket::async_write_some` or `asio::async_write`. 
 
 
@@ -96535,7 +85003,7 @@
 
 [section:placeholders__endpoint placeholders::endpoint]
 
-[indexterm1 placeholders::endpoint] 
+[indexterm1 asio.indexterm.placeholders__endpoint..placeholders::endpoint] 
 An argument placeholder, for use with boost::bind(), that corresponds to the results argument of a handler for asynchronous functions such as `asio::async_connect`. 
 
 
@@ -96555,7 +85023,7 @@
 
 [section:placeholders__error placeholders::error]
 
-[indexterm1 placeholders::error] 
+[indexterm1 asio.indexterm.placeholders__error..placeholders::error] 
 An argument placeholder, for use with boost::bind(), that corresponds to the error argument of a handler for any of the asynchronous functions. 
 
 
@@ -96575,7 +85043,7 @@
 
 [section:placeholders__iterator placeholders::iterator]
 
-[indexterm1 placeholders::iterator] 
+[indexterm1 asio.indexterm.placeholders__iterator..placeholders::iterator] 
 An argument placeholder, for use with boost::bind(), that corresponds to the iterator argument of a handler for asynchronous functions such as `asio::async_connect`. 
 
 
@@ -96595,7 +85063,7 @@
 
 [section:placeholders__results placeholders::results]
 
-[indexterm1 placeholders::results] 
+[indexterm1 asio.indexterm.placeholders__results..placeholders::results] 
 An argument placeholder, for use with boost::bind(), that corresponds to the results argument of a handler for asynchronous functions such as asio::basic\_resolver::async\_resolve. 
 
 
@@ -96615,7 +85083,7 @@
 
 [section:placeholders__signal_number placeholders::signal_number]
 
-[indexterm1 placeholders::signal_number] 
+[indexterm1 asio.indexterm.placeholders__signal_number..placeholders::signal_number] 
 An argument placeholder, for use with boost::bind(), that corresponds to the signal\_number argument of a handler for asynchronous functions such as `asio::signal_set::async_wait`. 
 
 
@@ -96632,16 +85100,13 @@
 [endsect]
 
 
-[section:posix__basic_descriptor posix::basic_descriptor]
+[section:posix__descriptor posix::descriptor]
 
 
 Provides POSIX descriptor functionality. 
 
 
-  template<
-      typename ``[link asio.reference.DescriptorService DescriptorService]``>
-  class basic_descriptor :
-    public basic_io_object< DescriptorService >,
+  class descriptor :
     public posix::descriptor_base
 
 
@@ -96651,49 +85116,35 @@
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.bytes_readable [*bytes_readable]]]
+    [[link asio.reference.posix__descriptor.bytes_readable [*bytes_readable]]]
     [IO control command to get the amount of data that can be read without blocking. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.executor_type [*executor_type]]]
+    [[link asio.reference.posix__descriptor.executor_type [*executor_type]]]
     [The type of the executor associated with the object. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
+    [[link asio.reference.posix__descriptor.lowest_layer_type [*lowest_layer_type]]]
+    [A descriptor is always the lowest layer. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_descriptor is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_descriptor.native_handle_type [*native_handle_type]]]
+    [[link asio.reference.posix__descriptor.native_handle_type [*native_handle_type]]]
     [The native representation of a descriptor. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_descriptor.wait_type [*wait_type]]]
+    [[link asio.reference.posix__descriptor.wait_type [*wait_type]]]
     [Wait types. ]
   
   ]
@@ -96705,97 +85156,97 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.posix__basic_descriptor.assign [*assign]]]
+    [[link asio.reference.posix__descriptor.assign [*assign]]]
     [Assign an existing native descriptor to the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.async_wait [*async_wait]]]
+    [[link asio.reference.posix__descriptor.async_wait [*async_wait]]]
     [Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.basic_descriptor [*basic_descriptor]]]
-    [Construct a basic_descriptor without opening it. 
-
-     Construct a basic_descriptor on an existing native descriptor. 
-
-     Move-construct a basic_descriptor from another. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_descriptor.cancel [*cancel]]]
+    [[link asio.reference.posix__descriptor.cancel [*cancel]]]
     [Cancel all asynchronous operations associated with the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.close [*close]]]
+    [[link asio.reference.posix__descriptor.close [*close]]]
     [Close the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.get_executor [*get_executor]]]
+    [[link asio.reference.posix__descriptor.descriptor [*descriptor]]]
+    [Construct a descriptor without opening it. 
+
+     Construct a descriptor on an existing native descriptor. 
+
+     Move-construct a descriptor from another. ]
+  ]
+  
+  [
+    [[link asio.reference.posix__descriptor.get_executor [*get_executor]]]
     [Get the executor associated with the object. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.get_io_context [*get_io_context]]]
+    [[link asio.reference.posix__descriptor.get_io_context [*get_io_context]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.get_io_service [*get_io_service]]]
+    [[link asio.reference.posix__descriptor.get_io_service [*get_io_service]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.io_control [*io_control]]]
+    [[link asio.reference.posix__descriptor.io_control [*io_control]]]
     [Perform an IO control command on the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.is_open [*is_open]]]
+    [[link asio.reference.posix__descriptor.is_open [*is_open]]]
     [Determine whether the descriptor is open. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.lowest_layer [*lowest_layer]]]
+    [[link asio.reference.posix__descriptor.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. 
 
      Get a const reference to the lowest layer. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.native_handle [*native_handle]]]
+    [[link asio.reference.posix__descriptor.native_handle [*native_handle]]]
     [Get the native descriptor representation. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.native_non_blocking [*native_non_blocking]]]
+    [[link asio.reference.posix__descriptor.native_non_blocking [*native_non_blocking]]]
     [Gets the non-blocking mode of the native descriptor implementation. 
 
      Sets the non-blocking mode of the native descriptor implementation. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.non_blocking [*non_blocking]]]
+    [[link asio.reference.posix__descriptor.non_blocking [*non_blocking]]]
     [Gets the non-blocking mode of the descriptor. 
 
      Sets the non-blocking mode of the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.operator_eq_ [*operator=]]]
-    [Move-assign a basic_descriptor from another. ]
+    [[link asio.reference.posix__descriptor.operator_eq_ [*operator=]]]
+    [Move-assign a descriptor from another. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.release [*release]]]
+    [[link asio.reference.posix__descriptor.release [*release]]]
     [Release ownership of the native descriptor implementation. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.wait [*wait]]]
+    [[link asio.reference.posix__descriptor.wait [*wait]]]
     [Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
@@ -96806,23 +85257,13 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.posix__basic_descriptor.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_descriptor.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_descriptor._basic_descriptor [*~basic_descriptor]]]
+    [[link asio.reference.posix__descriptor._descriptor [*~descriptor]]]
     [Protected destructor to prevent deletion through this type. ]
   ]
   
 ]
 
-The [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] class template provides the ability to wrap a POSIX descriptor.
+The [link asio.reference.posix__descriptor `posix::descriptor`] class template provides the ability to wrap a POSIX descriptor.
 
 
 [heading Thread Safety]
@@ -96835,27 +85276,27 @@
 
 [heading Requirements]
 
-['Header: ][^asio/posix/basic_descriptor.hpp]
+['Header: ][^asio/posix/descriptor.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
-[section:assign posix::basic_descriptor::assign]
+[section:assign posix::descriptor::assign]
 
-[indexterm2 assign..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.assign..assign..posix::descriptor] 
 Assign an existing native descriptor to the descriptor. 
 
 
-  void ``[link asio.reference.posix__basic_descriptor.assign.overload1 assign]``(
+  void ``[link asio.reference.posix__descriptor.assign.overload1 assign]``(
       const native_handle_type & native_descriptor);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.assign.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.assign.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.posix__basic_descriptor.assign.overload2 assign]``(
+  void ``[link asio.reference.posix__descriptor.assign.overload2 assign]``(
       const native_handle_type & native_descriptor,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.assign.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.assign.overload2 more...]]``
 
 
-[section:overload1 posix::basic_descriptor::assign (1 of 2 overloads)]
+[section:overload1 posix::descriptor::assign (1 of 2 overloads)]
 
 
 Assign an existing native descriptor to the descriptor. 
@@ -96870,13 +85311,13 @@
 
 
 
-[section:overload2 posix::basic_descriptor::assign (2 of 2 overloads)]
+[section:overload2 posix::descriptor::assign (2 of 2 overloads)]
 
 
 Assign an existing native descriptor to the descriptor. 
 
 
-  asio::error_code assign(
+  void assign(
       const native_handle_type & native_descriptor,
       asio::error_code & ec);
 
@@ -96888,15 +85329,15 @@
 [endsect]
 
 
-[section:async_wait posix::basic_descriptor::async_wait]
+[section:async_wait posix::descriptor::async_wait]
 
-[indexterm2 async_wait..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.async_wait..async_wait..posix::descriptor] 
 Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. 
 
 
   template<
       typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
       wait_type w,
       WaitHandler && handler);
 
@@ -96951,41 +85392,225 @@
 [endsect]
 
 
-[section:basic_descriptor posix::basic_descriptor::basic_descriptor]
 
-[indexterm2 basic_descriptor..posix::basic_descriptor] 
-Construct a [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] without opening it. 
+[section:bytes_readable posix::descriptor::bytes_readable]
+
+[indexterm2 asio.indexterm.posix__descriptor.bytes_readable..bytes_readable..posix::descriptor] 
+IO control command to get the amount of data that can be read without blocking. 
 
 
-  explicit ``[link asio.reference.posix__basic_descriptor.basic_descriptor.overload1 basic_descriptor]``(
+  typedef implementation_defined bytes_readable;
+
+
+
+Implements the FIONREAD IO control command.
+
+
+[heading Example]
+  
+
+
+   asio::posix::stream_descriptor descriptor(io_context); 
+   ...
+   asio::descriptor_base::bytes_readable command(true);
+   descriptor.io_control(command);
+   std::size_t bytes_readable = command.get();
+
+
+
+
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/posix/descriptor.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
+[section:cancel posix::descriptor::cancel]
+
+[indexterm2 asio.indexterm.posix__descriptor.cancel..cancel..posix::descriptor] 
+Cancel all asynchronous operations associated with the descriptor. 
+
+
+  void ``[link asio.reference.posix__descriptor.cancel.overload1 cancel]``();
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.cancel.overload1 more...]]``
+
+  void ``[link asio.reference.posix__descriptor.cancel.overload2 cancel]``(
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.cancel.overload2 more...]]``
+
+
+[section:overload1 posix::descriptor::cancel (1 of 2 overloads)]
+
+
+Cancel all asynchronous operations associated with the descriptor. 
+
+
+  void cancel();
+
+
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 posix::descriptor::cancel (2 of 2 overloads)]
+
+
+Cancel all asynchronous operations associated with the descriptor. 
+
+
+  void cancel(
+      asio::error_code & ec);
+
+
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:close posix::descriptor::close]
+
+[indexterm2 asio.indexterm.posix__descriptor.close..close..posix::descriptor] 
+Close the descriptor. 
+
+
+  void ``[link asio.reference.posix__descriptor.close.overload1 close]``();
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.close.overload1 more...]]``
+
+  void ``[link asio.reference.posix__descriptor.close.overload2 close]``(
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.close.overload2 more...]]``
+
+
+[section:overload1 posix::descriptor::close (1 of 2 overloads)]
+
+
+Close the descriptor. 
+
+
+  void close();
+
+
+This function is used to close the descriptor. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. Note that, even if the function indicates an error, the underlying descriptor is closed. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 posix::descriptor::close (2 of 2 overloads)]
+
+
+Close the descriptor. 
+
+
+  void close(
+      asio::error_code & ec);
+
+
+This function is used to close the descriptor. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[ec][Set to indicate what error occurred, if any. Note that, even if the function indicates an error, the underlying descriptor is closed. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:descriptor posix::descriptor::descriptor]
+
+[indexterm2 asio.indexterm.posix__descriptor.descriptor..descriptor..posix::descriptor] 
+Construct a descriptor without opening it. 
+
+
+  explicit ``[link asio.reference.posix__descriptor.descriptor.overload1 descriptor]``(
       asio::io_context & io_context);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.basic_descriptor.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.descriptor.overload1 more...]]``
 
 
-Construct a [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] on an existing native descriptor. 
+Construct a descriptor on an existing native descriptor. 
 
 
-  ``[link asio.reference.posix__basic_descriptor.basic_descriptor.overload2 basic_descriptor]``(
+  ``[link asio.reference.posix__descriptor.descriptor.overload2 descriptor]``(
       asio::io_context & io_context,
       const native_handle_type & native_descriptor);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.basic_descriptor.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.descriptor.overload2 more...]]``
 
 
-Move-construct a [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] from another. 
+Move-construct a descriptor from another. 
 
 
-  ``[link asio.reference.posix__basic_descriptor.basic_descriptor.overload3 basic_descriptor]``(
-      basic_descriptor && other);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.basic_descriptor.overload3 more...]]``
+  ``[link asio.reference.posix__descriptor.descriptor.overload3 descriptor]``(
+      descriptor && other);
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.descriptor.overload3 more...]]``
 
 
-[section:overload1 posix::basic_descriptor::basic_descriptor (1 of 3 overloads)]
+[section:overload1 posix::descriptor::descriptor (1 of 3 overloads)]
 
 
-Construct a [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] without opening it. 
+Construct a descriptor without opening it. 
 
 
-  basic_descriptor(
+  descriptor(
       asio::io_context & io_context);
 
 
@@ -97008,13 +85633,13 @@
 
 
 
-[section:overload2 posix::basic_descriptor::basic_descriptor (2 of 3 overloads)]
+[section:overload2 posix::descriptor::descriptor (2 of 3 overloads)]
 
 
-Construct a [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] on an existing native descriptor. 
+Construct a descriptor on an existing native descriptor. 
 
 
-  basic_descriptor(
+  descriptor(
       asio::io_context & io_context,
       const native_handle_type & native_descriptor);
 
@@ -97050,14 +85675,14 @@
 
 
 
-[section:overload3 posix::basic_descriptor::basic_descriptor (3 of 3 overloads)]
+[section:overload3 posix::descriptor::descriptor (3 of 3 overloads)]
 
 
-Move-construct a [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] from another. 
+Move-construct a descriptor from another. 
 
 
-  basic_descriptor(
-      basic_descriptor && other);
+  descriptor(
+      descriptor && other);
 
 
 This constructor moves a descriptor from one object to another.
@@ -97068,14 +85693,14 @@
 
 [variablelist
   
-[[other][The other [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] object from which the move will occur.]]
+[[other][The other descriptor object from which the move will occur.]]
 
 ]
 
 
 [heading Remarks]
       
-Following the move, the moved-from object is in the same state as if constructed using the `basic_descriptor(io_context&) constructor`. 
+Following the move, the moved-from object is in the same state as if constructed using the `descriptor(io_context&) constructor`. 
 
 
 
@@ -97086,203 +85711,13 @@
 [endsect]
 
 
-[section:bytes_readable posix::basic_descriptor::bytes_readable]
+[section:executor_type posix::descriptor::executor_type]
 
-
-['Inherited from posix::descriptor_base.]
-
-[indexterm2 bytes_readable..posix::basic_descriptor] 
-IO control command to get the amount of data that can be read without blocking. 
-
-
-  typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-  
-
-
-   asio::posix::stream_descriptor descriptor(io_context); 
-   ...
-   asio::descriptor_base::bytes_readable command(true);
-   descriptor.io_control(command);
-   std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/basic_descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:cancel posix::basic_descriptor::cancel]
-
-[indexterm2 cancel..posix::basic_descriptor] 
-Cancel all asynchronous operations associated with the descriptor. 
-
-
-  void ``[link asio.reference.posix__basic_descriptor.cancel.overload1 cancel]``();
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.cancel.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.posix__basic_descriptor.cancel.overload2 cancel]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.cancel.overload2 more...]]``
-
-
-[section:overload1 posix::basic_descriptor::cancel (1 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the descriptor. 
-
-
-  void cancel();
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::basic_descriptor::cancel (2 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the descriptor. 
-
-
-  asio::error_code cancel(
-      asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close posix::basic_descriptor::close]
-
-[indexterm2 close..posix::basic_descriptor] 
-Close the descriptor. 
-
-
-  void ``[link asio.reference.posix__basic_descriptor.close.overload1 close]``();
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.close.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.posix__basic_descriptor.close.overload2 close]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.close.overload2 more...]]``
-
-
-[section:overload1 posix::basic_descriptor::close (1 of 2 overloads)]
-
-
-Close the descriptor. 
-
-
-  void close();
-
-
-This function is used to close the descriptor. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. Note that, even if the function indicates an error, the underlying descriptor is closed. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::basic_descriptor::close (2 of 2 overloads)]
-
-
-Close the descriptor. 
-
-
-  asio::error_code close(
-      asio::error_code & ec);
-
-
-This function is used to close the descriptor. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any. Note that, even if the function indicates an error, the underlying descriptor is closed. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type posix::basic_descriptor::executor_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 executor_type..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.executor_type..executor_type..posix::descriptor] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -97345,7 +85780,7 @@
 
 [heading Requirements]
 
-['Header: ][^asio/posix/basic_descriptor.hpp]
+['Header: ][^asio/posix/descriptor.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -97354,12 +85789,9 @@
 
 
 
-[section:get_executor posix::basic_descriptor::get_executor]
+[section:get_executor posix::descriptor::get_executor]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.get_executor..get_executor..posix::descriptor] 
 Get the executor associated with the object. 
 
 
@@ -97370,61 +85802,10 @@
 [endsect]
 
 
-[section:get_implementation posix::basic_descriptor::get_implementation]
 
-[indexterm2 get_implementation..posix::basic_descriptor] 
-Get the underlying implementation of the I/O object. 
+[section:get_io_context posix::descriptor::get_io_context]
 
-
-  implementation_type & ``[link asio.reference.posix__basic_descriptor.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.posix__basic_descriptor.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.get_implementation.overload2 more...]]``
-
-
-[section:overload1 posix::basic_descriptor::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::basic_descriptor::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_io_context posix::basic_descriptor::get_io_context]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.get_io_context..get_io_context..posix::descriptor] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -97445,12 +85826,9 @@
 
 
 
-[section:get_io_service posix::basic_descriptor::get_io_service]
+[section:get_io_service posix::descriptor::get_io_service]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.get_io_service..get_io_service..posix::descriptor] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -97470,99 +85848,27 @@
 [endsect]
 
 
-[section:get_service posix::basic_descriptor::get_service]
+[section:io_control posix::descriptor::io_control]
 
-[indexterm2 get_service..posix::basic_descriptor] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.posix__basic_descriptor.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.posix__basic_descriptor.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.get_service.overload2 more...]]``
-
-
-[section:overload1 posix::basic_descriptor::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::basic_descriptor::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type posix::basic_descriptor::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..posix::basic_descriptor] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/basic_descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:io_control posix::basic_descriptor::io_control]
-
-[indexterm2 io_control..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.io_control..io_control..posix::descriptor] 
 Perform an IO control command on the descriptor. 
 
 
   template<
       typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  void ``[link asio.reference.posix__basic_descriptor.io_control.overload1 io_control]``(
+  void ``[link asio.reference.posix__descriptor.io_control.overload1 io_control]``(
       IoControlCommand & command);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.io_control.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.io_control.overload1 more...]]``
 
   template<
       typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code ``[link asio.reference.posix__basic_descriptor.io_control.overload2 io_control]``(
+  void ``[link asio.reference.posix__descriptor.io_control.overload2 io_control]``(
       IoControlCommand & command,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.io_control.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.io_control.overload2 more...]]``
 
 
-[section:overload1 posix::basic_descriptor::io_control (1 of 2 overloads)]
+[section:overload1 posix::descriptor::io_control (1 of 2 overloads)]
 
 
 Perform an IO control command on the descriptor. 
@@ -97618,7 +85924,7 @@
 
 
 
-[section:overload2 posix::basic_descriptor::io_control (2 of 2 overloads)]
+[section:overload2 posix::descriptor::io_control (2 of 2 overloads)]
 
 
 Perform an IO control command on the descriptor. 
@@ -97626,7 +85932,7 @@
 
   template<
       typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
+  void io_control(
       IoControlCommand & command,
       asio::error_code & ec);
 
@@ -97674,9 +85980,9 @@
 [endsect]
 
 
-[section:is_open posix::basic_descriptor::is_open]
+[section:is_open posix::descriptor::is_open]
 
-[indexterm2 is_open..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.is_open..is_open..posix::descriptor] 
 Determine whether the descriptor is open. 
 
 
@@ -97687,24 +85993,24 @@
 [endsect]
 
 
-[section:lowest_layer posix::basic_descriptor::lowest_layer]
+[section:lowest_layer posix::descriptor::lowest_layer]
 
-[indexterm2 lowest_layer..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.lowest_layer..lowest_layer..posix::descriptor] 
 Get a reference to the lowest layer. 
 
 
-  lowest_layer_type & ``[link asio.reference.posix__basic_descriptor.lowest_layer.overload1 lowest_layer]``();
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.lowest_layer.overload1 more...]]``
+  lowest_layer_type & ``[link asio.reference.posix__descriptor.lowest_layer.overload1 lowest_layer]``();
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.lowest_layer.overload1 more...]]``
 
 
 Get a const reference to the lowest layer. 
 
 
-  const lowest_layer_type & ``[link asio.reference.posix__basic_descriptor.lowest_layer.overload2 lowest_layer]``() const;
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.lowest_layer.overload2 more...]]``
+  const lowest_layer_type & ``[link asio.reference.posix__descriptor.lowest_layer.overload2 lowest_layer]``() const;
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.lowest_layer.overload2 more...]]``
 
 
-[section:overload1 posix::basic_descriptor::lowest_layer (1 of 2 overloads)]
+[section:overload1 posix::descriptor::lowest_layer (1 of 2 overloads)]
 
 
 Get a reference to the lowest layer. 
@@ -97713,7 +86019,7 @@
   lowest_layer_type & lowest_layer();
 
 
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] cannot contain any further layers, it simply returns a reference to itself.
+This function returns a reference to the lowest layer in a stack of layers. Since a descriptor cannot contain any further layers, it simply returns a reference to itself.
 
 
 [heading Return Value]
@@ -97727,7 +86033,7 @@
 
 
 
-[section:overload2 posix::basic_descriptor::lowest_layer (2 of 2 overloads)]
+[section:overload2 posix::descriptor::lowest_layer (2 of 2 overloads)]
 
 
 Get a const reference to the lowest layer. 
@@ -97736,7 +86042,7 @@
   const lowest_layer_type & lowest_layer() const;
 
 
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] cannot contain any further layers, it simply returns a reference to itself.
+This function returns a const reference to the lowest layer in a stack of layers. Since a descriptor cannot contain any further layers, it simply returns a reference to itself.
 
 
 [heading Return Value]
@@ -97752,13 +86058,13 @@
 [endsect]
 
 
-[section:lowest_layer_type posix::basic_descriptor::lowest_layer_type]
+[section:lowest_layer_type posix::descriptor::lowest_layer_type]
 
-[indexterm2 lowest_layer_type..posix::basic_descriptor] 
-A [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] is always the lowest layer. 
+[indexterm2 asio.indexterm.posix__descriptor.lowest_layer_type..lowest_layer_type..posix::descriptor] 
+A descriptor is always the lowest layer. 
 
 
-  typedef basic_descriptor< DescriptorService > lowest_layer_type;
+  typedef descriptor lowest_layer_type;
 
 
 [heading Types]
@@ -97767,49 +86073,35 @@
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.bytes_readable [*bytes_readable]]]
+    [[link asio.reference.posix__descriptor.bytes_readable [*bytes_readable]]]
     [IO control command to get the amount of data that can be read without blocking. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.executor_type [*executor_type]]]
+    [[link asio.reference.posix__descriptor.executor_type [*executor_type]]]
     [The type of the executor associated with the object. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
+    [[link asio.reference.posix__descriptor.lowest_layer_type [*lowest_layer_type]]]
+    [A descriptor is always the lowest layer. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_descriptor is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_descriptor.native_handle_type [*native_handle_type]]]
+    [[link asio.reference.posix__descriptor.native_handle_type [*native_handle_type]]]
     [The native representation of a descriptor. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_descriptor.wait_type [*wait_type]]]
+    [[link asio.reference.posix__descriptor.wait_type [*wait_type]]]
     [Wait types. ]
   
   ]
@@ -97821,97 +86113,97 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.posix__basic_descriptor.assign [*assign]]]
+    [[link asio.reference.posix__descriptor.assign [*assign]]]
     [Assign an existing native descriptor to the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.async_wait [*async_wait]]]
+    [[link asio.reference.posix__descriptor.async_wait [*async_wait]]]
     [Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.basic_descriptor [*basic_descriptor]]]
-    [Construct a basic_descriptor without opening it. 
-
-     Construct a basic_descriptor on an existing native descriptor. 
-
-     Move-construct a basic_descriptor from another. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_descriptor.cancel [*cancel]]]
+    [[link asio.reference.posix__descriptor.cancel [*cancel]]]
     [Cancel all asynchronous operations associated with the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.close [*close]]]
+    [[link asio.reference.posix__descriptor.close [*close]]]
     [Close the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.get_executor [*get_executor]]]
+    [[link asio.reference.posix__descriptor.descriptor [*descriptor]]]
+    [Construct a descriptor without opening it. 
+
+     Construct a descriptor on an existing native descriptor. 
+
+     Move-construct a descriptor from another. ]
+  ]
+  
+  [
+    [[link asio.reference.posix__descriptor.get_executor [*get_executor]]]
     [Get the executor associated with the object. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.get_io_context [*get_io_context]]]
+    [[link asio.reference.posix__descriptor.get_io_context [*get_io_context]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.get_io_service [*get_io_service]]]
+    [[link asio.reference.posix__descriptor.get_io_service [*get_io_service]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.io_control [*io_control]]]
+    [[link asio.reference.posix__descriptor.io_control [*io_control]]]
     [Perform an IO control command on the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.is_open [*is_open]]]
+    [[link asio.reference.posix__descriptor.is_open [*is_open]]]
     [Determine whether the descriptor is open. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.lowest_layer [*lowest_layer]]]
+    [[link asio.reference.posix__descriptor.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. 
 
      Get a const reference to the lowest layer. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.native_handle [*native_handle]]]
+    [[link asio.reference.posix__descriptor.native_handle [*native_handle]]]
     [Get the native descriptor representation. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.native_non_blocking [*native_non_blocking]]]
+    [[link asio.reference.posix__descriptor.native_non_blocking [*native_non_blocking]]]
     [Gets the non-blocking mode of the native descriptor implementation. 
 
      Sets the non-blocking mode of the native descriptor implementation. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.non_blocking [*non_blocking]]]
+    [[link asio.reference.posix__descriptor.non_blocking [*non_blocking]]]
     [Gets the non-blocking mode of the descriptor. 
 
      Sets the non-blocking mode of the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.operator_eq_ [*operator=]]]
-    [Move-assign a basic_descriptor from another. ]
+    [[link asio.reference.posix__descriptor.operator_eq_ [*operator=]]]
+    [Move-assign a descriptor from another. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.release [*release]]]
+    [[link asio.reference.posix__descriptor.release [*release]]]
     [Release ownership of the native descriptor implementation. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.wait [*wait]]]
+    [[link asio.reference.posix__descriptor.wait [*wait]]]
     [Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
@@ -97922,23 +86214,13 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.posix__basic_descriptor.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_descriptor.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_descriptor._basic_descriptor [*~basic_descriptor]]]
+    [[link asio.reference.posix__descriptor._descriptor [*~descriptor]]]
     [Protected destructor to prevent deletion through this type. ]
   ]
   
 ]
 
-The [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] class template provides the ability to wrap a POSIX descriptor.
+The [link asio.reference.posix__descriptor `posix::descriptor`] class template provides the ability to wrap a POSIX descriptor.
 
 
 [heading Thread Safety]
@@ -97952,7 +86234,7 @@
 
 [heading Requirements]
 
-['Header: ][^asio/posix/basic_descriptor.hpp]
+['Header: ][^asio/posix/descriptor.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -97961,9 +86243,9 @@
 
 
 
-[section:native_handle posix::basic_descriptor::native_handle]
+[section:native_handle posix::descriptor::native_handle]
 
-[indexterm2 native_handle..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.native_handle..native_handle..posix::descriptor] 
 Get the native descriptor representation. 
 
 
@@ -97977,19 +86259,19 @@
 
 
 
-[section:native_handle_type posix::basic_descriptor::native_handle_type]
+[section:native_handle_type posix::descriptor::native_handle_type]
 
-[indexterm2 native_handle_type..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.native_handle_type..native_handle_type..posix::descriptor] 
 The native representation of a descriptor. 
 
 
-  typedef DescriptorService::native_handle_type native_handle_type;
+  typedef implementation_defined native_handle_type;
 
 
 
 [heading Requirements]
 
-['Header: ][^asio/posix/basic_descriptor.hpp]
+['Header: ][^asio/posix/descriptor.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -97997,30 +86279,30 @@
 [endsect]
 
 
-[section:native_non_blocking posix::basic_descriptor::native_non_blocking]
+[section:native_non_blocking posix::descriptor::native_non_blocking]
 
-[indexterm2 native_non_blocking..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.native_non_blocking..native_non_blocking..posix::descriptor] 
 Gets the non-blocking mode of the native descriptor implementation. 
 
 
-  bool ``[link asio.reference.posix__basic_descriptor.native_non_blocking.overload1 native_non_blocking]``() const;
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.native_non_blocking.overload1 more...]]``
+  bool ``[link asio.reference.posix__descriptor.native_non_blocking.overload1 native_non_blocking]``() const;
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.native_non_blocking.overload1 more...]]``
 
 
 Sets the non-blocking mode of the native descriptor implementation. 
 
 
-  void ``[link asio.reference.posix__basic_descriptor.native_non_blocking.overload2 native_non_blocking]``(
+  void ``[link asio.reference.posix__descriptor.native_non_blocking.overload2 native_non_blocking]``(
       bool mode);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.native_non_blocking.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.native_non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.posix__basic_descriptor.native_non_blocking.overload3 native_non_blocking]``(
+  void ``[link asio.reference.posix__descriptor.native_non_blocking.overload3 native_non_blocking]``(
       bool mode,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.native_non_blocking.overload3 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.native_non_blocking.overload3 more...]]``
 
 
-[section:overload1 posix::basic_descriptor::native_non_blocking (1 of 3 overloads)]
+[section:overload1 posix::descriptor::native_non_blocking (1 of 3 overloads)]
 
 
 Gets the non-blocking mode of the native descriptor implementation. 
@@ -98048,7 +86330,7 @@
 
 
 
-[section:overload2 posix::basic_descriptor::native_non_blocking (2 of 3 overloads)]
+[section:overload2 posix::descriptor::native_non_blocking (2 of 3 overloads)]
 
 
 Sets the non-blocking mode of the native descriptor implementation. 
@@ -98087,13 +86369,13 @@
 
 
 
-[section:overload3 posix::basic_descriptor::native_non_blocking (3 of 3 overloads)]
+[section:overload3 posix::descriptor::native_non_blocking (3 of 3 overloads)]
 
 
 Sets the non-blocking mode of the native descriptor implementation. 
 
 
-  asio::error_code native_non_blocking(
+  void native_non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -98120,30 +86402,30 @@
 
 [endsect]
 
-[section:non_blocking posix::basic_descriptor::non_blocking]
+[section:non_blocking posix::descriptor::non_blocking]
 
-[indexterm2 non_blocking..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.non_blocking..non_blocking..posix::descriptor] 
 Gets the non-blocking mode of the descriptor. 
 
 
-  bool ``[link asio.reference.posix__basic_descriptor.non_blocking.overload1 non_blocking]``() const;
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.non_blocking.overload1 more...]]``
+  bool ``[link asio.reference.posix__descriptor.non_blocking.overload1 non_blocking]``() const;
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.non_blocking.overload1 more...]]``
 
 
 Sets the non-blocking mode of the descriptor. 
 
 
-  void ``[link asio.reference.posix__basic_descriptor.non_blocking.overload2 non_blocking]``(
+  void ``[link asio.reference.posix__descriptor.non_blocking.overload2 non_blocking]``(
       bool mode);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.non_blocking.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.posix__basic_descriptor.non_blocking.overload3 non_blocking]``(
+  void ``[link asio.reference.posix__descriptor.non_blocking.overload3 non_blocking]``(
       bool mode,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.non_blocking.overload3 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.non_blocking.overload3 more...]]``
 
 
-[section:overload1 posix::basic_descriptor::non_blocking (1 of 3 overloads)]
+[section:overload1 posix::descriptor::non_blocking (1 of 3 overloads)]
 
 
 Gets the non-blocking mode of the descriptor. 
@@ -98169,7 +86451,7 @@
 
 
 
-[section:overload2 posix::basic_descriptor::non_blocking (2 of 3 overloads)]
+[section:overload2 posix::descriptor::non_blocking (2 of 3 overloads)]
 
 
 Sets the non-blocking mode of the descriptor. 
@@ -98211,13 +86493,13 @@
 
 
 
-[section:overload3 posix::basic_descriptor::non_blocking (3 of 3 overloads)]
+[section:overload3 posix::descriptor::non_blocking (3 of 3 overloads)]
 
 
 Sets the non-blocking mode of the descriptor. 
 
 
-  asio::error_code non_blocking(
+  void non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -98248,14 +86530,14 @@
 [endsect]
 
 
-[section:operator_eq_ posix::basic_descriptor::operator=]
+[section:operator_eq_ posix::descriptor::operator=]
 
-[indexterm2 operator=..posix::basic_descriptor] 
-Move-assign a [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] from another. 
+[indexterm2 asio.indexterm.posix__descriptor.operator_eq_..operator=..posix::descriptor] 
+Move-assign a descriptor from another. 
 
 
-  basic_descriptor & operator=(
-      basic_descriptor && other);
+  descriptor & operator=(
+      descriptor && other);
 
 
 This assignment operator moves a descriptor from one object to another.
@@ -98266,14 +86548,14 @@
 
 [variablelist
   
-[[other][The other [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] object from which the move will occur.]]
+[[other][The other descriptor object from which the move will occur.]]
 
 ]
 
 
 [heading Remarks]
       
-Following the move, the moved-from object is in the same state as if constructed using the `basic_descriptor(io_context&) constructor`. 
+Following the move, the moved-from object is in the same state as if constructed using the `descriptor(io_context&) constructor`. 
 
 
 
@@ -98282,9 +86564,9 @@
 
 
 
-[section:release posix::basic_descriptor::release]
+[section:release posix::descriptor::release]
 
-[indexterm2 release..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.release..release..posix::descriptor] 
 Release ownership of the native descriptor implementation. 
 
 
@@ -98299,47 +86581,23 @@
 [endsect]
 
 
+[section:wait posix::descriptor::wait]
 
-[section:service_type posix::basic_descriptor::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..posix::basic_descriptor] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef DescriptorService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/basic_descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:wait posix::basic_descriptor::wait]
-
-[indexterm2 wait..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.wait..wait..posix::descriptor] 
 Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. 
 
 
-  void ``[link asio.reference.posix__basic_descriptor.wait.overload1 wait]``(
+  void ``[link asio.reference.posix__descriptor.wait.overload1 wait]``(
       wait_type w);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.wait.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.wait.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.posix__basic_descriptor.wait.overload2 wait]``(
+  void ``[link asio.reference.posix__descriptor.wait.overload2 wait]``(
       wait_type w,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_descriptor.wait.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__descriptor.wait.overload2 more...]]``
 
 
-[section:overload1 posix::basic_descriptor::wait (1 of 2 overloads)]
+[section:overload1 posix::descriptor::wait (1 of 2 overloads)]
 
 
 Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. 
@@ -98380,13 +86638,13 @@
 
 
 
-[section:overload2 posix::basic_descriptor::wait (2 of 2 overloads)]
+[section:overload2 posix::descriptor::wait (2 of 2 overloads)]
 
 
 Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. 
 
 
-  asio::error_code wait(
+  void wait(
       wait_type w,
       asio::error_code & ec);
 
@@ -98427,20 +86685,17 @@
 [endsect]
 
 
-[section:wait_type posix::basic_descriptor::wait_type]
+[section:wait_type posix::descriptor::wait_type]
 
-
-['Inherited from posix::descriptor_base.]
-
-[indexterm2 wait_type..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor.wait_type..wait_type..posix::descriptor] 
 Wait types. 
 
 
   enum wait_type
 
-[indexterm2 wait_read..posix::basic_descriptor]
-[indexterm2 wait_write..posix::basic_descriptor]
-[indexterm2 wait_error..posix::basic_descriptor]
+[indexterm2 asio.indexterm.posix__descriptor.wait_type.wait_read..wait_read..posix::descriptor]
+[indexterm2 asio.indexterm.posix__descriptor.wait_type.wait_write..wait_write..posix::descriptor]
+[indexterm2 asio.indexterm.posix__descriptor.wait_type.wait_error..wait_error..posix::descriptor]
 
 [heading Values]
 [variablelist
@@ -98463,22 +86718,24 @@
 ]
 
 
-For use with `basic_descriptor::wait()` and `basic_descriptor::async_wait()`. 
+For use with `descriptor::wait()` and `descriptor::async_wait()`. 
 
 
 [endsect]
 
 
 
-[section:_basic_descriptor posix::basic_descriptor::~basic_descriptor]
+[section:_descriptor posix::descriptor::~descriptor]
 
-[indexterm2 ~basic_descriptor..posix::basic_descriptor] 
+[indexterm2 asio.indexterm.posix__descriptor._descriptor..~descriptor..posix::descriptor] 
 Protected destructor to prevent deletion through this type. 
 
 
-  ~basic_descriptor();
+  ~descriptor();
 
 
+This function destroys the descriptor, cancelling any outstanding asynchronous wait operations associated with the descriptor as if by calling `cancel`. 
+
 
 [endsect]
 
@@ -98486,16 +86743,13 @@
 
 [endsect]
 
-[section:posix__basic_stream_descriptor posix::basic_stream_descriptor]
+[section:posix__descriptor_base posix::descriptor_base]
 
 
-Provides stream-oriented descriptor functionality. 
+The [link asio.reference.posix__descriptor_base `posix::descriptor_base`] class is used as a base for the descriptor class as a place to define the associated IO control commands. 
 
 
-  template<
-      typename ``[link asio.reference.StreamDescriptorService StreamDescriptorService]`` = stream_descriptor_service>
-  class basic_stream_descriptor :
-    public posix::basic_descriptor< StreamDescriptorService >
+  class descriptor_base
 
 
 [heading Types]
@@ -98504,49 +86758,179 @@
 
   [
 
-    [[link asio.reference.posix__basic_stream_descriptor.bytes_readable [*bytes_readable]]]
+    [[link asio.reference.posix__descriptor_base.bytes_readable [*bytes_readable]]]
     [IO control command to get the amount of data that can be read without blocking. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_stream_descriptor.executor_type [*executor_type]]]
+    [[link asio.reference.posix__descriptor_base.wait_type [*wait_type]]]
+    [Wait types. ]
+  
+  ]
+
+]
+
+[heading Protected Member Functions]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.posix__descriptor_base._descriptor_base [*~descriptor_base]]]
+    [Protected destructor to prevent deletion through this type. ]
+  ]
+  
+]
+
+[heading Requirements]
+
+['Header: ][^asio/posix/descriptor_base.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[section:bytes_readable posix::descriptor_base::bytes_readable]
+
+[indexterm2 asio.indexterm.posix__descriptor_base.bytes_readable..bytes_readable..posix::descriptor_base] 
+IO control command to get the amount of data that can be read without blocking. 
+
+
+  typedef implementation_defined bytes_readable;
+
+
+
+Implements the FIONREAD IO control command.
+
+
+[heading Example]
+  
+
+
+   asio::posix::stream_descriptor descriptor(io_context); 
+   ...
+   asio::descriptor_base::bytes_readable command(true);
+   descriptor.io_control(command);
+   std::size_t bytes_readable = command.get();
+
+
+
+
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/posix/descriptor_base.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
+
+[section:wait_type posix::descriptor_base::wait_type]
+
+[indexterm2 asio.indexterm.posix__descriptor_base.wait_type..wait_type..posix::descriptor_base] 
+Wait types. 
+
+
+  enum wait_type
+
+[indexterm2 asio.indexterm.posix__descriptor_base.wait_type.wait_read..wait_read..posix::descriptor_base]
+[indexterm2 asio.indexterm.posix__descriptor_base.wait_type.wait_write..wait_write..posix::descriptor_base]
+[indexterm2 asio.indexterm.posix__descriptor_base.wait_type.wait_error..wait_error..posix::descriptor_base]
+
+[heading Values]
+[variablelist
+
+  [
+    [wait_read]
+    [Wait for a descriptor to become ready to read. ]
+  ]
+
+  [
+    [wait_write]
+    [Wait for a descriptor to become ready to write. ]
+  ]
+
+  [
+    [wait_error]
+    [Wait for a descriptor to have error conditions pending. ]
+  ]
+
+]
+
+
+For use with `descriptor::wait()` and `descriptor::async_wait()`. 
+
+
+[endsect]
+
+
+
+[section:_descriptor_base posix::descriptor_base::~descriptor_base]
+
+[indexterm2 asio.indexterm.posix__descriptor_base._descriptor_base..~descriptor_base..posix::descriptor_base] 
+Protected destructor to prevent deletion through this type. 
+
+
+  ~descriptor_base();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:posix__stream_descriptor posix::stream_descriptor]
+
+
+Provides stream-oriented descriptor functionality. 
+
+
+  class stream_descriptor :
+    public posix::descriptor
+
+
+[heading Types]
+[table
+  [[Name][Description]]
+
+  [
+
+    [[link asio.reference.posix__stream_descriptor.bytes_readable [*bytes_readable]]]
+    [IO control command to get the amount of data that can be read without blocking. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.posix__stream_descriptor.executor_type [*executor_type]]]
     [The type of the executor associated with the object. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_stream_descriptor.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
+    [[link asio.reference.posix__stream_descriptor.lowest_layer_type [*lowest_layer_type]]]
+    [A descriptor is always the lowest layer. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_stream_descriptor.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_descriptor is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_stream_descriptor.native_handle_type [*native_handle_type]]]
+    [[link asio.reference.posix__stream_descriptor.native_handle_type [*native_handle_type]]]
     [The native representation of a descriptor. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_stream_descriptor.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_stream_descriptor.wait_type [*wait_type]]]
+    [[link asio.reference.posix__stream_descriptor.wait_type [*wait_type]]]
     [Wait types. ]
   
   ]
@@ -98558,139 +86942,123 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.posix__basic_stream_descriptor.assign [*assign]]]
+    [[link asio.reference.posix__stream_descriptor.assign [*assign]]]
     [Assign an existing native descriptor to the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.async_read_some [*async_read_some]]]
+    [[link asio.reference.posix__stream_descriptor.async_read_some [*async_read_some]]]
     [Start an asynchronous read. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.async_wait [*async_wait]]]
+    [[link asio.reference.posix__stream_descriptor.async_wait [*async_wait]]]
     [Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.async_write_some [*async_write_some]]]
+    [[link asio.reference.posix__stream_descriptor.async_write_some [*async_write_some]]]
     [Start an asynchronous write. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.basic_stream_descriptor [*basic_stream_descriptor]]]
-    [Construct a basic_stream_descriptor without opening it. 
-
-     Construct a basic_stream_descriptor on an existing native descriptor. 
-
-     Move-construct a basic_stream_descriptor from another. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.cancel [*cancel]]]
+    [[link asio.reference.posix__stream_descriptor.cancel [*cancel]]]
     [Cancel all asynchronous operations associated with the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.close [*close]]]
+    [[link asio.reference.posix__stream_descriptor.close [*close]]]
     [Close the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.get_executor [*get_executor]]]
+    [[link asio.reference.posix__stream_descriptor.get_executor [*get_executor]]]
     [Get the executor associated with the object. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.get_io_context [*get_io_context]]]
+    [[link asio.reference.posix__stream_descriptor.get_io_context [*get_io_context]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.get_io_service [*get_io_service]]]
+    [[link asio.reference.posix__stream_descriptor.get_io_service [*get_io_service]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.io_control [*io_control]]]
+    [[link asio.reference.posix__stream_descriptor.io_control [*io_control]]]
     [Perform an IO control command on the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.is_open [*is_open]]]
+    [[link asio.reference.posix__stream_descriptor.is_open [*is_open]]]
     [Determine whether the descriptor is open. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.lowest_layer [*lowest_layer]]]
+    [[link asio.reference.posix__stream_descriptor.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. 
 
      Get a const reference to the lowest layer. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.native_handle [*native_handle]]]
+    [[link asio.reference.posix__stream_descriptor.native_handle [*native_handle]]]
     [Get the native descriptor representation. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.native_non_blocking [*native_non_blocking]]]
+    [[link asio.reference.posix__stream_descriptor.native_non_blocking [*native_non_blocking]]]
     [Gets the non-blocking mode of the native descriptor implementation. 
 
      Sets the non-blocking mode of the native descriptor implementation. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.non_blocking [*non_blocking]]]
+    [[link asio.reference.posix__stream_descriptor.non_blocking [*non_blocking]]]
     [Gets the non-blocking mode of the descriptor. 
 
      Sets the non-blocking mode of the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.operator_eq_ [*operator=]]]
-    [Move-assign a basic_stream_descriptor from another. ]
+    [[link asio.reference.posix__stream_descriptor.operator_eq_ [*operator=]]]
+    [Move-assign a stream_descriptor from another. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.read_some [*read_some]]]
+    [[link asio.reference.posix__stream_descriptor.read_some [*read_some]]]
     [Read some data from the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.release [*release]]]
+    [[link asio.reference.posix__stream_descriptor.release [*release]]]
     [Release ownership of the native descriptor implementation. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.wait [*wait]]]
+    [[link asio.reference.posix__stream_descriptor.stream_descriptor [*stream_descriptor]]]
+    [Construct a stream_descriptor without opening it. 
+
+     Construct a stream_descriptor on an existing native descriptor. 
+
+     Move-construct a stream_descriptor from another. ]
+  ]
+  
+  [
+    [[link asio.reference.posix__stream_descriptor.wait [*wait]]]
     [Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_stream_descriptor.write_some [*write_some]]]
+    [[link asio.reference.posix__stream_descriptor.write_some [*write_some]]]
     [Write some data to the descriptor. ]
   ]
   
 ]
 
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-]
-
-The [link asio.reference.posix__basic_stream_descriptor `posix::basic_stream_descriptor`] class template provides asynchronous and blocking stream-oriented descriptor functionality.
+The [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] class template provides asynchronous and blocking stream-oriented descriptor functionality.
 
 
 [heading Thread Safety]
@@ -98704,30 +87072,30 @@
 
 [heading Requirements]
 
-['Header: ][^asio/posix/basic_stream_descriptor.hpp]
+['Header: ][^asio/posix/stream_descriptor.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
-[section:assign posix::basic_stream_descriptor::assign]
+[section:assign posix::stream_descriptor::assign]
 
-[indexterm2 assign..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.assign..assign..posix::stream_descriptor] 
 Assign an existing native descriptor to the descriptor. 
 
 
-  void ``[link asio.reference.posix__basic_stream_descriptor.assign.overload1 assign]``(
+  void ``[link asio.reference.posix__stream_descriptor.assign.overload1 assign]``(
       const native_handle_type & native_descriptor);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.assign.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.assign.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.posix__basic_stream_descriptor.assign.overload2 assign]``(
+  void ``[link asio.reference.posix__stream_descriptor.assign.overload2 assign]``(
       const native_handle_type & native_descriptor,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.assign.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.assign.overload2 more...]]``
 
 
-[section:overload1 posix::basic_stream_descriptor::assign (1 of 2 overloads)]
+[section:overload1 posix::stream_descriptor::assign (1 of 2 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Assign an existing native descriptor to the descriptor. 
@@ -98742,16 +87110,16 @@
 
 
 
-[section:overload2 posix::basic_stream_descriptor::assign (2 of 2 overloads)]
+[section:overload2 posix::stream_descriptor::assign (2 of 2 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Assign an existing native descriptor to the descriptor. 
 
 
-  asio::error_code assign(
+  void assign(
       const native_handle_type & native_descriptor,
       asio::error_code & ec);
 
@@ -98763,16 +87131,16 @@
 [endsect]
 
 
-[section:async_read_some posix::basic_stream_descriptor::async_read_some]
+[section:async_read_some posix::stream_descriptor::async_read_some]
 
-[indexterm2 async_read_some..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.async_read_some..async_read_some..posix::stream_descriptor] 
 Start an asynchronous read. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
       const MutableBufferSequence & buffers,
       ReadHandler && handler);
 
@@ -98820,18 +87188,18 @@
 
 
 
-[section:async_wait posix::basic_stream_descriptor::async_wait]
+[section:async_wait posix::stream_descriptor::async_wait]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
-[indexterm2 async_wait..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.async_wait..async_wait..posix::stream_descriptor] 
 Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. 
 
 
   template<
       typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
       wait_type w,
       WaitHandler && handler);
 
@@ -98887,16 +87255,16 @@
 
 
 
-[section:async_write_some posix::basic_stream_descriptor::async_write_some]
+[section:async_write_some posix::stream_descriptor::async_write_some]
 
-[indexterm2 async_write_some..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.async_write_some..async_write_some..posix::stream_descriptor] 
 Start an asynchronous write. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
       const ConstBufferSequence & buffers,
       WriteHandler && handler);
 
@@ -98943,147 +87311,13 @@
 [endsect]
 
 
-[section:basic_stream_descriptor posix::basic_stream_descriptor::basic_stream_descriptor]
 
-[indexterm2 basic_stream_descriptor..posix::basic_stream_descriptor] 
-Construct a [link asio.reference.posix__basic_stream_descriptor `posix::basic_stream_descriptor`] without opening it. 
+[section:bytes_readable posix::stream_descriptor::bytes_readable]
 
 
-  explicit ``[link asio.reference.posix__basic_stream_descriptor.basic_stream_descriptor.overload1 basic_stream_descriptor]``(
-      asio::io_context & io_context);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.basic_stream_descriptor.overload1 more...]]``
+['Inherited from posix::descriptor.]
 
-
-Construct a [link asio.reference.posix__basic_stream_descriptor `posix::basic_stream_descriptor`] on an existing native descriptor. 
-
-
-  ``[link asio.reference.posix__basic_stream_descriptor.basic_stream_descriptor.overload2 basic_stream_descriptor]``(
-      asio::io_context & io_context,
-      const native_handle_type & native_descriptor);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.basic_stream_descriptor.overload2 more...]]``
-
-
-Move-construct a [link asio.reference.posix__basic_stream_descriptor `posix::basic_stream_descriptor`] from another. 
-
-
-  ``[link asio.reference.posix__basic_stream_descriptor.basic_stream_descriptor.overload3 basic_stream_descriptor]``(
-      basic_stream_descriptor && other);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.basic_stream_descriptor.overload3 more...]]``
-
-
-[section:overload1 posix::basic_stream_descriptor::basic_stream_descriptor (1 of 3 overloads)]
-
-
-Construct a [link asio.reference.posix__basic_stream_descriptor `posix::basic_stream_descriptor`] without opening it. 
-
-
-  basic_stream_descriptor(
-      asio::io_context & io_context);
-
-
-This constructor creates a stream descriptor without opening it. The descriptor needs to be opened and then connected or accepted before data can be sent or received on it.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the stream descriptor will use to dispatch handlers for any asynchronous operations performed on the descriptor. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::basic_stream_descriptor::basic_stream_descriptor (2 of 3 overloads)]
-
-
-Construct a [link asio.reference.posix__basic_stream_descriptor `posix::basic_stream_descriptor`] on an existing native descriptor. 
-
-
-  basic_stream_descriptor(
-      asio::io_context & io_context,
-      const native_handle_type & native_descriptor);
-
-
-This constructor creates a stream descriptor object to hold an existing native descriptor.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the stream descriptor will use to dispatch handlers for any asynchronous operations performed on the descriptor.]]
-
-[[native_descriptor][The new underlying descriptor implementation.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 posix::basic_stream_descriptor::basic_stream_descriptor (3 of 3 overloads)]
-
-
-Move-construct a [link asio.reference.posix__basic_stream_descriptor `posix::basic_stream_descriptor`] from another. 
-
-
-  basic_stream_descriptor(
-      basic_stream_descriptor && other);
-
-
-This constructor moves a stream descriptor from one object to another.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[other][The other [link asio.reference.posix__basic_stream_descriptor `posix::basic_stream_descriptor`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-      
-Following the move, the moved-from object is in the same state as if constructed using the `basic_stream_descriptor(io_context&) constructor`. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:bytes_readable posix::basic_stream_descriptor::bytes_readable]
-
-
-['Inherited from posix::descriptor_base.]
-
-[indexterm2 bytes_readable..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.bytes_readable..bytes_readable..posix::stream_descriptor] 
 IO control command to get the amount of data that can be read without blocking. 
 
 
@@ -99112,7 +87346,7 @@
 
 [heading Requirements]
 
-['Header: ][^asio/posix/basic_stream_descriptor.hpp]
+['Header: ][^asio/posix/stream_descriptor.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -99120,24 +87354,24 @@
 [endsect]
 
 
-[section:cancel posix::basic_stream_descriptor::cancel]
+[section:cancel posix::stream_descriptor::cancel]
 
-[indexterm2 cancel..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.cancel..cancel..posix::stream_descriptor] 
 Cancel all asynchronous operations associated with the descriptor. 
 
 
-  void ``[link asio.reference.posix__basic_stream_descriptor.cancel.overload1 cancel]``();
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.cancel.overload1 more...]]``
+  void ``[link asio.reference.posix__stream_descriptor.cancel.overload1 cancel]``();
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.cancel.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.posix__basic_stream_descriptor.cancel.overload2 cancel]``(
+  void ``[link asio.reference.posix__stream_descriptor.cancel.overload2 cancel]``(
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.cancel.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.cancel.overload2 more...]]``
 
 
-[section:overload1 posix::basic_stream_descriptor::cancel (1 of 2 overloads)]
+[section:overload1 posix::stream_descriptor::cancel (1 of 2 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Cancel all asynchronous operations associated with the descriptor. 
@@ -99165,16 +87399,16 @@
 
 
 
-[section:overload2 posix::basic_stream_descriptor::cancel (2 of 2 overloads)]
+[section:overload2 posix::stream_descriptor::cancel (2 of 2 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Cancel all asynchronous operations associated with the descriptor. 
 
 
-  asio::error_code cancel(
+  void cancel(
       asio::error_code & ec);
 
 
@@ -99198,24 +87432,24 @@
 
 [endsect]
 
-[section:close posix::basic_stream_descriptor::close]
+[section:close posix::stream_descriptor::close]
 
-[indexterm2 close..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.close..close..posix::stream_descriptor] 
 Close the descriptor. 
 
 
-  void ``[link asio.reference.posix__basic_stream_descriptor.close.overload1 close]``();
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.close.overload1 more...]]``
+  void ``[link asio.reference.posix__stream_descriptor.close.overload1 close]``();
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.close.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.posix__basic_stream_descriptor.close.overload2 close]``(
+  void ``[link asio.reference.posix__stream_descriptor.close.overload2 close]``(
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.close.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.close.overload2 more...]]``
 
 
-[section:overload1 posix::basic_stream_descriptor::close (1 of 2 overloads)]
+[section:overload1 posix::stream_descriptor::close (1 of 2 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Close the descriptor. 
@@ -99243,16 +87477,16 @@
 
 
 
-[section:overload2 posix::basic_stream_descriptor::close (2 of 2 overloads)]
+[section:overload2 posix::stream_descriptor::close (2 of 2 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Close the descriptor. 
 
 
-  asio::error_code close(
+  void close(
       asio::error_code & ec);
 
 
@@ -99277,16 +87511,16 @@
 [endsect]
 
 
-[section:executor_type posix::basic_stream_descriptor::executor_type]
+[section:executor_type posix::stream_descriptor::executor_type]
 
 
-['Inherited from basic_io_object.]
+['Inherited from posix::descriptor.]
 
-[indexterm2 executor_type..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.executor_type..executor_type..posix::stream_descriptor] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -99349,7 +87583,7 @@
 
 [heading Requirements]
 
-['Header: ][^asio/posix/basic_stream_descriptor.hpp]
+['Header: ][^asio/posix/stream_descriptor.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -99358,12 +87592,12 @@
 
 
 
-[section:get_executor posix::basic_stream_descriptor::get_executor]
+[section:get_executor posix::stream_descriptor::get_executor]
 
 
-['Inherited from basic_io_object.]
+['Inherited from posix::descriptor.]
 
-[indexterm2 get_executor..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.get_executor..get_executor..posix::stream_descriptor] 
 Get the executor associated with the object. 
 
 
@@ -99374,61 +87608,13 @@
 [endsect]
 
 
-[section:get_implementation posix::basic_stream_descriptor::get_implementation]
 
-[indexterm2 get_implementation..posix::basic_stream_descriptor] 
-Get the underlying implementation of the I/O object. 
+[section:get_io_context posix::stream_descriptor::get_io_context]
 
 
-  implementation_type & ``[link asio.reference.posix__basic_stream_descriptor.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.get_implementation.overload1 more...]]``
+['Inherited from posix::descriptor.]
 
-  const implementation_type & ``[link asio.reference.posix__basic_stream_descriptor.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.get_implementation.overload2 more...]]``
-
-
-[section:overload1 posix::basic_stream_descriptor::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::basic_stream_descriptor::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_io_context posix::basic_stream_descriptor::get_io_context]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.get_io_context..get_io_context..posix::stream_descriptor] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -99449,12 +87635,12 @@
 
 
 
-[section:get_io_service posix::basic_stream_descriptor::get_io_service]
+[section:get_io_service posix::stream_descriptor::get_io_service]
 
 
-['Inherited from basic_io_object.]
+['Inherited from posix::descriptor.]
 
-[indexterm2 get_io_service..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.get_io_service..get_io_service..posix::stream_descriptor] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -99474,98 +87660,30 @@
 [endsect]
 
 
-[section:get_service posix::basic_stream_descriptor::get_service]
+[section:io_control posix::stream_descriptor::io_control]
 
-[indexterm2 get_service..posix::basic_stream_descriptor] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.posix__basic_stream_descriptor.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.posix__basic_stream_descriptor.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.get_service.overload2 more...]]``
-
-
-[section:overload1 posix::basic_stream_descriptor::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::basic_stream_descriptor::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type posix::basic_stream_descriptor::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..posix::basic_stream_descriptor] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/basic_stream_descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:io_control posix::basic_stream_descriptor::io_control]
-
-[indexterm2 io_control..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.io_control..io_control..posix::stream_descriptor] 
 Perform an IO control command on the descriptor. 
 
 
-  void ``[link asio.reference.posix__basic_stream_descriptor.io_control.overload1 io_control]``(
+  template<
+      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
+  void ``[link asio.reference.posix__stream_descriptor.io_control.overload1 io_control]``(
       IoControlCommand & command);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.io_control.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.io_control.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.posix__basic_stream_descriptor.io_control.overload2 io_control]``(
+  template<
+      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
+  void ``[link asio.reference.posix__stream_descriptor.io_control.overload2 io_control]``(
       IoControlCommand & command,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.io_control.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.io_control.overload2 more...]]``
 
 
-[section:overload1 posix::basic_stream_descriptor::io_control (1 of 2 overloads)]
+[section:overload1 posix::stream_descriptor::io_control (1 of 2 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Perform an IO control command on the descriptor. 
@@ -99621,10 +87739,10 @@
 
 
 
-[section:overload2 posix::basic_stream_descriptor::io_control (2 of 2 overloads)]
+[section:overload2 posix::stream_descriptor::io_control (2 of 2 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Perform an IO control command on the descriptor. 
@@ -99632,7 +87750,7 @@
 
   template<
       typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
+  void io_control(
       IoControlCommand & command,
       asio::error_code & ec);
 
@@ -99680,12 +87798,12 @@
 [endsect]
 
 
-[section:is_open posix::basic_stream_descriptor::is_open]
+[section:is_open posix::stream_descriptor::is_open]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
-[indexterm2 is_open..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.is_open..is_open..posix::stream_descriptor] 
 Determine whether the descriptor is open. 
 
 
@@ -99696,27 +87814,27 @@
 [endsect]
 
 
-[section:lowest_layer posix::basic_stream_descriptor::lowest_layer]
+[section:lowest_layer posix::stream_descriptor::lowest_layer]
 
-[indexterm2 lowest_layer..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.lowest_layer..lowest_layer..posix::stream_descriptor] 
 Get a reference to the lowest layer. 
 
 
-  lowest_layer_type & ``[link asio.reference.posix__basic_stream_descriptor.lowest_layer.overload1 lowest_layer]``();
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.lowest_layer.overload1 more...]]``
+  lowest_layer_type & ``[link asio.reference.posix__stream_descriptor.lowest_layer.overload1 lowest_layer]``();
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.lowest_layer.overload1 more...]]``
 
 
 Get a const reference to the lowest layer. 
 
 
-  const lowest_layer_type & ``[link asio.reference.posix__basic_stream_descriptor.lowest_layer.overload2 lowest_layer]``() const;
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.lowest_layer.overload2 more...]]``
+  const lowest_layer_type & ``[link asio.reference.posix__stream_descriptor.lowest_layer.overload2 lowest_layer]``() const;
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.lowest_layer.overload2 more...]]``
 
 
-[section:overload1 posix::basic_stream_descriptor::lowest_layer (1 of 2 overloads)]
+[section:overload1 posix::stream_descriptor::lowest_layer (1 of 2 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Get a reference to the lowest layer. 
@@ -99725,7 +87843,7 @@
   lowest_layer_type & lowest_layer();
 
 
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] cannot contain any further layers, it simply returns a reference to itself.
+This function returns a reference to the lowest layer in a stack of layers. Since a descriptor cannot contain any further layers, it simply returns a reference to itself.
 
 
 [heading Return Value]
@@ -99739,10 +87857,10 @@
 
 
 
-[section:overload2 posix::basic_stream_descriptor::lowest_layer (2 of 2 overloads)]
+[section:overload2 posix::stream_descriptor::lowest_layer (2 of 2 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Get a const reference to the lowest layer. 
@@ -99751,7 +87869,7 @@
   const lowest_layer_type & lowest_layer() const;
 
 
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] cannot contain any further layers, it simply returns a reference to itself.
+This function returns a const reference to the lowest layer in a stack of layers. Since a descriptor cannot contain any further layers, it simply returns a reference to itself.
 
 
 [heading Return Value]
@@ -99767,16 +87885,16 @@
 [endsect]
 
 
-[section:lowest_layer_type posix::basic_stream_descriptor::lowest_layer_type]
+[section:lowest_layer_type posix::stream_descriptor::lowest_layer_type]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
-[indexterm2 lowest_layer_type..posix::basic_stream_descriptor] 
-A [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] is always the lowest layer. 
+[indexterm2 asio.indexterm.posix__stream_descriptor.lowest_layer_type..lowest_layer_type..posix::stream_descriptor] 
+A descriptor is always the lowest layer. 
 
 
-  typedef basic_descriptor< StreamDescriptorService > lowest_layer_type;
+  typedef descriptor lowest_layer_type;
 
 
 [heading Types]
@@ -99785,49 +87903,35 @@
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.bytes_readable [*bytes_readable]]]
+    [[link asio.reference.posix__descriptor.bytes_readable [*bytes_readable]]]
     [IO control command to get the amount of data that can be read without blocking. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.executor_type [*executor_type]]]
+    [[link asio.reference.posix__descriptor.executor_type [*executor_type]]]
     [The type of the executor associated with the object. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
+    [[link asio.reference.posix__descriptor.lowest_layer_type [*lowest_layer_type]]]
+    [A descriptor is always the lowest layer. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_descriptor is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_descriptor.native_handle_type [*native_handle_type]]]
+    [[link asio.reference.posix__descriptor.native_handle_type [*native_handle_type]]]
     [The native representation of a descriptor. ]
   
   ]
 
   [
 
-    [[link asio.reference.posix__basic_descriptor.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_descriptor.wait_type [*wait_type]]]
+    [[link asio.reference.posix__descriptor.wait_type [*wait_type]]]
     [Wait types. ]
   
   ]
@@ -99839,97 +87943,97 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.posix__basic_descriptor.assign [*assign]]]
+    [[link asio.reference.posix__descriptor.assign [*assign]]]
     [Assign an existing native descriptor to the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.async_wait [*async_wait]]]
+    [[link asio.reference.posix__descriptor.async_wait [*async_wait]]]
     [Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.basic_descriptor [*basic_descriptor]]]
-    [Construct a basic_descriptor without opening it. 
-
-     Construct a basic_descriptor on an existing native descriptor. 
-
-     Move-construct a basic_descriptor from another. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_descriptor.cancel [*cancel]]]
+    [[link asio.reference.posix__descriptor.cancel [*cancel]]]
     [Cancel all asynchronous operations associated with the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.close [*close]]]
+    [[link asio.reference.posix__descriptor.close [*close]]]
     [Close the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.get_executor [*get_executor]]]
+    [[link asio.reference.posix__descriptor.descriptor [*descriptor]]]
+    [Construct a descriptor without opening it. 
+
+     Construct a descriptor on an existing native descriptor. 
+
+     Move-construct a descriptor from another. ]
+  ]
+  
+  [
+    [[link asio.reference.posix__descriptor.get_executor [*get_executor]]]
     [Get the executor associated with the object. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.get_io_context [*get_io_context]]]
+    [[link asio.reference.posix__descriptor.get_io_context [*get_io_context]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.get_io_service [*get_io_service]]]
+    [[link asio.reference.posix__descriptor.get_io_service [*get_io_service]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.io_control [*io_control]]]
+    [[link asio.reference.posix__descriptor.io_control [*io_control]]]
     [Perform an IO control command on the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.is_open [*is_open]]]
+    [[link asio.reference.posix__descriptor.is_open [*is_open]]]
     [Determine whether the descriptor is open. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.lowest_layer [*lowest_layer]]]
+    [[link asio.reference.posix__descriptor.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. 
 
      Get a const reference to the lowest layer. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.native_handle [*native_handle]]]
+    [[link asio.reference.posix__descriptor.native_handle [*native_handle]]]
     [Get the native descriptor representation. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.native_non_blocking [*native_non_blocking]]]
+    [[link asio.reference.posix__descriptor.native_non_blocking [*native_non_blocking]]]
     [Gets the non-blocking mode of the native descriptor implementation. 
 
      Sets the non-blocking mode of the native descriptor implementation. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.non_blocking [*non_blocking]]]
+    [[link asio.reference.posix__descriptor.non_blocking [*non_blocking]]]
     [Gets the non-blocking mode of the descriptor. 
 
      Sets the non-blocking mode of the descriptor. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.operator_eq_ [*operator=]]]
-    [Move-assign a basic_descriptor from another. ]
+    [[link asio.reference.posix__descriptor.operator_eq_ [*operator=]]]
+    [Move-assign a descriptor from another. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.release [*release]]]
+    [[link asio.reference.posix__descriptor.release [*release]]]
     [Release ownership of the native descriptor implementation. ]
   ]
   
   [
-    [[link asio.reference.posix__basic_descriptor.wait [*wait]]]
+    [[link asio.reference.posix__descriptor.wait [*wait]]]
     [Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
   ]
   
@@ -99940,23 +88044,13 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.posix__basic_descriptor.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_descriptor.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_descriptor._basic_descriptor [*~basic_descriptor]]]
+    [[link asio.reference.posix__descriptor._descriptor [*~descriptor]]]
     [Protected destructor to prevent deletion through this type. ]
   ]
   
 ]
 
-The [link asio.reference.posix__basic_descriptor `posix::basic_descriptor`] class template provides the ability to wrap a POSIX descriptor.
+The [link asio.reference.posix__descriptor `posix::descriptor`] class template provides the ability to wrap a POSIX descriptor.
 
 
 [heading Thread Safety]
@@ -99970,7 +88064,7 @@
 
 [heading Requirements]
 
-['Header: ][^asio/posix/basic_stream_descriptor.hpp]
+['Header: ][^asio/posix/stream_descriptor.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -99979,12 +88073,12 @@
 
 
 
-[section:native_handle posix::basic_stream_descriptor::native_handle]
+[section:native_handle posix::stream_descriptor::native_handle]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
-[indexterm2 native_handle..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.native_handle..native_handle..posix::stream_descriptor] 
 Get the native descriptor representation. 
 
 
@@ -99998,19 +88092,22 @@
 
 
 
-[section:native_handle_type posix::basic_stream_descriptor::native_handle_type]
+[section:native_handle_type posix::stream_descriptor::native_handle_type]
 
-[indexterm2 native_handle_type..posix::basic_stream_descriptor] 
+
+['Inherited from posix::descriptor.]
+
+[indexterm2 asio.indexterm.posix__stream_descriptor.native_handle_type..native_handle_type..posix::stream_descriptor] 
 The native representation of a descriptor. 
 
 
-  typedef StreamDescriptorService::native_handle_type native_handle_type;
+  typedef implementation_defined native_handle_type;
 
 
 
 [heading Requirements]
 
-['Header: ][^asio/posix/basic_stream_descriptor.hpp]
+['Header: ][^asio/posix/stream_descriptor.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -100018,33 +88115,33 @@
 [endsect]
 
 
-[section:native_non_blocking posix::basic_stream_descriptor::native_non_blocking]
+[section:native_non_blocking posix::stream_descriptor::native_non_blocking]
 
-[indexterm2 native_non_blocking..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.native_non_blocking..native_non_blocking..posix::stream_descriptor] 
 Gets the non-blocking mode of the native descriptor implementation. 
 
 
-  bool ``[link asio.reference.posix__basic_stream_descriptor.native_non_blocking.overload1 native_non_blocking]``() const;
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.native_non_blocking.overload1 more...]]``
+  bool ``[link asio.reference.posix__stream_descriptor.native_non_blocking.overload1 native_non_blocking]``() const;
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.native_non_blocking.overload1 more...]]``
 
 
 Sets the non-blocking mode of the native descriptor implementation. 
 
 
-  void ``[link asio.reference.posix__basic_stream_descriptor.native_non_blocking.overload2 native_non_blocking]``(
+  void ``[link asio.reference.posix__stream_descriptor.native_non_blocking.overload2 native_non_blocking]``(
       bool mode);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.native_non_blocking.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.native_non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.posix__basic_stream_descriptor.native_non_blocking.overload3 native_non_blocking]``(
+  void ``[link asio.reference.posix__stream_descriptor.native_non_blocking.overload3 native_non_blocking]``(
       bool mode,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.native_non_blocking.overload3 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.native_non_blocking.overload3 more...]]``
 
 
-[section:overload1 posix::basic_stream_descriptor::native_non_blocking (1 of 3 overloads)]
+[section:overload1 posix::stream_descriptor::native_non_blocking (1 of 3 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Gets the non-blocking mode of the native descriptor implementation. 
@@ -100072,10 +88169,10 @@
 
 
 
-[section:overload2 posix::basic_stream_descriptor::native_non_blocking (2 of 3 overloads)]
+[section:overload2 posix::stream_descriptor::native_non_blocking (2 of 3 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Sets the non-blocking mode of the native descriptor implementation. 
@@ -100114,16 +88211,16 @@
 
 
 
-[section:overload3 posix::basic_stream_descriptor::native_non_blocking (3 of 3 overloads)]
+[section:overload3 posix::stream_descriptor::native_non_blocking (3 of 3 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Sets the non-blocking mode of the native descriptor implementation. 
 
 
-  asio::error_code native_non_blocking(
+  void native_non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -100150,33 +88247,33 @@
 
 [endsect]
 
-[section:non_blocking posix::basic_stream_descriptor::non_blocking]
+[section:non_blocking posix::stream_descriptor::non_blocking]
 
-[indexterm2 non_blocking..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.non_blocking..non_blocking..posix::stream_descriptor] 
 Gets the non-blocking mode of the descriptor. 
 
 
-  bool ``[link asio.reference.posix__basic_stream_descriptor.non_blocking.overload1 non_blocking]``() const;
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.non_blocking.overload1 more...]]``
+  bool ``[link asio.reference.posix__stream_descriptor.non_blocking.overload1 non_blocking]``() const;
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.non_blocking.overload1 more...]]``
 
 
 Sets the non-blocking mode of the descriptor. 
 
 
-  void ``[link asio.reference.posix__basic_stream_descriptor.non_blocking.overload2 non_blocking]``(
+  void ``[link asio.reference.posix__stream_descriptor.non_blocking.overload2 non_blocking]``(
       bool mode);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.non_blocking.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.non_blocking.overload2 more...]]``
 
-  asio::error_code ``[link asio.reference.posix__basic_stream_descriptor.non_blocking.overload3 non_blocking]``(
+  void ``[link asio.reference.posix__stream_descriptor.non_blocking.overload3 non_blocking]``(
       bool mode,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.non_blocking.overload3 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.non_blocking.overload3 more...]]``
 
 
-[section:overload1 posix::basic_stream_descriptor::non_blocking (1 of 3 overloads)]
+[section:overload1 posix::stream_descriptor::non_blocking (1 of 3 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Gets the non-blocking mode of the descriptor. 
@@ -100202,10 +88299,10 @@
 
 
 
-[section:overload2 posix::basic_stream_descriptor::non_blocking (2 of 3 overloads)]
+[section:overload2 posix::stream_descriptor::non_blocking (2 of 3 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Sets the non-blocking mode of the descriptor. 
@@ -100247,16 +88344,16 @@
 
 
 
-[section:overload3 posix::basic_stream_descriptor::non_blocking (3 of 3 overloads)]
+[section:overload3 posix::stream_descriptor::non_blocking (3 of 3 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Sets the non-blocking mode of the descriptor. 
 
 
-  asio::error_code non_blocking(
+  void non_blocking(
       bool mode,
       asio::error_code & ec);
 
@@ -100287,14 +88384,14 @@
 [endsect]
 
 
-[section:operator_eq_ posix::basic_stream_descriptor::operator=]
+[section:operator_eq_ posix::stream_descriptor::operator=]
 
-[indexterm2 operator=..posix::basic_stream_descriptor] 
-Move-assign a [link asio.reference.posix__basic_stream_descriptor `posix::basic_stream_descriptor`] from another. 
+[indexterm2 asio.indexterm.posix__stream_descriptor.operator_eq_..operator=..posix::stream_descriptor] 
+Move-assign a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] from another. 
 
 
-  basic_stream_descriptor & operator=(
-      basic_stream_descriptor && other);
+  stream_descriptor & operator=(
+      stream_descriptor && other);
 
 
 This assignment operator moves a stream descriptor from one object to another.
@@ -100305,14 +88402,14 @@
 
 [variablelist
   
-[[other][The other [link asio.reference.posix__basic_stream_descriptor `posix::basic_stream_descriptor`] object from which the move will occur.]]
+[[other][The other [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] object from which the move will occur.]]
 
 ]
 
 
 [heading Remarks]
       
-Following the move, the moved-from object is in the same state as if constructed using the `basic_stream_descriptor(io_context&) constructor`. 
+Following the move, the moved-from object is in the same state as if constructed using the `stream_descriptor(io_context&) constructor`. 
 
 
 
@@ -100320,27 +88417,27 @@
 [endsect]
 
 
-[section:read_some posix::basic_stream_descriptor::read_some]
+[section:read_some posix::stream_descriptor::read_some]
 
-[indexterm2 read_some..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.read_some..read_some..posix::stream_descriptor] 
 Read some data from the descriptor. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.posix__basic_stream_descriptor.read_some.overload1 read_some]``(
+  std::size_t ``[link asio.reference.posix__stream_descriptor.read_some.overload1 read_some]``(
       const MutableBufferSequence & buffers);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.read_some.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.read_some.overload1 more...]]``
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.posix__basic_stream_descriptor.read_some.overload2 read_some]``(
+  std::size_t ``[link asio.reference.posix__stream_descriptor.read_some.overload2 read_some]``(
       const MutableBufferSequence & buffers,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.read_some.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.read_some.overload2 more...]]``
 
 
-[section:overload1 posix::basic_stream_descriptor::read_some (1 of 2 overloads)]
+[section:overload1 posix::stream_descriptor::read_some (1 of 2 overloads)]
 
 
 Read some data from the descriptor. 
@@ -100401,7 +88498,7 @@
 
 
 
-[section:overload2 posix::basic_stream_descriptor::read_some (2 of 2 overloads)]
+[section:overload2 posix::stream_descriptor::read_some (2 of 2 overloads)]
 
 
 Read some data from the descriptor. 
@@ -100447,12 +88544,12 @@
 [endsect]
 
 
-[section:release posix::basic_stream_descriptor::release]
+[section:release posix::stream_descriptor::release]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
-[indexterm2 release..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.release..release..posix::stream_descriptor] 
 Release ownership of the native descriptor implementation. 
 
 
@@ -100467,50 +88564,160 @@
 [endsect]
 
 
+[section:stream_descriptor posix::stream_descriptor::stream_descriptor]
 
-[section:service_type posix::basic_stream_descriptor::service_type]
+[indexterm2 asio.indexterm.posix__stream_descriptor.stream_descriptor..stream_descriptor..posix::stream_descriptor] 
+Construct a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] without opening it. 
 
 
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..posix::basic_stream_descriptor] 
-The type of the service that will be used to provide I/O operations. 
+  explicit ``[link asio.reference.posix__stream_descriptor.stream_descriptor.overload1 stream_descriptor]``(
+      asio::io_context & io_context);
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.stream_descriptor.overload1 more...]]``
 
 
-  typedef StreamDescriptorService service_type;
+Construct a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] on an existing native descriptor. 
 
 
+  ``[link asio.reference.posix__stream_descriptor.stream_descriptor.overload2 stream_descriptor]``(
+      asio::io_context & io_context,
+      const native_handle_type & native_descriptor);
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.stream_descriptor.overload2 more...]]``
 
-[heading Requirements]
 
-['Header: ][^asio/posix/basic_stream_descriptor.hpp]
+Move-construct a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] from another. 
 
-['Convenience header: ][^asio.hpp]
+
+  ``[link asio.reference.posix__stream_descriptor.stream_descriptor.overload3 stream_descriptor]``(
+      stream_descriptor && other);
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.stream_descriptor.overload3 more...]]``
+
+
+[section:overload1 posix::stream_descriptor::stream_descriptor (1 of 3 overloads)]
+
+
+Construct a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] without opening it. 
+
+
+  stream_descriptor(
+      asio::io_context & io_context);
+
+
+This constructor creates a stream descriptor without opening it. The descriptor needs to be opened and then connected or accepted before data can be sent or received on it.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the stream descriptor will use to dispatch handlers for any asynchronous operations performed on the descriptor. ]]
+
+]
+
+
 
 
 [endsect]
 
 
-[section:wait posix::basic_stream_descriptor::wait]
 
-[indexterm2 wait..posix::basic_stream_descriptor] 
+[section:overload2 posix::stream_descriptor::stream_descriptor (2 of 3 overloads)]
+
+
+Construct a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] on an existing native descriptor. 
+
+
+  stream_descriptor(
+      asio::io_context & io_context,
+      const native_handle_type & native_descriptor);
+
+
+This constructor creates a stream descriptor object to hold an existing native descriptor.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the stream descriptor will use to dispatch handlers for any asynchronous operations performed on the descriptor.]]
+
+[[native_descriptor][The new underlying descriptor implementation.]]
+
+]
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload3 posix::stream_descriptor::stream_descriptor (3 of 3 overloads)]
+
+
+Move-construct a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] from another. 
+
+
+  stream_descriptor(
+      stream_descriptor && other);
+
+
+This constructor moves a stream descriptor from one object to another.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] object from which the move will occur.]]
+
+]
+
+
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `stream_descriptor(io_context&) constructor`. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:wait posix::stream_descriptor::wait]
+
+[indexterm2 asio.indexterm.posix__stream_descriptor.wait..wait..posix::stream_descriptor] 
 Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. 
 
 
-  void ``[link asio.reference.posix__basic_stream_descriptor.wait.overload1 wait]``(
+  void ``[link asio.reference.posix__stream_descriptor.wait.overload1 wait]``(
       wait_type w);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.wait.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.wait.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.posix__basic_stream_descriptor.wait.overload2 wait]``(
+  void ``[link asio.reference.posix__stream_descriptor.wait.overload2 wait]``(
       wait_type w,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.wait.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.wait.overload2 more...]]``
 
 
-[section:overload1 posix::basic_stream_descriptor::wait (1 of 2 overloads)]
+[section:overload1 posix::stream_descriptor::wait (1 of 2 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. 
@@ -100551,16 +88758,16 @@
 
 
 
-[section:overload2 posix::basic_stream_descriptor::wait (2 of 2 overloads)]
+[section:overload2 posix::stream_descriptor::wait (2 of 2 overloads)]
 
 
-['Inherited from posix::basic_descriptor.]
+['Inherited from posix::descriptor.]
 
 
 Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. 
 
 
-  asio::error_code wait(
+  void wait(
       wait_type w,
       asio::error_code & ec);
 
@@ -100601,20 +88808,20 @@
 [endsect]
 
 
-[section:wait_type posix::basic_stream_descriptor::wait_type]
+[section:wait_type posix::stream_descriptor::wait_type]
 
 
-['Inherited from posix::descriptor_base.]
+['Inherited from posix::descriptor.]
 
-[indexterm2 wait_type..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.wait_type..wait_type..posix::stream_descriptor] 
 Wait types. 
 
 
   enum wait_type
 
-[indexterm2 wait_read..posix::basic_stream_descriptor]
-[indexterm2 wait_write..posix::basic_stream_descriptor]
-[indexterm2 wait_error..posix::basic_stream_descriptor]
+[indexterm2 asio.indexterm.posix__stream_descriptor.wait_type.wait_read..wait_read..posix::stream_descriptor]
+[indexterm2 asio.indexterm.posix__stream_descriptor.wait_type.wait_write..wait_write..posix::stream_descriptor]
+[indexterm2 asio.indexterm.posix__stream_descriptor.wait_type.wait_error..wait_error..posix::stream_descriptor]
 
 [heading Values]
 [variablelist
@@ -100637,33 +88844,33 @@
 ]
 
 
-For use with `basic_descriptor::wait()` and `basic_descriptor::async_wait()`. 
+For use with `descriptor::wait()` and `descriptor::async_wait()`. 
 
 
 [endsect]
 
 
-[section:write_some posix::basic_stream_descriptor::write_some]
+[section:write_some posix::stream_descriptor::write_some]
 
-[indexterm2 write_some..posix::basic_stream_descriptor] 
+[indexterm2 asio.indexterm.posix__stream_descriptor.write_some..write_some..posix::stream_descriptor] 
 Write some data to the descriptor. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.posix__basic_stream_descriptor.write_some.overload1 write_some]``(
+  std::size_t ``[link asio.reference.posix__stream_descriptor.write_some.overload1 write_some]``(
       const ConstBufferSequence & buffers);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.write_some.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.write_some.overload1 more...]]``
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.posix__basic_stream_descriptor.write_some.overload2 write_some]``(
+  std::size_t ``[link asio.reference.posix__stream_descriptor.write_some.overload2 write_some]``(
       const ConstBufferSequence & buffers,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__basic_stream_descriptor.write_some.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor.write_some.overload2 more...]]``
 
 
-[section:overload1 posix::basic_stream_descriptor::write_some (1 of 2 overloads)]
+[section:overload1 posix::stream_descriptor::write_some (1 of 2 overloads)]
 
 
 Write some data to the descriptor. 
@@ -100724,7 +88931,7 @@
 
 
 
-[section:overload2 posix::basic_stream_descriptor::write_some (2 of 2 overloads)]
+[section:overload2 posix::stream_descriptor::write_some (2 of 2 overloads)]
 
 
 Write some data to the descriptor. 
@@ -100772,1063 +88979,22 @@
 
 [endsect]
 
-[section:posix__descriptor_base posix::descriptor_base]
-
-
-The [link asio.reference.posix__descriptor_base `posix::descriptor_base`] class is used as a base for the [link asio.reference.posix__basic_stream_descriptor `posix::basic_stream_descriptor`] class template so that we have a common place to define the associated IO control commands. 
-
-
-  class descriptor_base
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.posix__descriptor_base.bytes_readable [*bytes_readable]]]
-    [IO control command to get the amount of data that can be read without blocking. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__descriptor_base.wait_type [*wait_type]]]
-    [Wait types. ]
-  
-  ]
-
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.posix__descriptor_base._descriptor_base [*~descriptor_base]]]
-    [Protected destructor to prevent deletion through this type. ]
-  ]
-  
-]
-
-[heading Requirements]
-
-['Header: ][^asio/posix/descriptor_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:bytes_readable posix::descriptor_base::bytes_readable]
-
-[indexterm2 bytes_readable..posix::descriptor_base] 
-IO control command to get the amount of data that can be read without blocking. 
-
-
-  typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-  
-
-
-   asio::posix::stream_descriptor descriptor(io_context); 
-   ...
-   asio::descriptor_base::bytes_readable command(true);
-   descriptor.io_control(command);
-   std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/descriptor_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:wait_type posix::descriptor_base::wait_type]
-
-[indexterm2 wait_type..posix::descriptor_base] 
-Wait types. 
-
-
-  enum wait_type
-
-[indexterm2 wait_read..posix::descriptor_base]
-[indexterm2 wait_write..posix::descriptor_base]
-[indexterm2 wait_error..posix::descriptor_base]
-
-[heading Values]
-[variablelist
-
-  [
-    [wait_read]
-    [Wait for a descriptor to become ready to read. ]
-  ]
-
-  [
-    [wait_write]
-    [Wait for a descriptor to become ready to write. ]
-  ]
-
-  [
-    [wait_error]
-    [Wait for a descriptor to have error conditions pending. ]
-  ]
-
-]
-
-
-For use with `basic_descriptor::wait()` and `basic_descriptor::async_wait()`. 
-
-
-[endsect]
-
-
-
-[section:_descriptor_base posix::descriptor_base::~descriptor_base]
-
-[indexterm2 ~descriptor_base..posix::descriptor_base] 
-Protected destructor to prevent deletion through this type. 
-
-
-  ~descriptor_base();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:posix__stream_descriptor posix::stream_descriptor]
-
-[indexterm1 posix::stream_descriptor] 
-Typedef for the typical usage of a stream-oriented descriptor. 
-
-
-  typedef basic_stream_descriptor stream_descriptor;
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.posix__basic_stream_descriptor.bytes_readable [*bytes_readable]]]
-    [IO control command to get the amount of data that can be read without blocking. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_stream_descriptor.executor_type [*executor_type]]]
-    [The type of the executor associated with the object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_stream_descriptor.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_stream_descriptor.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_descriptor is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_stream_descriptor.native_handle_type [*native_handle_type]]]
-    [The native representation of a descriptor. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_stream_descriptor.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__basic_stream_descriptor.wait_type [*wait_type]]]
-    [Wait types. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.assign [*assign]]]
-    [Assign an existing native descriptor to the descriptor. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.async_read_some [*async_read_some]]]
-    [Start an asynchronous read. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.async_wait [*async_wait]]]
-    [Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.async_write_some [*async_write_some]]]
-    [Start an asynchronous write. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.basic_stream_descriptor [*basic_stream_descriptor]]]
-    [Construct a basic_stream_descriptor without opening it. 
-
-     Construct a basic_stream_descriptor on an existing native descriptor. 
-
-     Move-construct a basic_stream_descriptor from another. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the descriptor. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.close [*close]]]
-    [Close the descriptor. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.get_executor [*get_executor]]]
-    [Get the executor associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.get_io_context [*get_io_context]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.io_control [*io_control]]]
-    [Perform an IO control command on the descriptor. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.is_open [*is_open]]]
-    [Determine whether the descriptor is open. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.lowest_layer [*lowest_layer]]]
-    [Get a reference to the lowest layer. 
-
-     Get a const reference to the lowest layer. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.native_handle [*native_handle]]]
-    [Get the native descriptor representation. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.native_non_blocking [*native_non_blocking]]]
-    [Gets the non-blocking mode of the native descriptor implementation. 
-
-     Sets the non-blocking mode of the native descriptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.non_blocking [*non_blocking]]]
-    [Gets the non-blocking mode of the descriptor. 
-
-     Sets the non-blocking mode of the descriptor. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.operator_eq_ [*operator=]]]
-    [Move-assign a basic_stream_descriptor from another. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.read_some [*read_some]]]
-    [Read some data from the descriptor. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.release [*release]]]
-    [Release ownership of the native descriptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.wait [*wait]]]
-    [Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.write_some [*write_some]]]
-    [Write some data to the descriptor. ]
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__basic_stream_descriptor.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-]
-
-The [link asio.reference.posix__basic_stream_descriptor `posix::basic_stream_descriptor`] class template provides asynchronous and blocking stream-oriented descriptor functionality.
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/stream_descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:posix__stream_descriptor_service posix::stream_descriptor_service]
-
-
-Default service implementation for a stream descriptor. 
-
-
-  class stream_descriptor_service :
-    public io_context::service
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.posix__stream_descriptor_service.implementation_type [*implementation_type]]]
-    [The type of a stream descriptor implementation. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.posix__stream_descriptor_service.native_handle_type [*native_handle_type]]]
-    [The native descriptor type. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.posix__stream_descriptor_service.assign [*assign]]]
-    [Assign an existing native descriptor to a stream descriptor. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.async_read_some [*async_read_some]]]
-    [Start an asynchronous read. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.async_wait [*async_wait]]]
-    [Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.async_write_some [*async_write_some]]]
-    [Start an asynchronous write. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the descriptor. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.close [*close]]]
-    [Close a stream descriptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.construct [*construct]]]
-    [Construct a new stream descriptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.destroy [*destroy]]]
-    [Destroy a stream descriptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.io_control [*io_control]]]
-    [Perform an IO control command on the descriptor. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.is_open [*is_open]]]
-    [Determine whether the descriptor is open. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.move_assign [*move_assign]]]
-    [Move-assign from another stream descriptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.move_construct [*move_construct]]]
-    [Move-construct a new stream descriptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.native_handle [*native_handle]]]
-    [Get the native descriptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.native_non_blocking [*native_non_blocking]]]
-    [Gets the non-blocking mode of the native descriptor implementation. 
-
-     Sets the non-blocking mode of the native descriptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.non_blocking [*non_blocking]]]
-    [Gets the non-blocking mode of the descriptor. 
-
-     Sets the non-blocking mode of the descriptor. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.read_some [*read_some]]]
-    [Read some data from the stream. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.release [*release]]]
-    [Release ownership of the native descriptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.stream_descriptor_service [*stream_descriptor_service]]]
-    [Construct a new stream descriptor service for the specified io_context. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.wait [*wait]]]
-    [Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-  [
-    [[link asio.reference.posix__stream_descriptor_service.write_some [*write_some]]]
-    [Write the given data to the stream. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.posix__stream_descriptor_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/posix/stream_descriptor_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:assign posix::stream_descriptor_service::assign]
-
-[indexterm2 assign..posix::stream_descriptor_service] 
-Assign an existing native descriptor to a stream descriptor. 
-
-
-  asio::error_code assign(
-      implementation_type & impl,
-      const native_handle_type & native_descriptor,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:async_read_some posix::stream_descriptor_service::async_read_some]
-
-[indexterm2 async_read_some..posix::stream_descriptor_service] 
-Start an asynchronous read. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_wait posix::stream_descriptor_service::async_wait]
-
-[indexterm2 async_wait..posix::stream_descriptor_service] 
-Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  template<
-      typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      implementation_type & impl,
-      descriptor_base::wait_type w,
-      WaitHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_write_some posix::stream_descriptor_service::async_write_some]
-
-[indexterm2 async_write_some..posix::stream_descriptor_service] 
-Start an asynchronous write. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      WriteHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:cancel posix::stream_descriptor_service::cancel]
-
-[indexterm2 cancel..posix::stream_descriptor_service] 
-Cancel all asynchronous operations associated with the descriptor. 
-
-
-  asio::error_code cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:close posix::stream_descriptor_service::close]
-
-[indexterm2 close..posix::stream_descriptor_service] 
-Close a stream descriptor implementation. 
-
-
-  asio::error_code close(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct posix::stream_descriptor_service::construct]
-
-[indexterm2 construct..posix::stream_descriptor_service] 
-Construct a new stream descriptor implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:destroy posix::stream_descriptor_service::destroy]
-
-[indexterm2 destroy..posix::stream_descriptor_service] 
-Destroy a stream descriptor implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:get_io_context posix::stream_descriptor_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..posix::stream_descriptor_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service posix::stream_descriptor_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..posix::stream_descriptor_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:id posix::stream_descriptor_service::id]
-
-[indexterm2 id..posix::stream_descriptor_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type posix::stream_descriptor_service::implementation_type]
-
-[indexterm2 implementation_type..posix::stream_descriptor_service] 
-The type of a stream descriptor implementation. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/stream_descriptor_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:io_control posix::stream_descriptor_service::io_control]
-
-[indexterm2 io_control..posix::stream_descriptor_service] 
-Perform an IO control command on the descriptor. 
-
-
-  template<
-      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
-      implementation_type & impl,
-      IoControlCommand & command,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:is_open posix::stream_descriptor_service::is_open]
-
-[indexterm2 is_open..posix::stream_descriptor_service] 
-Determine whether the descriptor is open. 
-
-
-  bool is_open(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:move_assign posix::stream_descriptor_service::move_assign]
-
-[indexterm2 move_assign..posix::stream_descriptor_service] 
-Move-assign from another stream descriptor implementation. 
-
-
-  void move_assign(
-      implementation_type & impl,
-      stream_descriptor_service & other_service,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:move_construct posix::stream_descriptor_service::move_construct]
-
-[indexterm2 move_construct..posix::stream_descriptor_service] 
-Move-construct a new stream descriptor implementation. 
-
-
-  void move_construct(
-      implementation_type & impl,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle posix::stream_descriptor_service::native_handle]
-
-[indexterm2 native_handle..posix::stream_descriptor_service] 
-Get the native descriptor implementation. 
-
-
-  native_handle_type native_handle(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle_type posix::stream_descriptor_service::native_handle_type]
-
-[indexterm2 native_handle_type..posix::stream_descriptor_service] 
-The native descriptor type. 
-
-
-  typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/stream_descriptor_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking posix::stream_descriptor_service::native_non_blocking]
-
-[indexterm2 native_non_blocking..posix::stream_descriptor_service] 
-Gets the non-blocking mode of the native descriptor implementation. 
-
-
-  bool ``[link asio.reference.posix__stream_descriptor_service.native_non_blocking.overload1 native_non_blocking]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor_service.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native descriptor implementation. 
-
-
-  asio::error_code ``[link asio.reference.posix__stream_descriptor_service.native_non_blocking.overload2 native_non_blocking]``(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor_service.native_non_blocking.overload2 more...]]``
-
-
-[section:overload1 posix::stream_descriptor_service::native_non_blocking (1 of 2 overloads)]
-
-
-Gets the non-blocking mode of the native descriptor implementation. 
-
-
-  bool native_non_blocking(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor_service::native_non_blocking (2 of 2 overloads)]
-
-
-Sets the non-blocking mode of the native descriptor implementation. 
-
-
-  asio::error_code native_non_blocking(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking posix::stream_descriptor_service::non_blocking]
-
-[indexterm2 non_blocking..posix::stream_descriptor_service] 
-Gets the non-blocking mode of the descriptor. 
-
-
-  bool ``[link asio.reference.posix__stream_descriptor_service.non_blocking.overload1 non_blocking]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor_service.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the descriptor. 
-
-
-  asio::error_code ``[link asio.reference.posix__stream_descriptor_service.non_blocking.overload2 non_blocking]``(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.posix__stream_descriptor_service.non_blocking.overload2 more...]]``
-
-
-[section:overload1 posix::stream_descriptor_service::non_blocking (1 of 2 overloads)]
-
-
-Gets the non-blocking mode of the descriptor. 
-
-
-  bool non_blocking(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor_service::non_blocking (2 of 2 overloads)]
-
-
-Sets the non-blocking mode of the descriptor. 
-
-
-  asio::error_code non_blocking(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:read_some posix::stream_descriptor_service::read_some]
-
-[indexterm2 read_some..posix::stream_descriptor_service] 
-Read some data from the stream. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t read_some(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:release posix::stream_descriptor_service::release]
-
-[indexterm2 release..posix::stream_descriptor_service] 
-Release ownership of the native descriptor implementation. 
-
-
-  native_handle_type release(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:stream_descriptor_service posix::stream_descriptor_service::stream_descriptor_service]
-
-[indexterm2 stream_descriptor_service..posix::stream_descriptor_service] 
-Construct a new stream descriptor service for the specified [link asio.reference.io_context `io_context`]. 
-
-
-  stream_descriptor_service(
-      asio::io_context & io_context);
-
-
-
-[endsect]
-
-
-
-[section:wait posix::stream_descriptor_service::wait]
-
-[indexterm2 wait..posix::stream_descriptor_service] 
-Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  asio::error_code wait(
-      implementation_type & impl,
-      descriptor_base::wait_type w,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:write_some posix::stream_descriptor_service::write_some]
-
-[indexterm2 write_some..posix::stream_descriptor_service] 
-Write the given data to the stream. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t write_some(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
 [section:post post]
 
-[indexterm1 post] 
+[indexterm1 asio.indexterm.post..post] 
 Submits a completion token or function object for execution. 
 
     
   template<
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.post.overload1 post]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.post.overload1 post]``(
       CompletionToken && token);
   ``  [''''&raquo;''' [link asio.reference.post.overload1 more...]]``
 
   template<
       typename ``[link asio.reference.Executor1 Executor]``,
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.post.overload2 post]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.post.overload2 post]``(
       const Executor & ex,
       CompletionToken && token,
       typename enable_if< is_executor< Executor >::value >::type *  = 0);
@@ -101837,7 +89003,7 @@
   template<
       typename ExecutionContext,
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.post.overload3 post]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.post.overload3 post]``(
       ExecutionContext & ctx,
       CompletionToken && token,
       typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type *  = 0);
@@ -101858,7 +89024,7 @@
 
   template<
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` post(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` post(
       CompletionToken && token);
 
 
@@ -101900,7 +89066,7 @@
   template<
       typename ``[link asio.reference.Executor1 Executor]``,
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` post(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` post(
       const Executor & ex,
       CompletionToken && token,
       typename enable_if< is_executor< Executor >::value >::type *  = 0);
@@ -101950,7 +89116,7 @@
   template<
       typename ExecutionContext,
       typename CompletionToken>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` post(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` post(
       ExecutionContext & ctx,
       CompletionToken && token,
       typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type *  = 0);
@@ -101969,1095 +89135,9 @@
 
 [endsect]
 
-[section:raw_socket_service raw_socket_service]
-
-
-Default service implementation for a raw socket. 
-
-
-  template<
-      typename ``[link asio.reference.Protocol Protocol]``>
-  class raw_socket_service :
-    public io_context::service
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.raw_socket_service.endpoint_type [*endpoint_type]]]
-    [The endpoint type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.raw_socket_service.implementation_type [*implementation_type]]]
-    [The type of a raw socket. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.raw_socket_service.native_handle_type [*native_handle_type]]]
-    [The native socket type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.raw_socket_service.protocol_type [*protocol_type]]]
-    [The protocol type. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.raw_socket_service.assign [*assign]]]
-    [Assign an existing native socket to a raw socket. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.async_connect [*async_connect]]]
-    [Start an asynchronous connect. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.async_receive [*async_receive]]]
-    [Start an asynchronous receive. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.async_receive_from [*async_receive_from]]]
-    [Start an asynchronous receive that will get the endpoint of the sender. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.async_send [*async_send]]]
-    [Start an asynchronous send. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.async_send_to [*async_send_to]]]
-    [Start an asynchronous send. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.async_wait [*async_wait]]]
-    [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.at_mark [*at_mark]]]
-    [Determine whether the socket is at the out-of-band data mark. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.available [*available]]]
-    [Determine the number of bytes available for reading. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.bind [*bind]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.close [*close]]]
-    [Close a raw socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.connect [*connect]]]
-    [Connect the raw socket to the specified endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.construct [*construct]]]
-    [Construct a new raw socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.converting_move_construct [*converting_move_construct]]]
-    [Move-construct a new raw socket implementation from another protocol type. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.destroy [*destroy]]]
-    [Destroy a raw socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.get_option [*get_option]]]
-    [Get a socket option. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.io_control [*io_control]]]
-    [Perform an IO control command on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.is_open [*is_open]]]
-    [Determine whether the socket is open. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.local_endpoint [*local_endpoint]]]
-    [Get the local endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.move_assign [*move_assign]]]
-    [Move-assign from another raw socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.move_construct [*move_construct]]]
-    [Move-construct a new raw socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.native_handle [*native_handle]]]
-    [Get the native socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.native_non_blocking [*native_non_blocking]]]
-    [Gets the non-blocking mode of the native socket implementation. 
-
-     Sets the non-blocking mode of the native socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.non_blocking [*non_blocking]]]
-    [Gets the non-blocking mode of the socket. 
-
-     Sets the non-blocking mode of the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.open [*open]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.raw_socket_service [*raw_socket_service]]]
-    [Construct a new raw socket service for the specified io_context. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.receive [*receive]]]
-    [Receive some data from the peer. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.receive_from [*receive_from]]]
-    [Receive raw data with the endpoint of the sender. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.remote_endpoint [*remote_endpoint]]]
-    [Get the remote endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.send [*send]]]
-    [Send the given data to the peer. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.send_to [*send_to]]]
-    [Send raw data to the specified endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.set_option [*set_option]]]
-    [Set a socket option. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.shutdown [*shutdown]]]
-    [Disable sends or receives on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.raw_socket_service.wait [*wait]]]
-    [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.raw_socket_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/raw_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:assign raw_socket_service::assign]
-
-[indexterm2 assign..raw_socket_service] 
-Assign an existing native socket to a raw socket. 
-
-
-  asio::error_code assign(
-      implementation_type & impl,
-      const protocol_type & protocol,
-      const native_handle_type & native_socket,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:async_connect raw_socket_service::async_connect]
-
-[indexterm2 async_connect..raw_socket_service] 
-Start an asynchronous connect. 
-
-
-  template<
-      typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
-      implementation_type & impl,
-      const endpoint_type & peer_endpoint,
-      ConnectHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_receive raw_socket_service::async_receive]
-
-[indexterm2 async_receive..raw_socket_service] 
-Start an asynchronous receive. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      socket_base::message_flags flags,
-      ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_receive_from raw_socket_service::async_receive_from]
-
-[indexterm2 async_receive_from..raw_socket_service] 
-Start an asynchronous receive that will get the endpoint of the sender. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive_from(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      endpoint_type & sender_endpoint,
-      socket_base::message_flags flags,
-      ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_send raw_socket_service::async_send]
-
-[indexterm2 async_send..raw_socket_service] 
-Start an asynchronous send. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      socket_base::message_flags flags,
-      WriteHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_send_to raw_socket_service::async_send_to]
-
-[indexterm2 async_send_to..raw_socket_service] 
-Start an asynchronous send. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send_to(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      const endpoint_type & destination,
-      socket_base::message_flags flags,
-      WriteHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_wait raw_socket_service::async_wait]
-
-[indexterm2 async_wait..raw_socket_service] 
-Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  template<
-      typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      implementation_type & impl,
-      socket_base::wait_type w,
-      WaitHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:at_mark raw_socket_service::at_mark]
-
-[indexterm2 at_mark..raw_socket_service] 
-Determine whether the socket is at the out-of-band data mark. 
-
-
-  bool at_mark(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:available raw_socket_service::available]
-
-[indexterm2 available..raw_socket_service] 
-Determine the number of bytes available for reading. 
-
-
-  std::size_t available(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:bind raw_socket_service::bind]
-
-[indexterm2 bind..raw_socket_service] 
-
-  asio::error_code bind(
-      implementation_type & impl,
-      const endpoint_type & endpoint,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:cancel raw_socket_service::cancel]
-
-[indexterm2 cancel..raw_socket_service] 
-Cancel all asynchronous operations associated with the socket. 
-
-
-  asio::error_code cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:close raw_socket_service::close]
-
-[indexterm2 close..raw_socket_service] 
-Close a raw socket implementation. 
-
-
-  asio::error_code close(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:connect raw_socket_service::connect]
-
-[indexterm2 connect..raw_socket_service] 
-Connect the raw socket to the specified endpoint. 
-
-
-  asio::error_code connect(
-      implementation_type & impl,
-      const endpoint_type & peer_endpoint,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct raw_socket_service::construct]
-
-[indexterm2 construct..raw_socket_service] 
-Construct a new raw socket implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:converting_move_construct raw_socket_service::converting_move_construct]
-
-[indexterm2 converting_move_construct..raw_socket_service] 
-Move-construct a new raw socket implementation from another protocol type. 
-
-
-  template<
-      typename ``[link asio.reference.Protocol Protocol1]``>
-  void converting_move_construct(
-      implementation_type & impl,
-      typename raw_socket_service< Protocol1 >::implementation_type & other_impl,
-      typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
-
-
-
-[endsect]
-
-
-
-[section:destroy raw_socket_service::destroy]
-
-[indexterm2 destroy..raw_socket_service] 
-Destroy a raw socket implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:endpoint_type raw_socket_service::endpoint_type]
-
-[indexterm2 endpoint_type..raw_socket_service] 
-The endpoint type. 
-
-
-  typedef Protocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/raw_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_io_context raw_socket_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..raw_socket_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service raw_socket_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..raw_socket_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:get_option raw_socket_service::get_option]
-
-[indexterm2 get_option..raw_socket_service] 
-Get a socket option. 
-
-
-  template<
-      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code get_option(
-      const implementation_type & impl,
-      GettableSocketOption & option,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:id raw_socket_service::id]
-
-[indexterm2 id..raw_socket_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type raw_socket_service::implementation_type]
-
-[indexterm2 implementation_type..raw_socket_service] 
-The type of a raw socket. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/raw_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:io_control raw_socket_service::io_control]
-
-[indexterm2 io_control..raw_socket_service] 
-Perform an IO control command on the socket. 
-
-
-  template<
-      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
-      implementation_type & impl,
-      IoControlCommand & command,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:is_open raw_socket_service::is_open]
-
-[indexterm2 is_open..raw_socket_service] 
-Determine whether the socket is open. 
-
-
-  bool is_open(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:local_endpoint raw_socket_service::local_endpoint]
-
-[indexterm2 local_endpoint..raw_socket_service] 
-Get the local endpoint. 
-
-
-  endpoint_type local_endpoint(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:move_assign raw_socket_service::move_assign]
-
-[indexterm2 move_assign..raw_socket_service] 
-Move-assign from another raw socket implementation. 
-
-
-  void move_assign(
-      implementation_type & impl,
-      raw_socket_service & other_service,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:move_construct raw_socket_service::move_construct]
-
-[indexterm2 move_construct..raw_socket_service] 
-Move-construct a new raw socket implementation. 
-
-
-  void move_construct(
-      implementation_type & impl,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle raw_socket_service::native_handle]
-
-[indexterm2 native_handle..raw_socket_service] 
-Get the native socket implementation. 
-
-
-  native_handle_type native_handle(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle_type raw_socket_service::native_handle_type]
-
-[indexterm2 native_handle_type..raw_socket_service] 
-The native socket type. 
-
-
-  typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/raw_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking raw_socket_service::native_non_blocking]
-
-[indexterm2 native_non_blocking..raw_socket_service] 
-Gets the non-blocking mode of the native socket implementation. 
-
-
-  bool ``[link asio.reference.raw_socket_service.native_non_blocking.overload1 native_non_blocking]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.raw_socket_service.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native socket implementation. 
-
-
-  asio::error_code ``[link asio.reference.raw_socket_service.native_non_blocking.overload2 native_non_blocking]``(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.raw_socket_service.native_non_blocking.overload2 more...]]``
-
-
-[section:overload1 raw_socket_service::native_non_blocking (1 of 2 overloads)]
-
-
-Gets the non-blocking mode of the native socket implementation. 
-
-
-  bool native_non_blocking(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 raw_socket_service::native_non_blocking (2 of 2 overloads)]
-
-
-Sets the non-blocking mode of the native socket implementation. 
-
-
-  asio::error_code native_non_blocking(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking raw_socket_service::non_blocking]
-
-[indexterm2 non_blocking..raw_socket_service] 
-Gets the non-blocking mode of the socket. 
-
-
-  bool ``[link asio.reference.raw_socket_service.non_blocking.overload1 non_blocking]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.raw_socket_service.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the socket. 
-
-
-  asio::error_code ``[link asio.reference.raw_socket_service.non_blocking.overload2 non_blocking]``(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.raw_socket_service.non_blocking.overload2 more...]]``
-
-
-[section:overload1 raw_socket_service::non_blocking (1 of 2 overloads)]
-
-
-Gets the non-blocking mode of the socket. 
-
-
-  bool non_blocking(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 raw_socket_service::non_blocking (2 of 2 overloads)]
-
-
-Sets the non-blocking mode of the socket. 
-
-
-  asio::error_code non_blocking(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:open raw_socket_service::open]
-
-[indexterm2 open..raw_socket_service] 
-
-  asio::error_code open(
-      implementation_type & impl,
-      const protocol_type & protocol,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:protocol_type raw_socket_service::protocol_type]
-
-[indexterm2 protocol_type..raw_socket_service] 
-The protocol type. 
-
-
-  typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/raw_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:raw_socket_service raw_socket_service::raw_socket_service]
-
-[indexterm2 raw_socket_service..raw_socket_service] 
-Construct a new raw socket service for the specified [link asio.reference.io_context `io_context`]. 
-
-
-  raw_socket_service(
-      asio::io_context & io_context);
-
-
-
-[endsect]
-
-
-
-[section:receive raw_socket_service::receive]
-
-[indexterm2 receive..raw_socket_service] 
-Receive some data from the peer. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t receive(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      socket_base::message_flags flags,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:receive_from raw_socket_service::receive_from]
-
-[indexterm2 receive_from..raw_socket_service] 
-Receive raw data with the endpoint of the sender. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t receive_from(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      endpoint_type & sender_endpoint,
-      socket_base::message_flags flags,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:remote_endpoint raw_socket_service::remote_endpoint]
-
-[indexterm2 remote_endpoint..raw_socket_service] 
-Get the remote endpoint. 
-
-
-  endpoint_type remote_endpoint(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:send raw_socket_service::send]
-
-[indexterm2 send..raw_socket_service] 
-Send the given data to the peer. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t send(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      socket_base::message_flags flags,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:send_to raw_socket_service::send_to]
-
-[indexterm2 send_to..raw_socket_service] 
-Send raw data to the specified endpoint. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t send_to(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      const endpoint_type & destination,
-      socket_base::message_flags flags,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:set_option raw_socket_service::set_option]
-
-[indexterm2 set_option..raw_socket_service] 
-Set a socket option. 
-
-
-  template<
-      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code set_option(
-      implementation_type & impl,
-      const SettableSocketOption & option,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:shutdown raw_socket_service::shutdown]
-
-[indexterm2 shutdown..raw_socket_service] 
-Disable sends or receives on the socket. 
-
-
-  asio::error_code shutdown(
-      implementation_type & impl,
-      socket_base::shutdown_type what,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:wait raw_socket_service::wait]
-
-[indexterm2 wait..raw_socket_service] 
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  asio::error_code wait(
-      implementation_type & impl,
-      socket_base::wait_type w,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
 [section:read read]
 
-[indexterm1 read] 
+[indexterm1 asio.indexterm.read..read] 
 Attempt to read a certain amount of data from a stream before returning. 
 
       
@@ -103083,7 +89163,7 @@
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.read.overload3 read]``(
       SyncReadStream & s,
       const MutableBufferSequence & buffers,
@@ -103094,7 +89174,7 @@
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.read.overload4 read]``(
       SyncReadStream & s,
       const MutableBufferSequence & buffers,
@@ -103105,44 +89185,44 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t ``[link asio.reference.read.overload5 read]``(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      DynamicBuffer && buffers,
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.read.overload5 more...]]``
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t ``[link asio.reference.read.overload6 read]``(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       asio::error_code & ec,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.read.overload6 more...]]``
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.read.overload7 read]``(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       CompletionCondition completion_condition,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.read.overload7 more...]]``
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.read.overload8 read]``(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       CompletionCondition completion_condition,
       asio::error_code & ec,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.read.overload8 more...]]``
 
   template<
@@ -103165,7 +89245,7 @@
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.read.overload11 read]``(
       SyncReadStream & s,
       basic_streambuf< Allocator > & b,
@@ -103175,7 +89255,7 @@
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.read.overload12 read]``(
       SyncReadStream & s,
       basic_streambuf< Allocator > & b,
@@ -103354,7 +89434,7 @@
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t read(
       SyncReadStream & s,
       const MutableBufferSequence & buffers,
@@ -103438,7 +89518,7 @@
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t read(
       SyncReadStream & s,
       const MutableBufferSequence & buffers,
@@ -103503,11 +89583,11 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t read(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      DynamicBuffer && buffers,
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
 
 
 This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
@@ -103574,12 +89654,12 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t read(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       asio::error_code & ec,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
 
 
 This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
@@ -103638,13 +89718,13 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t read(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       CompletionCondition completion_condition,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
 
 
 This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
@@ -103711,14 +89791,14 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t read(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       CompletionCondition completion_condition,
       asio::error_code & ec,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
 
 
 This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
@@ -103911,7 +89991,7 @@
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t read(
       SyncReadStream & s,
       basic_streambuf< Allocator > & b,
@@ -103983,7 +90063,7 @@
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t read(
       SyncReadStream & s,
       basic_streambuf< Allocator > & b,
@@ -104042,7 +90122,7 @@
 
 [section:read_at read_at]
 
-[indexterm1 read_at] 
+[indexterm1 asio.indexterm.read_at..read_at] 
 Attempt to read a certain amount of data at the specified offset before returning. 
 
       
@@ -104068,7 +90148,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.read_at.overload3 read_at]``(
       SyncRandomAccessReadDevice & d,
       uint64_t offset,
@@ -104079,7 +90159,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.read_at.overload4 read_at]``(
       SyncRandomAccessReadDevice & d,
       uint64_t offset,
@@ -104110,7 +90190,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.read_at.overload7 read_at]``(
       SyncRandomAccessReadDevice & d,
       uint64_t offset,
@@ -104121,7 +90201,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.read_at.overload8 read_at]``(
       SyncRandomAccessReadDevice & d,
       uint64_t offset,
@@ -104306,7 +90386,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t read_at(
       SyncRandomAccessReadDevice & d,
       uint64_t offset,
@@ -104392,7 +90472,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t read_at(
       SyncRandomAccessReadDevice & d,
       uint64_t offset,
@@ -104593,7 +90673,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t read_at(
       SyncRandomAccessReadDevice & d,
       uint64_t offset,
@@ -104665,7 +90745,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t read_at(
       SyncRandomAccessReadDevice & d,
       uint64_t offset,
@@ -104724,87 +90804,85 @@
 
 [section:read_until read_until]
 
-[indexterm1 read_until] 
+[indexterm1 asio.indexterm.read_until..read_until] 
 Read data into a dynamic buffer sequence, or into a streambuf, until it contains a delimiter, matches a regular expression, or a function object indicates a match. 
 
       
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t ``[link asio.reference.read_until.overload1 read_until]``(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       char delim);
   ``  [''''&raquo;''' [link asio.reference.read_until.overload1 more...]]``
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t ``[link asio.reference.read_until.overload2 read_until]``(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       char delim,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.read_until.overload2 more...]]``
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename Allocator>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t ``[link asio.reference.read_until.overload3 read_until]``(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
-      const std::basic_string< char, std::char_traits< char >, Allocator > & delim);
+      DynamicBuffer && buffers,
+      string_view delim);
   ``  [''''&raquo;''' [link asio.reference.read_until.overload3 more...]]``
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename Allocator>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t ``[link asio.reference.read_until.overload4 read_until]``(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
-      const std::basic_string< char, std::char_traits< char >, Allocator > & delim,
+      DynamicBuffer && buffers,
+      string_view delim,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.read_until.overload4 more...]]``
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t ``[link asio.reference.read_until.overload5 read_until]``(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       const boost::regex & expr);
   ``  [''''&raquo;''' [link asio.reference.read_until.overload5 more...]]``
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t ``[link asio.reference.read_until.overload6 read_until]``(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       const boost::regex & expr,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.read_until.overload6 more...]]``
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename MatchCondition>
   std::size_t ``[link asio.reference.read_until.overload7 read_until]``(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       MatchCondition match_condition,
       typename enable_if< is_match_condition< MatchCondition >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.read_until.overload7 more...]]``
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename MatchCondition>
   std::size_t ``[link asio.reference.read_until.overload8 read_until]``(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       MatchCondition match_condition,
       asio::error_code & ec,
       typename enable_if< is_match_condition< MatchCondition >::value >::type *  = 0);
@@ -104835,7 +90913,7 @@
   std::size_t ``[link asio.reference.read_until.overload11 read_until]``(
       SyncReadStream & s,
       asio::basic_streambuf< Allocator > & b,
-      const std::string & delim);
+      string_view delim);
   ``  [''''&raquo;''' [link asio.reference.read_until.overload11 more...]]``
 
   template<
@@ -104844,7 +90922,7 @@
   std::size_t ``[link asio.reference.read_until.overload12 read_until]``(
       SyncReadStream & s,
       asio::basic_streambuf< Allocator > & b,
-      const std::string & delim,
+      string_view delim,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.read_until.overload12 more...]]``
 
@@ -104890,25 +90968,6 @@
       typename enable_if< is_match_condition< MatchCondition >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.read_until.overload16 more...]]``
 
-  template<
-      typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
-  std::size_t ``[link asio.reference.read_until.overload17 read_until]``(
-      SyncReadStream & s,
-      DynamicBufferSequence && buffers,
-      const std::string & delim);
-  ``  [''''&raquo;''' [link asio.reference.read_until.overload17 more...]]``
-
-  template<
-      typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
-  std::size_t ``[link asio.reference.read_until.overload18 read_until]``(
-      SyncReadStream & s,
-      DynamicBufferSequence && buffers,
-      const std::string & delim,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.read_until.overload18 more...]]``
-
 [heading Requirements]
 
 ['Header: ][^asio/read_until.hpp]
@@ -104916,7 +90975,7 @@
 ['Convenience header: ][^asio.hpp]
 
 
-[section:overload1 read_until (1 of 18 overloads)]
+[section:overload1 read_until (1 of 16 overloads)]
 
 
 Read data into a dynamic buffer sequence until it contains a specified delimiter. 
@@ -104924,10 +90983,10 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t read_until(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       char delim);
 
 
@@ -105011,7 +91070,7 @@
 
 
 
-[section:overload2 read_until (2 of 18 overloads)]
+[section:overload2 read_until (2 of 16 overloads)]
 
 
 Read data into a dynamic buffer sequence until it contains a specified delimiter. 
@@ -105019,10 +91078,10 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t read_until(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       char delim,
       asio::error_code & ec);
 
@@ -105070,7 +91129,7 @@
 
 
 
-[section:overload3 read_until (3 of 18 overloads)]
+[section:overload3 read_until (3 of 16 overloads)]
 
 
 Read data into a dynamic buffer sequence until it contains a specified delimiter. 
@@ -105078,12 +91137,11 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename Allocator>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t read_until(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
-      const std::basic_string< char, std::char_traits< char >, Allocator > & delim);
+      DynamicBuffer && buffers,
+      string_view delim);
 
 
 This function is used to read data into the specified dynamic buffer sequence until the dynamic buffer sequence's get area contains the specified delimiter. The call will block until one of the following conditions is true:
@@ -105156,7 +91214,7 @@
 
 
 
-[section:overload4 read_until (4 of 18 overloads)]
+[section:overload4 read_until (4 of 16 overloads)]
 
 
 Read data into a dynamic buffer sequence until it contains a specified delimiter. 
@@ -105164,12 +91222,11 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename Allocator>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t read_until(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
-      const std::basic_string< char, std::char_traits< char >, Allocator > & delim,
+      DynamicBuffer && buffers,
+      string_view delim,
       asio::error_code & ec);
 
 
@@ -105216,7 +91273,7 @@
 
 
 
-[section:overload5 read_until (5 of 18 overloads)]
+[section:overload5 read_until (5 of 16 overloads)]
 
 
 Read data into a dynamic buffer sequence until some part of the data it contains matches a regular expression. 
@@ -105224,10 +91281,10 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t read_until(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       const boost::regex & expr);
 
 
@@ -105311,7 +91368,7 @@
 
 
 
-[section:overload6 read_until (6 of 18 overloads)]
+[section:overload6 read_until (6 of 16 overloads)]
 
 
 Read data into a dynamic buffer sequence until some part of the data it contains matches a regular expression. 
@@ -105319,10 +91376,10 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t read_until(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       const boost::regex & expr,
       asio::error_code & ec);
 
@@ -105370,7 +91427,7 @@
 
 
 
-[section:overload7 read_until (7 of 18 overloads)]
+[section:overload7 read_until (7 of 16 overloads)]
 
 
 Read data into a dynamic buffer sequence until a function object indicates a match. 
@@ -105378,11 +91435,11 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename MatchCondition>
   std::size_t read_until(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       MatchCondition match_condition,
       typename enable_if< is_match_condition< MatchCondition >::value >::type *  = 0);
 
@@ -105413,7 +91470,7 @@
 ``
 where `iterator` represents the type: 
 ``
-   buffers_iterator<typename DynamicBufferSequence::const_buffers_type>
+   buffers_iterator<typename DynamicBuffer::const_buffers_type>
 ``
 The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]]
 
@@ -105422,7 +91479,7 @@
 
 [heading Return Value]
       
-The number of bytes in the dynamic\_buffer\_sequence's get area that have been fully consumed by the match function.
+The number of bytes in the dynamic\_buffer's get area that have been fully consumed by the match function.
 
 
 [heading Exceptions]
@@ -105503,7 +91560,7 @@
 
 
 
-[section:overload8 read_until (8 of 18 overloads)]
+[section:overload8 read_until (8 of 16 overloads)]
 
 
 Read data into a dynamic buffer sequence until a function object indicates a match. 
@@ -105511,11 +91568,11 @@
 
   template<
       typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
       typename MatchCondition>
   std::size_t read_until(
       SyncReadStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       MatchCondition match_condition,
       asio::error_code & ec,
       typename enable_if< is_match_condition< MatchCondition >::value >::type *  = 0);
@@ -105547,7 +91604,7 @@
 ``
 where `iterator` represents the type: 
 ``
-   buffers_iterator<DynamicBufferSequence::const_buffers_type>
+   buffers_iterator<DynamicBuffer::const_buffers_type>
 ``
 The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]]
 
@@ -105574,7 +91631,7 @@
 
 
 
-[section:overload9 read_until (9 of 18 overloads)]
+[section:overload9 read_until (9 of 16 overloads)]
 
 
 Read data into a streambuf until it contains a specified delimiter. 
@@ -105669,7 +91726,7 @@
 
 
 
-[section:overload10 read_until (10 of 18 overloads)]
+[section:overload10 read_until (10 of 16 overloads)]
 
 
 Read data into a streambuf until it contains a specified delimiter. 
@@ -105728,7 +91785,7 @@
 
 
 
-[section:overload11 read_until (11 of 18 overloads)]
+[section:overload11 read_until (11 of 16 overloads)]
 
 
 Read data into a streambuf until it contains a specified delimiter. 
@@ -105740,7 +91797,7 @@
   std::size_t read_until(
       SyncReadStream & s,
       asio::basic_streambuf< Allocator > & b,
-      const std::string & delim);
+      string_view delim);
 
 
 This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
@@ -105823,7 +91880,7 @@
 
 
 
-[section:overload12 read_until (12 of 18 overloads)]
+[section:overload12 read_until (12 of 16 overloads)]
 
 
 Read data into a streambuf until it contains a specified delimiter. 
@@ -105835,7 +91892,7 @@
   std::size_t read_until(
       SyncReadStream & s,
       asio::basic_streambuf< Allocator > & b,
-      const std::string & delim,
+      string_view delim,
       asio::error_code & ec);
 
 
@@ -105882,7 +91939,7 @@
 
 
 
-[section:overload13 read_until (13 of 18 overloads)]
+[section:overload13 read_until (13 of 16 overloads)]
 
 
 Read data into a streambuf until some part of the data it contains matches a regular expression. 
@@ -105977,7 +92034,7 @@
 
 
 
-[section:overload14 read_until (14 of 18 overloads)]
+[section:overload14 read_until (14 of 16 overloads)]
 
 
 Read data into a streambuf until some part of the data it contains matches a regular expression. 
@@ -106036,7 +92093,7 @@
 
 
 
-[section:overload15 read_until (15 of 18 overloads)]
+[section:overload15 read_until (15 of 16 overloads)]
 
 
 Read data into a streambuf until a function object indicates a match. 
@@ -106169,7 +92226,7 @@
 
 
 
-[section:overload16 read_until (16 of 18 overloads)]
+[section:overload16 read_until (16 of 16 overloads)]
 
 
 Read data into a streambuf until a function object indicates a match. 
@@ -106239,1039 +92296,16 @@
 [endsect]
 
 
-
-[section:overload17 read_until (17 of 18 overloads)]
-
-
-
-  template<
-      typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
-  std::size_t read_until(
-      SyncReadStream & s,
-      DynamicBufferSequence && buffers,
-      const std::string & delim);
-
-
-
 [endsect]
 
-
-
-[section:overload18 read_until (18 of 18 overloads)]
-
-
-
-  template<
-      typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
-  std::size_t read_until(
-      SyncReadStream & s,
-      DynamicBufferSequence && buffers,
-      const std::string & delim,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:seq_packet_socket_service seq_packet_socket_service]
-
-
-Default service implementation for a sequenced packet socket. 
-
-
-  template<
-      typename ``[link asio.reference.Protocol Protocol]``>
-  class seq_packet_socket_service :
-    public io_context::service
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.seq_packet_socket_service.endpoint_type [*endpoint_type]]]
-    [The endpoint type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.seq_packet_socket_service.implementation_type [*implementation_type]]]
-    [The type of a sequenced packet socket implementation. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.seq_packet_socket_service.native_handle_type [*native_handle_type]]]
-    [The native socket type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.seq_packet_socket_service.protocol_type [*protocol_type]]]
-    [The protocol type. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.seq_packet_socket_service.assign [*assign]]]
-    [Assign an existing native socket to a sequenced packet socket. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.async_connect [*async_connect]]]
-    [Start an asynchronous connect. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.async_receive [*async_receive]]]
-    [Start an asynchronous receive. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.async_send [*async_send]]]
-    [Start an asynchronous send. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.async_wait [*async_wait]]]
-    [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.at_mark [*at_mark]]]
-    [Determine whether the socket is at the out-of-band data mark. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.available [*available]]]
-    [Determine the number of bytes available for reading. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.bind [*bind]]]
-    [Bind the sequenced packet socket to the specified local endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.close [*close]]]
-    [Close a sequenced packet socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.connect [*connect]]]
-    [Connect the sequenced packet socket to the specified endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.construct [*construct]]]
-    [Construct a new sequenced packet socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.converting_move_construct [*converting_move_construct]]]
-    [Move-construct a new sequenced packet socket implementation from another protocol type. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.destroy [*destroy]]]
-    [Destroy a sequenced packet socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.get_option [*get_option]]]
-    [Get a socket option. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.io_control [*io_control]]]
-    [Perform an IO control command on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.is_open [*is_open]]]
-    [Determine whether the socket is open. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.local_endpoint [*local_endpoint]]]
-    [Get the local endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.move_assign [*move_assign]]]
-    [Move-assign from another sequenced packet socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.move_construct [*move_construct]]]
-    [Move-construct a new sequenced packet socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.native_handle [*native_handle]]]
-    [Get the native socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.native_non_blocking [*native_non_blocking]]]
-    [Gets the non-blocking mode of the native socket implementation. 
-
-     Sets the non-blocking mode of the native socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.non_blocking [*non_blocking]]]
-    [Gets the non-blocking mode of the socket. 
-
-     Sets the non-blocking mode of the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.open [*open]]]
-    [Open a sequenced packet socket. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.receive [*receive]]]
-    [Receive some data from the peer. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.remote_endpoint [*remote_endpoint]]]
-    [Get the remote endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.send [*send]]]
-    [Send the given data to the peer. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.seq_packet_socket_service [*seq_packet_socket_service]]]
-    [Construct a new sequenced packet socket service for the specified io_context. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.set_option [*set_option]]]
-    [Set a socket option. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.shutdown [*shutdown]]]
-    [Disable sends or receives on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.seq_packet_socket_service.wait [*wait]]]
-    [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.seq_packet_socket_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/seq_packet_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:assign seq_packet_socket_service::assign]
-
-[indexterm2 assign..seq_packet_socket_service] 
-Assign an existing native socket to a sequenced packet socket. 
-
-
-  asio::error_code assign(
-      implementation_type & impl,
-      const protocol_type & protocol,
-      const native_handle_type & native_socket,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:async_connect seq_packet_socket_service::async_connect]
-
-[indexterm2 async_connect..seq_packet_socket_service] 
-Start an asynchronous connect. 
-
-
-  template<
-      typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
-      implementation_type & impl,
-      const endpoint_type & peer_endpoint,
-      ConnectHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_receive seq_packet_socket_service::async_receive]
-
-[indexterm2 async_receive..seq_packet_socket_service] 
-Start an asynchronous receive. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      socket_base::message_flags in_flags,
-      socket_base::message_flags & out_flags,
-      ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_send seq_packet_socket_service::async_send]
-
-[indexterm2 async_send..seq_packet_socket_service] 
-Start an asynchronous send. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      socket_base::message_flags flags,
-      WriteHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_wait seq_packet_socket_service::async_wait]
-
-[indexterm2 async_wait..seq_packet_socket_service] 
-Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  template<
-      typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      implementation_type & impl,
-      socket_base::wait_type w,
-      WaitHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:at_mark seq_packet_socket_service::at_mark]
-
-[indexterm2 at_mark..seq_packet_socket_service] 
-Determine whether the socket is at the out-of-band data mark. 
-
-
-  bool at_mark(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:available seq_packet_socket_service::available]
-
-[indexterm2 available..seq_packet_socket_service] 
-Determine the number of bytes available for reading. 
-
-
-  std::size_t available(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:bind seq_packet_socket_service::bind]
-
-[indexterm2 bind..seq_packet_socket_service] 
-Bind the sequenced packet socket to the specified local endpoint. 
-
-
-  asio::error_code bind(
-      implementation_type & impl,
-      const endpoint_type & endpoint,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:cancel seq_packet_socket_service::cancel]
-
-[indexterm2 cancel..seq_packet_socket_service] 
-Cancel all asynchronous operations associated with the socket. 
-
-
-  asio::error_code cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:close seq_packet_socket_service::close]
-
-[indexterm2 close..seq_packet_socket_service] 
-Close a sequenced packet socket implementation. 
-
-
-  asio::error_code close(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:connect seq_packet_socket_service::connect]
-
-[indexterm2 connect..seq_packet_socket_service] 
-Connect the sequenced packet socket to the specified endpoint. 
-
-
-  asio::error_code connect(
-      implementation_type & impl,
-      const endpoint_type & peer_endpoint,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct seq_packet_socket_service::construct]
-
-[indexterm2 construct..seq_packet_socket_service] 
-Construct a new sequenced packet socket implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:converting_move_construct seq_packet_socket_service::converting_move_construct]
-
-[indexterm2 converting_move_construct..seq_packet_socket_service] 
-Move-construct a new sequenced packet socket implementation from another protocol type. 
-
-
-  template<
-      typename ``[link asio.reference.Protocol Protocol1]``>
-  void converting_move_construct(
-      implementation_type & impl,
-      typename seq_packet_socket_service< Protocol1 >::implementation_type & other_impl,
-      typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
-
-
-
-[endsect]
-
-
-
-[section:destroy seq_packet_socket_service::destroy]
-
-[indexterm2 destroy..seq_packet_socket_service] 
-Destroy a sequenced packet socket implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:endpoint_type seq_packet_socket_service::endpoint_type]
-
-[indexterm2 endpoint_type..seq_packet_socket_service] 
-The endpoint type. 
-
-
-  typedef Protocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/seq_packet_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_io_context seq_packet_socket_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..seq_packet_socket_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service seq_packet_socket_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..seq_packet_socket_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:get_option seq_packet_socket_service::get_option]
-
-[indexterm2 get_option..seq_packet_socket_service] 
-Get a socket option. 
-
-
-  template<
-      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code get_option(
-      const implementation_type & impl,
-      GettableSocketOption & option,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:id seq_packet_socket_service::id]
-
-[indexterm2 id..seq_packet_socket_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type seq_packet_socket_service::implementation_type]
-
-[indexterm2 implementation_type..seq_packet_socket_service] 
-The type of a sequenced packet socket implementation. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/seq_packet_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:io_control seq_packet_socket_service::io_control]
-
-[indexterm2 io_control..seq_packet_socket_service] 
-Perform an IO control command on the socket. 
-
-
-  template<
-      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
-      implementation_type & impl,
-      IoControlCommand & command,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:is_open seq_packet_socket_service::is_open]
-
-[indexterm2 is_open..seq_packet_socket_service] 
-Determine whether the socket is open. 
-
-
-  bool is_open(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:local_endpoint seq_packet_socket_service::local_endpoint]
-
-[indexterm2 local_endpoint..seq_packet_socket_service] 
-Get the local endpoint. 
-
-
-  endpoint_type local_endpoint(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:move_assign seq_packet_socket_service::move_assign]
-
-[indexterm2 move_assign..seq_packet_socket_service] 
-Move-assign from another sequenced packet socket implementation. 
-
-
-  void move_assign(
-      implementation_type & impl,
-      seq_packet_socket_service & other_service,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:move_construct seq_packet_socket_service::move_construct]
-
-[indexterm2 move_construct..seq_packet_socket_service] 
-Move-construct a new sequenced packet socket implementation. 
-
-
-  void move_construct(
-      implementation_type & impl,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle seq_packet_socket_service::native_handle]
-
-[indexterm2 native_handle..seq_packet_socket_service] 
-Get the native socket implementation. 
-
-
-  native_handle_type native_handle(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle_type seq_packet_socket_service::native_handle_type]
-
-[indexterm2 native_handle_type..seq_packet_socket_service] 
-The native socket type. 
-
-
-  typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/seq_packet_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking seq_packet_socket_service::native_non_blocking]
-
-[indexterm2 native_non_blocking..seq_packet_socket_service] 
-Gets the non-blocking mode of the native socket implementation. 
-
-
-  bool ``[link asio.reference.seq_packet_socket_service.native_non_blocking.overload1 native_non_blocking]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.seq_packet_socket_service.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native socket implementation. 
-
-
-  asio::error_code ``[link asio.reference.seq_packet_socket_service.native_non_blocking.overload2 native_non_blocking]``(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.seq_packet_socket_service.native_non_blocking.overload2 more...]]``
-
-
-[section:overload1 seq_packet_socket_service::native_non_blocking (1 of 2 overloads)]
-
-
-Gets the non-blocking mode of the native socket implementation. 
-
-
-  bool native_non_blocking(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 seq_packet_socket_service::native_non_blocking (2 of 2 overloads)]
-
-
-Sets the non-blocking mode of the native socket implementation. 
-
-
-  asio::error_code native_non_blocking(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking seq_packet_socket_service::non_blocking]
-
-[indexterm2 non_blocking..seq_packet_socket_service] 
-Gets the non-blocking mode of the socket. 
-
-
-  bool ``[link asio.reference.seq_packet_socket_service.non_blocking.overload1 non_blocking]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.seq_packet_socket_service.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the socket. 
-
-
-  asio::error_code ``[link asio.reference.seq_packet_socket_service.non_blocking.overload2 non_blocking]``(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.seq_packet_socket_service.non_blocking.overload2 more...]]``
-
-
-[section:overload1 seq_packet_socket_service::non_blocking (1 of 2 overloads)]
-
-
-Gets the non-blocking mode of the socket. 
-
-
-  bool non_blocking(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 seq_packet_socket_service::non_blocking (2 of 2 overloads)]
-
-
-Sets the non-blocking mode of the socket. 
-
-
-  asio::error_code non_blocking(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:open seq_packet_socket_service::open]
-
-[indexterm2 open..seq_packet_socket_service] 
-Open a sequenced packet socket. 
-
-
-  asio::error_code open(
-      implementation_type & impl,
-      const protocol_type & protocol,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:protocol_type seq_packet_socket_service::protocol_type]
-
-[indexterm2 protocol_type..seq_packet_socket_service] 
-The protocol type. 
-
-
-  typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/seq_packet_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:receive seq_packet_socket_service::receive]
-
-[indexterm2 receive..seq_packet_socket_service] 
-Receive some data from the peer. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t receive(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      socket_base::message_flags in_flags,
-      socket_base::message_flags & out_flags,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:remote_endpoint seq_packet_socket_service::remote_endpoint]
-
-[indexterm2 remote_endpoint..seq_packet_socket_service] 
-Get the remote endpoint. 
-
-
-  endpoint_type remote_endpoint(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:send seq_packet_socket_service::send]
-
-[indexterm2 send..seq_packet_socket_service] 
-Send the given data to the peer. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t send(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      socket_base::message_flags flags,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:seq_packet_socket_service seq_packet_socket_service::seq_packet_socket_service]
-
-[indexterm2 seq_packet_socket_service..seq_packet_socket_service] 
-Construct a new sequenced packet socket service for the specified [link asio.reference.io_context `io_context`]. 
-
-
-  seq_packet_socket_service(
-      asio::io_context & io_context);
-
-
-
-[endsect]
-
-
-
-[section:set_option seq_packet_socket_service::set_option]
-
-[indexterm2 set_option..seq_packet_socket_service] 
-Set a socket option. 
-
-
-  template<
-      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code set_option(
-      implementation_type & impl,
-      const SettableSocketOption & option,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:shutdown seq_packet_socket_service::shutdown]
-
-[indexterm2 shutdown..seq_packet_socket_service] 
-Disable sends or receives on the socket. 
-
-
-  asio::error_code shutdown(
-      implementation_type & impl,
-      socket_base::shutdown_type what,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:wait seq_packet_socket_service::wait]
-
-[indexterm2 wait..seq_packet_socket_service] 
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  asio::error_code wait(
-      implementation_type & impl,
-      socket_base::wait_type w,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
 [section:serial_port serial_port]
 
-[indexterm1 serial_port] 
-Typedef for the typical usage of a serial port. 
+
+Provides serial port functionality. 
 
 
-  typedef basic_serial_port serial_port;
+  class serial_port :
+    public serial_port_base
 
 
 [heading Types]
@@ -107280,39 +92314,25 @@
 
   [
 
-    [[link asio.reference.basic_serial_port.executor_type [*executor_type]]]
+    [[link asio.reference.serial_port.executor_type [*executor_type]]]
     [The type of the executor associated with the object. ]
   
   ]
 
   [
 
-    [[link asio.reference.basic_serial_port.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_serial_port.lowest_layer_type [*lowest_layer_type]]]
+    [[link asio.reference.serial_port.lowest_layer_type [*lowest_layer_type]]]
     [A basic_serial_port is always the lowest layer. ]
   
   ]
 
   [
 
-    [[link asio.reference.basic_serial_port.native_handle_type [*native_handle_type]]]
+    [[link asio.reference.serial_port.native_handle_type [*native_handle_type]]]
     [The native representation of a serial port. ]
   
   ]
 
-  [
-
-    [[link asio.reference.basic_serial_port.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -107320,127 +92340,904 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.basic_serial_port.assign [*assign]]]
+    [[link asio.reference.serial_port.assign [*assign]]]
     [Assign an existing native serial port to the serial port. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.async_read_some [*async_read_some]]]
+    [[link asio.reference.serial_port.async_read_some [*async_read_some]]]
     [Start an asynchronous read. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.async_write_some [*async_write_some]]]
+    [[link asio.reference.serial_port.async_write_some [*async_write_some]]]
     [Start an asynchronous write. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.basic_serial_port [*basic_serial_port]]]
-    [Construct a basic_serial_port without opening it. 
-
-     Construct and open a basic_serial_port. 
-
-     Construct a basic_serial_port on an existing native serial port. 
-
-     Move-construct a basic_serial_port from another. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_serial_port.cancel [*cancel]]]
+    [[link asio.reference.serial_port.cancel [*cancel]]]
     [Cancel all asynchronous operations associated with the serial port. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.close [*close]]]
+    [[link asio.reference.serial_port.close [*close]]]
     [Close the serial port. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.get_executor [*get_executor]]]
+    [[link asio.reference.serial_port.get_executor [*get_executor]]]
     [Get the executor associated with the object. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.get_io_context [*get_io_context]]]
+    [[link asio.reference.serial_port.get_io_context [*get_io_context]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.get_io_service [*get_io_service]]]
+    [[link asio.reference.serial_port.get_io_service [*get_io_service]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.get_option [*get_option]]]
+    [[link asio.reference.serial_port.get_option [*get_option]]]
     [Get an option from the serial port. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.is_open [*is_open]]]
+    [[link asio.reference.serial_port.is_open [*is_open]]]
     [Determine whether the serial port is open. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.lowest_layer [*lowest_layer]]]
+    [[link asio.reference.serial_port.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. 
 
      Get a const reference to the lowest layer. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.native_handle [*native_handle]]]
+    [[link asio.reference.serial_port.native_handle [*native_handle]]]
     [Get the native serial port representation. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.open [*open]]]
+    [[link asio.reference.serial_port.open [*open]]]
     [Open the serial port using the specified device name. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.operator_eq_ [*operator=]]]
-    [Move-assign a basic_serial_port from another. ]
+    [[link asio.reference.serial_port.operator_eq_ [*operator=]]]
+    [Move-assign a serial_port from another. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.read_some [*read_some]]]
+    [[link asio.reference.serial_port.read_some [*read_some]]]
     [Read some data from the serial port. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.send_break [*send_break]]]
+    [[link asio.reference.serial_port.send_break [*send_break]]]
     [Send a break sequence to the serial port. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.set_option [*set_option]]]
+    [[link asio.reference.serial_port.serial_port [*serial_port]]]
+    [Construct a serial_port without opening it. 
+
+     Construct and open a serial_port. 
+
+     Construct a serial_port on an existing native serial port. 
+
+     Move-construct a serial_port from another. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.set_option [*set_option]]]
     [Set an option on the serial port. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.write_some [*write_some]]]
+    [[link asio.reference.serial_port.write_some [*write_some]]]
     [Write some data to the serial port. ]
   ]
   
+  [
+    [[link asio.reference.serial_port._serial_port [*~serial_port]]]
+    [Destroys the serial port. ]
+  ]
+  
 ]
 
-[heading Protected Member Functions]
+The [link asio.reference.serial_port `serial_port`] class provides a wrapper over serial port functionality.
+
+
+[heading Thread Safety]
+  
+['Distinct] ['objects:] Safe.
+
+['Shared] ['objects:] Unsafe. 
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/serial_port.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+[section:assign serial_port::assign]
+
+[indexterm2 asio.indexterm.serial_port.assign..assign..serial_port] 
+Assign an existing native serial port to the serial port. 
+
+
+  void ``[link asio.reference.serial_port.assign.overload1 assign]``(
+      const native_handle_type & native_serial_port);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.assign.overload1 more...]]``
+
+  void ``[link asio.reference.serial_port.assign.overload2 assign]``(
+      const native_handle_type & native_serial_port,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.assign.overload2 more...]]``
+
+
+[section:overload1 serial_port::assign (1 of 2 overloads)]
+
+
+Assign an existing native serial port to the serial port. 
+
+
+  void assign(
+      const native_handle_type & native_serial_port);
+
+
+
+[endsect]
+
+
+
+[section:overload2 serial_port::assign (2 of 2 overloads)]
+
+
+Assign an existing native serial port to the serial port. 
+
+
+  void assign(
+      const native_handle_type & native_serial_port,
+      asio::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:async_read_some serial_port::async_read_some]
+
+[indexterm2 asio.indexterm.serial_port.async_read_some..async_read_some..serial_port] 
+Start an asynchronous read. 
+
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
+      typename ``[link asio.reference.ReadHandler ReadHandler]``>
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
+      const MutableBufferSequence & buffers,
+      ReadHandler && handler);
+
+
+This function is used to asynchronously read data from the serial port. The function call always returns immediately.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
+``
+   void handler(
+     const asio::error_code& error, // Result of operation.
+     std::size_t bytes_transferred           // Number of bytes read.
+   ); 
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
+
+]
+
+
+[heading Remarks]
+      
+The read operation may not read all of the requested number of bytes. Consider using the [link asio.reference.async_read `async_read`]  function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
+
+
+[heading Example]
+  
+To read into a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
+
+   serial_port.async_read_some(asio::buffer(data, size), handler);
+
+
+See the [link asio.reference.buffer `buffer`]  documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
+
+
+
+
+[endsect]
+
+
+
+[section:async_write_some serial_port::async_write_some]
+
+[indexterm2 asio.indexterm.serial_port.async_write_some..async_write_some..serial_port] 
+Start an asynchronous write. 
+
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
+      typename ``[link asio.reference.WriteHandler WriteHandler]``>
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
+      const ConstBufferSequence & buffers,
+      WriteHandler && handler);
+
+
+This function is used to asynchronously write data to the serial port. The function call always returns immediately.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[buffers][One or more data buffers to be written to the serial port. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
+``
+   void handler(
+     const asio::error_code& error, // Result of operation.
+     std::size_t bytes_transferred           // Number of bytes written.
+   ); 
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
+
+]
+
+
+[heading Remarks]
+      
+The write operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write `async_write`]  function if you need to ensure that all data is written before the asynchronous operation completes.
+
+
+[heading Example]
+  
+To write a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
+
+   serial_port.async_write_some(asio::buffer(data, size), handler);
+
+
+See the [link asio.reference.buffer `buffer`]  documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
+
+
+
+
+[endsect]
+
+
+[section:cancel serial_port::cancel]
+
+[indexterm2 asio.indexterm.serial_port.cancel..cancel..serial_port] 
+Cancel all asynchronous operations associated with the serial port. 
+
+
+  void ``[link asio.reference.serial_port.cancel.overload1 cancel]``();
+  ``  [''''&raquo;''' [link asio.reference.serial_port.cancel.overload1 more...]]``
+
+  void ``[link asio.reference.serial_port.cancel.overload2 cancel]``(
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.cancel.overload2 more...]]``
+
+
+[section:overload1 serial_port::cancel (1 of 2 overloads)]
+
+
+Cancel all asynchronous operations associated with the serial port. 
+
+
+  void cancel();
+
+
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 serial_port::cancel (2 of 2 overloads)]
+
+
+Cancel all asynchronous operations associated with the serial port. 
+
+
+  void cancel(
+      asio::error_code & ec);
+
+
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:close serial_port::close]
+
+[indexterm2 asio.indexterm.serial_port.close..close..serial_port] 
+Close the serial port. 
+
+
+  void ``[link asio.reference.serial_port.close.overload1 close]``();
+  ``  [''''&raquo;''' [link asio.reference.serial_port.close.overload1 more...]]``
+
+  void ``[link asio.reference.serial_port.close.overload2 close]``(
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.close.overload2 more...]]``
+
+
+[section:overload1 serial_port::close (1 of 2 overloads)]
+
+
+Close the serial port. 
+
+
+  void close();
+
+
+This function is used to close the serial port. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 serial_port::close (2 of 2 overloads)]
+
+
+Close the serial port. 
+
+
+  void close(
+      asio::error_code & ec);
+
+
+This function is used to close the serial port. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:executor_type serial_port::executor_type]
+
+[indexterm2 asio.indexterm.serial_port.executor_type..executor_type..serial_port] 
+The type of the executor associated with the object. 
+
+
+  typedef io_context::executor_type executor_type;
+
+
+[heading Member Functions]
 [table
   [[Name][Description]]
 
   [
-    [[link asio.reference.basic_serial_port.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
+    [[link asio.reference.io_context__executor_type.context [*context]]]
+    [Obtain the underlying execution context. ]
   ]
   
   [
-    [[link asio.reference.basic_serial_port.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.io_context__executor_type.defer [*defer]]]
+    [Request the io_context to invoke the given function object. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
+    [Request the io_context to invoke the given function object. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
+    [Inform the io_context that some work is no longer outstanding. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
+    [Inform the io_context that it has some outstanding work to do. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.post [*post]]]
+    [Request the io_context to invoke the given function object. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
+    [Determine whether the io_context is running in the current thread. ]
   ]
   
 ]
 
-The [link asio.reference.basic_serial_port `basic_serial_port`] class template provides functionality that is common to all serial ports.
+[heading Friends]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
+    [Compare two executors for inequality. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
+    [Compare two executors for equality. ]
+  ]
+  
+]
+
+
+[heading Requirements]
+
+['Header: ][^asio/serial_port.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
+
+[section:get_executor serial_port::get_executor]
+
+[indexterm2 asio.indexterm.serial_port.get_executor..get_executor..serial_port] 
+Get the executor associated with the object. 
+
+
+  executor_type get_executor();
+
+
+
+[endsect]
+
+
+
+[section:get_io_context serial_port::get_io_context]
+
+[indexterm2 asio.indexterm.serial_port.get_io_context..get_io_context..serial_port] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
+
+
+  asio::io_context & get_io_context();
+
+
+This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+      
+A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
+
+
+
+
+[endsect]
+
+
+
+[section:get_io_service serial_port::get_io_service]
+
+[indexterm2 asio.indexterm.serial_port.get_io_service..get_io_service..serial_port] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
+
+
+  asio::io_context & get_io_service();
+
+
+This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+      
+A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
+
+
+
+
+[endsect]
+
+
+[section:get_option serial_port::get_option]
+
+[indexterm2 asio.indexterm.serial_port.get_option..get_option..serial_port] 
+Get an option from the serial port. 
+
+
+  template<
+      typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
+  void ``[link asio.reference.serial_port.get_option.overload1 get_option]``(
+      GettableSerialPortOption & option);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.get_option.overload1 more...]]``
+
+  template<
+      typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
+  void ``[link asio.reference.serial_port.get_option.overload2 get_option]``(
+      GettableSerialPortOption & option,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.get_option.overload2 more...]]``
+
+
+[section:overload1 serial_port::get_option (1 of 2 overloads)]
+
+
+Get an option from the serial port. 
+
+
+  template<
+      typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
+  void get_option(
+      GettableSerialPortOption & option);
+
+
+This function is used to get the current value of an option on the serial port.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[option][The option value to be obtained from the serial port.]]
+
+]
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure.]]
+
+]
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 serial_port::get_option (2 of 2 overloads)]
+
+
+Get an option from the serial port. 
+
+
+  template<
+      typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
+  void get_option(
+      GettableSerialPortOption & option,
+      asio::error_code & ec);
+
+
+This function is used to get the current value of an option on the serial port.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[option][The option value to be obtained from the serial port.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:is_open serial_port::is_open]
+
+[indexterm2 asio.indexterm.serial_port.is_open..is_open..serial_port] 
+Determine whether the serial port is open. 
+
+
+  bool is_open() const;
+
+
+
+[endsect]
+
+
+[section:lowest_layer serial_port::lowest_layer]
+
+[indexterm2 asio.indexterm.serial_port.lowest_layer..lowest_layer..serial_port] 
+Get a reference to the lowest layer. 
+
+
+  lowest_layer_type & ``[link asio.reference.serial_port.lowest_layer.overload1 lowest_layer]``();
+  ``  [''''&raquo;''' [link asio.reference.serial_port.lowest_layer.overload1 more...]]``
+
+
+Get a const reference to the lowest layer. 
+
+
+  const lowest_layer_type & ``[link asio.reference.serial_port.lowest_layer.overload2 lowest_layer]``() const;
+  ``  [''''&raquo;''' [link asio.reference.serial_port.lowest_layer.overload2 more...]]``
+
+
+[section:overload1 serial_port::lowest_layer (1 of 2 overloads)]
+
+
+Get a reference to the lowest layer. 
+
+
+  lowest_layer_type & lowest_layer();
+
+
+This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.serial_port `serial_port`] cannot contain any further layers, it simply returns a reference to itself.
+
+
+[heading Return Value]
+      
+A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 serial_port::lowest_layer (2 of 2 overloads)]
+
+
+Get a const reference to the lowest layer. 
+
+
+  const lowest_layer_type & lowest_layer() const;
+
+
+This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.serial_port `serial_port`] cannot contain any further layers, it simply returns a reference to itself.
+
+
+[heading Return Value]
+      
+A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:lowest_layer_type serial_port::lowest_layer_type]
+
+[indexterm2 asio.indexterm.serial_port.lowest_layer_type..lowest_layer_type..serial_port] 
+A basic\_serial\_port is always the lowest layer. 
+
+
+  typedef serial_port lowest_layer_type;
+
+
+[heading Types]
+[table
+  [[Name][Description]]
+
+  [
+
+    [[link asio.reference.serial_port.executor_type [*executor_type]]]
+    [The type of the executor associated with the object. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.serial_port.lowest_layer_type [*lowest_layer_type]]]
+    [A basic_serial_port is always the lowest layer. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.serial_port.native_handle_type [*native_handle_type]]]
+    [The native representation of a serial port. ]
+  
+  ]
+
+]
+
+[heading Member Functions]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.serial_port.assign [*assign]]]
+    [Assign an existing native serial port to the serial port. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.async_read_some [*async_read_some]]]
+    [Start an asynchronous read. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.async_write_some [*async_write_some]]]
+    [Start an asynchronous write. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.cancel [*cancel]]]
+    [Cancel all asynchronous operations associated with the serial port. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.close [*close]]]
+    [Close the serial port. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.get_executor [*get_executor]]]
+    [Get the executor associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.get_io_context [*get_io_context]]]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.get_io_service [*get_io_service]]]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.get_option [*get_option]]]
+    [Get an option from the serial port. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.is_open [*is_open]]]
+    [Determine whether the serial port is open. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.lowest_layer [*lowest_layer]]]
+    [Get a reference to the lowest layer. 
+
+     Get a const reference to the lowest layer. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.native_handle [*native_handle]]]
+    [Get the native serial port representation. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.open [*open]]]
+    [Open the serial port using the specified device name. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.operator_eq_ [*operator=]]]
+    [Move-assign a serial_port from another. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.read_some [*read_some]]]
+    [Read some data from the serial port. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.send_break [*send_break]]]
+    [Send a break sequence to the serial port. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.serial_port [*serial_port]]]
+    [Construct a serial_port without opening it. 
+
+     Construct and open a serial_port. 
+
+     Construct a serial_port on an existing native serial port. 
+
+     Move-construct a serial_port from another. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.set_option [*set_option]]]
+    [Set an option on the serial port. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port.write_some [*write_some]]]
+    [Write some data to the serial port. ]
+  ]
+  
+  [
+    [[link asio.reference.serial_port._serial_port [*~serial_port]]]
+    [Destroys the serial port. ]
+  ]
+  
+]
+
+The [link asio.reference.serial_port `serial_port`] class provides a wrapper over serial port functionality.
 
 
 [heading Thread Safety]
@@ -107462,10 +93259,822 @@
 [endsect]
 
 
+
+[section:native_handle serial_port::native_handle]
+
+[indexterm2 asio.indexterm.serial_port.native_handle..native_handle..serial_port] 
+Get the native serial port representation. 
+
+
+  native_handle_type native_handle();
+
+
+This function may be used to obtain the underlying representation of the serial port. This is intended to allow access to native serial port functionality that is not otherwise provided. 
+
+
+[endsect]
+
+
+
+[section:native_handle_type serial_port::native_handle_type]
+
+[indexterm2 asio.indexterm.serial_port.native_handle_type..native_handle_type..serial_port] 
+The native representation of a serial port. 
+
+
+  typedef implementation_defined native_handle_type;
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/serial_port.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
+[section:open serial_port::open]
+
+[indexterm2 asio.indexterm.serial_port.open..open..serial_port] 
+Open the serial port using the specified device name. 
+
+
+  void ``[link asio.reference.serial_port.open.overload1 open]``(
+      const std::string & device);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.open.overload1 more...]]``
+
+  void ``[link asio.reference.serial_port.open.overload2 open]``(
+      const std::string & device,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.open.overload2 more...]]``
+
+
+[section:overload1 serial_port::open (1 of 2 overloads)]
+
+
+Open the serial port using the specified device name. 
+
+
+  void open(
+      const std::string & device);
+
+
+This function opens the serial port for the specified device name.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[device][The platform-specific device name.]]
+
+]
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 serial_port::open (2 of 2 overloads)]
+
+
+Open the serial port using the specified device name. 
+
+
+  void open(
+      const std::string & device,
+      asio::error_code & ec);
+
+
+This function opens the serial port using the given platform-specific device name.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[device][The platform-specific device name.]]
+
+[[ec][Set the indicate what error occurred, if any. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:operator_eq_ serial_port::operator=]
+
+[indexterm2 asio.indexterm.serial_port.operator_eq_..operator=..serial_port] 
+Move-assign a [link asio.reference.serial_port `serial_port`] from another. 
+
+
+  serial_port & operator=(
+      serial_port && other);
+
+
+This assignment operator moves a serial port from one object to another.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.serial_port `serial_port`] object from which the move will occur.]]
+
+]
+
+
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `serial_port(io_context&) constructor`. 
+
+
+
+
+[endsect]
+
+
+[section:read_some serial_port::read_some]
+
+[indexterm2 asio.indexterm.serial_port.read_some..read_some..serial_port] 
+Read some data from the serial port. 
+
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
+  std::size_t ``[link asio.reference.serial_port.read_some.overload1 read_some]``(
+      const MutableBufferSequence & buffers);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.read_some.overload1 more...]]``
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
+  std::size_t ``[link asio.reference.serial_port.read_some.overload2 read_some]``(
+      const MutableBufferSequence & buffers,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.read_some.overload2 more...]]``
+
+
+[section:overload1 serial_port::read_some (1 of 2 overloads)]
+
+
+Read some data from the serial port. 
+
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
+  std::size_t read_some(
+      const MutableBufferSequence & buffers);
+
+
+This function is used to read data from the serial port. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[buffers][One or more buffers into which the data will be read.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of bytes read.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
+
+]
+
+
+[heading Remarks]
+      
+The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`]  function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+
+
+[heading Example]
+  
+To read into a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
+
+   serial_port.read_some(asio::buffer(data, size));
+
+
+See the [link asio.reference.buffer `buffer`]  documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 serial_port::read_some (2 of 2 overloads)]
+
+
+Read some data from the serial port. 
+
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
+  std::size_t read_some(
+      const MutableBufferSequence & buffers,
+      asio::error_code & ec);
+
+
+This function is used to read data from the serial port. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[buffers][One or more buffers into which the data will be read.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of bytes read. Returns 0 if an error occurred.
+
+
+[heading Remarks]
+      
+The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`]  function if you need to ensure that the requested amount of data is read before the blocking operation completes. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:send_break serial_port::send_break]
+
+[indexterm2 asio.indexterm.serial_port.send_break..send_break..serial_port] 
+Send a break sequence to the serial port. 
+
+
+  void ``[link asio.reference.serial_port.send_break.overload1 send_break]``();
+  ``  [''''&raquo;''' [link asio.reference.serial_port.send_break.overload1 more...]]``
+
+  void ``[link asio.reference.serial_port.send_break.overload2 send_break]``(
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.send_break.overload2 more...]]``
+
+
+[section:overload1 serial_port::send_break (1 of 2 overloads)]
+
+
+Send a break sequence to the serial port. 
+
+
+  void send_break();
+
+
+This function causes a break sequence of platform-specific duration to be sent out the serial port.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 serial_port::send_break (2 of 2 overloads)]
+
+
+Send a break sequence to the serial port. 
+
+
+  void send_break(
+      asio::error_code & ec);
+
+
+This function causes a break sequence of platform-specific duration to be sent out the serial port.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:serial_port serial_port::serial_port]
+
+[indexterm2 asio.indexterm.serial_port.serial_port..serial_port..serial_port] 
+Construct a [link asio.reference.serial_port `serial_port`] without opening it. 
+
+
+  explicit ``[link asio.reference.serial_port.serial_port.overload1 serial_port]``(
+      asio::io_context & io_context);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.serial_port.overload1 more...]]``
+
+
+Construct and open a [link asio.reference.serial_port `serial_port`]. 
+
+
+  explicit ``[link asio.reference.serial_port.serial_port.overload2 serial_port]``(
+      asio::io_context & io_context,
+      const char * device);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.serial_port.overload2 more...]]``
+
+  explicit ``[link asio.reference.serial_port.serial_port.overload3 serial_port]``(
+      asio::io_context & io_context,
+      const std::string & device);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.serial_port.overload3 more...]]``
+
+
+Construct a [link asio.reference.serial_port `serial_port`] on an existing native serial port. 
+
+
+  ``[link asio.reference.serial_port.serial_port.overload4 serial_port]``(
+      asio::io_context & io_context,
+      const native_handle_type & native_serial_port);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.serial_port.overload4 more...]]``
+
+
+Move-construct a [link asio.reference.serial_port `serial_port`] from another. 
+
+
+  ``[link asio.reference.serial_port.serial_port.overload5 serial_port]``(
+      serial_port && other);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.serial_port.overload5 more...]]``
+
+
+[section:overload1 serial_port::serial_port (1 of 5 overloads)]
+
+
+Construct a [link asio.reference.serial_port `serial_port`] without opening it. 
+
+
+  serial_port(
+      asio::io_context & io_context);
+
+
+This constructor creates a serial port without opening it.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 serial_port::serial_port (2 of 5 overloads)]
+
+
+Construct and open a [link asio.reference.serial_port `serial_port`]. 
+
+
+  serial_port(
+      asio::io_context & io_context,
+      const char * device);
+
+
+This constructor creates and opens a serial port for the specified device name.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port.]]
+
+[[device][The platform-specific device name for this serial port. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload3 serial_port::serial_port (3 of 5 overloads)]
+
+
+Construct and open a [link asio.reference.serial_port `serial_port`]. 
+
+
+  serial_port(
+      asio::io_context & io_context,
+      const std::string & device);
+
+
+This constructor creates and opens a serial port for the specified device name.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port.]]
+
+[[device][The platform-specific device name for this serial port. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload4 serial_port::serial_port (4 of 5 overloads)]
+
+
+Construct a [link asio.reference.serial_port `serial_port`] on an existing native serial port. 
+
+
+  serial_port(
+      asio::io_context & io_context,
+      const native_handle_type & native_serial_port);
+
+
+This constructor creates a serial port object to hold an existing native serial port.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port.]]
+
+[[native_serial_port][A native serial port.]]
+
+]
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload5 serial_port::serial_port (5 of 5 overloads)]
+
+
+Move-construct a [link asio.reference.serial_port `serial_port`] from another. 
+
+
+  serial_port(
+      serial_port && other);
+
+
+This constructor moves a serial port from one object to another.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.serial_port `serial_port`] object from which the move will occur.]]
+
+]
+
+
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `serial_port(io_context&) constructor`. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:set_option serial_port::set_option]
+
+[indexterm2 asio.indexterm.serial_port.set_option..set_option..serial_port] 
+Set an option on the serial port. 
+
+
+  template<
+      typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
+  void ``[link asio.reference.serial_port.set_option.overload1 set_option]``(
+      const SettableSerialPortOption & option);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.set_option.overload1 more...]]``
+
+  template<
+      typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
+  void ``[link asio.reference.serial_port.set_option.overload2 set_option]``(
+      const SettableSerialPortOption & option,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.set_option.overload2 more...]]``
+
+
+[section:overload1 serial_port::set_option (1 of 2 overloads)]
+
+
+Set an option on the serial port. 
+
+
+  template<
+      typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
+  void set_option(
+      const SettableSerialPortOption & option);
+
+
+This function is used to set an option on the serial port.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[option][The option value to be set on the serial port.]]
+
+]
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure.]]
+
+]
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 serial_port::set_option (2 of 2 overloads)]
+
+
+Set an option on the serial port. 
+
+
+  template<
+      typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
+  void set_option(
+      const SettableSerialPortOption & option,
+      asio::error_code & ec);
+
+
+This function is used to set an option on the serial port.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[option][The option value to be set on the serial port.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:write_some serial_port::write_some]
+
+[indexterm2 asio.indexterm.serial_port.write_some..write_some..serial_port] 
+Write some data to the serial port. 
+
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
+  std::size_t ``[link asio.reference.serial_port.write_some.overload1 write_some]``(
+      const ConstBufferSequence & buffers);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.write_some.overload1 more...]]``
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
+  std::size_t ``[link asio.reference.serial_port.write_some.overload2 write_some]``(
+      const ConstBufferSequence & buffers,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.serial_port.write_some.overload2 more...]]``
+
+
+[section:overload1 serial_port::write_some (1 of 2 overloads)]
+
+
+Write some data to the serial port. 
+
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
+  std::size_t write_some(
+      const ConstBufferSequence & buffers);
+
+
+This function is used to write data to the serial port. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[buffers][One or more data buffers to be written to the serial port.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of bytes written.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
+
+]
+
+
+[heading Remarks]
+      
+The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`]  function if you need to ensure that all data is written before the blocking operation completes.
+
+
+[heading Example]
+  
+To write a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
+
+   serial_port.write_some(asio::buffer(data, size));
+
+
+See the [link asio.reference.buffer `buffer`]  documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 serial_port::write_some (2 of 2 overloads)]
+
+
+Write some data to the serial port. 
+
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
+  std::size_t write_some(
+      const ConstBufferSequence & buffers,
+      asio::error_code & ec);
+
+
+This function is used to write data to the serial port. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[buffers][One or more data buffers to be written to the serial port.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of bytes written. Returns 0 if an error occurred.
+
+
+[heading Remarks]
+      
+The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`]  function if you need to ensure that all data is written before the blocking operation completes. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:_serial_port serial_port::~serial_port]
+
+[indexterm2 asio.indexterm.serial_port._serial_port..~serial_port..serial_port] 
+Destroys the serial port. 
+
+
+  ~serial_port();
+
+
+This function destroys the serial port, cancelling any outstanding asynchronous wait operations associated with the serial port as if by calling `cancel`. 
+
+
+[endsect]
+
+
+
+[endsect]
+
 [section:serial_port_base serial_port_base]
 
 
-The [link asio.reference.serial_port_base `serial_port_base`] class is used as a base for the [link asio.reference.basic_serial_port `basic_serial_port`] class template so that we have a common place to define the serial port options. 
+The [link asio.reference.serial_port_base `serial_port_base`] class is used as a base for the basic\_serial\_port class template so that we have a common place to define the serial port options. 
 
 
   class serial_port_base
@@ -107532,7 +94141,7 @@
 
 [section:_serial_port_base serial_port_base::~serial_port_base]
 
-[indexterm2 ~serial_port_base..serial_port_base] 
+[indexterm2 asio.indexterm.serial_port_base._serial_port_base..~serial_port_base..serial_port_base] 
 Protected destructor to prevent deletion through this type. 
 
 
@@ -107592,7 +94201,7 @@
 
 [section:baud_rate serial_port_base::baud_rate::baud_rate]
 
-[indexterm2 baud_rate..serial_port_base::baud_rate] 
+[indexterm2 asio.indexterm.serial_port_base__baud_rate.baud_rate..baud_rate..serial_port_base::baud_rate] 
 
   baud_rate(
       unsigned int rate = 0);
@@ -107605,9 +94214,9 @@
 
 [section:load serial_port_base::baud_rate::load]
 
-[indexterm2 load..serial_port_base::baud_rate] 
+[indexterm2 asio.indexterm.serial_port_base__baud_rate.load..load..serial_port_base::baud_rate] 
 
-  asio::error_code load(
+  void load(
       const ASIO_OPTION_STORAGE & storage,
       asio::error_code & ec);
 
@@ -107619,9 +94228,9 @@
 
 [section:store serial_port_base::baud_rate::store]
 
-[indexterm2 store..serial_port_base::baud_rate] 
+[indexterm2 asio.indexterm.serial_port_base__baud_rate.store..store..serial_port_base::baud_rate] 
 
-  asio::error_code store(
+  void store(
       ASIO_OPTION_STORAGE & storage,
       asio::error_code & ec) const;
 
@@ -107633,7 +94242,7 @@
 
 [section:value serial_port_base::baud_rate::value]
 
-[indexterm2 value..serial_port_base::baud_rate] 
+[indexterm2 asio.indexterm.serial_port_base__baud_rate.value..value..serial_port_base::baud_rate] 
 
   unsigned int value() const;
 
@@ -107691,7 +94300,7 @@
 
 [section:character_size serial_port_base::character_size::character_size]
 
-[indexterm2 character_size..serial_port_base::character_size] 
+[indexterm2 asio.indexterm.serial_port_base__character_size.character_size..character_size..serial_port_base::character_size] 
 
   character_size(
       unsigned int t = 8);
@@ -107704,9 +94313,9 @@
 
 [section:load serial_port_base::character_size::load]
 
-[indexterm2 load..serial_port_base::character_size] 
+[indexterm2 asio.indexterm.serial_port_base__character_size.load..load..serial_port_base::character_size] 
 
-  asio::error_code load(
+  void load(
       const ASIO_OPTION_STORAGE & storage,
       asio::error_code & ec);
 
@@ -107718,9 +94327,9 @@
 
 [section:store serial_port_base::character_size::store]
 
-[indexterm2 store..serial_port_base::character_size] 
+[indexterm2 asio.indexterm.serial_port_base__character_size.store..store..serial_port_base::character_size] 
 
-  asio::error_code store(
+  void store(
       ASIO_OPTION_STORAGE & storage,
       asio::error_code & ec) const;
 
@@ -107732,7 +94341,7 @@
 
 [section:value serial_port_base::character_size::value]
 
-[indexterm2 value..serial_port_base::character_size] 
+[indexterm2 asio.indexterm.serial_port_base__character_size.value..value..serial_port_base::character_size] 
 
   unsigned int value() const;
 
@@ -107803,7 +94412,7 @@
 
 [section:flow_control serial_port_base::flow_control::flow_control]
 
-[indexterm2 flow_control..serial_port_base::flow_control] 
+[indexterm2 asio.indexterm.serial_port_base__flow_control.flow_control..flow_control..serial_port_base::flow_control] 
 
   flow_control(
       type t = none);
@@ -107816,9 +94425,9 @@
 
 [section:load serial_port_base::flow_control::load]
 
-[indexterm2 load..serial_port_base::flow_control] 
+[indexterm2 asio.indexterm.serial_port_base__flow_control.load..load..serial_port_base::flow_control] 
 
-  asio::error_code load(
+  void load(
       const ASIO_OPTION_STORAGE & storage,
       asio::error_code & ec);
 
@@ -107830,9 +94439,9 @@
 
 [section:store serial_port_base::flow_control::store]
 
-[indexterm2 store..serial_port_base::flow_control] 
+[indexterm2 asio.indexterm.serial_port_base__flow_control.store..store..serial_port_base::flow_control] 
 
-  asio::error_code store(
+  void store(
       ASIO_OPTION_STORAGE & storage,
       asio::error_code & ec) const;
 
@@ -107844,13 +94453,13 @@
 
 [section:type serial_port_base::flow_control::type]
 
-[indexterm2 type..serial_port_base::flow_control] 
+[indexterm2 asio.indexterm.serial_port_base__flow_control.type..type..serial_port_base::flow_control] 
 
   enum type
 
-[indexterm2 none..serial_port_base::flow_control]
-[indexterm2 software..serial_port_base::flow_control]
-[indexterm2 hardware..serial_port_base::flow_control]
+[indexterm2 asio.indexterm.serial_port_base__flow_control.type.none..none..serial_port_base::flow_control]
+[indexterm2 asio.indexterm.serial_port_base__flow_control.type.software..software..serial_port_base::flow_control]
+[indexterm2 asio.indexterm.serial_port_base__flow_control.type.hardware..hardware..serial_port_base::flow_control]
 
 [heading Values]
 [variablelist
@@ -107880,7 +94489,7 @@
 
 [section:value serial_port_base::flow_control::value]
 
-[indexterm2 value..serial_port_base::flow_control] 
+[indexterm2 asio.indexterm.serial_port_base__flow_control.value..value..serial_port_base::flow_control] 
 
   type value() const;
 
@@ -107951,9 +94560,9 @@
 
 [section:load serial_port_base::parity::load]
 
-[indexterm2 load..serial_port_base::parity] 
+[indexterm2 asio.indexterm.serial_port_base__parity.load..load..serial_port_base::parity] 
 
-  asio::error_code load(
+  void load(
       const ASIO_OPTION_STORAGE & storage,
       asio::error_code & ec);
 
@@ -107965,7 +94574,7 @@
 
 [section:parity serial_port_base::parity::parity]
 
-[indexterm2 parity..serial_port_base::parity] 
+[indexterm2 asio.indexterm.serial_port_base__parity.parity..parity..serial_port_base::parity] 
 
   parity(
       type t = none);
@@ -107978,9 +94587,9 @@
 
 [section:store serial_port_base::parity::store]
 
-[indexterm2 store..serial_port_base::parity] 
+[indexterm2 asio.indexterm.serial_port_base__parity.store..store..serial_port_base::parity] 
 
-  asio::error_code store(
+  void store(
       ASIO_OPTION_STORAGE & storage,
       asio::error_code & ec) const;
 
@@ -107992,13 +94601,13 @@
 
 [section:type serial_port_base::parity::type]
 
-[indexterm2 type..serial_port_base::parity] 
+[indexterm2 asio.indexterm.serial_port_base__parity.type..type..serial_port_base::parity] 
 
   enum type
 
-[indexterm2 none..serial_port_base::parity]
-[indexterm2 odd..serial_port_base::parity]
-[indexterm2 even..serial_port_base::parity]
+[indexterm2 asio.indexterm.serial_port_base__parity.type.none..none..serial_port_base::parity]
+[indexterm2 asio.indexterm.serial_port_base__parity.type.odd..odd..serial_port_base::parity]
+[indexterm2 asio.indexterm.serial_port_base__parity.type.even..even..serial_port_base::parity]
 
 [heading Values]
 [variablelist
@@ -108028,7 +94637,7 @@
 
 [section:value serial_port_base::parity::value]
 
-[indexterm2 value..serial_port_base::parity] 
+[indexterm2 asio.indexterm.serial_port_base__parity.value..value..serial_port_base::parity] 
 
   type value() const;
 
@@ -108099,9 +94708,9 @@
 
 [section:load serial_port_base::stop_bits::load]
 
-[indexterm2 load..serial_port_base::stop_bits] 
+[indexterm2 asio.indexterm.serial_port_base__stop_bits.load..load..serial_port_base::stop_bits] 
 
-  asio::error_code load(
+  void load(
       const ASIO_OPTION_STORAGE & storage,
       asio::error_code & ec);
 
@@ -108113,7 +94722,7 @@
 
 [section:stop_bits serial_port_base::stop_bits::stop_bits]
 
-[indexterm2 stop_bits..serial_port_base::stop_bits] 
+[indexterm2 asio.indexterm.serial_port_base__stop_bits.stop_bits..stop_bits..serial_port_base::stop_bits] 
 
   stop_bits(
       type t = one);
@@ -108126,9 +94735,9 @@
 
 [section:store serial_port_base::stop_bits::store]
 
-[indexterm2 store..serial_port_base::stop_bits] 
+[indexterm2 asio.indexterm.serial_port_base__stop_bits.store..store..serial_port_base::stop_bits] 
 
-  asio::error_code store(
+  void store(
       ASIO_OPTION_STORAGE & storage,
       asio::error_code & ec) const;
 
@@ -108140,13 +94749,13 @@
 
 [section:type serial_port_base::stop_bits::type]
 
-[indexterm2 type..serial_port_base::stop_bits] 
+[indexterm2 asio.indexterm.serial_port_base__stop_bits.type..type..serial_port_base::stop_bits] 
 
   enum type
 
-[indexterm2 one..serial_port_base::stop_bits]
-[indexterm2 onepointfive..serial_port_base::stop_bits]
-[indexterm2 two..serial_port_base::stop_bits]
+[indexterm2 asio.indexterm.serial_port_base__stop_bits.type.one..one..serial_port_base::stop_bits]
+[indexterm2 asio.indexterm.serial_port_base__stop_bits.type.onepointfive..onepointfive..serial_port_base::stop_bits]
+[indexterm2 asio.indexterm.serial_port_base__stop_bits.type.two..two..serial_port_base::stop_bits]
 
 [heading Values]
 [variablelist
@@ -108176,7 +94785,7 @@
 
 [section:value serial_port_base::stop_bits::value]
 
-[indexterm2 value..serial_port_base::stop_bits] 
+[indexterm2 asio.indexterm.serial_port_base__stop_bits.value..value..serial_port_base::stop_bits] 
 
   type value() const;
 
@@ -108188,558 +94797,6 @@
 
 [endsect]
 
-[section:serial_port_service serial_port_service]
-
-
-Default service implementation for a serial port. 
-
-
-  class serial_port_service :
-    public io_context::service
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.serial_port_service.implementation_type [*implementation_type]]]
-    [The type of a serial port implementation. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.serial_port_service.native_handle_type [*native_handle_type]]]
-    [The native handle type. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.serial_port_service.assign [*assign]]]
-    [Assign an existing native handle to a serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.async_read_some [*async_read_some]]]
-    [Start an asynchronous read. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.async_write_some [*async_write_some]]]
-    [Start an asynchronous write. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.close [*close]]]
-    [Close a serial port implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.construct [*construct]]]
-    [Construct a new serial port implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.destroy [*destroy]]]
-    [Destroy a serial port implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.get_option [*get_option]]]
-    [Get a serial port option. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.is_open [*is_open]]]
-    [Determine whether the handle is open. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.move_assign [*move_assign]]]
-    [Move-assign from another serial port implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.move_construct [*move_construct]]]
-    [Move-construct a new serial port implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.native_handle [*native_handle]]]
-    [Get the native handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.open [*open]]]
-    [Open a serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.read_some [*read_some]]]
-    [Read some data from the stream. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.send_break [*send_break]]]
-    [Send a break sequence to the serial port. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.serial_port_service [*serial_port_service]]]
-    [Construct a new serial port service for the specified io_context. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.set_option [*set_option]]]
-    [Set a serial port option. ]
-  ]
-  
-  [
-    [[link asio.reference.serial_port_service.write_some [*write_some]]]
-    [Write the given data to the stream. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.serial_port_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:assign serial_port_service::assign]
-
-[indexterm2 assign..serial_port_service] 
-Assign an existing native handle to a serial port. 
-
-
-  asio::error_code assign(
-      implementation_type & impl,
-      const native_handle_type & handle,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:async_read_some serial_port_service::async_read_some]
-
-[indexterm2 async_read_some..serial_port_service] 
-Start an asynchronous read. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_write_some serial_port_service::async_write_some]
-
-[indexterm2 async_write_some..serial_port_service] 
-Start an asynchronous write. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      WriteHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:cancel serial_port_service::cancel]
-
-[indexterm2 cancel..serial_port_service] 
-Cancel all asynchronous operations associated with the handle. 
-
-
-  asio::error_code cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:close serial_port_service::close]
-
-[indexterm2 close..serial_port_service] 
-Close a serial port implementation. 
-
-
-  asio::error_code close(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct serial_port_service::construct]
-
-[indexterm2 construct..serial_port_service] 
-Construct a new serial port implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:destroy serial_port_service::destroy]
-
-[indexterm2 destroy..serial_port_service] 
-Destroy a serial port implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:get_io_context serial_port_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..serial_port_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service serial_port_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..serial_port_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:get_option serial_port_service::get_option]
-
-[indexterm2 get_option..serial_port_service] 
-Get a serial port option. 
-
-
-  template<
-      typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
-  asio::error_code get_option(
-      const implementation_type & impl,
-      GettableSerialPortOption & option,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:id serial_port_service::id]
-
-[indexterm2 id..serial_port_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type serial_port_service::implementation_type]
-
-[indexterm2 implementation_type..serial_port_service] 
-The type of a serial port implementation. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:is_open serial_port_service::is_open]
-
-[indexterm2 is_open..serial_port_service] 
-Determine whether the handle is open. 
-
-
-  bool is_open(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:move_assign serial_port_service::move_assign]
-
-[indexterm2 move_assign..serial_port_service] 
-Move-assign from another serial port implementation. 
-
-
-  void move_assign(
-      implementation_type & impl,
-      serial_port_service & other_service,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:move_construct serial_port_service::move_construct]
-
-[indexterm2 move_construct..serial_port_service] 
-Move-construct a new serial port implementation. 
-
-
-  void move_construct(
-      implementation_type & impl,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle serial_port_service::native_handle]
-
-[indexterm2 native_handle..serial_port_service] 
-Get the native handle implementation. 
-
-
-  native_handle_type native_handle(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle_type serial_port_service::native_handle_type]
-
-[indexterm2 native_handle_type..serial_port_service] 
-The native handle type. 
-
-
-  typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:open serial_port_service::open]
-
-[indexterm2 open..serial_port_service] 
-Open a serial port. 
-
-
-  asio::error_code open(
-      implementation_type & impl,
-      const std::string & device,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:read_some serial_port_service::read_some]
-
-[indexterm2 read_some..serial_port_service] 
-Read some data from the stream. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t read_some(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:send_break serial_port_service::send_break]
-
-[indexterm2 send_break..serial_port_service] 
-Send a break sequence to the serial port. 
-
-
-  asio::error_code send_break(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:serial_port_service serial_port_service::serial_port_service]
-
-[indexterm2 serial_port_service..serial_port_service] 
-Construct a new serial port service for the specified [link asio.reference.io_context `io_context`]. 
-
-
-  serial_port_service(
-      asio::io_context & io_context);
-
-
-
-[endsect]
-
-
-
-[section:set_option serial_port_service::set_option]
-
-[indexterm2 set_option..serial_port_service] 
-Set a serial port option. 
-
-
-  template<
-      typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
-  asio::error_code set_option(
-      implementation_type & impl,
-      const SettableSerialPortOption & option,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:write_some serial_port_service::write_some]
-
-[indexterm2 write_some..serial_port_service] 
-Write the given data to the stream. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t write_some(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
 [section:service_already_exists service_already_exists]
 
 
@@ -108769,7 +94826,7 @@
 
 [section:service_already_exists service_already_exists::service_already_exists]
 
-[indexterm2 service_already_exists..service_already_exists] 
+[indexterm2 asio.indexterm.service_already_exists.service_already_exists..service_already_exists..service_already_exists] 
 
   service_already_exists();
 
@@ -108781,14 +94838,13 @@
 
 [endsect]
 
-
 [section:signal_set signal_set]
 
-[indexterm1 signal_set] 
-Typedef for the typical usage of a signal set. 
+
+Provides signal functionality. 
 
 
-  typedef basic_signal_set signal_set;
+  class signal_set
 
 
 [heading Types]
@@ -108797,25 +94853,11 @@
 
   [
 
-    [[link asio.reference.basic_signal_set.executor_type [*executor_type]]]
+    [[link asio.reference.signal_set.executor_type [*executor_type]]]
     [The type of the executor associated with the object. ]
   
   ]
 
-  [
-
-    [[link asio.reference.basic_signal_set.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_signal_set.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -108823,17 +94865,47 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.basic_signal_set.add [*add]]]
+    [[link asio.reference.signal_set.add [*add]]]
     [Add a signal to a signal_set. ]
   ]
   
   [
-    [[link asio.reference.basic_signal_set.async_wait [*async_wait]]]
+    [[link asio.reference.signal_set.async_wait [*async_wait]]]
     [Start an asynchronous operation to wait for a signal to be delivered. ]
   ]
   
   [
-    [[link asio.reference.basic_signal_set.basic_signal_set [*basic_signal_set]]]
+    [[link asio.reference.signal_set.cancel [*cancel]]]
+    [Cancel all operations associated with the signal set. ]
+  ]
+  
+  [
+    [[link asio.reference.signal_set.clear [*clear]]]
+    [Remove all signals from a signal_set. ]
+  ]
+  
+  [
+    [[link asio.reference.signal_set.get_executor [*get_executor]]]
+    [Get the executor associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.signal_set.get_io_context [*get_io_context]]]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.signal_set.get_io_service [*get_io_service]]]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.signal_set.remove [*remove]]]
+    [Remove a signal from a signal_set. ]
+  ]
+  
+  [
+    [[link asio.reference.signal_set.signal_set [*signal_set]]]
     [Construct a signal set without adding any signals. 
 
      Construct a signal set and add one signal. 
@@ -108844,56 +94916,13 @@
   ]
   
   [
-    [[link asio.reference.basic_signal_set.cancel [*cancel]]]
-    [Cancel all operations associated with the signal set. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.clear [*clear]]]
-    [Remove all signals from a signal_set. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.get_executor [*get_executor]]]
-    [Get the executor associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.get_io_context [*get_io_context]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.remove [*remove]]]
-    [Remove a signal from a signal_set. ]
+    [[link asio.reference.signal_set._signal_set [*~signal_set]]]
+    [Destroys the signal set. ]
   ]
   
 ]
 
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.basic_signal_set.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_signal_set.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-]
-
-The [link asio.reference.basic_signal_set `basic_signal_set`] class template provides the ability to perform an asynchronous wait for one or more signals to occur.
-
-Most applications will use the [link asio.reference.signal_set `signal_set`] typedef.
+The [link asio.reference.signal_set `signal_set`] class provides the ability to perform an asynchronous wait for one or more signals to occur.
 
 
 [heading Thread Safety]
@@ -108933,16 +94962,16 @@
   
 
 
-If a signal is registered with a signal\_set, and the signal occurs when there are no waiting handlers, then the signal notification is queued. The next async\_wait operation on that signal\_set will dequeue the notification. If multiple notifications are queued, subsequent async\_wait operations dequeue them one at a time. Signal notifications are dequeued in order of ascending signal number.
+If a signal is registered with a [link asio.reference.signal_set `signal_set`], and the signal occurs when there are no waiting handlers, then the signal notification is queued. The next async\_wait operation on that [link asio.reference.signal_set `signal_set`] will dequeue the notification. If multiple notifications are queued, subsequent async\_wait operations dequeue them one at a time. Signal notifications are dequeued in order of ascending signal number.
 
-If a signal number is removed from a signal\_set (using the `remove` or `erase` member functions) then any queued notifications for that signal are discarded.
+If a signal number is removed from a [link asio.reference.signal_set `signal_set`] (using the `remove` or `erase` member functions) then any queued notifications for that signal are discarded.
 
 
 [heading Multiple registration of signals]
   
 
 
-The same signal number may be registered with different signal\_set objects. When the signal occurs, one handler is called for each signal\_set object.
+The same signal number may be registered with different [link asio.reference.signal_set `signal_set`] objects. When the signal occurs, one handler is called for each [link asio.reference.signal_set `signal_set`] object.
 
 Note that multiple registration only works for signals that are registered using Asio. The application must not also register a signal handler using functions such as `signal()` or `sigaction()`.
 
@@ -108951,7 +94980,394 @@
   
 
 
-POSIX allows signals to be blocked using functions such as `sigprocmask()` and `pthread_sigmask()`. For signals to be delivered, programs must ensure that any signals registered using signal\_set objects are unblocked in at least one thread. 
+POSIX allows signals to be blocked using functions such as `sigprocmask()` and `pthread_sigmask()`. For signals to be delivered, programs must ensure that any signals registered using [link asio.reference.signal_set `signal_set`] objects are unblocked in at least one thread. 
+
+[heading Requirements]
+
+['Header: ][^asio/signal_set.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+[section:add signal_set::add]
+
+[indexterm2 asio.indexterm.signal_set.add..add..signal_set] 
+Add a signal to a [link asio.reference.signal_set `signal_set`]. 
+
+
+  void ``[link asio.reference.signal_set.add.overload1 add]``(
+      int signal_number);
+  ``  [''''&raquo;''' [link asio.reference.signal_set.add.overload1 more...]]``
+
+  void ``[link asio.reference.signal_set.add.overload2 add]``(
+      int signal_number,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.signal_set.add.overload2 more...]]``
+
+
+[section:overload1 signal_set::add (1 of 2 overloads)]
+
+
+Add a signal to a [link asio.reference.signal_set `signal_set`]. 
+
+
+  void add(
+      int signal_number);
+
+
+This function adds the specified signal to the set. It has no effect if the signal is already in the set.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[signal_number][The signal to be added to the set.]]
+
+]
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 signal_set::add (2 of 2 overloads)]
+
+
+Add a signal to a [link asio.reference.signal_set `signal_set`]. 
+
+
+  void add(
+      int signal_number,
+      asio::error_code & ec);
+
+
+This function adds the specified signal to the set. It has no effect if the signal is already in the set.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[signal_number][The signal to be added to the set.]]
+
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:async_wait signal_set::async_wait]
+
+[indexterm2 asio.indexterm.signal_set.async_wait..async_wait..signal_set] 
+Start an asynchronous operation to wait for a signal to be delivered. 
+
+
+  template<
+      typename ``[link asio.reference.SignalHandler SignalHandler]``>
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
+      SignalHandler && handler);
+
+
+This function may be used to initiate an asynchronous wait against the signal set. It always returns immediately.
+
+For each call to `async_wait()`, the supplied handler will be called exactly once. The handler will be called when:
+
+
+* One of the registered signals in the signal set occurs; or
+
+
+* The signal set was cancelled, in which case the handler is passed the error code `asio::error::operation_aborted`.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[handler][The handler to be called when the signal occurs. Copies will be made of the handler as required. The function signature of the handler must be: 
+``
+   void handler(
+     const asio::error_code& error, // Result of operation.
+     int signal_number // Indicates which signal occurred.
+   ); 
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+[section:cancel signal_set::cancel]
+
+[indexterm2 asio.indexterm.signal_set.cancel..cancel..signal_set] 
+Cancel all operations associated with the signal set. 
+
+
+  void ``[link asio.reference.signal_set.cancel.overload1 cancel]``();
+  ``  [''''&raquo;''' [link asio.reference.signal_set.cancel.overload1 more...]]``
+
+  void ``[link asio.reference.signal_set.cancel.overload2 cancel]``(
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.signal_set.cancel.overload2 more...]]``
+
+
+[section:overload1 signal_set::cancel (1 of 2 overloads)]
+
+
+Cancel all operations associated with the signal set. 
+
+
+  void cancel();
+
+
+This function forces the completion of any pending asynchronous wait operations against the signal set. The handler for each cancelled operation will be invoked with the `asio::error::operation_aborted` error code.
+
+Cancellation does not alter the set of registered signals.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure.]]
+
+]
+
+
+[heading Remarks]
+      
+If a registered signal occurred before `cancel()` is called, then the handlers for asynchronous wait operations will:
+
+
+* have already been invoked; or
+
+
+* have been queued for invocation in the near future.
+
+These handlers can no longer be cancelled, and therefore are passed an error code that indicates the successful completion of the wait operation. 
+
+
+[endsect]
+
+
+
+[section:overload2 signal_set::cancel (2 of 2 overloads)]
+
+
+Cancel all operations associated with the signal set. 
+
+
+  void cancel(
+      asio::error_code & ec);
+
+
+This function forces the completion of any pending asynchronous wait operations against the signal set. The handler for each cancelled operation will be invoked with the `asio::error::operation_aborted` error code.
+
+Cancellation does not alter the set of registered signals.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+
+[heading Remarks]
+      
+If a registered signal occurred before `cancel()` is called, then the handlers for asynchronous wait operations will:
+
+
+* have already been invoked; or
+
+
+* have been queued for invocation in the near future.
+
+These handlers can no longer be cancelled, and therefore are passed an error code that indicates the successful completion of the wait operation. 
+
+
+[endsect]
+
+
+[endsect]
+
+[section:clear signal_set::clear]
+
+[indexterm2 asio.indexterm.signal_set.clear..clear..signal_set] 
+Remove all signals from a [link asio.reference.signal_set `signal_set`]. 
+
+
+  void ``[link asio.reference.signal_set.clear.overload1 clear]``();
+  ``  [''''&raquo;''' [link asio.reference.signal_set.clear.overload1 more...]]``
+
+  void ``[link asio.reference.signal_set.clear.overload2 clear]``(
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.signal_set.clear.overload2 more...]]``
+
+
+[section:overload1 signal_set::clear (1 of 2 overloads)]
+
+
+Remove all signals from a [link asio.reference.signal_set `signal_set`]. 
+
+
+  void clear();
+
+
+This function removes all signals from the set. It has no effect if the set is already empty.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure.]]
+
+]
+
+
+[heading Remarks]
+      
+Removes all queued notifications. 
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 signal_set::clear (2 of 2 overloads)]
+
+
+Remove all signals from a [link asio.reference.signal_set `signal_set`]. 
+
+
+  void clear(
+      asio::error_code & ec);
+
+
+This function removes all signals from the set. It has no effect if the set is already empty.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+
+[heading Remarks]
+      
+Removes all queued notifications. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:executor_type signal_set::executor_type]
+
+[indexterm2 asio.indexterm.signal_set.executor_type..executor_type..signal_set] 
+The type of the executor associated with the object. 
+
+
+  typedef io_context::executor_type executor_type;
+
+
+[heading Member Functions]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.io_context__executor_type.context [*context]]]
+    [Obtain the underlying execution context. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.defer [*defer]]]
+    [Request the io_context to invoke the given function object. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
+    [Request the io_context to invoke the given function object. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
+    [Inform the io_context that some work is no longer outstanding. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
+    [Inform the io_context that it has some outstanding work to do. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.post [*post]]]
+    [Request the io_context to invoke the given function object. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
+    [Determine whether the io_context is running in the current thread. ]
+  ]
+  
+]
+
+[heading Friends]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
+    [Compare two executors for inequality. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
+    [Compare two executors for equality. ]
+  ]
+  
+]
 
 
 [heading Requirements]
@@ -108964,113 +95380,14 @@
 [endsect]
 
 
-[section:signal_set_service signal_set_service]
+
+[section:get_executor signal_set::get_executor]
+
+[indexterm2 asio.indexterm.signal_set.get_executor..get_executor..signal_set] 
+Get the executor associated with the object. 
 
 
-Default service implementation for a signal set. 
-
-
-  class signal_set_service :
-    public io_context::service
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.signal_set_service.implementation_type [*implementation_type]]]
-    [The type of a signal set implementation. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.signal_set_service.add [*add]]]
-    [Add a signal to a signal_set. ]
-  ]
-  
-  [
-    [[link asio.reference.signal_set_service.async_wait [*async_wait]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.signal_set_service.cancel [*cancel]]]
-    [Cancel all operations associated with the signal set. ]
-  ]
-  
-  [
-    [[link asio.reference.signal_set_service.clear [*clear]]]
-    [Remove all signals from a signal_set. ]
-  ]
-  
-  [
-    [[link asio.reference.signal_set_service.construct [*construct]]]
-    [Construct a new signal set implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.signal_set_service.destroy [*destroy]]]
-    [Destroy a signal set implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.signal_set_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.signal_set_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.signal_set_service.remove [*remove]]]
-    [Remove a signal to a signal_set. ]
-  ]
-  
-  [
-    [[link asio.reference.signal_set_service.signal_set_service [*signal_set_service]]]
-    [Construct a new signal set service for the specified io_context. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.signal_set_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/signal_set_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:add signal_set_service::add]
-
-[indexterm2 add..signal_set_service] 
-Add a signal to a signal\_set. 
-
-
-  asio::error_code add(
-      implementation_type & impl,
-      int signal_number,
-      asio::error_code & ec);
+  executor_type get_executor();
 
 
 
@@ -109078,125 +95395,104 @@
 
 
 
-[section:async_wait signal_set_service::async_wait]
+[section:get_io_context signal_set::get_io_context]
 
-[indexterm2 async_wait..signal_set_service] 
-
-  template<
-      typename ``[link asio.reference.SignalHandler SignalHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      implementation_type & impl,
-      SignalHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:cancel signal_set_service::cancel]
-
-[indexterm2 cancel..signal_set_service] 
-Cancel all operations associated with the signal set. 
-
-
-  asio::error_code cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:clear signal_set_service::clear]
-
-[indexterm2 clear..signal_set_service] 
-Remove all signals from a signal\_set. 
-
-
-  asio::error_code clear(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct signal_set_service::construct]
-
-[indexterm2 construct..signal_set_service] 
-Construct a new signal set implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:destroy signal_set_service::destroy]
-
-[indexterm2 destroy..signal_set_service] 
-Destroy a signal set implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:get_io_context signal_set_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..signal_set_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
+[indexterm2 asio.indexterm.signal_set.get_io_context..get_io_context..signal_set] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
   asio::io_context & get_io_context();
 
 
+This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+      
+A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
+
+
+
 
 [endsect]
 
 
 
-[section:get_io_service signal_set_service::get_io_service]
+[section:get_io_service signal_set::get_io_service]
 
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..signal_set_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
+[indexterm2 asio.indexterm.signal_set.get_io_service..get_io_service..signal_set] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
   asio::io_context & get_io_service();
 
 
+This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+      
+A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
+
+
+
 
 [endsect]
 
 
+[section:remove signal_set::remove]
 
-[section:id signal_set_service::id]
-
-[indexterm2 id..signal_set_service] 
-The unique service identifier. 
+[indexterm2 asio.indexterm.signal_set.remove..remove..signal_set] 
+Remove a signal from a [link asio.reference.signal_set `signal_set`]. 
 
 
-  static asio::io_context::id id;
+  void ``[link asio.reference.signal_set.remove.overload1 remove]``(
+      int signal_number);
+  ``  [''''&raquo;''' [link asio.reference.signal_set.remove.overload1 more...]]``
+
+  void ``[link asio.reference.signal_set.remove.overload2 remove]``(
+      int signal_number,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.signal_set.remove.overload2 more...]]``
+
+
+[section:overload1 signal_set::remove (1 of 2 overloads)]
+
+
+Remove a signal from a [link asio.reference.signal_set `signal_set`]. 
+
+
+  void remove(
+      int signal_number);
+
+
+This function removes the specified signal from the set. It has no effect if the signal is not in the set.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[signal_number][The signal to be removed from the set.]]
+
+]
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure.]]
+
+]
+
+
+[heading Remarks]
+      
+Removes any notifications that have been queued for the specified signal number. 
+
 
 
 
@@ -109204,280 +95500,150 @@
 
 
 
-[section:implementation_type signal_set_service::implementation_type]
-
-[indexterm2 implementation_type..signal_set_service] 
-The type of a signal set implementation. 
+[section:overload2 signal_set::remove (2 of 2 overloads)]
 
 
-  typedef implementation_defined implementation_type;
+Remove a signal from a [link asio.reference.signal_set `signal_set`]. 
 
 
-
-[heading Requirements]
-
-['Header: ][^asio/signal_set_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:remove signal_set_service::remove]
-
-[indexterm2 remove..signal_set_service] 
-Remove a signal to a signal\_set. 
-
-
-  asio::error_code remove(
-      implementation_type & impl,
+  void remove(
       int signal_number,
       asio::error_code & ec);
 
 
+This function removes the specified signal from the set. It has no effect if the signal is not in the set.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[signal_number][The signal to be removed from the set.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+
+[heading Remarks]
+      
+Removes any notifications that have been queued for the specified signal number. 
+
+
+
 
 [endsect]
 
 
+[endsect]
 
-[section:signal_set_service signal_set_service::signal_set_service]
+[section:signal_set signal_set::signal_set]
 
-[indexterm2 signal_set_service..signal_set_service] 
-Construct a new signal set service for the specified [link asio.reference.io_context `io_context`]. 
+[indexterm2 asio.indexterm.signal_set.signal_set..signal_set..signal_set] 
+Construct a signal set without adding any signals. 
 
 
-  signal_set_service(
+  explicit ``[link asio.reference.signal_set.signal_set.overload1 signal_set]``(
+      asio::io_context & io_context);
+  ``  [''''&raquo;''' [link asio.reference.signal_set.signal_set.overload1 more...]]``
+
+
+Construct a signal set and add one signal. 
+
+
+  ``[link asio.reference.signal_set.signal_set.overload2 signal_set]``(
+      asio::io_context & io_context,
+      int signal_number_1);
+  ``  [''''&raquo;''' [link asio.reference.signal_set.signal_set.overload2 more...]]``
+
+
+Construct a signal set and add two signals. 
+
+
+  ``[link asio.reference.signal_set.signal_set.overload3 signal_set]``(
+      asio::io_context & io_context,
+      int signal_number_1,
+      int signal_number_2);
+  ``  [''''&raquo;''' [link asio.reference.signal_set.signal_set.overload3 more...]]``
+
+
+Construct a signal set and add three signals. 
+
+
+  ``[link asio.reference.signal_set.signal_set.overload4 signal_set]``(
+      asio::io_context & io_context,
+      int signal_number_1,
+      int signal_number_2,
+      int signal_number_3);
+  ``  [''''&raquo;''' [link asio.reference.signal_set.signal_set.overload4 more...]]``
+
+
+[section:overload1 signal_set::signal_set (1 of 4 overloads)]
+
+
+Construct a signal set without adding any signals. 
+
+
+  signal_set(
       asio::io_context & io_context);
 
 
-
-[endsect]
+This constructor creates a signal set without registering for any signals.
 
 
+[heading Parameters]
+    
 
-[endsect]
-
-[section:socket_acceptor_service socket_acceptor_service]
-
-
-Default service implementation for a socket acceptor. 
-
-
-  template<
-      typename ``[link asio.reference.Protocol Protocol]``>
-  class socket_acceptor_service :
-    public io_context::service
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.socket_acceptor_service.endpoint_type [*endpoint_type]]]
-    [The endpoint type. ]
+[variablelist
   
-  ]
-
-  [
-
-    [[link asio.reference.socket_acceptor_service.implementation_type [*implementation_type]]]
-    [The native type of the socket acceptor. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.socket_acceptor_service.native_handle_type [*native_handle_type]]]
-    [The native acceptor type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.socket_acceptor_service.protocol_type [*protocol_type]]]
-    [The protocol type. ]
-  
-  ]
+[[io_context][The [link asio.reference.io_context `io_context`] object that the signal set will use to dispatch handlers for any asynchronous operations performed on the set. ]]
 
 ]
 
-[heading Member Functions]
-[table
-  [[Name][Description]]
 
-  [
-    [[link asio.reference.socket_acceptor_service.accept [*accept]]]
-    [Accept a new connection. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.assign [*assign]]]
-    [Assign an existing native acceptor to a socket acceptor. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.async_accept [*async_accept]]]
-    [Start an asynchronous accept. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.async_wait [*async_wait]]]
-    [Asynchronously wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.bind [*bind]]]
-    [Bind the socket acceptor to the specified local endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the acceptor. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.close [*close]]]
-    [Close a socket acceptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.construct [*construct]]]
-    [Construct a new socket acceptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.converting_move_construct [*converting_move_construct]]]
-    [Move-construct a new socket acceptor implementation from another protocol type. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.destroy [*destroy]]]
-    [Destroy a socket acceptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.get_option [*get_option]]]
-    [Get a socket option. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.io_control [*io_control]]]
-    [Perform an IO control command on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.is_open [*is_open]]]
-    [Determine whether the acceptor is open. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.listen [*listen]]]
-    [Place the socket acceptor into the state where it will listen for new connections. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.local_endpoint [*local_endpoint]]]
-    [Get the local endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.move_assign [*move_assign]]]
-    [Move-assign from another socket acceptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.move_construct [*move_construct]]]
-    [Move-construct a new socket acceptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.native_handle [*native_handle]]]
-    [Get the native acceptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.native_non_blocking [*native_non_blocking]]]
-    [Gets the non-blocking mode of the native acceptor implementation. 
 
-     Sets the non-blocking mode of the native acceptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.non_blocking [*non_blocking]]]
-    [Gets the non-blocking mode of the acceptor. 
 
-     Sets the non-blocking mode of the acceptor. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.open [*open]]]
-    [Open a new socket acceptor implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.set_option [*set_option]]]
-    [Set a socket option. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.socket_acceptor_service [*socket_acceptor_service]]]
-    [Construct a new socket acceptor service for the specified io_context. ]
-  ]
-  
-  [
-    [[link asio.reference.socket_acceptor_service.wait [*wait]]]
-    [Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-]
+[endsect]
 
-[heading Data Members]
-[table
-  [[Name][Description]]
 
-  [
-    [[link asio.reference.socket_acceptor_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
+
+[section:overload2 signal_set::signal_set (2 of 4 overloads)]
+
+
+Construct a signal set and add one signal. 
+
+
+  signal_set(
+      asio::io_context & io_context,
+      int signal_number_1);
+
+
+This constructor creates a signal set and registers for one signal.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the signal set will use to dispatch handlers for any asynchronous operations performed on the set.]]
+
+[[signal_number_1][The signal number to be added.]]
 
 ]
 
-[heading Requirements]
 
-['Header: ][^asio/socket_acceptor_service.hpp]
+[heading Remarks]
+      
+This constructor is equivalent to performing: 
 
-['Convenience header: ][^asio.hpp]
+   asio::signal_set signals(io_context);
+   signals.add(signal_number_1); 
 
 
-[section:accept socket_acceptor_service::accept]
-
-[indexterm2 accept..socket_acceptor_service] 
-Accept a new connection. 
 
 
-  template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketService SocketService]``>
-  asio::error_code accept(
-      implementation_type & impl,
-      basic_socket< Protocol1, SocketService > & peer,
-      endpoint_type * peer_endpoint,
-      asio::error_code & ec,
-      typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type *  = 0);
 
 
 
@@ -109485,17 +95651,46 @@
 
 
 
-[section:assign socket_acceptor_service::assign]
-
-[indexterm2 assign..socket_acceptor_service] 
-Assign an existing native acceptor to a socket acceptor. 
+[section:overload3 signal_set::signal_set (3 of 4 overloads)]
 
 
-  asio::error_code assign(
-      implementation_type & impl,
-      const protocol_type & protocol,
-      const native_handle_type & native_acceptor,
-      asio::error_code & ec);
+Construct a signal set and add two signals. 
+
+
+  signal_set(
+      asio::io_context & io_context,
+      int signal_number_1,
+      int signal_number_2);
+
+
+This constructor creates a signal set and registers for two signals.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the signal set will use to dispatch handlers for any asynchronous operations performed on the set.]]
+
+[[signal_number_1][The first signal number to be added.]]
+
+[[signal_number_2][The second signal number to be added.]]
+
+]
+
+
+[heading Remarks]
+      
+This constructor is equivalent to performing: 
+
+   asio::signal_set signals(io_context);
+   signals.add(signal_number_1);
+   signals.add(signal_number_2); 
+
+
+
+
 
 
 
@@ -109503,490 +95698,50 @@
 
 
 
-[section:async_accept socket_acceptor_service::async_accept]
+[section:overload4 signal_set::signal_set (4 of 4 overloads)]
 
-[indexterm2 async_accept..socket_acceptor_service] 
-Start an asynchronous accept. 
 
+Construct a signal set and add three signals. 
 
-  template<
-      typename ``[link asio.reference.Protocol Protocol1]``,
-      typename ``[link asio.reference.SocketService SocketService]``,
-      typename ``[link asio.reference.AcceptHandler AcceptHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_accept(
-      implementation_type & impl,
-      basic_socket< Protocol1, SocketService > & peer,
-      endpoint_type * peer_endpoint,
-      AcceptHandler && handler,
-      typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type *  = 0);
 
+  signal_set(
+      asio::io_context & io_context,
+      int signal_number_1,
+      int signal_number_2,
+      int signal_number_3);
 
 
-[endsect]
+This constructor creates a signal set and registers for three signals.
 
 
+[heading Parameters]
+    
 
-[section:async_wait socket_acceptor_service::async_wait]
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the signal set will use to dispatch handlers for any asynchronous operations performed on the set.]]
 
-[indexterm2 async_wait..socket_acceptor_service] 
-Asynchronously wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. 
+[[signal_number_1][The first signal number to be added.]]
 
+[[signal_number_2][The second signal number to be added.]]
 
-  template<
-      typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      implementation_type & impl,
-      socket_base::wait_type w,
-      WaitHandler && handler);
+[[signal_number_3][The third signal number to be added.]]
 
+]
 
 
-[endsect]
+[heading Remarks]
+      
+This constructor is equivalent to performing: 
 
-
-
-[section:bind socket_acceptor_service::bind]
-
-[indexterm2 bind..socket_acceptor_service] 
-Bind the socket acceptor to the specified local endpoint. 
-
-
-  asio::error_code bind(
-      implementation_type & impl,
-      const endpoint_type & endpoint,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:cancel socket_acceptor_service::cancel]
-
-[indexterm2 cancel..socket_acceptor_service] 
-Cancel all asynchronous operations associated with the acceptor. 
-
-
-  asio::error_code cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:close socket_acceptor_service::close]
-
-[indexterm2 close..socket_acceptor_service] 
-Close a socket acceptor implementation. 
-
-
-  asio::error_code close(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct socket_acceptor_service::construct]
-
-[indexterm2 construct..socket_acceptor_service] 
-Construct a new socket acceptor implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:converting_move_construct socket_acceptor_service::converting_move_construct]
-
-[indexterm2 converting_move_construct..socket_acceptor_service] 
-Move-construct a new socket acceptor implementation from another protocol type. 
-
-
-  template<
-      typename ``[link asio.reference.Protocol Protocol1]``>
-  void converting_move_construct(
-      implementation_type & impl,
-      typename socket_acceptor_service< Protocol1 >::implementation_type & other_impl,
-      typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
-
-
-
-[endsect]
-
-
-
-[section:destroy socket_acceptor_service::destroy]
-
-[indexterm2 destroy..socket_acceptor_service] 
-Destroy a socket acceptor implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:endpoint_type socket_acceptor_service::endpoint_type]
-
-[indexterm2 endpoint_type..socket_acceptor_service] 
-The endpoint type. 
-
-
-  typedef protocol_type::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_acceptor_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_io_context socket_acceptor_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..socket_acceptor_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service socket_acceptor_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..socket_acceptor_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:get_option socket_acceptor_service::get_option]
-
-[indexterm2 get_option..socket_acceptor_service] 
-Get a socket option. 
-
-
-  template<
-      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code get_option(
-      const implementation_type & impl,
-      GettableSocketOption & option,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:id socket_acceptor_service::id]
-
-[indexterm2 id..socket_acceptor_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type socket_acceptor_service::implementation_type]
-
-[indexterm2 implementation_type..socket_acceptor_service] 
-The native type of the socket acceptor. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_acceptor_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:io_control socket_acceptor_service::io_control]
-
-[indexterm2 io_control..socket_acceptor_service] 
-Perform an IO control command on the socket. 
-
-
-  template<
-      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
-      implementation_type & impl,
-      IoControlCommand & command,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:is_open socket_acceptor_service::is_open]
-
-[indexterm2 is_open..socket_acceptor_service] 
-Determine whether the acceptor is open. 
-
-
-  bool is_open(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:listen socket_acceptor_service::listen]
-
-[indexterm2 listen..socket_acceptor_service] 
-Place the socket acceptor into the state where it will listen for new connections. 
-
-
-  asio::error_code listen(
-      implementation_type & impl,
-      int backlog,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:local_endpoint socket_acceptor_service::local_endpoint]
-
-[indexterm2 local_endpoint..socket_acceptor_service] 
-Get the local endpoint. 
-
-
-  endpoint_type local_endpoint(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:move_assign socket_acceptor_service::move_assign]
-
-[indexterm2 move_assign..socket_acceptor_service] 
-Move-assign from another socket acceptor implementation. 
-
-
-  void move_assign(
-      implementation_type & impl,
-      socket_acceptor_service & other_service,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:move_construct socket_acceptor_service::move_construct]
-
-[indexterm2 move_construct..socket_acceptor_service] 
-Move-construct a new socket acceptor implementation. 
-
-
-  void move_construct(
-      implementation_type & impl,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle socket_acceptor_service::native_handle]
-
-[indexterm2 native_handle..socket_acceptor_service] 
-Get the native acceptor implementation. 
-
-
-  native_handle_type native_handle(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle_type socket_acceptor_service::native_handle_type]
-
-[indexterm2 native_handle_type..socket_acceptor_service] 
-The native acceptor type. 
-
-
-  typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_acceptor_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking socket_acceptor_service::native_non_blocking]
-
-[indexterm2 native_non_blocking..socket_acceptor_service] 
-Gets the non-blocking mode of the native acceptor implementation. 
-
-
-  bool ``[link asio.reference.socket_acceptor_service.native_non_blocking.overload1 native_non_blocking]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.socket_acceptor_service.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native acceptor implementation. 
-
-
-  asio::error_code ``[link asio.reference.socket_acceptor_service.native_non_blocking.overload2 native_non_blocking]``(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.socket_acceptor_service.native_non_blocking.overload2 more...]]``
-
-
-[section:overload1 socket_acceptor_service::native_non_blocking (1 of 2 overloads)]
-
-
-Gets the non-blocking mode of the native acceptor implementation. 
-
-
-  bool native_non_blocking(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 socket_acceptor_service::native_non_blocking (2 of 2 overloads)]
-
-
-Sets the non-blocking mode of the native acceptor implementation. 
-
-
-  asio::error_code native_non_blocking(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking socket_acceptor_service::non_blocking]
-
-[indexterm2 non_blocking..socket_acceptor_service] 
-Gets the non-blocking mode of the acceptor. 
-
-
-  bool ``[link asio.reference.socket_acceptor_service.non_blocking.overload1 non_blocking]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.socket_acceptor_service.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the acceptor. 
-
-
-  asio::error_code ``[link asio.reference.socket_acceptor_service.non_blocking.overload2 non_blocking]``(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.socket_acceptor_service.non_blocking.overload2 more...]]``
-
-
-[section:overload1 socket_acceptor_service::non_blocking (1 of 2 overloads)]
-
-
-Gets the non-blocking mode of the acceptor. 
-
-
-  bool non_blocking(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 socket_acceptor_service::non_blocking (2 of 2 overloads)]
+   asio::signal_set signals(io_context);
+   signals.add(signal_number_1);
+   signals.add(signal_number_2);
+   signals.add(signal_number_3); 
 
 
-Sets the non-blocking mode of the acceptor. 
 
 
-  asio::error_code non_blocking(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
 
 
 
@@ -109996,89 +95751,16 @@
 [endsect]
 
 
-[section:open socket_acceptor_service::open]
+[section:_signal_set signal_set::~signal_set]
 
-[indexterm2 open..socket_acceptor_service] 
-Open a new socket acceptor implementation. 
+[indexterm2 asio.indexterm.signal_set._signal_set..~signal_set..signal_set] 
+Destroys the signal set. 
 
 
-  asio::error_code open(
-      implementation_type & impl,
-      const protocol_type & protocol,
-      asio::error_code & ec);
+  ~signal_set();
 
 
-
-[endsect]
-
-
-
-[section:protocol_type socket_acceptor_service::protocol_type]
-
-[indexterm2 protocol_type..socket_acceptor_service] 
-The protocol type. 
-
-
-  typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_acceptor_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:set_option socket_acceptor_service::set_option]
-
-[indexterm2 set_option..socket_acceptor_service] 
-Set a socket option. 
-
-
-  template<
-      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code set_option(
-      implementation_type & impl,
-      const SettableSocketOption & option,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:socket_acceptor_service socket_acceptor_service::socket_acceptor_service]
-
-[indexterm2 socket_acceptor_service..socket_acceptor_service] 
-Construct a new socket acceptor service for the specified [link asio.reference.io_context `io_context`]. 
-
-
-  socket_acceptor_service(
-      asio::io_context & io_context);
-
-
-
-[endsect]
-
-
-
-[section:wait socket_acceptor_service::wait]
-
-[indexterm2 wait..socket_acceptor_service] 
-Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  asio::error_code wait(
-      implementation_type & impl,
-      socket_base::wait_type w,
-      asio::error_code & ec);
-
+This function destroys the signal set, cancelling any outstanding asynchronous wait operations associated with the signal set as if by calling `cancel`. 
 
 
 [endsect]
@@ -110224,6 +95906,11 @@
 
   [
     [[link asio.reference.socket_base.max_connections [*max_connections]]]
+    [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
+  ]
+
+  [
+    [[link asio.reference.socket_base.max_listen_connections [*max_listen_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
@@ -110258,7 +95945,7 @@
 
 [section:broadcast socket_base::broadcast]
 
-[indexterm2 broadcast..socket_base] 
+[indexterm2 asio.indexterm.socket_base.broadcast..broadcast..socket_base] 
 Socket option to permit sending of broadcast messages. 
 
 
@@ -110309,7 +95996,7 @@
 
 [section:bytes_readable socket_base::bytes_readable]
 
-[indexterm2 bytes_readable..socket_base] 
+[indexterm2 asio.indexterm.socket_base.bytes_readable..bytes_readable..socket_base] 
 IO control command to get the amount of data that can be read without blocking. 
 
 
@@ -110349,7 +96036,7 @@
 
 [section:debug socket_base::debug]
 
-[indexterm2 debug..socket_base] 
+[indexterm2 asio.indexterm.socket_base.debug..debug..socket_base] 
 Socket option to enable socket-level debugging. 
 
 
@@ -110400,7 +96087,7 @@
 
 [section:do_not_route socket_base::do_not_route]
 
-[indexterm2 do_not_route..socket_base] 
+[indexterm2 asio.indexterm.socket_base.do_not_route..do_not_route..socket_base] 
 Socket option to prevent routing, use local interfaces only. 
 
 
@@ -110451,7 +96138,7 @@
 
 [section:enable_connection_aborted socket_base::enable_connection_aborted]
 
-[indexterm2 enable_connection_aborted..socket_base] 
+[indexterm2 asio.indexterm.socket_base.enable_connection_aborted..enable_connection_aborted..socket_base] 
 Socket option to report aborted connections on accept. 
 
 
@@ -110502,7 +96189,7 @@
 
 [section:keep_alive socket_base::keep_alive]
 
-[indexterm2 keep_alive..socket_base] 
+[indexterm2 asio.indexterm.socket_base.keep_alive..keep_alive..socket_base] 
 Socket option to send keep-alives. 
 
 
@@ -110553,7 +96240,7 @@
 
 [section:linger socket_base::linger]
 
-[indexterm2 linger..socket_base] 
+[indexterm2 asio.indexterm.socket_base.linger..linger..socket_base] 
 Socket option to specify whether the socket lingers on close if unsent data is present. 
 
 
@@ -110605,8 +96292,8 @@
 
 [section:max_connections socket_base::max_connections]
 
-[indexterm2 max_connections..socket_base] 
-The maximum length of the queue of pending incoming connections. 
+[indexterm2 asio.indexterm.socket_base.max_connections..max_connections..socket_base] 
+(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections. 
 
 
   static const int max_connections = implementation_defined;
@@ -110617,9 +96304,23 @@
 
 
 
+[section:max_listen_connections socket_base::max_listen_connections]
+
+[indexterm2 asio.indexterm.socket_base.max_listen_connections..max_listen_connections..socket_base] 
+The maximum length of the queue of pending incoming connections. 
+
+
+  static const int max_listen_connections = implementation_defined;
+
+
+
+[endsect]
+
+
+
 [section:message_do_not_route socket_base::message_do_not_route]
 
-[indexterm2 message_do_not_route..socket_base] 
+[indexterm2 asio.indexterm.socket_base.message_do_not_route..message_do_not_route..socket_base] 
 Specify that the data should not be subject to routing. 
 
 
@@ -110633,7 +96334,7 @@
 
 [section:message_end_of_record socket_base::message_end_of_record]
 
-[indexterm2 message_end_of_record..socket_base] 
+[indexterm2 asio.indexterm.socket_base.message_end_of_record..message_end_of_record..socket_base] 
 Specifies that the data marks the end of a record. 
 
 
@@ -110647,7 +96348,7 @@
 
 [section:message_flags socket_base::message_flags]
 
-[indexterm2 message_flags..socket_base] 
+[indexterm2 asio.indexterm.socket_base.message_flags..message_flags..socket_base] 
 Bitmask type for flags that can be passed to send and receive operations. 
 
 
@@ -110668,7 +96369,7 @@
 
 [section:message_out_of_band socket_base::message_out_of_band]
 
-[indexterm2 message_out_of_band..socket_base] 
+[indexterm2 asio.indexterm.socket_base.message_out_of_band..message_out_of_band..socket_base] 
 Process out-of-band data. 
 
 
@@ -110682,7 +96383,7 @@
 
 [section:message_peek socket_base::message_peek]
 
-[indexterm2 message_peek..socket_base] 
+[indexterm2 asio.indexterm.socket_base.message_peek..message_peek..socket_base] 
 Peek at incoming data without removing it from the input queue. 
 
 
@@ -110696,7 +96397,7 @@
 
 [section:receive_buffer_size socket_base::receive_buffer_size]
 
-[indexterm2 receive_buffer_size..socket_base] 
+[indexterm2 asio.indexterm.socket_base.receive_buffer_size..receive_buffer_size..socket_base] 
 Socket option for the receive buffer size of a socket. 
 
 
@@ -110747,7 +96448,7 @@
 
 [section:receive_low_watermark socket_base::receive_low_watermark]
 
-[indexterm2 receive_low_watermark..socket_base] 
+[indexterm2 asio.indexterm.socket_base.receive_low_watermark..receive_low_watermark..socket_base] 
 Socket option for the receive low watermark. 
 
 
@@ -110798,7 +96499,7 @@
 
 [section:reuse_address socket_base::reuse_address]
 
-[indexterm2 reuse_address..socket_base] 
+[indexterm2 asio.indexterm.socket_base.reuse_address..reuse_address..socket_base] 
 Socket option to allow the socket to be bound to an address that is already in use. 
 
 
@@ -110849,7 +96550,7 @@
 
 [section:send_buffer_size socket_base::send_buffer_size]
 
-[indexterm2 send_buffer_size..socket_base] 
+[indexterm2 asio.indexterm.socket_base.send_buffer_size..send_buffer_size..socket_base] 
 Socket option for the send buffer size of a socket. 
 
 
@@ -110900,7 +96601,7 @@
 
 [section:send_low_watermark socket_base::send_low_watermark]
 
-[indexterm2 send_low_watermark..socket_base] 
+[indexterm2 asio.indexterm.socket_base.send_low_watermark..send_low_watermark..socket_base] 
 Socket option for the send low watermark. 
 
 
@@ -110951,15 +96652,15 @@
 
 [section:shutdown_type socket_base::shutdown_type]
 
-[indexterm2 shutdown_type..socket_base] 
+[indexterm2 asio.indexterm.socket_base.shutdown_type..shutdown_type..socket_base] 
 Different ways a socket may be shutdown. 
 
 
   enum shutdown_type
 
-[indexterm2 shutdown_receive..socket_base]
-[indexterm2 shutdown_send..socket_base]
-[indexterm2 shutdown_both..socket_base]
+[indexterm2 asio.indexterm.socket_base.shutdown_type.shutdown_receive..shutdown_receive..socket_base]
+[indexterm2 asio.indexterm.socket_base.shutdown_type.shutdown_send..shutdown_send..socket_base]
+[indexterm2 asio.indexterm.socket_base.shutdown_type.shutdown_both..shutdown_both..socket_base]
 
 [heading Values]
 [variablelist
@@ -110989,15 +96690,15 @@
 
 [section:wait_type socket_base::wait_type]
 
-[indexterm2 wait_type..socket_base] 
+[indexterm2 asio.indexterm.socket_base.wait_type..wait_type..socket_base] 
 Wait types. 
 
 
   enum wait_type
 
-[indexterm2 wait_read..socket_base]
-[indexterm2 wait_write..socket_base]
-[indexterm2 wait_error..socket_base]
+[indexterm2 asio.indexterm.socket_base.wait_type.wait_read..wait_read..socket_base]
+[indexterm2 asio.indexterm.socket_base.wait_type.wait_write..wait_write..socket_base]
+[indexterm2 asio.indexterm.socket_base.wait_type.wait_error..wait_error..socket_base]
 
 [heading Values]
 [variablelist
@@ -111029,7 +96730,7 @@
 
 [section:_socket_base socket_base::~socket_base]
 
-[indexterm2 ~socket_base..socket_base] 
+[indexterm2 asio.indexterm.socket_base._socket_base..~socket_base..socket_base] 
 Protected destructor to prevent deletion through this type. 
 
 
@@ -111045,7 +96746,7 @@
 
 [section:spawn spawn]
 
-[indexterm1 spawn] 
+[indexterm1 asio.indexterm.spawn..spawn] 
 Start a new stackful coroutine. 
 
       
@@ -111680,7 +97381,7 @@
 
 [section:add_certificate_authority ssl::context::add_certificate_authority]
 
-[indexterm2 add_certificate_authority..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.add_certificate_authority..add_certificate_authority..ssl::context] 
 Add certification authority for performing verification. 
 
 
@@ -111688,7 +97389,7 @@
       const const_buffer & ca);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.add_certificate_authority.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.add_certificate_authority.overload2 add_certificate_authority]``(
+  void ``[link asio.reference.ssl__context.add_certificate_authority.overload2 add_certificate_authority]``(
       const const_buffer & ca,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.add_certificate_authority.overload2 more...]]``
@@ -111744,7 +97445,7 @@
 Add certification authority for performing verification. 
 
 
-  asio::error_code add_certificate_authority(
+  void add_certificate_authority(
       const const_buffer & ca,
       asio::error_code & ec);
 
@@ -111778,7 +97479,7 @@
 
 [section:add_verify_path ssl::context::add_verify_path]
 
-[indexterm2 add_verify_path..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.add_verify_path..add_verify_path..ssl::context] 
 Add a directory containing certificate authority files to be used for performing verification. 
 
 
@@ -111786,7 +97487,7 @@
       const std::string & path);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.add_verify_path.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.add_verify_path.overload2 add_verify_path]``(
+  void ``[link asio.reference.ssl__context.add_verify_path.overload2 add_verify_path]``(
       const std::string & path,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.add_verify_path.overload2 more...]]``
@@ -111842,7 +97543,7 @@
 Add a directory containing certificate authority files to be used for performing verification. 
 
 
-  asio::error_code add_verify_path(
+  void add_verify_path(
       const std::string & path,
       asio::error_code & ec);
 
@@ -111876,7 +97577,7 @@
 
 [section:clear_options ssl::context::clear_options]
 
-[indexterm2 clear_options..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.clear_options..clear_options..ssl::context] 
 Clear options on the context. 
 
 
@@ -111884,7 +97585,7 @@
       options o);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.clear_options.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.clear_options.overload2 clear_options]``(
+  void ``[link asio.reference.ssl__context.clear_options.overload2 clear_options]``(
       options o,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.clear_options.overload2 more...]]``
@@ -111940,7 +97641,7 @@
 Clear options on the context. 
 
 
-  asio::error_code clear_options(
+  void clear_options(
       options o,
       asio::error_code & ec);
 
@@ -111974,7 +97675,7 @@
 
 [section:context ssl::context::context]
 
-[indexterm2 context..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.context..context..ssl::context] 
 Constructor. 
 
 
@@ -112049,7 +97750,7 @@
 
 [section:default_workarounds ssl::context::default_workarounds]
 
-[indexterm2 default_workarounds..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.default_workarounds..default_workarounds..ssl::context] 
 Implement various bug workarounds. 
 
 
@@ -112063,14 +97764,14 @@
 
 [section:file_format ssl::context::file_format]
 
-[indexterm2 file_format..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.file_format..file_format..ssl::context] 
 File format types. 
 
 
   enum file_format
 
-[indexterm2 asn1..ssl::context]
-[indexterm2 pem..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.file_format.asn1..asn1..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.file_format.pem..pem..ssl::context]
 
 [heading Values]
 [variablelist
@@ -112094,7 +97795,7 @@
 
 [section:load_verify_file ssl::context::load_verify_file]
 
-[indexterm2 load_verify_file..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.load_verify_file..load_verify_file..ssl::context] 
 Load a certification authority file for performing verification. 
 
 
@@ -112102,7 +97803,7 @@
       const std::string & filename);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.load_verify_file.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.load_verify_file.overload2 load_verify_file]``(
+  void ``[link asio.reference.ssl__context.load_verify_file.overload2 load_verify_file]``(
       const std::string & filename,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.load_verify_file.overload2 more...]]``
@@ -112158,7 +97859,7 @@
 Load a certification authority file for performing verification. 
 
 
-  asio::error_code load_verify_file(
+  void load_verify_file(
       const std::string & filename,
       asio::error_code & ec);
 
@@ -112193,30 +97894,30 @@
 
 [section:method ssl::context::method]
 
-[indexterm2 method..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.method..method..ssl::context] 
 Different methods supported by a context. 
 
 
   enum method
 
-[indexterm2 sslv2..ssl::context]
-[indexterm2 sslv2_client..ssl::context]
-[indexterm2 sslv2_server..ssl::context]
-[indexterm2 sslv3..ssl::context]
-[indexterm2 sslv3_client..ssl::context]
-[indexterm2 sslv3_server..ssl::context]
-[indexterm2 tlsv1..ssl::context]
-[indexterm2 tlsv1_client..ssl::context]
-[indexterm2 tlsv1_server..ssl::context]
-[indexterm2 sslv23..ssl::context]
-[indexterm2 sslv23_client..ssl::context]
-[indexterm2 sslv23_server..ssl::context]
-[indexterm2 tlsv11..ssl::context]
-[indexterm2 tlsv11_client..ssl::context]
-[indexterm2 tlsv11_server..ssl::context]
-[indexterm2 tlsv12..ssl::context]
-[indexterm2 tlsv12_client..ssl::context]
-[indexterm2 tlsv12_server..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.sslv2..sslv2..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.sslv2_client..sslv2_client..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.sslv2_server..sslv2_server..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.sslv3..sslv3..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.sslv3_client..sslv3_client..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.sslv3_server..sslv3_server..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.tlsv1..tlsv1..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.tlsv1_client..tlsv1_client..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.tlsv1_server..tlsv1_server..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.sslv23..sslv23..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.sslv23_client..sslv23_client..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.sslv23_server..sslv23_server..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.tlsv11..tlsv11..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.tlsv11_client..tlsv11_client..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.tlsv11_server..tlsv11_server..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.tlsv12..tlsv12..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.tlsv12_client..tlsv12_client..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.method.tlsv12_server..tlsv12_server..ssl::context]
 
 [heading Values]
 [variablelist
@@ -112321,7 +98022,7 @@
 
 [section:native_handle ssl::context::native_handle]
 
-[indexterm2 native_handle..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.native_handle..native_handle..ssl::context] 
 Get the underlying implementation in the native type. 
 
 
@@ -112337,7 +98038,7 @@
 
 [section:native_handle_type ssl::context::native_handle_type]
 
-[indexterm2 native_handle_type..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.native_handle_type..native_handle_type..ssl::context] 
 The native handle type of the SSL context. 
 
 
@@ -112358,7 +98059,7 @@
 
 [section:no_compression ssl::context::no_compression]
 
-[indexterm2 no_compression..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.no_compression..no_compression..ssl::context] 
 Disable compression. Compression is disabled by default. 
 
 
@@ -112372,7 +98073,7 @@
 
 [section:no_sslv2 ssl::context::no_sslv2]
 
-[indexterm2 no_sslv2..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.no_sslv2..no_sslv2..ssl::context] 
 Disable SSL v2. 
 
 
@@ -112386,7 +98087,7 @@
 
 [section:no_sslv3 ssl::context::no_sslv3]
 
-[indexterm2 no_sslv3..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.no_sslv3..no_sslv3..ssl::context] 
 Disable SSL v3. 
 
 
@@ -112400,7 +98101,7 @@
 
 [section:no_tlsv1 ssl::context::no_tlsv1]
 
-[indexterm2 no_tlsv1..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.no_tlsv1..no_tlsv1..ssl::context] 
 Disable TLS v1. 
 
 
@@ -112414,7 +98115,7 @@
 
 [section:no_tlsv1_1 ssl::context::no_tlsv1_1]
 
-[indexterm2 no_tlsv1_1..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.no_tlsv1_1..no_tlsv1_1..ssl::context] 
 Disable TLS v1.1. 
 
 
@@ -112428,7 +98129,7 @@
 
 [section:no_tlsv1_2 ssl::context::no_tlsv1_2]
 
-[indexterm2 no_tlsv1_2..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.no_tlsv1_2..no_tlsv1_2..ssl::context] 
 Disable TLS v1.2. 
 
 
@@ -112442,7 +98143,7 @@
 
 [section:operator_eq_ ssl::context::operator=]
 
-[indexterm2 operator=..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.operator_eq_..operator=..ssl::context] 
 Move-assign a context from another. 
 
 
@@ -112481,7 +98182,7 @@
 
 [section:options ssl::context::options]
 
-[indexterm2 options..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.options..options..ssl::context] 
 Bitmask type for SSL options. 
 
 
@@ -112502,14 +98203,14 @@
 
 [section:password_purpose ssl::context::password_purpose]
 
-[indexterm2 password_purpose..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.password_purpose..password_purpose..ssl::context] 
 Purpose of PEM password. 
 
 
   enum password_purpose
 
-[indexterm2 for_reading..ssl::context]
-[indexterm2 for_writing..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.password_purpose.for_reading..for_reading..ssl::context]
+[indexterm2 asio.indexterm.ssl__context.password_purpose.for_writing..for_writing..ssl::context]
 
 [heading Values]
 [variablelist
@@ -112533,14 +98234,14 @@
 
 [section:set_default_verify_paths ssl::context::set_default_verify_paths]
 
-[indexterm2 set_default_verify_paths..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.set_default_verify_paths..set_default_verify_paths..ssl::context] 
 Configures the context to use the default directories for finding certification authority certificates. 
 
 
   void ``[link asio.reference.ssl__context.set_default_verify_paths.overload1 set_default_verify_paths]``();
   ``  [''''&raquo;''' [link asio.reference.ssl__context.set_default_verify_paths.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.set_default_verify_paths.overload2 set_default_verify_paths]``(
+  void ``[link asio.reference.ssl__context.set_default_verify_paths.overload2 set_default_verify_paths]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.set_default_verify_paths.overload2 more...]]``
 
@@ -112584,7 +98285,7 @@
 Configures the context to use the default directories for finding certification authority certificates. 
 
 
-  asio::error_code set_default_verify_paths(
+  void set_default_verify_paths(
       asio::error_code & ec);
 
 
@@ -112615,7 +98316,7 @@
 
 [section:set_options ssl::context::set_options]
 
-[indexterm2 set_options..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.set_options..set_options..ssl::context] 
 Set options on the context. 
 
 
@@ -112623,7 +98324,7 @@
       options o);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.set_options.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.set_options.overload2 set_options]``(
+  void ``[link asio.reference.ssl__context.set_options.overload2 set_options]``(
       options o,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.set_options.overload2 more...]]``
@@ -112679,7 +98380,7 @@
 Set options on the context. 
 
 
-  asio::error_code set_options(
+  void set_options(
       options o,
       asio::error_code & ec);
 
@@ -112713,7 +98414,7 @@
 
 [section:set_password_callback ssl::context::set_password_callback]
 
-[indexterm2 set_password_callback..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.set_password_callback..set_password_callback..ssl::context] 
 Set the password callback. 
 
 
@@ -112725,7 +98426,7 @@
 
   template<
       typename PasswordCallback>
-  asio::error_code ``[link asio.reference.ssl__context.set_password_callback.overload2 set_password_callback]``(
+  void ``[link asio.reference.ssl__context.set_password_callback.overload2 set_password_callback]``(
       PasswordCallback callback,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.set_password_callback.overload2 more...]]``
@@ -112792,7 +98493,7 @@
 
   template<
       typename PasswordCallback>
-  asio::error_code set_password_callback(
+  void set_password_callback(
       PasswordCallback callback,
       asio::error_code & ec);
 
@@ -112833,7 +98534,7 @@
 
 [section:set_verify_callback ssl::context::set_verify_callback]
 
-[indexterm2 set_verify_callback..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.set_verify_callback..set_verify_callback..ssl::context] 
 Set the callback used to verify peer certificates. 
 
 
@@ -112845,7 +98546,7 @@
 
   template<
       typename VerifyCallback>
-  asio::error_code ``[link asio.reference.ssl__context.set_verify_callback.overload2 set_verify_callback]``(
+  void ``[link asio.reference.ssl__context.set_verify_callback.overload2 set_verify_callback]``(
       VerifyCallback callback,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.set_verify_callback.overload2 more...]]``
@@ -112912,7 +98613,7 @@
 
   template<
       typename VerifyCallback>
-  asio::error_code set_verify_callback(
+  void set_verify_callback(
       VerifyCallback callback,
       asio::error_code & ec);
 
@@ -112953,7 +98654,7 @@
 
 [section:set_verify_depth ssl::context::set_verify_depth]
 
-[indexterm2 set_verify_depth..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.set_verify_depth..set_verify_depth..ssl::context] 
 Set the peer verification depth. 
 
 
@@ -112961,7 +98662,7 @@
       int depth);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.set_verify_depth.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.set_verify_depth.overload2 set_verify_depth]``(
+  void ``[link asio.reference.ssl__context.set_verify_depth.overload2 set_verify_depth]``(
       int depth,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.set_verify_depth.overload2 more...]]``
@@ -113017,7 +98718,7 @@
 Set the peer verification depth. 
 
 
-  asio::error_code set_verify_depth(
+  void set_verify_depth(
       int depth,
       asio::error_code & ec);
 
@@ -113051,7 +98752,7 @@
 
 [section:set_verify_mode ssl::context::set_verify_mode]
 
-[indexterm2 set_verify_mode..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.set_verify_mode..set_verify_mode..ssl::context] 
 Set the peer verification mode. 
 
 
@@ -113059,7 +98760,7 @@
       verify_mode v);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.set_verify_mode.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.set_verify_mode.overload2 set_verify_mode]``(
+  void ``[link asio.reference.ssl__context.set_verify_mode.overload2 set_verify_mode]``(
       verify_mode v,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.set_verify_mode.overload2 more...]]``
@@ -113115,7 +98816,7 @@
 Set the peer verification mode. 
 
 
-  asio::error_code set_verify_mode(
+  void set_verify_mode(
       verify_mode v,
       asio::error_code & ec);
 
@@ -113150,7 +98851,7 @@
 
 [section:single_dh_use ssl::context::single_dh_use]
 
-[indexterm2 single_dh_use..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.single_dh_use..single_dh_use..ssl::context] 
 Always create a new key when using tmp\_dh parameters. 
 
 
@@ -113163,7 +98864,7 @@
 
 [section:use_certificate ssl::context::use_certificate]
 
-[indexterm2 use_certificate..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.use_certificate..use_certificate..ssl::context] 
 Use a certificate from a memory buffer. 
 
 
@@ -113172,7 +98873,7 @@
       file_format format);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_certificate.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.use_certificate.overload2 use_certificate]``(
+  void ``[link asio.reference.ssl__context.use_certificate.overload2 use_certificate]``(
       const const_buffer & certificate,
       file_format format,
       asio::error_code & ec);
@@ -113232,7 +98933,7 @@
 Use a certificate from a memory buffer. 
 
 
-  asio::error_code use_certificate(
+  void use_certificate(
       const const_buffer & certificate,
       file_format format,
       asio::error_code & ec);
@@ -113269,7 +98970,7 @@
 
 [section:use_certificate_chain ssl::context::use_certificate_chain]
 
-[indexterm2 use_certificate_chain..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.use_certificate_chain..use_certificate_chain..ssl::context] 
 Use a certificate chain from a memory buffer. 
 
 
@@ -113277,7 +98978,7 @@
       const const_buffer & chain);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_certificate_chain.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.use_certificate_chain.overload2 use_certificate_chain]``(
+  void ``[link asio.reference.ssl__context.use_certificate_chain.overload2 use_certificate_chain]``(
       const const_buffer & chain,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_certificate_chain.overload2 more...]]``
@@ -113333,7 +99034,7 @@
 Use a certificate chain from a memory buffer. 
 
 
-  asio::error_code use_certificate_chain(
+  void use_certificate_chain(
       const const_buffer & chain,
       asio::error_code & ec);
 
@@ -113367,7 +99068,7 @@
 
 [section:use_certificate_chain_file ssl::context::use_certificate_chain_file]
 
-[indexterm2 use_certificate_chain_file..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.use_certificate_chain_file..use_certificate_chain_file..ssl::context] 
 Use a certificate chain from a file. 
 
 
@@ -113375,7 +99076,7 @@
       const std::string & filename);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_certificate_chain_file.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.use_certificate_chain_file.overload2 use_certificate_chain_file]``(
+  void ``[link asio.reference.ssl__context.use_certificate_chain_file.overload2 use_certificate_chain_file]``(
       const std::string & filename,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_certificate_chain_file.overload2 more...]]``
@@ -113431,7 +99132,7 @@
 Use a certificate chain from a file. 
 
 
-  asio::error_code use_certificate_chain_file(
+  void use_certificate_chain_file(
       const std::string & filename,
       asio::error_code & ec);
 
@@ -113465,7 +99166,7 @@
 
 [section:use_certificate_file ssl::context::use_certificate_file]
 
-[indexterm2 use_certificate_file..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.use_certificate_file..use_certificate_file..ssl::context] 
 Use a certificate from a file. 
 
 
@@ -113474,7 +99175,7 @@
       file_format format);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_certificate_file.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.use_certificate_file.overload2 use_certificate_file]``(
+  void ``[link asio.reference.ssl__context.use_certificate_file.overload2 use_certificate_file]``(
       const std::string & filename,
       file_format format,
       asio::error_code & ec);
@@ -113534,7 +99235,7 @@
 Use a certificate from a file. 
 
 
-  asio::error_code use_certificate_file(
+  void use_certificate_file(
       const std::string & filename,
       file_format format,
       asio::error_code & ec);
@@ -113571,7 +99272,7 @@
 
 [section:use_private_key ssl::context::use_private_key]
 
-[indexterm2 use_private_key..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.use_private_key..use_private_key..ssl::context] 
 Use a private key from a memory buffer. 
 
 
@@ -113580,7 +99281,7 @@
       file_format format);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_private_key.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.use_private_key.overload2 use_private_key]``(
+  void ``[link asio.reference.ssl__context.use_private_key.overload2 use_private_key]``(
       const const_buffer & private_key,
       file_format format,
       asio::error_code & ec);
@@ -113640,7 +99341,7 @@
 Use a private key from a memory buffer. 
 
 
-  asio::error_code use_private_key(
+  void use_private_key(
       const const_buffer & private_key,
       file_format format,
       asio::error_code & ec);
@@ -113677,7 +99378,7 @@
 
 [section:use_private_key_file ssl::context::use_private_key_file]
 
-[indexterm2 use_private_key_file..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.use_private_key_file..use_private_key_file..ssl::context] 
 Use a private key from a file. 
 
 
@@ -113686,7 +99387,7 @@
       file_format format);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_private_key_file.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.use_private_key_file.overload2 use_private_key_file]``(
+  void ``[link asio.reference.ssl__context.use_private_key_file.overload2 use_private_key_file]``(
       const std::string & filename,
       file_format format,
       asio::error_code & ec);
@@ -113746,7 +99447,7 @@
 Use a private key from a file. 
 
 
-  asio::error_code use_private_key_file(
+  void use_private_key_file(
       const std::string & filename,
       file_format format,
       asio::error_code & ec);
@@ -113783,7 +99484,7 @@
 
 [section:use_rsa_private_key ssl::context::use_rsa_private_key]
 
-[indexterm2 use_rsa_private_key..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.use_rsa_private_key..use_rsa_private_key..ssl::context] 
 Use an RSA private key from a memory buffer. 
 
 
@@ -113792,7 +99493,7 @@
       file_format format);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_rsa_private_key.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.use_rsa_private_key.overload2 use_rsa_private_key]``(
+  void ``[link asio.reference.ssl__context.use_rsa_private_key.overload2 use_rsa_private_key]``(
       const const_buffer & private_key,
       file_format format,
       asio::error_code & ec);
@@ -113852,7 +99553,7 @@
 Use an RSA private key from a memory buffer. 
 
 
-  asio::error_code use_rsa_private_key(
+  void use_rsa_private_key(
       const const_buffer & private_key,
       file_format format,
       asio::error_code & ec);
@@ -113889,7 +99590,7 @@
 
 [section:use_rsa_private_key_file ssl::context::use_rsa_private_key_file]
 
-[indexterm2 use_rsa_private_key_file..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.use_rsa_private_key_file..use_rsa_private_key_file..ssl::context] 
 Use an RSA private key from a file. 
 
 
@@ -113898,7 +99599,7 @@
       file_format format);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_rsa_private_key_file.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.use_rsa_private_key_file.overload2 use_rsa_private_key_file]``(
+  void ``[link asio.reference.ssl__context.use_rsa_private_key_file.overload2 use_rsa_private_key_file]``(
       const std::string & filename,
       file_format format,
       asio::error_code & ec);
@@ -113958,7 +99659,7 @@
 Use an RSA private key from a file. 
 
 
-  asio::error_code use_rsa_private_key_file(
+  void use_rsa_private_key_file(
       const std::string & filename,
       file_format format,
       asio::error_code & ec);
@@ -113995,7 +99696,7 @@
 
 [section:use_tmp_dh ssl::context::use_tmp_dh]
 
-[indexterm2 use_tmp_dh..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.use_tmp_dh..use_tmp_dh..ssl::context] 
 Use the specified memory buffer to obtain the temporary Diffie-Hellman parameters. 
 
 
@@ -114003,7 +99704,7 @@
       const const_buffer & dh);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_tmp_dh.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.use_tmp_dh.overload2 use_tmp_dh]``(
+  void ``[link asio.reference.ssl__context.use_tmp_dh.overload2 use_tmp_dh]``(
       const const_buffer & dh,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_tmp_dh.overload2 more...]]``
@@ -114059,7 +99760,7 @@
 Use the specified memory buffer to obtain the temporary Diffie-Hellman parameters. 
 
 
-  asio::error_code use_tmp_dh(
+  void use_tmp_dh(
       const const_buffer & dh,
       asio::error_code & ec);
 
@@ -114093,7 +99794,7 @@
 
 [section:use_tmp_dh_file ssl::context::use_tmp_dh_file]
 
-[indexterm2 use_tmp_dh_file..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context.use_tmp_dh_file..use_tmp_dh_file..ssl::context] 
 Use the specified file to obtain the temporary Diffie-Hellman parameters. 
 
 
@@ -114101,7 +99802,7 @@
       const std::string & filename);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_tmp_dh_file.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__context.use_tmp_dh_file.overload2 use_tmp_dh_file]``(
+  void ``[link asio.reference.ssl__context.use_tmp_dh_file.overload2 use_tmp_dh_file]``(
       const std::string & filename,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__context.use_tmp_dh_file.overload2 more...]]``
@@ -114157,7 +99858,7 @@
 Use the specified file to obtain the temporary Diffie-Hellman parameters. 
 
 
-  asio::error_code use_tmp_dh_file(
+  void use_tmp_dh_file(
       const std::string & filename,
       asio::error_code & ec);
 
@@ -114192,7 +99893,7 @@
 
 [section:_context ssl::context::~context]
 
-[indexterm2 ~context..ssl::context] 
+[indexterm2 asio.indexterm.ssl__context._context..~context..ssl::context] 
 Destructor. 
 
 
@@ -114315,7 +100016,7 @@
 
 [section:default_workarounds ssl::context_base::default_workarounds]
 
-[indexterm2 default_workarounds..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base.default_workarounds..default_workarounds..ssl::context_base] 
 Implement various bug workarounds. 
 
 
@@ -114329,14 +100030,14 @@
 
 [section:file_format ssl::context_base::file_format]
 
-[indexterm2 file_format..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base.file_format..file_format..ssl::context_base] 
 File format types. 
 
 
   enum file_format
 
-[indexterm2 asn1..ssl::context_base]
-[indexterm2 pem..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.file_format.asn1..asn1..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.file_format.pem..pem..ssl::context_base]
 
 [heading Values]
 [variablelist
@@ -114361,30 +100062,30 @@
 
 [section:method ssl::context_base::method]
 
-[indexterm2 method..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base.method..method..ssl::context_base] 
 Different methods supported by a context. 
 
 
   enum method
 
-[indexterm2 sslv2..ssl::context_base]
-[indexterm2 sslv2_client..ssl::context_base]
-[indexterm2 sslv2_server..ssl::context_base]
-[indexterm2 sslv3..ssl::context_base]
-[indexterm2 sslv3_client..ssl::context_base]
-[indexterm2 sslv3_server..ssl::context_base]
-[indexterm2 tlsv1..ssl::context_base]
-[indexterm2 tlsv1_client..ssl::context_base]
-[indexterm2 tlsv1_server..ssl::context_base]
-[indexterm2 sslv23..ssl::context_base]
-[indexterm2 sslv23_client..ssl::context_base]
-[indexterm2 sslv23_server..ssl::context_base]
-[indexterm2 tlsv11..ssl::context_base]
-[indexterm2 tlsv11_client..ssl::context_base]
-[indexterm2 tlsv11_server..ssl::context_base]
-[indexterm2 tlsv12..ssl::context_base]
-[indexterm2 tlsv12_client..ssl::context_base]
-[indexterm2 tlsv12_server..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.sslv2..sslv2..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.sslv2_client..sslv2_client..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.sslv2_server..sslv2_server..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.sslv3..sslv3..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.sslv3_client..sslv3_client..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.sslv3_server..sslv3_server..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.tlsv1..tlsv1..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.tlsv1_client..tlsv1_client..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.tlsv1_server..tlsv1_server..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.sslv23..sslv23..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.sslv23_client..sslv23_client..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.sslv23_server..sslv23_server..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.tlsv11..tlsv11..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.tlsv11_client..tlsv11_client..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.tlsv11_server..tlsv11_server..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.tlsv12..tlsv12..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.tlsv12_client..tlsv12_client..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.method.tlsv12_server..tlsv12_server..ssl::context_base]
 
 [heading Values]
 [variablelist
@@ -114489,7 +100190,7 @@
 
 [section:no_compression ssl::context_base::no_compression]
 
-[indexterm2 no_compression..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base.no_compression..no_compression..ssl::context_base] 
 Disable compression. Compression is disabled by default. 
 
 
@@ -114503,7 +100204,7 @@
 
 [section:no_sslv2 ssl::context_base::no_sslv2]
 
-[indexterm2 no_sslv2..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base.no_sslv2..no_sslv2..ssl::context_base] 
 Disable SSL v2. 
 
 
@@ -114517,7 +100218,7 @@
 
 [section:no_sslv3 ssl::context_base::no_sslv3]
 
-[indexterm2 no_sslv3..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base.no_sslv3..no_sslv3..ssl::context_base] 
 Disable SSL v3. 
 
 
@@ -114531,7 +100232,7 @@
 
 [section:no_tlsv1 ssl::context_base::no_tlsv1]
 
-[indexterm2 no_tlsv1..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base.no_tlsv1..no_tlsv1..ssl::context_base] 
 Disable TLS v1. 
 
 
@@ -114545,7 +100246,7 @@
 
 [section:no_tlsv1_1 ssl::context_base::no_tlsv1_1]
 
-[indexterm2 no_tlsv1_1..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base.no_tlsv1_1..no_tlsv1_1..ssl::context_base] 
 Disable TLS v1.1. 
 
 
@@ -114559,7 +100260,7 @@
 
 [section:no_tlsv1_2 ssl::context_base::no_tlsv1_2]
 
-[indexterm2 no_tlsv1_2..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base.no_tlsv1_2..no_tlsv1_2..ssl::context_base] 
 Disable TLS v1.2. 
 
 
@@ -114573,7 +100274,7 @@
 
 [section:options ssl::context_base::options]
 
-[indexterm2 options..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base.options..options..ssl::context_base] 
 Bitmask type for SSL options. 
 
 
@@ -114594,14 +100295,14 @@
 
 [section:password_purpose ssl::context_base::password_purpose]
 
-[indexterm2 password_purpose..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base.password_purpose..password_purpose..ssl::context_base] 
 Purpose of PEM password. 
 
 
   enum password_purpose
 
-[indexterm2 for_reading..ssl::context_base]
-[indexterm2 for_writing..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.password_purpose.for_reading..for_reading..ssl::context_base]
+[indexterm2 asio.indexterm.ssl__context_base.password_purpose.for_writing..for_writing..ssl::context_base]
 
 [heading Values]
 [variablelist
@@ -114626,7 +100327,7 @@
 
 [section:single_dh_use ssl::context_base::single_dh_use]
 
-[indexterm2 single_dh_use..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base.single_dh_use..single_dh_use..ssl::context_base] 
 Always create a new key when using tmp\_dh parameters. 
 
 
@@ -114640,7 +100341,7 @@
 
 [section:_context_base ssl::context_base::~context_base]
 
-[indexterm2 ~context_base..ssl::context_base] 
+[indexterm2 asio.indexterm.ssl__context_base._context_base..~context_base..ssl::context_base] 
 Protected destructor to prevent deletion through this type. 
 
 
@@ -114654,6 +100355,91 @@
 
 [endsect]
 
+
+[section:ssl__error__get_stream_category ssl::error::get_stream_category]
+
+[indexterm1 asio.indexterm.ssl__error__get_stream_category..ssl::error::get_stream_category] 
+
+  const asio::error_category & get_stream_category();
+
+
+[heading Requirements]
+
+['Header: ][^asio/ssl/error.hpp]
+
+['Convenience header: ][^asio/ssl.hpp]
+
+
+[endsect]
+
+
+
+[section:ssl__error__make_error_code ssl::error::make_error_code]
+
+[indexterm1 asio.indexterm.ssl__error__make_error_code..ssl::error::make_error_code] 
+
+  asio::error_code make_error_code(
+      stream_errors e);
+
+
+[heading Requirements]
+
+['Header: ][^asio/ssl/error.hpp]
+
+['Convenience header: ][^asio/ssl.hpp]
+
+
+[endsect]
+
+
+
+[section:ssl__error__stream_category ssl::error::stream_category]
+
+[indexterm1 asio.indexterm.ssl__error__stream_category..ssl::error::stream_category] 
+
+  static const asio::error_category & stream_category = asio::ssl::error::get_stream_category();
+
+
+[heading Requirements]
+
+['Header: ][^asio/ssl/error.hpp]
+
+['Convenience header: ][^asio/ssl.hpp]
+
+
+[endsect]
+
+
+
+[section:ssl__error__stream_errors ssl::error::stream_errors]
+
+[indexterm1 asio.indexterm.ssl__error__stream_errors..ssl::error::stream_errors] 
+
+  enum stream_errors
+
+[indexterm2 asio.indexterm.ssl__error__stream_errors.stream_truncated..stream_truncated..ssl::error::stream_errors]
+
+[heading Values]
+[variablelist
+
+  [
+    [stream_truncated]
+    [The underlying stream closed before the ssl stream gracefully shut down. ]
+  ]
+
+]
+
+
+[heading Requirements]
+
+['Header: ][^asio/ssl/error.hpp]
+
+['Convenience header: ][^asio/ssl.hpp]
+
+
+[endsect]
+
+
 [section:ssl__rfc2818_verification ssl::rfc2818_verification]
 
 
@@ -114734,7 +100520,7 @@
 
 [section:operator_lp__rp_ ssl::rfc2818_verification::operator()]
 
-[indexterm2 operator()..ssl::rfc2818_verification] 
+[indexterm2 asio.indexterm.ssl__rfc2818_verification.operator_lp__rp_..operator()..ssl::rfc2818_verification] 
 Perform certificate verification. 
 
 
@@ -114750,7 +100536,7 @@
 
 [section:result_type ssl::rfc2818_verification::result_type]
 
-[indexterm2 result_type..ssl::rfc2818_verification] 
+[indexterm2 asio.indexterm.ssl__rfc2818_verification.result_type..result_type..ssl::rfc2818_verification] 
 The type of the function object's result. 
 
 
@@ -114771,7 +100557,7 @@
 
 [section:rfc2818_verification ssl::rfc2818_verification::rfc2818_verification]
 
-[indexterm2 rfc2818_verification..ssl::rfc2818_verification] 
+[indexterm2 asio.indexterm.ssl__rfc2818_verification.rfc2818_verification..rfc2818_verification..ssl::rfc2818_verification] 
 Constructor. 
 
 
@@ -114812,6 +100598,13 @@
 
   [
 
+    [[link asio.reference.ssl__stream.executor_type [*executor_type]]]
+    [The type of the executor associated with the object. ]
+  
+  ]
+
+  [
+
     [[link asio.reference.ssl__stream.handshake_type [*handshake_type]]]
     [Different handshake types. ]
   
@@ -114865,8 +100658,18 @@
   ]
   
   [
+    [[link asio.reference.ssl__stream.get_executor [*get_executor]]]
+    [Get the executor associated with the object. ]
+  ]
+  
+  [
     [[link asio.reference.ssl__stream.get_io_context [*get_io_context]]]
-    [Get the io_context associated with the object. ]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.ssl__stream.get_io_service [*get_io_service]]]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
@@ -114963,13 +100766,13 @@
 
 [section:async_handshake ssl::stream::async_handshake]
 
-[indexterm2 async_handshake..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.async_handshake..async_handshake..ssl::stream] 
 Start an asynchronous SSL handshake. 
 
 
   template<
       typename ``[link asio.reference.HandshakeHandler HandshakeHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.ssl__stream.async_handshake.overload1 async_handshake]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ssl__stream.async_handshake.overload1 async_handshake]``(
       handshake_type type,
       HandshakeHandler && handler);
   ``  [''''&raquo;''' [link asio.reference.ssl__stream.async_handshake.overload1 more...]]``
@@ -114977,7 +100780,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.BufferedHandshakeHandler BufferedHandshakeHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` ``[link asio.reference.ssl__stream.async_handshake.overload2 async_handshake]``(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ssl__stream.async_handshake.overload2 async_handshake]``(
       handshake_type type,
       const ConstBufferSequence & buffers,
       BufferedHandshakeHandler && handler);
@@ -114992,7 +100795,7 @@
 
   template<
       typename ``[link asio.reference.HandshakeHandler HandshakeHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_handshake(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_handshake(
       handshake_type type,
       HandshakeHandler && handler);
 
@@ -115033,7 +100836,7 @@
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.BufferedHandshakeHandler BufferedHandshakeHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_handshake(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_handshake(
       handshake_type type,
       const ConstBufferSequence & buffers,
       BufferedHandshakeHandler && handler);
@@ -115073,14 +100876,14 @@
 
 [section:async_read_some ssl::stream::async_read_some]
 
-[indexterm2 async_read_some..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.async_read_some..async_read_some..ssl::stream] 
 Start an asynchronous read. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
       const MutableBufferSequence & buffers,
       ReadHandler && handler);
 
@@ -115120,13 +100923,13 @@
 
 [section:async_shutdown ssl::stream::async_shutdown]
 
-[indexterm2 async_shutdown..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.async_shutdown..async_shutdown..ssl::stream] 
 Asynchronously shut down SSL on the stream. 
 
 
   template<
       typename ``[link asio.reference.ShutdownHandler ShutdownHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_shutdown(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_shutdown(
       ShutdownHandler && handler);
 
 
@@ -115157,14 +100960,14 @@
 
 [section:async_write_some ssl::stream::async_write_some]
 
-[indexterm2 async_write_some..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.async_write_some..async_write_some..ssl::stream] 
 Start an asynchronous write. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some(
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
       const ConstBufferSequence & buffers,
       WriteHandler && handler);
 
@@ -115202,22 +101005,71 @@
 
 
 
+[section:executor_type ssl::stream::executor_type]
+
+[indexterm2 asio.indexterm.ssl__stream.executor_type..executor_type..ssl::stream] 
+The type of the executor associated with the object. 
+
+
+  typedef lowest_layer_type::executor_type executor_type;
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/ssl/stream.hpp]
+
+['Convenience header: ][^asio/ssl.hpp]
+
+
+[endsect]
+
+
+
+[section:get_executor ssl::stream::get_executor]
+
+[indexterm2 asio.indexterm.ssl__stream.get_executor..get_executor..ssl::stream] 
+Get the executor associated with the object. 
+
+
+  executor_type get_executor();
+
+
+This function may be used to obtain the executor object that the stream uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+      
+A copy of the executor that stream will use to dispatch handlers. 
+
+
+
+
+[endsect]
+
+
+
 [section:get_io_context ssl::stream::get_io_context]
 
-[indexterm2 get_io_context..ssl::stream] 
-Get the [link asio.reference.io_context `io_context`] associated with the object. 
+[indexterm2 asio.indexterm.ssl__stream.get_io_context..get_io_context..ssl::stream] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
   asio::io_context & get_io_context();
 
 
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the stream uses to dispatch handlers for asynchronous operations.
+
+[endsect]
 
 
-[heading Return Value]
-      
-A reference to the [link asio.reference.io_context `io_context`] object that stream will use to dispatch handlers. Ownership is not transferred to the caller. 
 
+[section:get_io_service ssl::stream::get_io_service]
+
+[indexterm2 asio.indexterm.ssl__stream.get_io_service..get_io_service..ssl::stream] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
+
+
+  asio::io_context & get_io_service();
 
 
 
@@ -115226,7 +101078,7 @@
 
 [section:handshake ssl::stream::handshake]
 
-[indexterm2 handshake..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.handshake..handshake..ssl::stream] 
 Perform SSL handshaking. 
 
 
@@ -115234,7 +101086,7 @@
       handshake_type type);
   ``  [''''&raquo;''' [link asio.reference.ssl__stream.handshake.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__stream.handshake.overload2 handshake]``(
+  void ``[link asio.reference.ssl__stream.handshake.overload2 handshake]``(
       handshake_type type,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__stream.handshake.overload2 more...]]``
@@ -115248,7 +101100,7 @@
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  asio::error_code ``[link asio.reference.ssl__stream.handshake.overload4 handshake]``(
+  void ``[link asio.reference.ssl__stream.handshake.overload4 handshake]``(
       handshake_type type,
       const ConstBufferSequence & buffers,
       asio::error_code & ec);
@@ -115300,7 +101152,7 @@
 Perform SSL handshaking. 
 
 
-  asio::error_code handshake(
+  void handshake(
       handshake_type type,
       asio::error_code & ec);
 
@@ -115378,7 +101230,7 @@
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  asio::error_code handshake(
+  void handshake(
       handshake_type type,
       const ConstBufferSequence & buffers,
       asio::error_code & ec);
@@ -115411,14 +101263,14 @@
 
 [section:handshake_type ssl::stream::handshake_type]
 
-[indexterm2 handshake_type..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.handshake_type..handshake_type..ssl::stream] 
 Different handshake types. 
 
 
   enum handshake_type
 
-[indexterm2 client..ssl::stream]
-[indexterm2 server..ssl::stream]
+[indexterm2 asio.indexterm.ssl__stream.handshake_type.client..client..ssl::stream]
+[indexterm2 asio.indexterm.ssl__stream.handshake_type.server..server..ssl::stream]
 
 [heading Values]
 [variablelist
@@ -115442,7 +101294,7 @@
 
 [section:lowest_layer ssl::stream::lowest_layer]
 
-[indexterm2 lowest_layer..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.lowest_layer..lowest_layer..ssl::stream] 
 Get a reference to the lowest layer. 
 
 
@@ -115503,7 +101355,7 @@
 
 [section:lowest_layer_type ssl::stream::lowest_layer_type]
 
-[indexterm2 lowest_layer_type..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.lowest_layer_type..lowest_layer_type..ssl::stream] 
 The type of the lowest layer. 
 
 
@@ -115524,7 +101376,7 @@
 
 [section:native_handle ssl::stream::native_handle]
 
-[indexterm2 native_handle..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.native_handle..native_handle..ssl::stream] 
 Get the underlying implementation in the native type. 
 
 
@@ -115562,7 +101414,7 @@
 
 [section:native_handle_type ssl::stream::native_handle_type]
 
-[indexterm2 native_handle_type..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.native_handle_type..native_handle_type..ssl::stream] 
 The native handle type of the SSL stream. 
 
 
@@ -115582,7 +101434,7 @@
 
 [section:next_layer ssl::stream::next_layer]
 
-[indexterm2 next_layer..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.next_layer..next_layer..ssl::stream] 
 Get a reference to the next layer. 
 
 
@@ -115643,7 +101495,7 @@
 
 [section:next_layer_type ssl::stream::next_layer_type]
 
-[indexterm2 next_layer_type..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.next_layer_type..next_layer_type..ssl::stream] 
 The type of the next layer. 
 
 
@@ -115663,7 +101515,7 @@
 
 [section:read_some ssl::stream::read_some]
 
-[indexterm2 read_some..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.read_some..read_some..ssl::stream] 
 Read some data from the stream. 
 
 
@@ -115779,7 +101631,7 @@
 
 [section:set_verify_callback ssl::stream::set_verify_callback]
 
-[indexterm2 set_verify_callback..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.set_verify_callback..set_verify_callback..ssl::stream] 
 Set the callback used to verify peer certificates. 
 
 
@@ -115791,7 +101643,7 @@
 
   template<
       typename VerifyCallback>
-  asio::error_code ``[link asio.reference.ssl__stream.set_verify_callback.overload2 set_verify_callback]``(
+  void ``[link asio.reference.ssl__stream.set_verify_callback.overload2 set_verify_callback]``(
       VerifyCallback callback,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__stream.set_verify_callback.overload2 more...]]``
@@ -115858,7 +101710,7 @@
 
   template<
       typename VerifyCallback>
-  asio::error_code set_verify_callback(
+  void set_verify_callback(
       VerifyCallback callback,
       asio::error_code & ec);
 
@@ -115899,7 +101751,7 @@
 
 [section:set_verify_depth ssl::stream::set_verify_depth]
 
-[indexterm2 set_verify_depth..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.set_verify_depth..set_verify_depth..ssl::stream] 
 Set the peer verification depth. 
 
 
@@ -115907,7 +101759,7 @@
       int depth);
   ``  [''''&raquo;''' [link asio.reference.ssl__stream.set_verify_depth.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__stream.set_verify_depth.overload2 set_verify_depth]``(
+  void ``[link asio.reference.ssl__stream.set_verify_depth.overload2 set_verify_depth]``(
       int depth,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__stream.set_verify_depth.overload2 more...]]``
@@ -115963,7 +101815,7 @@
 Set the peer verification depth. 
 
 
-  asio::error_code set_verify_depth(
+  void set_verify_depth(
       int depth,
       asio::error_code & ec);
 
@@ -115997,7 +101849,7 @@
 
 [section:set_verify_mode ssl::stream::set_verify_mode]
 
-[indexterm2 set_verify_mode..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.set_verify_mode..set_verify_mode..ssl::stream] 
 Set the peer verification mode. 
 
 
@@ -116005,7 +101857,7 @@
       verify_mode v);
   ``  [''''&raquo;''' [link asio.reference.ssl__stream.set_verify_mode.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__stream.set_verify_mode.overload2 set_verify_mode]``(
+  void ``[link asio.reference.ssl__stream.set_verify_mode.overload2 set_verify_mode]``(
       verify_mode v,
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__stream.set_verify_mode.overload2 more...]]``
@@ -116061,7 +101913,7 @@
 Set the peer verification mode. 
 
 
-  asio::error_code set_verify_mode(
+  void set_verify_mode(
       verify_mode v,
       asio::error_code & ec);
 
@@ -116095,14 +101947,14 @@
 
 [section:shutdown ssl::stream::shutdown]
 
-[indexterm2 shutdown..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.shutdown..shutdown..ssl::stream] 
 Shut down SSL on the stream. 
 
 
   void ``[link asio.reference.ssl__stream.shutdown.overload1 shutdown]``();
   ``  [''''&raquo;''' [link asio.reference.ssl__stream.shutdown.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.ssl__stream.shutdown.overload2 shutdown]``(
+  void ``[link asio.reference.ssl__stream.shutdown.overload2 shutdown]``(
       asio::error_code & ec);
   ``  [''''&raquo;''' [link asio.reference.ssl__stream.shutdown.overload2 more...]]``
 
@@ -116141,7 +101993,7 @@
 Shut down SSL on the stream. 
 
 
-  asio::error_code shutdown(
+  void shutdown(
       asio::error_code & ec);
 
 
@@ -116168,7 +102020,7 @@
 
 [section:stream ssl::stream::stream]
 
-[indexterm2 stream..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.stream..stream..ssl::stream] 
 Construct a stream. 
 
 
@@ -116201,7 +102053,7 @@
 
 [section:write_some ssl::stream::write_some]
 
-[indexterm2 write_some..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream.write_some..write_some..ssl::stream] 
 Write some data to the stream. 
 
 
@@ -116318,7 +102170,7 @@
 
 [section:_stream ssl::stream::~stream]
 
-[indexterm2 ~stream..ssl::stream] 
+[indexterm2 asio.indexterm.ssl__stream._stream..~stream..ssl::stream] 
 Destructor. 
 
 
@@ -116326,6 +102178,13 @@
 
 
 
+[heading Remarks]
+      
+A `stream` object must not be destroyed while there are pending asynchronous operations associated with it. 
+
+
+
+
 [endsect]
 
 
@@ -116361,7 +102220,7 @@
 
 [section:ssl ssl::stream::impl_struct::ssl]
 
-[indexterm2 ssl..ssl::stream::impl_struct] 
+[indexterm2 asio.indexterm.ssl__stream__impl_struct.ssl..ssl..ssl::stream::impl_struct] 
 
   SSL * ssl;
 
@@ -116415,14 +102274,14 @@
 
 [section:handshake_type ssl::stream_base::handshake_type]
 
-[indexterm2 handshake_type..ssl::stream_base] 
+[indexterm2 asio.indexterm.ssl__stream_base.handshake_type..handshake_type..ssl::stream_base] 
 Different handshake types. 
 
 
   enum handshake_type
 
-[indexterm2 client..ssl::stream_base]
-[indexterm2 server..ssl::stream_base]
+[indexterm2 asio.indexterm.ssl__stream_base.handshake_type.client..client..ssl::stream_base]
+[indexterm2 asio.indexterm.ssl__stream_base.handshake_type.server..server..ssl::stream_base]
 
 [heading Values]
 [variablelist
@@ -116447,7 +102306,7 @@
 
 [section:_stream_base ssl::stream_base::~stream_base]
 
-[indexterm2 ~stream_base..ssl::stream_base] 
+[indexterm2 asio.indexterm.ssl__stream_base._stream_base..~stream_base..ssl::stream_base] 
 Protected destructor to prevent deletion through this type. 
 
 
@@ -116464,7 +102323,7 @@
 
 [section:ssl__verify_client_once ssl::verify_client_once]
 
-[indexterm1 ssl::verify_client_once] 
+[indexterm1 asio.indexterm.ssl__verify_client_once..ssl::verify_client_once] 
 Do not request client certificate on renegotiation. Ignored unless [link asio.reference.ssl__verify_peer `ssl::verify_peer`]  is set. 
 
 
@@ -116536,7 +102395,7 @@
 
 [section:native_handle ssl::verify_context::native_handle]
 
-[indexterm2 native_handle..ssl::verify_context] 
+[indexterm2 asio.indexterm.ssl__verify_context.native_handle..native_handle..ssl::verify_context] 
 Get the underlying implementation in the native type. 
 
 
@@ -116552,7 +102411,7 @@
 
 [section:native_handle_type ssl::verify_context::native_handle_type]
 
-[indexterm2 native_handle_type..ssl::verify_context] 
+[indexterm2 asio.indexterm.ssl__verify_context.native_handle_type..native_handle_type..ssl::verify_context] 
 The native handle type of the verification context. 
 
 
@@ -116573,7 +102432,7 @@
 
 [section:verify_context ssl::verify_context::verify_context]
 
-[indexterm2 verify_context..ssl::verify_context] 
+[indexterm2 asio.indexterm.ssl__verify_context.verify_context..verify_context..ssl::verify_context] 
 Constructor. 
 
 
@@ -116591,7 +102450,7 @@
 
 [section:ssl__verify_fail_if_no_peer_cert ssl::verify_fail_if_no_peer_cert]
 
-[indexterm1 ssl::verify_fail_if_no_peer_cert] 
+[indexterm1 asio.indexterm.ssl__verify_fail_if_no_peer_cert..ssl::verify_fail_if_no_peer_cert] 
 Fail verification if the peer has no certificate. Ignored unless [link asio.reference.ssl__verify_peer `ssl::verify_peer`]  is set. 
 
 
@@ -116611,7 +102470,7 @@
 
 [section:ssl__verify_mode ssl::verify_mode]
 
-[indexterm1 ssl::verify_mode] 
+[indexterm1 asio.indexterm.ssl__verify_mode..ssl::verify_mode] 
 Bitmask type for peer verification. 
 
 
@@ -116645,7 +102504,7 @@
 
 [section:ssl__verify_none ssl::verify_none]
 
-[indexterm1 ssl::verify_none] 
+[indexterm1 asio.indexterm.ssl__verify_none..ssl::verify_none] 
 No verification. 
 
 
@@ -116665,7 +102524,7 @@
 
 [section:ssl__verify_peer ssl::verify_peer]
 
-[indexterm1 ssl::verify_peer] 
+[indexterm1 asio.indexterm.ssl__verify_peer..ssl::verify_peer] 
 Verify the peer. 
 
 
@@ -116685,7 +102544,7 @@
 
 [section:steady_timer steady_timer]
 
-[indexterm1 steady_timer] 
+[indexterm1 asio.indexterm.steady_timer..steady_timer] 
 Typedef for a timer based on the steady clock. 
 
 
@@ -116719,20 +102578,6 @@
 
   [
 
-    [[link asio.reference.basic_waitable_timer.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_waitable_timer.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_waitable_timer.time_point [*time_point]]]
     [The time point type of the clock. ]
   
@@ -116769,12 +102614,16 @@
   
   [
     [[link asio.reference.basic_waitable_timer.cancel [*cancel]]]
-    [Cancel any asynchronous operations that are waiting on the timer. ]
+    [Cancel any asynchronous operations that are waiting on the timer. 
+
+     (Deprecated: Use non-error_code overload.) Cancel any asynchronous operations that are waiting on the timer. ]
   ]
   
   [
     [[link asio.reference.basic_waitable_timer.cancel_one [*cancel_one]]]
-    [Cancels one asynchronous operation that is waiting on the timer. ]
+    [Cancels one asynchronous operation that is waiting on the timer. 
+
+     (Deprecated: Use non-error_code overload.) Cancels one asynchronous operation that is waiting on the timer. ]
   ]
   
   [
@@ -116786,7 +102635,9 @@
     [[link asio.reference.basic_waitable_timer.expires_at [*expires_at]]]
     [(Deprecated: Use expiry().) Get the timer's expiry time as an absolute time. 
 
-     Set the timer's expiry time as an absolute time. ]
+     Set the timer's expiry time as an absolute time. 
+
+     (Deprecated: Use non-error_code overload.) Set the timer's expiry time as an absolute time. ]
   ]
   
   [
@@ -116826,20 +102677,9 @@
     [Perform a blocking wait on the timer. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_waitable_timer.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_waitable_timer.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_waitable_timer._basic_waitable_timer [*~basic_waitable_timer]]]
+    [Destroys the timer. ]
   ]
   
 ]
@@ -117087,7 +102927,7 @@
 
 [section:context strand::context]
 
-[indexterm2 context..strand] 
+[indexterm2 asio.indexterm.strand.context..context..strand] 
 Obtain the underlying execution context. 
 
 
@@ -117101,7 +102941,7 @@
 
 [section:defer strand::defer]
 
-[indexterm2 defer..strand] 
+[indexterm2 asio.indexterm.strand.defer..defer..strand] 
 Request the strand to invoke the given function object. 
 
 
@@ -117140,7 +102980,7 @@
 
 [section:dispatch strand::dispatch]
 
-[indexterm2 dispatch..strand] 
+[indexterm2 asio.indexterm.strand.dispatch..dispatch..strand] 
 Request the strand to invoke the given function object. 
 
 
@@ -117179,7 +103019,7 @@
 
 [section:get_inner_executor strand::get_inner_executor]
 
-[indexterm2 get_inner_executor..strand] 
+[indexterm2 asio.indexterm.strand.get_inner_executor..get_inner_executor..strand] 
 Obtain the underlying executor. 
 
 
@@ -117193,7 +103033,7 @@
 
 [section:inner_executor_type strand::inner_executor_type]
 
-[indexterm2 inner_executor_type..strand] 
+[indexterm2 asio.indexterm.strand.inner_executor_type..inner_executor_type..strand] 
 The type of the underlying executor. 
 
 
@@ -117214,7 +103054,7 @@
 
 [section:on_work_finished strand::on_work_finished]
 
-[indexterm2 on_work_finished..strand] 
+[indexterm2 asio.indexterm.strand.on_work_finished..on_work_finished..strand] 
 Inform the strand that some work is no longer outstanding. 
 
 
@@ -117230,7 +103070,7 @@
 
 [section:on_work_started strand::on_work_started]
 
-[indexterm2 on_work_started..strand] 
+[indexterm2 asio.indexterm.strand.on_work_started..on_work_started..strand] 
 Inform the strand that it has some outstanding work to do. 
 
 
@@ -117246,7 +103086,7 @@
 
 [section:operator_not__eq_ strand::operator!=]
 
-[indexterm2 operator!=..strand] 
+[indexterm2 asio.indexterm.strand.operator_not__eq_..operator!=..strand] 
 Compare two strands for inequality. 
 
 
@@ -117269,7 +103109,7 @@
 
 [section:operator_eq_ strand::operator=]
 
-[indexterm2 operator=..strand] 
+[indexterm2 asio.indexterm.strand.operator_eq_..operator=..strand] 
 Assignment operator. 
 
 
@@ -117378,7 +103218,7 @@
 
 [section:operator_eq__eq_ strand::operator==]
 
-[indexterm2 operator==..strand] 
+[indexterm2 asio.indexterm.strand.operator_eq__eq_..operator==..strand] 
 Compare two strands for equality. 
 
 
@@ -117402,7 +103242,7 @@
 
 [section:post strand::post]
 
-[indexterm2 post..strand] 
+[indexterm2 asio.indexterm.strand.post..post..strand] 
 Request the strand to invoke the given function object. 
 
 
@@ -117441,7 +103281,7 @@
 
 [section:running_in_this_thread strand::running_in_this_thread]
 
-[indexterm2 running_in_this_thread..strand] 
+[indexterm2 asio.indexterm.strand.running_in_this_thread..running_in_this_thread..strand] 
 Determine whether the strand is running in the current thread. 
 
 
@@ -117461,7 +103301,7 @@
 
 [section:strand strand::strand]
 
-[indexterm2 strand..strand] 
+[indexterm2 asio.indexterm.strand.strand..strand..strand] 
 Default constructor. 
 
 
@@ -117616,7 +103456,7 @@
 
 [section:_strand strand::~strand]
 
-[indexterm2 ~strand..strand] 
+[indexterm2 asio.indexterm.strand._strand..~strand..strand] 
 Destructor. 
 
 
@@ -117630,994 +103470,10 @@
 
 [endsect]
 
-[section:stream_socket_service stream_socket_service]
-
-
-Default service implementation for a stream socket. 
-
-
-  template<
-      typename ``[link asio.reference.Protocol Protocol]``>
-  class stream_socket_service :
-    public io_context::service
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.stream_socket_service.endpoint_type [*endpoint_type]]]
-    [The endpoint type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.stream_socket_service.implementation_type [*implementation_type]]]
-    [The type of a stream socket implementation. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.stream_socket_service.native_handle_type [*native_handle_type]]]
-    [The native socket type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.stream_socket_service.protocol_type [*protocol_type]]]
-    [The protocol type. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.stream_socket_service.assign [*assign]]]
-    [Assign an existing native socket to a stream socket. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.async_connect [*async_connect]]]
-    [Start an asynchronous connect. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.async_receive [*async_receive]]]
-    [Start an asynchronous receive. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.async_send [*async_send]]]
-    [Start an asynchronous send. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.async_wait [*async_wait]]]
-    [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.at_mark [*at_mark]]]
-    [Determine whether the socket is at the out-of-band data mark. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.available [*available]]]
-    [Determine the number of bytes available for reading. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.bind [*bind]]]
-    [Bind the stream socket to the specified local endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.close [*close]]]
-    [Close a stream socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.connect [*connect]]]
-    [Connect the stream socket to the specified endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.construct [*construct]]]
-    [Construct a new stream socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.converting_move_construct [*converting_move_construct]]]
-    [Move-construct a new stream socket implementation from another protocol type. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.destroy [*destroy]]]
-    [Destroy a stream socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.get_option [*get_option]]]
-    [Get a socket option. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.io_control [*io_control]]]
-    [Perform an IO control command on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.is_open [*is_open]]]
-    [Determine whether the socket is open. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.local_endpoint [*local_endpoint]]]
-    [Get the local endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.move_assign [*move_assign]]]
-    [Move-assign from another stream socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.move_construct [*move_construct]]]
-    [Move-construct a new stream socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.native_handle [*native_handle]]]
-    [Get the native socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.native_non_blocking [*native_non_blocking]]]
-    [Gets the non-blocking mode of the native socket implementation. 
-
-     Sets the non-blocking mode of the native socket implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.non_blocking [*non_blocking]]]
-    [Gets the non-blocking mode of the socket. 
-
-     Sets the non-blocking mode of the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.open [*open]]]
-    [Open a stream socket. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.receive [*receive]]]
-    [Receive some data from the peer. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.remote_endpoint [*remote_endpoint]]]
-    [Get the remote endpoint. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.send [*send]]]
-    [Send the given data to the peer. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.set_option [*set_option]]]
-    [Set a socket option. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.shutdown [*shutdown]]]
-    [Disable sends or receives on the socket. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.stream_socket_service [*stream_socket_service]]]
-    [Construct a new stream socket service for the specified io_context. ]
-  ]
-  
-  [
-    [[link asio.reference.stream_socket_service.wait [*wait]]]
-    [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.stream_socket_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/stream_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:assign stream_socket_service::assign]
-
-[indexterm2 assign..stream_socket_service] 
-Assign an existing native socket to a stream socket. 
-
-
-  asio::error_code assign(
-      implementation_type & impl,
-      const protocol_type & protocol,
-      const native_handle_type & native_socket,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:async_connect stream_socket_service::async_connect]
-
-[indexterm2 async_connect..stream_socket_service] 
-Start an asynchronous connect. 
-
-
-  template<
-      typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_connect(
-      implementation_type & impl,
-      const endpoint_type & peer_endpoint,
-      ConnectHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_receive stream_socket_service::async_receive]
-
-[indexterm2 async_receive..stream_socket_service] 
-Start an asynchronous receive. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_receive(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      socket_base::message_flags flags,
-      ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_send stream_socket_service::async_send]
-
-[indexterm2 async_send..stream_socket_service] 
-Start an asynchronous send. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_send(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      socket_base::message_flags flags,
-      WriteHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_wait stream_socket_service::async_wait]
-
-[indexterm2 async_wait..stream_socket_service] 
-Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  template<
-      typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      implementation_type & impl,
-      socket_base::wait_type w,
-      WaitHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:at_mark stream_socket_service::at_mark]
-
-[indexterm2 at_mark..stream_socket_service] 
-Determine whether the socket is at the out-of-band data mark. 
-
-
-  bool at_mark(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:available stream_socket_service::available]
-
-[indexterm2 available..stream_socket_service] 
-Determine the number of bytes available for reading. 
-
-
-  std::size_t available(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:bind stream_socket_service::bind]
-
-[indexterm2 bind..stream_socket_service] 
-Bind the stream socket to the specified local endpoint. 
-
-
-  asio::error_code bind(
-      implementation_type & impl,
-      const endpoint_type & endpoint,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:cancel stream_socket_service::cancel]
-
-[indexterm2 cancel..stream_socket_service] 
-Cancel all asynchronous operations associated with the socket. 
-
-
-  asio::error_code cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:close stream_socket_service::close]
-
-[indexterm2 close..stream_socket_service] 
-Close a stream socket implementation. 
-
-
-  asio::error_code close(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:connect stream_socket_service::connect]
-
-[indexterm2 connect..stream_socket_service] 
-Connect the stream socket to the specified endpoint. 
-
-
-  asio::error_code connect(
-      implementation_type & impl,
-      const endpoint_type & peer_endpoint,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct stream_socket_service::construct]
-
-[indexterm2 construct..stream_socket_service] 
-Construct a new stream socket implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:converting_move_construct stream_socket_service::converting_move_construct]
-
-[indexterm2 converting_move_construct..stream_socket_service] 
-Move-construct a new stream socket implementation from another protocol type. 
-
-
-  template<
-      typename ``[link asio.reference.Protocol Protocol1]``>
-  void converting_move_construct(
-      implementation_type & impl,
-      typename stream_socket_service< Protocol1 >::implementation_type & other_impl,
-      typename enable_if< is_convertible< Protocol1, Protocol >::value >::type *  = 0);
-
-
-
-[endsect]
-
-
-
-[section:destroy stream_socket_service::destroy]
-
-[indexterm2 destroy..stream_socket_service] 
-Destroy a stream socket implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:endpoint_type stream_socket_service::endpoint_type]
-
-[indexterm2 endpoint_type..stream_socket_service] 
-The endpoint type. 
-
-
-  typedef Protocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/stream_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_io_context stream_socket_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..stream_socket_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service stream_socket_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..stream_socket_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:get_option stream_socket_service::get_option]
-
-[indexterm2 get_option..stream_socket_service] 
-Get a socket option. 
-
-
-  template<
-      typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
-  asio::error_code get_option(
-      const implementation_type & impl,
-      GettableSocketOption & option,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:id stream_socket_service::id]
-
-[indexterm2 id..stream_socket_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type stream_socket_service::implementation_type]
-
-[indexterm2 implementation_type..stream_socket_service] 
-The type of a stream socket implementation. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/stream_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:io_control stream_socket_service::io_control]
-
-[indexterm2 io_control..stream_socket_service] 
-Perform an IO control command on the socket. 
-
-
-  template<
-      typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
-  asio::error_code io_control(
-      implementation_type & impl,
-      IoControlCommand & command,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:is_open stream_socket_service::is_open]
-
-[indexterm2 is_open..stream_socket_service] 
-Determine whether the socket is open. 
-
-
-  bool is_open(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:local_endpoint stream_socket_service::local_endpoint]
-
-[indexterm2 local_endpoint..stream_socket_service] 
-Get the local endpoint. 
-
-
-  endpoint_type local_endpoint(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:move_assign stream_socket_service::move_assign]
-
-[indexterm2 move_assign..stream_socket_service] 
-Move-assign from another stream socket implementation. 
-
-
-  void move_assign(
-      implementation_type & impl,
-      stream_socket_service & other_service,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:move_construct stream_socket_service::move_construct]
-
-[indexterm2 move_construct..stream_socket_service] 
-Move-construct a new stream socket implementation. 
-
-
-  void move_construct(
-      implementation_type & impl,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle stream_socket_service::native_handle]
-
-[indexterm2 native_handle..stream_socket_service] 
-Get the native socket implementation. 
-
-
-  native_handle_type native_handle(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle_type stream_socket_service::native_handle_type]
-
-[indexterm2 native_handle_type..stream_socket_service] 
-The native socket type. 
-
-
-  typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/stream_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking stream_socket_service::native_non_blocking]
-
-[indexterm2 native_non_blocking..stream_socket_service] 
-Gets the non-blocking mode of the native socket implementation. 
-
-
-  bool ``[link asio.reference.stream_socket_service.native_non_blocking.overload1 native_non_blocking]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.stream_socket_service.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native socket implementation. 
-
-
-  asio::error_code ``[link asio.reference.stream_socket_service.native_non_blocking.overload2 native_non_blocking]``(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.stream_socket_service.native_non_blocking.overload2 more...]]``
-
-
-[section:overload1 stream_socket_service::native_non_blocking (1 of 2 overloads)]
-
-
-Gets the non-blocking mode of the native socket implementation. 
-
-
-  bool native_non_blocking(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 stream_socket_service::native_non_blocking (2 of 2 overloads)]
-
-
-Sets the non-blocking mode of the native socket implementation. 
-
-
-  asio::error_code native_non_blocking(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking stream_socket_service::non_blocking]
-
-[indexterm2 non_blocking..stream_socket_service] 
-Gets the non-blocking mode of the socket. 
-
-
-  bool ``[link asio.reference.stream_socket_service.non_blocking.overload1 non_blocking]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.stream_socket_service.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the socket. 
-
-
-  asio::error_code ``[link asio.reference.stream_socket_service.non_blocking.overload2 non_blocking]``(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.stream_socket_service.non_blocking.overload2 more...]]``
-
-
-[section:overload1 stream_socket_service::non_blocking (1 of 2 overloads)]
-
-
-Gets the non-blocking mode of the socket. 
-
-
-  bool non_blocking(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 stream_socket_service::non_blocking (2 of 2 overloads)]
-
-
-Sets the non-blocking mode of the socket. 
-
-
-  asio::error_code non_blocking(
-      implementation_type & impl,
-      bool mode,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:open stream_socket_service::open]
-
-[indexterm2 open..stream_socket_service] 
-Open a stream socket. 
-
-
-  asio::error_code open(
-      implementation_type & impl,
-      const protocol_type & protocol,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:protocol_type stream_socket_service::protocol_type]
-
-[indexterm2 protocol_type..stream_socket_service] 
-The protocol type. 
-
-
-  typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/stream_socket_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:receive stream_socket_service::receive]
-
-[indexterm2 receive..stream_socket_service] 
-Receive some data from the peer. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t receive(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      socket_base::message_flags flags,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:remote_endpoint stream_socket_service::remote_endpoint]
-
-[indexterm2 remote_endpoint..stream_socket_service] 
-Get the remote endpoint. 
-
-
-  endpoint_type remote_endpoint(
-      const implementation_type & impl,
-      asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:send stream_socket_service::send]
-
-[indexterm2 send..stream_socket_service] 
-Send the given data to the peer. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t send(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      socket_base::message_flags flags,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:set_option stream_socket_service::set_option]
-
-[indexterm2 set_option..stream_socket_service] 
-Set a socket option. 
-
-
-  template<
-      typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
-  asio::error_code set_option(
-      implementation_type & impl,
-      const SettableSocketOption & option,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:shutdown stream_socket_service::shutdown]
-
-[indexterm2 shutdown..stream_socket_service] 
-Disable sends or receives on the socket. 
-
-
-  asio::error_code shutdown(
-      implementation_type & impl,
-      socket_base::shutdown_type what,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:stream_socket_service stream_socket_service::stream_socket_service]
-
-[indexterm2 stream_socket_service..stream_socket_service] 
-Construct a new stream socket service for the specified [link asio.reference.io_context `io_context`]. 
-
-
-  stream_socket_service(
-      asio::io_context & io_context);
-
-
-
-[endsect]
-
-
-
-[section:wait stream_socket_service::wait]
-
-[indexterm2 wait..stream_socket_service] 
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions. 
-
-
-  asio::error_code wait(
-      implementation_type & impl,
-      socket_base::wait_type w,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
 
 [section:streambuf streambuf]
 
-[indexterm1 streambuf] 
+[indexterm1 asio.indexterm.streambuf..streambuf] 
 Typedef for the typical usage of [link asio.reference.basic_streambuf `basic_streambuf`]. 
 
 
@@ -118783,7 +103639,7 @@
 
 [section:system_category system_category]
 
-[indexterm1 system_category] 
+[indexterm1 asio.indexterm.system_category..system_category] 
 Returns the error category used for the system errors produced by asio. 
 
 
@@ -118854,7 +103710,7 @@
 
 [section:code system_error::code]
 
-[indexterm2 code..system_error] 
+[indexterm2 asio.indexterm.system_error.code..code..system_error] 
 Get the error code associated with the exception. 
 
 
@@ -118868,7 +103724,7 @@
 
 [section:operator_eq_ system_error::operator=]
 
-[indexterm2 operator=..system_error] 
+[indexterm2 asio.indexterm.system_error.operator_eq_..operator=..system_error] 
 Assignment operator. 
 
 
@@ -118882,7 +103738,7 @@
 
 [section:system_error system_error::system_error]
 
-[indexterm2 system_error..system_error] 
+[indexterm2 asio.indexterm.system_error.system_error..system_error..system_error] 
 Construct with an error code. 
 
 
@@ -118958,7 +103814,7 @@
 
 [section:what system_error::what]
 
-[indexterm2 what..system_error] 
+[indexterm2 asio.indexterm.system_error.what..what..system_error] 
 Get a string representation of the exception. 
 
 
@@ -118972,7 +103828,7 @@
 
 [section:_system_error system_error::~system_error]
 
-[indexterm2 ~system_error..system_error] 
+[indexterm2 asio.indexterm.system_error._system_error..~system_error..system_error] 
 Destructor. 
 
 
@@ -118999,13 +103855,6 @@
 [table
   [[Name][Description]]
 
-  [
-
-    [[link asio.reference.system_executor__thread_function [*thread_function]]]
-    []
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -119071,11 +103920,11 @@
 
 [section:context system_executor::context]
 
-[indexterm2 context..system_executor] 
+[indexterm2 asio.indexterm.system_executor.context..context..system_executor] 
 Obtain the underlying execution context. 
 
 
-  execution_context & context();
+  execution_context & context() const;
 
 
 
@@ -119085,7 +103934,7 @@
 
 [section:defer system_executor::defer]
 
-[indexterm2 defer..system_executor] 
+[indexterm2 asio.indexterm.system_executor.defer..defer..system_executor] 
 Request the system executor to invoke the given function object. 
 
 
@@ -119094,7 +103943,7 @@
       typename Allocator>
   void defer(
       Function && f,
-      const Allocator & a);
+      const Allocator & a) const;
 
 
 This function is used to ask the executor to execute the given function object. The function object will never be executed inside this function. Instead, it will be scheduled to run on an unspecified system thread pool.
@@ -119124,7 +103973,7 @@
 
 [section:dispatch system_executor::dispatch]
 
-[indexterm2 dispatch..system_executor] 
+[indexterm2 asio.indexterm.system_executor.dispatch..dispatch..system_executor] 
 Request the system executor to invoke the given function object. 
 
 
@@ -119133,7 +103982,7 @@
       typename Allocator>
   void dispatch(
       Function && f,
-      const Allocator & a);
+      const Allocator & a) const;
 
 
 This function is used to ask the executor to execute the given function object. The function object will always be executed inside this function.
@@ -119163,11 +104012,11 @@
 
 [section:on_work_finished system_executor::on_work_finished]
 
-[indexterm2 on_work_finished..system_executor] 
+[indexterm2 asio.indexterm.system_executor.on_work_finished..on_work_finished..system_executor] 
 Inform the executor that some work is no longer outstanding. 
 
 
-  void on_work_finished();
+  void on_work_finished() const;
 
 
 For the system executor, this is a no-op. 
@@ -119179,11 +104028,11 @@
 
 [section:on_work_started system_executor::on_work_started]
 
-[indexterm2 on_work_started..system_executor] 
+[indexterm2 asio.indexterm.system_executor.on_work_started..on_work_started..system_executor] 
 Inform the executor that it has some outstanding work to do. 
 
 
-  void on_work_started();
+  void on_work_started() const;
 
 
 For the system executor, this is a no-op. 
@@ -119195,7 +104044,7 @@
 
 [section:operator_not__eq_ system_executor::operator!=]
 
-[indexterm2 operator!=..system_executor] 
+[indexterm2 asio.indexterm.system_executor.operator_not__eq_..operator!=..system_executor] 
 Compare two executors for inequality. 
 
 
@@ -119219,7 +104068,7 @@
 
 [section:operator_eq__eq_ system_executor::operator==]
 
-[indexterm2 operator==..system_executor] 
+[indexterm2 asio.indexterm.system_executor.operator_eq__eq_..operator==..system_executor] 
 Compare two executors for equality. 
 
 
@@ -119243,7 +104092,7 @@
 
 [section:post system_executor::post]
 
-[indexterm2 post..system_executor] 
+[indexterm2 asio.indexterm.system_executor.post..post..system_executor] 
 Request the system executor to invoke the given function object. 
 
 
@@ -119252,7 +104101,7 @@
       typename Allocator>
   void post(
       Function && f,
-      const Allocator & a);
+      const Allocator & a) const;
 
 
 This function is used to ask the executor to execute the given function object. The function object will never be executed inside this function. Instead, it will be scheduled to run on an unspecified system thread pool.
@@ -119282,660 +104131,10 @@
 
 [endsect]
 
-[section:system_executor__context_impl system_executor::context_impl]
-
-
-
-  struct context_impl :
-    public execution_context
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.system_executor__context_impl.fork_event [*fork_event]]]
-    [Fork-related event notifications. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.system_executor__context_impl.context_impl [*context_impl]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.system_executor__context_impl.notify_fork [*notify_fork]]]
-    [Notify the execution_context of a fork-related event. ]
-  ]
-  
-  [
-    [[link asio.reference.system_executor__context_impl._context_impl [*~context_impl]]]
-    []
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.system_executor__context_impl.destroy_context [*destroy_context]]]
-    [Destroys all services in the context. ]
-  ]
-  
-  [
-    [[link asio.reference.system_executor__context_impl.shutdown_context [*shutdown_context]]]
-    [Shuts down all services in the context. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.system_executor__context_impl.scheduler_ [*scheduler_]]]
-    []
-  ]
-
-  [
-    [[link asio.reference.system_executor__context_impl.threads_ [*threads_]]]
-    []
-  ]
-
-]
-
-[heading Friends]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.system_executor__context_impl.add_service [*add_service]]]
-    [(Deprecated: Use make_service().) Add a service object to the execution_context. ]
-  ]
-  
-  [
-    [[link asio.reference.system_executor__context_impl.has_service [*has_service]]]
-    [Determine if an execution_context contains a specified service type. ]
-  ]
-  
-  [
-    [[link asio.reference.system_executor__context_impl.make_service [*make_service]]]
-    [Creates a service object and adds it to the execution_context. ]
-  ]
-  
-  [
-    [[link asio.reference.system_executor__context_impl.use_service [*use_service]]]
-    [Obtain the service object corresponding to the given type. ]
-  ]
-  
-]
-
-[heading Requirements]
-
-['Header: ][^asio/system_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:add_service system_executor::context_impl::add_service]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 add_service..system_executor::context_impl] 
-(Deprecated: Use `make_service()`.) Add a service object to the [link asio.reference.execution_context `execution_context`]. 
-
-
-  template<
-      typename ``[link asio.reference.Service Service]``>
-  friend void add_service(
-      execution_context & e,
-      Service * svc);
-
-
-This function is used to add a service to the [link asio.reference.execution_context `execution_context`].
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-[[svc][The service object. On success, ownership of the service object is transferred to the [link asio.reference.execution_context `execution_context`]. When the [link asio.reference.execution_context `execution_context`] object is destroyed, it will destroy the service object by performing:
-``
-   delete static_cast<execution_context::service*>(svc) 
-``
-]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::service_already_exists][Thrown if a service of the given type is already present in the [link asio.reference.execution_context `execution_context`].]]
-
-[[asio::invalid_service_owner][Thrown if the service's owning [link asio.reference.execution_context `execution_context`] is not the [link asio.reference.execution_context `execution_context`] object specified by the `e` parameter. ]]
-
-]
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/system_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:context_impl system_executor::context_impl::context_impl]
-
-[indexterm2 context_impl..system_executor::context_impl] 
-
-  context_impl();
-
-
-
-[endsect]
-
-
-
-[section:destroy_context system_executor::context_impl::destroy_context]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 destroy_context..system_executor::context_impl] 
-Destroys all services in the context. 
-
-
-  void destroy_context();
-
-
-This function is implemented as follows:
-
-
-* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order * of the beginning of service object lifetime, performs `delete static_cast<execution_context::service*>(svc)`. 
-
-
-
-
-[endsect]
-
-
-
-[section:fork_event system_executor::context_impl::fork_event]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 fork_event..system_executor::context_impl] 
-Fork-related event notifications. 
-
-
-  enum fork_event
-
-[indexterm2 fork_prepare..system_executor::context_impl]
-[indexterm2 fork_parent..system_executor::context_impl]
-[indexterm2 fork_child..system_executor::context_impl]
-
-[heading Values]
-[variablelist
-
-  [
-    [fork_prepare]
-    [Notify the context that the process is about to fork. ]
-  ]
-
-  [
-    [fork_parent]
-    [Notify the context that the process has forked and is the parent. ]
-  ]
-
-  [
-    [fork_child]
-    [Notify the context that the process has forked and is the child. ]
-  ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:has_service system_executor::context_impl::has_service]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 has_service..system_executor::context_impl] 
-Determine if an [link asio.reference.execution_context `execution_context`] contains a specified service type. 
-
-
-  template<
-      typename ``[link asio.reference.Service Service]``>
-  friend bool has_service(
-      execution_context & e);
-
-
-This function is used to determine whether the [link asio.reference.execution_context `execution_context`] contains a service object corresponding to the given service type.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-      
-A boolean indicating whether the [link asio.reference.execution_context `execution_context`] contains the service. 
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/system_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:make_service system_executor::context_impl::make_service]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 make_service..system_executor::context_impl] 
-Creates a service object and adds it to the [link asio.reference.execution_context `execution_context`]. 
-
-
-  template<
-      typename ``[link asio.reference.Service Service]``,
-      typename... Args>
-  friend Service & make_service(
-      execution_context & e,
-      Args &&... args);
-
-
-This function is used to add a service to the [link asio.reference.execution_context `execution_context`].
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-[[args][Zero or more arguments to be passed to the service constructor.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::service_already_exists][Thrown if a service of the given type is already present in the [link asio.reference.execution_context `execution_context`]. ]]
-
-]
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/system_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:notify_fork system_executor::context_impl::notify_fork]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 notify_fork..system_executor::context_impl] 
-Notify the [link asio.reference.execution_context `execution_context`] of a fork-related event. 
-
-
-  void notify_fork(
-      fork_event event);
-
-
-This function is used to inform the [link asio.reference.execution_context `execution_context`] that the process is about to fork, or has just forked. This allows the [link asio.reference.execution_context `execution_context`], and the services it contains, to perform any necessary housekeeping to ensure correct operation following a fork.
-
-This function must not be called while any other [link asio.reference.execution_context `execution_context`] function, or any function associated with the execution\_context's derived class, is being called in another thread. It is, however, safe to call this function from within a completion handler, provided no other thread is accessing the [link asio.reference.execution_context `execution_context`] or its derived class.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[event][A fork-related event.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. If the notification fails the [link asio.reference.execution_context `execution_context`] object should no longer be used and should be destroyed.]]
-
-]
-
-
-[heading Example]
-  
-The following code illustrates how to incorporate the `notify_fork()` function: 
-
-   my_execution_context.notify_fork(execution_context::fork_prepare);
-   if (fork() == 0)
-   {
-     // This is the child process.
-     my_execution_context.notify_fork(execution_context::fork_child);
-   }
-   else
-   {
-     // This is the parent process.
-     my_execution_context.notify_fork(execution_context::fork_parent);
-   } 
-
-
-
-
-
-[heading Remarks]
-      
-For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, performs `svc->fork_service();`. When processing the fork\_prepare event, services are visited in reverse order of the beginning of service object lifetime. Otherwise, services are visited in order of the beginning of service object lifetime. 
-
-
-
-
-[endsect]
-
-
-
-[section:scheduler_ system_executor::context_impl::scheduler_]
-
-[indexterm2 scheduler_..system_executor::context_impl] 
-
-  detail::scheduler & scheduler_;
-
-
-
-[endsect]
-
-
-
-[section:shutdown_context system_executor::context_impl::shutdown_context]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 shutdown_context..system_executor::context_impl] 
-Shuts down all services in the context. 
-
-
-  void shutdown_context();
-
-
-This function is implemented as follows:
-
-
-* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown_service()`. 
-
-
-
-
-[endsect]
-
-
-
-[section:threads_ system_executor::context_impl::threads_]
-
-[indexterm2 threads_..system_executor::context_impl] 
-
-  detail::thread_group threads_;
-
-
-
-[endsect]
-
-
-[section:use_service system_executor::context_impl::use_service]
-
-[indexterm2 use_service..system_executor::context_impl] 
-Obtain the service object corresponding to the given type. 
-
-
-  template<
-      typename ``[link asio.reference.Service Service]``>
-  friend Service & ``[link asio.reference.system_executor__context_impl.use_service.overload1 use_service]``(
-      execution_context & e);
-  ``  [''''&raquo;''' [link asio.reference.system_executor__context_impl.use_service.overload1 more...]]``
-
-  template<
-      typename ``[link asio.reference.Service Service]``>
-  friend Service & ``[link asio.reference.system_executor__context_impl.use_service.overload2 use_service]``(
-      io_context & ioc);
-  ``  [''''&raquo;''' [link asio.reference.system_executor__context_impl.use_service.overload2 more...]]``
-
-
-[section:overload1 system_executor::context_impl::use_service (1 of 2 overloads)]
-
-
-['Inherited from execution_context.]
-
-
-Obtain the service object corresponding to the given type. 
-
-
-  template<
-      typename ``[link asio.reference.Service Service]``>
-  friend Service & use_service(
-      execution_context & e);
-
-
-This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the [link asio.reference.execution_context `execution_context`] will create a new instance of the service.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-      
-The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller. 
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/system_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:overload2 system_executor::context_impl::use_service (2 of 2 overloads)]
-
-
-['Inherited from execution_context.]
-
-
-Obtain the service object corresponding to the given type. 
-
-
-  template<
-      typename ``[link asio.reference.Service Service]``>
-  friend Service & use_service(
-      io_context & ioc);
-
-
-This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the [link asio.reference.io_context `io_context`] will create a new instance of the service.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ioc][The [link asio.reference.io_context `io_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-      
-The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
-
-
-[heading Remarks]
-      
-This overload is preserved for backwards compatibility with services that inherit from [link asio.reference.io_context__service `io_context::service`]. 
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/system_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_context_impl system_executor::context_impl::~context_impl]
-
-[indexterm2 ~context_impl..system_executor::context_impl] 
-
-  ~context_impl();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:system_executor__thread_function system_executor::thread_function]
-
-
-
-  struct thread_function
-
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.system_executor__thread_function.operator_lp__rp_ [*operator()]]]
-    []
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.system_executor__thread_function.scheduler_ [*scheduler_]]]
-    []
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/impl/system_executor.ipp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:operator_lp__rp_ system_executor::thread_function::operator()]
-
-[indexterm2 operator()..system_executor::thread_function] 
-
-  void operator()();
-
-
-
-[endsect]
-
-
-
-[section:scheduler_ system_executor::thread_function::scheduler_]
-
-[indexterm2 scheduler_..system_executor::thread_function] 
-
-  detail::scheduler * scheduler_;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
 
 [section:system_timer system_timer]
 
-[indexterm1 system_timer] 
+[indexterm1 asio.indexterm.system_timer..system_timer] 
 Typedef for a timer based on the system clock. 
 
 
@@ -119969,20 +104168,6 @@
 
   [
 
-    [[link asio.reference.basic_waitable_timer.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.basic_waitable_timer.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-  [
-
     [[link asio.reference.basic_waitable_timer.time_point [*time_point]]]
     [The time point type of the clock. ]
   
@@ -120019,12 +104204,16 @@
   
   [
     [[link asio.reference.basic_waitable_timer.cancel [*cancel]]]
-    [Cancel any asynchronous operations that are waiting on the timer. ]
+    [Cancel any asynchronous operations that are waiting on the timer. 
+
+     (Deprecated: Use non-error_code overload.) Cancel any asynchronous operations that are waiting on the timer. ]
   ]
   
   [
     [[link asio.reference.basic_waitable_timer.cancel_one [*cancel_one]]]
-    [Cancels one asynchronous operation that is waiting on the timer. ]
+    [Cancels one asynchronous operation that is waiting on the timer. 
+
+     (Deprecated: Use non-error_code overload.) Cancels one asynchronous operation that is waiting on the timer. ]
   ]
   
   [
@@ -120036,7 +104225,9 @@
     [[link asio.reference.basic_waitable_timer.expires_at [*expires_at]]]
     [(Deprecated: Use expiry().) Get the timer's expiry time as an absolute time. 
 
-     Set the timer's expiry time as an absolute time. ]
+     Set the timer's expiry time as an absolute time. 
+
+     (Deprecated: Use non-error_code overload.) Set the timer's expiry time as an absolute time. ]
   ]
   
   [
@@ -120076,20 +104267,9 @@
     [Perform a blocking wait on the timer. ]
   ]
   
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
   [
-    [[link asio.reference.basic_waitable_timer.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.basic_waitable_timer.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.basic_waitable_timer._basic_waitable_timer [*~basic_waitable_timer]]]
+    [Destroys the timer. ]
   ]
   
 ]
@@ -120279,7 +104459,7 @@
 
 [section:join thread::join]
 
-[indexterm2 join..thread] 
+[indexterm2 asio.indexterm.thread.join..join..thread] 
 Wait for the thread to exit. 
 
 
@@ -120297,7 +104477,7 @@
 
 [section:thread thread::thread]
 
-[indexterm2 thread..thread] 
+[indexterm2 asio.indexterm.thread.thread..thread..thread] 
 Start a new thread that executes the supplied function. 
 
 
@@ -120332,7 +104512,7 @@
 
 [section:_thread thread::~thread]
 
-[indexterm2 ~thread..thread] 
+[indexterm2 asio.indexterm.thread._thread..~thread..thread] 
 Destructor. 
 
 
@@ -120369,13 +104549,6 @@
 
   [
 
-    [[link asio.reference.thread_pool__thread_function [*thread_function]]]
-    []
-  
-  ]
-
-  [
-
     [[link asio.reference.thread_pool.fork_event [*fork_event]]]
     [Fork-related event notifications. ]
   
@@ -120426,12 +104599,12 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.thread_pool.destroy_context [*destroy_context]]]
+    [[link asio.reference.thread_pool.destroy [*destroy]]]
     [Destroys all services in the context. ]
   ]
   
   [
-    [[link asio.reference.thread_pool.shutdown_context [*shutdown_context]]]
+    [[link asio.reference.thread_pool.shutdown [*shutdown]]]
     [Shuts down all services in the context. ]
   ]
   
@@ -120477,7 +104650,7 @@
 
 ['Inherited from execution_context.]
 
-[indexterm2 add_service..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool.add_service..add_service..thread_pool] 
 (Deprecated: Use `make_service()`.) Add a service object to the [link asio.reference.execution_context `execution_context`]. 
 
 
@@ -120531,16 +104704,16 @@
 
 
 
-[section:destroy_context thread_pool::destroy_context]
+[section:destroy thread_pool::destroy]
 
 
 ['Inherited from execution_context.]
 
-[indexterm2 destroy_context..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool.destroy..destroy..thread_pool] 
 Destroys all services in the context. 
 
 
-  void destroy_context();
+  void destroy();
 
 
 This function is implemented as follows:
@@ -120560,15 +104733,15 @@
 
 ['Inherited from execution_context.]
 
-[indexterm2 fork_event..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool.fork_event..fork_event..thread_pool] 
 Fork-related event notifications. 
 
 
   enum fork_event
 
-[indexterm2 fork_prepare..thread_pool]
-[indexterm2 fork_parent..thread_pool]
-[indexterm2 fork_child..thread_pool]
+[indexterm2 asio.indexterm.thread_pool.fork_event.fork_prepare..fork_prepare..thread_pool]
+[indexterm2 asio.indexterm.thread_pool.fork_event.fork_parent..fork_parent..thread_pool]
+[indexterm2 asio.indexterm.thread_pool.fork_event.fork_child..fork_child..thread_pool]
 
 [heading Values]
 [variablelist
@@ -120598,7 +104771,7 @@
 
 [section:get_executor thread_pool::get_executor]
 
-[indexterm2 get_executor..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool.get_executor..get_executor..thread_pool] 
 Obtains the executor associated with the pool. 
 
 
@@ -120615,7 +104788,7 @@
 
 ['Inherited from execution_context.]
 
-[indexterm2 has_service..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool.has_service..has_service..thread_pool] 
 Determine if an [link asio.reference.execution_context `execution_context`] contains a specified service type. 
 
 
@@ -120657,7 +104830,7 @@
 
 [section:join thread_pool::join]
 
-[indexterm2 join..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool.join..join..thread_pool] 
 Joins the threads. 
 
 
@@ -120676,7 +104849,7 @@
 
 ['Inherited from execution_context.]
 
-[indexterm2 make_service..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool.make_service..make_service..thread_pool] 
 Creates a service object and adds it to the [link asio.reference.execution_context `execution_context`]. 
 
 
@@ -120730,7 +104903,7 @@
 
 ['Inherited from execution_context.]
 
-[indexterm2 notify_fork..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool.notify_fork..notify_fork..thread_pool] 
 Notify the [link asio.reference.execution_context `execution_context`] of a fork-related event. 
 
 
@@ -120785,7 +104958,7 @@
 
 [heading Remarks]
       
-For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, performs `svc->fork_service();`. When processing the fork\_prepare event, services are visited in reverse order of the beginning of service object lifetime. Otherwise, services are visited in order of the beginning of service object lifetime. 
+For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, performs `svc->notify_fork();`. When processing the fork\_prepare event, services are visited in reverse order of the beginning of service object lifetime. Otherwise, services are visited in order of the beginning of service object lifetime. 
 
 
 
@@ -120794,22 +104967,22 @@
 
 
 
-[section:shutdown_context thread_pool::shutdown_context]
+[section:shutdown thread_pool::shutdown]
 
 
 ['Inherited from execution_context.]
 
-[indexterm2 shutdown_context..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool.shutdown..shutdown..thread_pool] 
 Shuts down all services in the context. 
 
 
-  void shutdown_context();
+  void shutdown();
 
 
 This function is implemented as follows:
 
 
-* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown_service()`. 
+* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown()`. 
 
 
 
@@ -120820,7 +104993,7 @@
 
 [section:stop thread_pool::stop]
 
-[indexterm2 stop..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool.stop..stop..thread_pool] 
 Stops the threads. 
 
 
@@ -120835,7 +105008,7 @@
 
 [section:thread_pool thread_pool::thread_pool]
 
-[indexterm2 thread_pool..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool.thread_pool..thread_pool..thread_pool] 
 Constructs a pool with an automatically determined number of threads. 
 
 
@@ -120883,7 +105056,7 @@
 
 [section:use_service thread_pool::use_service]
 
-[indexterm2 use_service..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool.use_service..use_service..thread_pool] 
 Obtain the service object corresponding to the given type. 
 
 
@@ -120999,7 +105172,7 @@
 
 [section:_thread_pool thread_pool::~thread_pool]
 
-[indexterm2 ~thread_pool..thread_pool] 
+[indexterm2 asio.indexterm.thread_pool._thread_pool..~thread_pool..thread_pool] 
 Destructor. 
 
 
@@ -121090,11 +105263,11 @@
 
 [section:context thread_pool::executor_type::context]
 
-[indexterm2 context..thread_pool::executor_type] 
+[indexterm2 asio.indexterm.thread_pool__executor_type.context..context..thread_pool::executor_type] 
 Obtain the underlying execution context. 
 
 
-  thread_pool & context();
+  thread_pool & context() const;
 
 
 
@@ -121104,7 +105277,7 @@
 
 [section:defer thread_pool::executor_type::defer]
 
-[indexterm2 defer..thread_pool::executor_type] 
+[indexterm2 asio.indexterm.thread_pool__executor_type.defer..defer..thread_pool::executor_type] 
 Request the thread pool to invoke the given function object. 
 
 
@@ -121113,7 +105286,7 @@
       typename Allocator>
   void defer(
       Function && f,
-      const Allocator & a);
+      const Allocator & a) const;
 
 
 This function is used to ask the thread pool to execute the given function object. The function object will never be executed inside `defer()`. Instead, it will be scheduled to run on the thread pool.
@@ -121145,7 +105318,7 @@
 
 [section:dispatch thread_pool::executor_type::dispatch]
 
-[indexterm2 dispatch..thread_pool::executor_type] 
+[indexterm2 asio.indexterm.thread_pool__executor_type.dispatch..dispatch..thread_pool::executor_type] 
 Request the thread pool to invoke the given function object. 
 
 
@@ -121154,7 +105327,7 @@
       typename Allocator>
   void dispatch(
       Function && f,
-      const Allocator & a);
+      const Allocator & a) const;
 
 
 This function is used to ask the thread pool to execute the given function object. If the current thread belongs to the pool, `dispatch()` executes the function before returning. Otherwise, the function will be scheduled to run on the thread pool.
@@ -121184,11 +105357,11 @@
 
 [section:on_work_finished thread_pool::executor_type::on_work_finished]
 
-[indexterm2 on_work_finished..thread_pool::executor_type] 
+[indexterm2 asio.indexterm.thread_pool__executor_type.on_work_finished..on_work_finished..thread_pool::executor_type] 
 Inform the thread pool that some work is no longer outstanding. 
 
 
-  void on_work_finished();
+  void on_work_finished() const;
 
 
 This function is used to inform the thread pool that some work has finished. Once the count of unfinished work reaches zero, the thread pool's `join()` function is permitted to exit. 
@@ -121200,11 +105373,11 @@
 
 [section:on_work_started thread_pool::executor_type::on_work_started]
 
-[indexterm2 on_work_started..thread_pool::executor_type] 
+[indexterm2 asio.indexterm.thread_pool__executor_type.on_work_started..on_work_started..thread_pool::executor_type] 
 Inform the thread pool that it has some outstanding work to do. 
 
 
-  void on_work_started();
+  void on_work_started() const;
 
 
 This function is used to inform the thread pool that some work has begun. This ensures that the thread pool's `join()` function will not return while the work is underway. 
@@ -121216,7 +105389,7 @@
 
 [section:operator_not__eq_ thread_pool::executor_type::operator!=]
 
-[indexterm2 operator!=..thread_pool::executor_type] 
+[indexterm2 asio.indexterm.thread_pool__executor_type.operator_not__eq_..operator!=..thread_pool::executor_type] 
 Compare two executors for inequality. 
 
 
@@ -121240,7 +105413,7 @@
 
 [section:operator_eq__eq_ thread_pool::executor_type::operator==]
 
-[indexterm2 operator==..thread_pool::executor_type] 
+[indexterm2 asio.indexterm.thread_pool__executor_type.operator_eq__eq_..operator==..thread_pool::executor_type] 
 Compare two executors for equality. 
 
 
@@ -121264,7 +105437,7 @@
 
 [section:post thread_pool::executor_type::post]
 
-[indexterm2 post..thread_pool::executor_type] 
+[indexterm2 asio.indexterm.thread_pool__executor_type.post..post..thread_pool::executor_type] 
 Request the thread pool to invoke the given function object. 
 
 
@@ -121273,7 +105446,7 @@
       typename Allocator>
   void post(
       Function && f,
-      const Allocator & a);
+      const Allocator & a) const;
 
 
 This function is used to ask the thread pool to execute the given function object. The function object will never be executed inside `post()`. Instead, it will be scheduled to run on the thread pool.
@@ -121303,7 +105476,7 @@
 
 [section:running_in_this_thread thread_pool::executor_type::running_in_this_thread]
 
-[indexterm2 running_in_this_thread..thread_pool::executor_type] 
+[indexterm2 asio.indexterm.thread_pool__executor_type.running_in_this_thread..running_in_this_thread..thread_pool::executor_type] 
 Determine whether the thread pool is running in the current thread. 
 
 
@@ -121324,68 +105497,6 @@
 
 [endsect]
 
-[section:thread_pool__thread_function thread_pool::thread_function]
-
-
-
-  struct thread_function
-
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.thread_pool__thread_function.operator_lp__rp_ [*operator()]]]
-    []
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.thread_pool__thread_function.scheduler_ [*scheduler_]]]
-    []
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/impl/thread_pool.ipp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:operator_lp__rp_ thread_pool::thread_function::operator()]
-
-[indexterm2 operator()..thread_pool::thread_function] 
-
-  void operator()();
-
-
-
-[endsect]
-
-
-
-[section:scheduler_ thread_pool::thread_function::scheduler_]
-
-[indexterm2 scheduler_..thread_pool::thread_function] 
-
-  detail::scheduler * scheduler_;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
 [section:time_traits_lt__ptime__gt_ time_traits< boost::posix_time::ptime >]
 
 
@@ -121456,7 +105567,7 @@
 
 [section:add time_traits< boost::posix_time::ptime >::add]
 
-[indexterm2 add..time_traits< boost::posix_time::ptime >] 
+[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.add..add..time_traits< boost::posix_time::ptime >] 
 Add a duration to a time. 
 
 
@@ -121472,7 +105583,7 @@
 
 [section:duration_type time_traits< boost::posix_time::ptime >::duration_type]
 
-[indexterm2 duration_type..time_traits< boost::posix_time::ptime >] 
+[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.duration_type..duration_type..time_traits< boost::posix_time::ptime >] 
 The duration type. 
 
 
@@ -121493,7 +105604,7 @@
 
 [section:less_than time_traits< boost::posix_time::ptime >::less_than]
 
-[indexterm2 less_than..time_traits< boost::posix_time::ptime >] 
+[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.less_than..less_than..time_traits< boost::posix_time::ptime >] 
 Test whether one time is less than another. 
 
 
@@ -121509,7 +105620,7 @@
 
 [section:now time_traits< boost::posix_time::ptime >::now]
 
-[indexterm2 now..time_traits< boost::posix_time::ptime >] 
+[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.now..now..time_traits< boost::posix_time::ptime >] 
 Get the current time. 
 
 
@@ -121523,7 +105634,7 @@
 
 [section:subtract time_traits< boost::posix_time::ptime >::subtract]
 
-[indexterm2 subtract..time_traits< boost::posix_time::ptime >] 
+[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.subtract..subtract..time_traits< boost::posix_time::ptime >] 
 Subtract one time from another. 
 
 
@@ -121539,7 +105650,7 @@
 
 [section:time_type time_traits< boost::posix_time::ptime >::time_type]
 
-[indexterm2 time_type..time_traits< boost::posix_time::ptime >] 
+[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.time_type..time_type..time_traits< boost::posix_time::ptime >] 
 The time type. 
 
 
@@ -121560,7 +105671,7 @@
 
 [section:to_posix_duration time_traits< boost::posix_time::ptime >::to_posix_duration]
 
-[indexterm2 to_posix_duration..time_traits< boost::posix_time::ptime >] 
+[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.to_posix_duration..to_posix_duration..time_traits< boost::posix_time::ptime >] 
 Convert to POSIX duration type. 
 
 
@@ -121578,7 +105689,7 @@
 
 [section:transfer_all transfer_all]
 
-[indexterm1 transfer_all] 
+[indexterm1 asio.indexterm.transfer_all..transfer_all] 
 Return a completion condition function object that indicates that a read or write operation should continue until all of the data has been transferred, or until an error occurs. 
 
 
@@ -121624,7 +105735,7 @@
 
 [section:transfer_at_least transfer_at_least]
 
-[indexterm1 transfer_at_least] 
+[indexterm1 asio.indexterm.transfer_at_least..transfer_at_least] 
 Return a completion condition function object that indicates that a read or write operation should continue until a minimum number of bytes has been transferred, or until an error occurs. 
 
 
@@ -121671,7 +105782,7 @@
 
 [section:transfer_exactly transfer_exactly]
 
-[indexterm1 transfer_exactly] 
+[indexterm1 asio.indexterm.transfer_exactly..transfer_exactly] 
 Return a completion condition function object that indicates that a read or write operation should continue until an exact number of bytes has been transferred, or until an error occurs. 
 
 
@@ -121718,7 +105829,7 @@
 
 [section:use_future use_future]
 
-[indexterm1 use_future] 
+[indexterm1 asio.indexterm.use_future..use_future] 
 A special value, similar to std::nothrow. 
 
 
@@ -121771,6 +105882,11 @@
   ]
   
   [
+    [[link asio.reference.use_future_t.operator_lp__rp_ [*operator()]]]
+    [Wrap a function object in a packaged task. ]
+  ]
+  
+  [
     [[link asio.reference.use_future_t.operator_lb__rb_ [*operator\[\]]]]
     [(Deprecated: Use rebind().) Specify an alternate allocator. ]
   ]
@@ -121810,7 +105926,7 @@
 
 [section:allocator_type use_future_t::allocator_type]
 
-[indexterm2 allocator_type..use_future_t] 
+[indexterm2 asio.indexterm.use_future_t.allocator_type..allocator_type..use_future_t] 
 The allocator type. The allocator is used when constructing the `std::promise` object for a given asynchronous operation. 
 
 
@@ -121831,7 +105947,7 @@
 
 [section:get_allocator use_future_t::get_allocator]
 
-[indexterm2 get_allocator..use_future_t] 
+[indexterm2 asio.indexterm.use_future_t.get_allocator..get_allocator..use_future_t] 
 Obtain allocator. 
 
 
@@ -121843,9 +105959,47 @@
 
 
 
+[section:operator_lp__rp_ use_future_t::operator()]
+
+[indexterm2 asio.indexterm.use_future_t.operator_lp__rp_..operator()..use_future_t] 
+Wrap a function object in a packaged task. 
+
+
+  template<
+      typename Function>
+  unspecified operator()(
+      Function && f) const;
+
+
+The `package` function is used to adapt a function object as a packaged task. When this adapter is passed as a completion token to an asynchronous operation, the result of the function object is retuned via a std::future.
+
+
+[heading Example]
+  
+
+
+
+
+   std::future<std::size_t> fut =
+     my_socket.async_read_some(buffer,
+       use_future([](asio::error_code ec, std::size_t n)
+         {
+           return ec ? 0 : n;
+         }));
+   ...
+   std::size_t n = fut.get(); 
+
+
+
+
+
+[endsect]
+
+
+
 [section:operator_lb__rb_ use_future_t::operator\[\]]
 
-[indexterm2 operator\[\]..use_future_t] 
+[indexterm2 asio.indexterm.use_future_t.operator_lb__rb_..operator\[\]..use_future_t] 
 (Deprecated: Use `rebind()`.) Specify an alternate allocator. 
 
 
@@ -121862,7 +106016,7 @@
 
 [section:rebind use_future_t::rebind]
 
-[indexterm2 rebind..use_future_t] 
+[indexterm2 asio.indexterm.use_future_t.rebind..rebind..use_future_t] 
 Specify an alternate allocator. 
 
 
@@ -121878,7 +106032,7 @@
 
 [section:use_future_t use_future_t::use_future_t]
 
-[indexterm2 use_future_t..use_future_t] 
+[indexterm2 asio.indexterm.use_future_t.use_future_t..use_future_t..use_future_t] 
 Construct using default-constructed allocator. 
 
 
@@ -121929,7 +106083,7 @@
 
 [section:use_service use_service]
 
-[indexterm1 use_service] 
+[indexterm1 asio.indexterm.use_service..use_service] 
     
   template<
       typename ``[link asio.reference.Service Service]``>
@@ -122024,26 +106178,6 @@
 
 [endsect]
 
-
-[section:use_service_lt__detail__io_context_impl__gt_ use_service< detail::io_context_impl >]
-
-[indexterm1 use_service< detail::io_context_impl >] 
-
-  template<>
-  detail::io_context_impl & use_service< detail::io_context_impl >(
-      io_context & ioc);
-
-
-[heading Requirements]
-
-['Header: ][^asio/impl/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
 [section:uses_executor uses_executor]
 
 
@@ -122097,7 +106231,7 @@
 
 [section:to_wait_duration wait_traits::to_wait_duration]
 
-[indexterm2 to_wait_duration..wait_traits] 
+[indexterm2 asio.indexterm.wait_traits.to_wait_duration..to_wait_duration..wait_traits] 
 Convert a clock duration into a duration used for waiting. 
 
 
@@ -122158,17 +106292,13 @@
 
 [endsect]
 
-[section:waitable_timer_service waitable_timer_service]
+[section:windows__object_handle windows::object_handle]
 
 
-Default service implementation for a timer. 
+Provides object-oriented handle functionality. 
 
 
-  template<
-      typename Clock,
-      typename ``[link asio.reference.WaitTraits WaitTraits]`` = asio::wait_traits<Clock>>
-  class waitable_timer_service :
-    public io_context::service
+  class object_handle
 
 
 [heading Types]
@@ -122177,630 +106307,25 @@
 
   [
 
-    [[link asio.reference.waitable_timer_service.clock_type [*clock_type]]]
-    [The clock type. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.waitable_timer_service.duration [*duration]]]
-    [The duration type of the clock. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.waitable_timer_service.implementation_type [*implementation_type]]]
-    [The implementation type of the waitable timer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.waitable_timer_service.time_point [*time_point]]]
-    [The time point type of the clock. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.waitable_timer_service.traits_type [*traits_type]]]
-    [The wait traits type. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.waitable_timer_service.async_wait [*async_wait]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.cancel [*cancel]]]
-    [Cancel any asynchronous wait operations associated with the timer. ]
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.cancel_one [*cancel_one]]]
-    [Cancels one asynchronous wait operation associated with the timer. ]
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.construct [*construct]]]
-    [Construct a new timer implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.destroy [*destroy]]]
-    [Destroy a timer implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.expires_after [*expires_after]]]
-    [Set the expiry time for the timer relative to now. ]
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.expires_at [*expires_at]]]
-    [(Deprecated: Use expiry().) Get the expiry time for the timer as an absolute time. 
-
-     Set the expiry time for the timer as an absolute time. ]
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.expires_from_now [*expires_from_now]]]
-    [(Deprecated: Use expiry().) Get the expiry time for the timer relative to now. 
-
-     (Deprecated: Use expires_after().) Set the expiry time for the timer relative to now. ]
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.expiry [*expiry]]]
-    [Get the expiry time for the timer as an absolute time. ]
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.move_assign [*move_assign]]]
-    [Move-assign from another timer implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.move_construct [*move_construct]]]
-    [Move-construct a new timer implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.wait [*wait]]]
-    []
-  ]
-  
-  [
-    [[link asio.reference.waitable_timer_service.waitable_timer_service [*waitable_timer_service]]]
-    [Construct a new timer service for the specified io_context. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.waitable_timer_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/waitable_timer_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:async_wait waitable_timer_service::async_wait]
-
-[indexterm2 async_wait..waitable_timer_service] 
-
-  template<
-      typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      implementation_type & impl,
-      WaitHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:cancel waitable_timer_service::cancel]
-
-[indexterm2 cancel..waitable_timer_service] 
-Cancel any asynchronous wait operations associated with the timer. 
-
-
-  std::size_t cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:cancel_one waitable_timer_service::cancel_one]
-
-[indexterm2 cancel_one..waitable_timer_service] 
-Cancels one asynchronous wait operation associated with the timer. 
-
-
-  std::size_t cancel_one(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:clock_type waitable_timer_service::clock_type]
-
-[indexterm2 clock_type..waitable_timer_service] 
-The clock type. 
-
-
-  typedef Clock clock_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/waitable_timer_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:construct waitable_timer_service::construct]
-
-[indexterm2 construct..waitable_timer_service] 
-Construct a new timer implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:destroy waitable_timer_service::destroy]
-
-[indexterm2 destroy..waitable_timer_service] 
-Destroy a timer implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:duration waitable_timer_service::duration]
-
-[indexterm2 duration..waitable_timer_service] 
-The duration type of the clock. 
-
-
-  typedef clock_type::duration duration;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/waitable_timer_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:expires_after waitable_timer_service::expires_after]
-
-[indexterm2 expires_after..waitable_timer_service] 
-Set the expiry time for the timer relative to now. 
-
-
-  std::size_t expires_after(
-      implementation_type & impl,
-      const duration & expiry_time,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[section:expires_at waitable_timer_service::expires_at]
-
-[indexterm2 expires_at..waitable_timer_service] 
-(Deprecated: Use `expiry()`.) Get the expiry time for the timer as an absolute time. 
-
-
-  time_point ``[link asio.reference.waitable_timer_service.expires_at.overload1 expires_at]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.waitable_timer_service.expires_at.overload1 more...]]``
-
-
-Set the expiry time for the timer as an absolute time. 
-
-
-  std::size_t ``[link asio.reference.waitable_timer_service.expires_at.overload2 expires_at]``(
-      implementation_type & impl,
-      const time_point & expiry_time,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.waitable_timer_service.expires_at.overload2 more...]]``
-
-
-[section:overload1 waitable_timer_service::expires_at (1 of 2 overloads)]
-
-
-(Deprecated: Use `expiry()`.) Get the expiry time for the timer as an absolute time. 
-
-
-  time_point expires_at(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 waitable_timer_service::expires_at (2 of 2 overloads)]
-
-
-Set the expiry time for the timer as an absolute time. 
-
-
-  std::size_t expires_at(
-      implementation_type & impl,
-      const time_point & expiry_time,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:expires_from_now waitable_timer_service::expires_from_now]
-
-[indexterm2 expires_from_now..waitable_timer_service] 
-(Deprecated: Use `expiry()`.) Get the expiry time for the timer relative to now. 
-
-
-  duration ``[link asio.reference.waitable_timer_service.expires_from_now.overload1 expires_from_now]``(
-      const implementation_type & impl) const;
-  ``  [''''&raquo;''' [link asio.reference.waitable_timer_service.expires_from_now.overload1 more...]]``
-
-
-(Deprecated: Use `expires_after()`.) Set the expiry time for the timer relative to now. 
-
-
-  std::size_t ``[link asio.reference.waitable_timer_service.expires_from_now.overload2 expires_from_now]``(
-      implementation_type & impl,
-      const duration & expiry_time,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.waitable_timer_service.expires_from_now.overload2 more...]]``
-
-
-[section:overload1 waitable_timer_service::expires_from_now (1 of 2 overloads)]
-
-
-(Deprecated: Use `expiry()`.) Get the expiry time for the timer relative to now. 
-
-
-  duration expires_from_now(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 waitable_timer_service::expires_from_now (2 of 2 overloads)]
-
-
-(Deprecated: Use `expires_after()`.) Set the expiry time for the timer relative to now. 
-
-
-  std::size_t expires_from_now(
-      implementation_type & impl,
-      const duration & expiry_time,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:expiry waitable_timer_service::expiry]
-
-[indexterm2 expiry..waitable_timer_service] 
-Get the expiry time for the timer as an absolute time. 
-
-
-  time_point expiry(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:get_io_context waitable_timer_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..waitable_timer_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service waitable_timer_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..waitable_timer_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:id waitable_timer_service::id]
-
-[indexterm2 id..waitable_timer_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type waitable_timer_service::implementation_type]
-
-[indexterm2 implementation_type..waitable_timer_service] 
-The implementation type of the waitable timer. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/waitable_timer_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:move_assign waitable_timer_service::move_assign]
-
-[indexterm2 move_assign..waitable_timer_service] 
-Move-assign from another timer implementation. 
-
-
-  void move_assign(
-      implementation_type & impl,
-      waitable_timer_service & other_service,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:move_construct waitable_timer_service::move_construct]
-
-[indexterm2 move_construct..waitable_timer_service] 
-Move-construct a new timer implementation. 
-
-
-  void move_construct(
-      implementation_type & impl,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:time_point waitable_timer_service::time_point]
-
-[indexterm2 time_point..waitable_timer_service] 
-The time point type of the clock. 
-
-
-  typedef clock_type::time_point time_point;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/waitable_timer_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:traits_type waitable_timer_service::traits_type]
-
-[indexterm2 traits_type..waitable_timer_service] 
-The wait traits type. 
-
-
-  typedef WaitTraits traits_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/waitable_timer_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:wait waitable_timer_service::wait]
-
-[indexterm2 wait..waitable_timer_service] 
-
-  void wait(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:waitable_timer_service waitable_timer_service::waitable_timer_service]
-
-[indexterm2 waitable_timer_service..waitable_timer_service] 
-Construct a new timer service for the specified [link asio.reference.io_context `io_context`]. 
-
-
-  waitable_timer_service(
-      asio::io_context & io_context);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:windows__basic_handle windows::basic_handle]
-
-
-Provides Windows handle functionality. 
-
-
-  template<
-      typename ``[link asio.reference.HandleService HandleService]``>
-  class basic_handle :
-    public basic_io_object< HandleService >
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.executor_type [*executor_type]]]
+    [[link asio.reference.windows__object_handle.executor_type [*executor_type]]]
     [The type of the executor associated with the object. ]
   
   ]
 
   [
 
-    [[link asio.reference.windows__basic_handle.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
+    [[link asio.reference.windows__object_handle.lowest_layer_type [*lowest_layer_type]]]
+    [An object_handle is always the lowest layer. ]
   
   ]
 
   [
 
-    [[link asio.reference.windows__basic_handle.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_handle is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.native_handle_type [*native_handle_type]]]
+    [[link asio.reference.windows__object_handle.native_handle_type [*native_handle_type]]]
     [The native representation of a handle. ]
   
   ]
 
-  [
-
-    [[link asio.reference.windows__basic_handle.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -122808,90 +106333,79 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.windows__basic_handle.assign [*assign]]]
+    [[link asio.reference.windows__object_handle.assign [*assign]]]
     [Assign an existing native handle to the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.basic_handle [*basic_handle]]]
-    [Construct a basic_handle without opening it. 
-
-     Construct a basic_handle on an existing native handle. 
-
-     Move-construct a basic_handle from another. ]
+    [[link asio.reference.windows__object_handle.async_wait [*async_wait]]]
+    [Start an asynchronous wait on the object handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.cancel [*cancel]]]
+    [[link asio.reference.windows__object_handle.cancel [*cancel]]]
     [Cancel all asynchronous operations associated with the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.close [*close]]]
+    [[link asio.reference.windows__object_handle.close [*close]]]
     [Close the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.get_executor [*get_executor]]]
+    [[link asio.reference.windows__object_handle.get_executor [*get_executor]]]
     [Get the executor associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.get_io_context [*get_io_context]]]
+    [[link asio.reference.windows__object_handle.get_io_context [*get_io_context]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.get_io_service [*get_io_service]]]
+    [[link asio.reference.windows__object_handle.get_io_service [*get_io_service]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.is_open [*is_open]]]
+    [[link asio.reference.windows__object_handle.is_open [*is_open]]]
     [Determine whether the handle is open. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.lowest_layer [*lowest_layer]]]
+    [[link asio.reference.windows__object_handle.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. 
 
      Get a const reference to the lowest layer. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.native_handle [*native_handle]]]
+    [[link asio.reference.windows__object_handle.native_handle [*native_handle]]]
     [Get the native handle representation. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.operator_eq_ [*operator=]]]
-    [Move-assign a basic_handle from another. ]
+    [[link asio.reference.windows__object_handle.object_handle [*object_handle]]]
+    [Construct an object_handle without opening it. 
+
+     Construct an object_handle on an existing native handle. 
+
+     Move-construct an object_handle from another. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__object_handle.operator_eq_ [*operator=]]]
+    [Move-assign an object_handle from another. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__object_handle.wait [*wait]]]
+    [Perform a blocking wait on the object handle. ]
   ]
   
 ]
 
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__basic_handle.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle._basic_handle [*~basic_handle]]]
-    [Protected destructor to prevent deletion through this type. ]
-  ]
-  
-]
-
-The [link asio.reference.windows__basic_handle `windows::basic_handle`] class template provides the ability to wrap a Windows handle.
+The [link asio.reference.windows__object_handle `windows::object_handle`] class provides asynchronous and blocking object-oriented handle functionality.
 
 
 [heading Thread Safety]
@@ -122904,27 +106418,27 @@
 
 [heading Requirements]
 
-['Header: ][^asio/windows/basic_handle.hpp]
+['Header: ][^asio/windows/object_handle.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
-[section:assign windows::basic_handle::assign]
+[section:assign windows::object_handle::assign]
 
-[indexterm2 assign..windows::basic_handle] 
+[indexterm2 asio.indexterm.windows__object_handle.assign..assign..windows::object_handle] 
 Assign an existing native handle to the handle. 
 
 
-  void ``[link asio.reference.windows__basic_handle.assign.overload1 assign]``(
+  void ``[link asio.reference.windows__object_handle.assign.overload1 assign]``(
       const native_handle_type & handle);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.assign.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.assign.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.windows__basic_handle.assign.overload2 assign]``(
+  void ``[link asio.reference.windows__object_handle.assign.overload2 assign]``(
       const native_handle_type & handle,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.assign.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.assign.overload2 more...]]``
 
 
-[section:overload1 windows::basic_handle::assign (1 of 2 overloads)]
+[section:overload1 windows::object_handle::assign (1 of 2 overloads)]
 
 
 Assign an existing native handle to the handle. 
@@ -122939,13 +106453,13 @@
 
 
 
-[section:overload2 windows::basic_handle::assign (2 of 2 overloads)]
+[section:overload2 windows::object_handle::assign (2 of 2 overloads)]
 
 
 Assign an existing native handle to the handle. 
 
 
-  asio::error_code assign(
+  void assign(
       const native_handle_type & handle,
       asio::error_code & ec);
 
@@ -122956,45 +106470,20 @@
 
 [endsect]
 
-[section:basic_handle windows::basic_handle::basic_handle]
 
-[indexterm2 basic_handle..windows::basic_handle] 
-Construct a [link asio.reference.windows__basic_handle `windows::basic_handle`] without opening it. 
+[section:async_wait windows::object_handle::async_wait]
+
+[indexterm2 asio.indexterm.windows__object_handle.async_wait..async_wait..windows::object_handle] 
+Start an asynchronous wait on the object handle. 
 
 
-  explicit ``[link asio.reference.windows__basic_handle.basic_handle.overload1 basic_handle]``(
-      asio::io_context & io_context);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.basic_handle.overload1 more...]]``
+  template<
+      typename ``[link asio.reference.WaitHandler WaitHandler]``>
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
+      WaitHandler && handler);
 
 
-Construct a [link asio.reference.windows__basic_handle `windows::basic_handle`] on an existing native handle. 
-
-
-  ``[link asio.reference.windows__basic_handle.basic_handle.overload2 basic_handle]``(
-      asio::io_context & io_context,
-      const native_handle_type & handle);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.basic_handle.overload2 more...]]``
-
-
-Move-construct a [link asio.reference.windows__basic_handle `windows::basic_handle`] from another. 
-
-
-  ``[link asio.reference.windows__basic_handle.basic_handle.overload3 basic_handle]``(
-      basic_handle && other);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.basic_handle.overload3 more...]]``
-
-
-[section:overload1 windows::basic_handle::basic_handle (1 of 3 overloads)]
-
-
-Construct a [link asio.reference.windows__basic_handle `windows::basic_handle`] without opening it. 
-
-
-  basic_handle(
-      asio::io_context & io_context);
-
-
-This constructor creates a handle without opening it.
+This function is be used to initiate an asynchronous wait against the object handle. It always returns immediately.
 
 
 [heading Parameters]
@@ -123002,7 +106491,13 @@
 
 [variablelist
   
-[[io_context][The [link asio.reference.io_context `io_context`] object that the handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
+[[handler][The handler to be called when the object handle is set to the signalled state. Copies will be made of the handler as required. The function signature of the handler must be: 
+``
+   void handler(
+     const asio::error_code& error // Result of operation.
+   ); 
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
 
 ]
 
@@ -123012,99 +106507,21 @@
 [endsect]
 
 
+[section:cancel windows::object_handle::cancel]
 
-[section:overload2 windows::basic_handle::basic_handle (2 of 3 overloads)]
-
-
-Construct a [link asio.reference.windows__basic_handle `windows::basic_handle`] on an existing native handle. 
-
-
-  basic_handle(
-      asio::io_context & io_context,
-      const native_handle_type & handle);
-
-
-This constructor creates a handle object to hold an existing native handle.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
-
-[[handle][A native handle.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 windows::basic_handle::basic_handle (3 of 3 overloads)]
-
-
-Move-construct a [link asio.reference.windows__basic_handle `windows::basic_handle`] from another. 
-
-
-  basic_handle(
-      basic_handle && other);
-
-
-This constructor moves a handle from one object to another.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[other][The other [link asio.reference.windows__basic_handle `windows::basic_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-      
-Following the move, the moved-from object is in the same state as if constructed using the `basic_handle(io_context&) constructor`. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:cancel windows::basic_handle::cancel]
-
-[indexterm2 cancel..windows::basic_handle] 
+[indexterm2 asio.indexterm.windows__object_handle.cancel..cancel..windows::object_handle] 
 Cancel all asynchronous operations associated with the handle. 
 
 
-  void ``[link asio.reference.windows__basic_handle.cancel.overload1 cancel]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.cancel.overload1 more...]]``
+  void ``[link asio.reference.windows__object_handle.cancel.overload1 cancel]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.cancel.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.windows__basic_handle.cancel.overload2 cancel]``(
+  void ``[link asio.reference.windows__object_handle.cancel.overload2 cancel]``(
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.cancel.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.cancel.overload2 more...]]``
 
 
-[section:overload1 windows::basic_handle::cancel (1 of 2 overloads)]
+[section:overload1 windows::object_handle::cancel (1 of 2 overloads)]
 
 
 Cancel all asynchronous operations associated with the handle. 
@@ -123132,13 +106549,13 @@
 
 
 
-[section:overload2 windows::basic_handle::cancel (2 of 2 overloads)]
+[section:overload2 windows::object_handle::cancel (2 of 2 overloads)]
 
 
 Cancel all asynchronous operations associated with the handle. 
 
 
-  asio::error_code cancel(
+  void cancel(
       asio::error_code & ec);
 
 
@@ -123162,21 +106579,21 @@
 
 [endsect]
 
-[section:close windows::basic_handle::close]
+[section:close windows::object_handle::close]
 
-[indexterm2 close..windows::basic_handle] 
+[indexterm2 asio.indexterm.windows__object_handle.close..close..windows::object_handle] 
 Close the handle. 
 
 
-  void ``[link asio.reference.windows__basic_handle.close.overload1 close]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.close.overload1 more...]]``
+  void ``[link asio.reference.windows__object_handle.close.overload1 close]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.close.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.windows__basic_handle.close.overload2 close]``(
+  void ``[link asio.reference.windows__object_handle.close.overload2 close]``(
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.close.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.close.overload2 more...]]``
 
 
-[section:overload1 windows::basic_handle::close (1 of 2 overloads)]
+[section:overload1 windows::object_handle::close (1 of 2 overloads)]
 
 
 Close the handle. 
@@ -123204,13 +106621,13 @@
 
 
 
-[section:overload2 windows::basic_handle::close (2 of 2 overloads)]
+[section:overload2 windows::object_handle::close (2 of 2 overloads)]
 
 
 Close the handle. 
 
 
-  asio::error_code close(
+  void close(
       asio::error_code & ec);
 
 
@@ -123235,16 +106652,13 @@
 [endsect]
 
 
-[section:executor_type windows::basic_handle::executor_type]
+[section:executor_type windows::object_handle::executor_type]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 executor_type..windows::basic_handle] 
+[indexterm2 asio.indexterm.windows__object_handle.executor_type..executor_type..windows::object_handle] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -123307,7 +106721,7 @@
 
 [heading Requirements]
 
-['Header: ][^asio/windows/basic_handle.hpp]
+['Header: ][^asio/windows/object_handle.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -123316,12 +106730,9 @@
 
 
 
-[section:get_executor windows::basic_handle::get_executor]
+[section:get_executor windows::object_handle::get_executor]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..windows::basic_handle] 
+[indexterm2 asio.indexterm.windows__object_handle.get_executor..get_executor..windows::object_handle] 
 Get the executor associated with the object. 
 
 
@@ -123332,61 +106743,10 @@
 [endsect]
 
 
-[section:get_implementation windows::basic_handle::get_implementation]
 
-[indexterm2 get_implementation..windows::basic_handle] 
-Get the underlying implementation of the I/O object. 
+[section:get_io_context windows::object_handle::get_io_context]
 
-
-  implementation_type & ``[link asio.reference.windows__basic_handle.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.windows__basic_handle.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.get_implementation.overload2 more...]]``
-
-
-[section:overload1 windows::basic_handle::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_handle::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_io_context windows::basic_handle::get_io_context]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..windows::basic_handle] 
+[indexterm2 asio.indexterm.windows__object_handle.get_io_context..get_io_context..windows::object_handle] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -123407,12 +106767,9 @@
 
 
 
-[section:get_io_service windows::basic_handle::get_io_service]
+[section:get_io_service windows::object_handle::get_io_service]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..windows::basic_handle] 
+[indexterm2 asio.indexterm.windows__object_handle.get_io_service..get_io_service..windows::object_handle] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -123432,82 +106789,10 @@
 [endsect]
 
 
-[section:get_service windows::basic_handle::get_service]
 
-[indexterm2 get_service..windows::basic_handle] 
-Get the service associated with the I/O object. 
+[section:is_open windows::object_handle::is_open]
 
-
-  service_type & ``[link asio.reference.windows__basic_handle.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.windows__basic_handle.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.get_service.overload2 more...]]``
-
-
-[section:overload1 windows::basic_handle::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_handle::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type windows::basic_handle::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..windows::basic_handle] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:is_open windows::basic_handle::is_open]
-
-[indexterm2 is_open..windows::basic_handle] 
+[indexterm2 asio.indexterm.windows__object_handle.is_open..is_open..windows::object_handle] 
 Determine whether the handle is open. 
 
 
@@ -123518,24 +106803,24 @@
 [endsect]
 
 
-[section:lowest_layer windows::basic_handle::lowest_layer]
+[section:lowest_layer windows::object_handle::lowest_layer]
 
-[indexterm2 lowest_layer..windows::basic_handle] 
+[indexterm2 asio.indexterm.windows__object_handle.lowest_layer..lowest_layer..windows::object_handle] 
 Get a reference to the lowest layer. 
 
 
-  lowest_layer_type & ``[link asio.reference.windows__basic_handle.lowest_layer.overload1 lowest_layer]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.lowest_layer.overload1 more...]]``
+  lowest_layer_type & ``[link asio.reference.windows__object_handle.lowest_layer.overload1 lowest_layer]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.lowest_layer.overload1 more...]]``
 
 
 Get a const reference to the lowest layer. 
 
 
-  const lowest_layer_type & ``[link asio.reference.windows__basic_handle.lowest_layer.overload2 lowest_layer]``() const;
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_handle.lowest_layer.overload2 more...]]``
+  const lowest_layer_type & ``[link asio.reference.windows__object_handle.lowest_layer.overload2 lowest_layer]``() const;
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.lowest_layer.overload2 more...]]``
 
 
-[section:overload1 windows::basic_handle::lowest_layer (1 of 2 overloads)]
+[section:overload1 windows::object_handle::lowest_layer (1 of 2 overloads)]
 
 
 Get a reference to the lowest layer. 
@@ -123544,7 +106829,7 @@
   lowest_layer_type & lowest_layer();
 
 
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.windows__basic_handle `windows::basic_handle`] cannot contain any further layers, it simply returns a reference to itself.
+This function returns a reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__object_handle `windows::object_handle`] cannot contain any further layers, it simply returns a reference to itself.
 
 
 [heading Return Value]
@@ -123558,7 +106843,7 @@
 
 
 
-[section:overload2 windows::basic_handle::lowest_layer (2 of 2 overloads)]
+[section:overload2 windows::object_handle::lowest_layer (2 of 2 overloads)]
 
 
 Get a const reference to the lowest layer. 
@@ -123567,7 +106852,7 @@
   const lowest_layer_type & lowest_layer() const;
 
 
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.windows__basic_handle `windows::basic_handle`] cannot contain any further layers, it simply returns a reference to itself.
+This function returns a const reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__object_handle `windows::object_handle`] cannot contain any further layers, it simply returns a reference to itself.
 
 
 [heading Return Value]
@@ -123583,13 +106868,13 @@
 [endsect]
 
 
-[section:lowest_layer_type windows::basic_handle::lowest_layer_type]
+[section:lowest_layer_type windows::object_handle::lowest_layer_type]
 
-[indexterm2 lowest_layer_type..windows::basic_handle] 
-A [link asio.reference.windows__basic_handle `windows::basic_handle`] is always the lowest layer. 
+[indexterm2 asio.indexterm.windows__object_handle.lowest_layer_type..lowest_layer_type..windows::object_handle] 
+An [link asio.reference.windows__object_handle `windows::object_handle`] is always the lowest layer. 
 
 
-  typedef basic_handle< HandleService > lowest_layer_type;
+  typedef object_handle lowest_layer_type;
 
 
 [heading Types]
@@ -123598,39 +106883,25 @@
 
   [
 
-    [[link asio.reference.windows__basic_handle.executor_type [*executor_type]]]
+    [[link asio.reference.windows__object_handle.executor_type [*executor_type]]]
     [The type of the executor associated with the object. ]
   
   ]
 
   [
 
-    [[link asio.reference.windows__basic_handle.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
+    [[link asio.reference.windows__object_handle.lowest_layer_type [*lowest_layer_type]]]
+    [An object_handle is always the lowest layer. ]
   
   ]
 
   [
 
-    [[link asio.reference.windows__basic_handle.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_handle is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.native_handle_type [*native_handle_type]]]
+    [[link asio.reference.windows__object_handle.native_handle_type [*native_handle_type]]]
     [The native representation of a handle. ]
   
   ]
 
-  [
-
-    [[link asio.reference.windows__basic_handle.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -123638,90 +106909,79 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.windows__basic_handle.assign [*assign]]]
+    [[link asio.reference.windows__object_handle.assign [*assign]]]
     [Assign an existing native handle to the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.basic_handle [*basic_handle]]]
-    [Construct a basic_handle without opening it. 
-
-     Construct a basic_handle on an existing native handle. 
-
-     Move-construct a basic_handle from another. ]
+    [[link asio.reference.windows__object_handle.async_wait [*async_wait]]]
+    [Start an asynchronous wait on the object handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.cancel [*cancel]]]
+    [[link asio.reference.windows__object_handle.cancel [*cancel]]]
     [Cancel all asynchronous operations associated with the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.close [*close]]]
+    [[link asio.reference.windows__object_handle.close [*close]]]
     [Close the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.get_executor [*get_executor]]]
+    [[link asio.reference.windows__object_handle.get_executor [*get_executor]]]
     [Get the executor associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.get_io_context [*get_io_context]]]
+    [[link asio.reference.windows__object_handle.get_io_context [*get_io_context]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.get_io_service [*get_io_service]]]
+    [[link asio.reference.windows__object_handle.get_io_service [*get_io_service]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.is_open [*is_open]]]
+    [[link asio.reference.windows__object_handle.is_open [*is_open]]]
     [Determine whether the handle is open. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.lowest_layer [*lowest_layer]]]
+    [[link asio.reference.windows__object_handle.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. 
 
      Get a const reference to the lowest layer. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.native_handle [*native_handle]]]
+    [[link asio.reference.windows__object_handle.native_handle [*native_handle]]]
     [Get the native handle representation. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.operator_eq_ [*operator=]]]
-    [Move-assign a basic_handle from another. ]
+    [[link asio.reference.windows__object_handle.object_handle [*object_handle]]]
+    [Construct an object_handle without opening it. 
+
+     Construct an object_handle on an existing native handle. 
+
+     Move-construct an object_handle from another. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__object_handle.operator_eq_ [*operator=]]]
+    [Move-assign an object_handle from another. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__object_handle.wait [*wait]]]
+    [Perform a blocking wait on the object handle. ]
   ]
   
 ]
 
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__basic_handle.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle._basic_handle [*~basic_handle]]]
-    [Protected destructor to prevent deletion through this type. ]
-  ]
-  
-]
-
-The [link asio.reference.windows__basic_handle `windows::basic_handle`] class template provides the ability to wrap a Windows handle.
+The [link asio.reference.windows__object_handle `windows::object_handle`] class provides asynchronous and blocking object-oriented handle functionality.
 
 
 [heading Thread Safety]
@@ -123735,7 +106995,7 @@
 
 [heading Requirements]
 
-['Header: ][^asio/windows/basic_handle.hpp]
+['Header: ][^asio/windows/object_handle.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -123744,9 +107004,9 @@
 
 
 
-[section:native_handle windows::basic_handle::native_handle]
+[section:native_handle windows::object_handle::native_handle]
 
-[indexterm2 native_handle..windows::basic_handle] 
+[indexterm2 asio.indexterm.windows__object_handle.native_handle..native_handle..windows::object_handle] 
 Get the native handle representation. 
 
 
@@ -123760,19 +107020,19 @@
 
 
 
-[section:native_handle_type windows::basic_handle::native_handle_type]
+[section:native_handle_type windows::object_handle::native_handle_type]
 
-[indexterm2 native_handle_type..windows::basic_handle] 
+[indexterm2 asio.indexterm.windows__object_handle.native_handle_type..native_handle_type..windows::object_handle] 
 The native representation of a handle. 
 
 
-  typedef HandleService::native_handle_type native_handle_type;
+  typedef implementation_defined native_handle_type;
 
 
 
 [heading Requirements]
 
-['Header: ][^asio/windows/basic_handle.hpp]
+['Header: ][^asio/windows/object_handle.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -123780,370 +107040,41 @@
 [endsect]
 
 
+[section:object_handle windows::object_handle::object_handle]
 
-[section:operator_eq_ windows::basic_handle::operator=]
+[indexterm2 asio.indexterm.windows__object_handle.object_handle..object_handle..windows::object_handle] 
+Construct an [link asio.reference.windows__object_handle `windows::object_handle`] without opening it. 
 
-[indexterm2 operator=..windows::basic_handle] 
-Move-assign a [link asio.reference.windows__basic_handle `windows::basic_handle`] from another. 
 
-
-  basic_handle & operator=(
-      basic_handle && other);
-
-
-This assignment operator moves a handle from one object to another.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[other][The other [link asio.reference.windows__basic_handle `windows::basic_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-      
-Following the move, the moved-from object is in the same state as if constructed using the `basic_handle(io_context&) constructor`. 
-
-
-
-
-[endsect]
-
-
-
-[section:service_type windows::basic_handle::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..windows::basic_handle] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef HandleService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:_basic_handle windows::basic_handle::~basic_handle]
-
-[indexterm2 ~basic_handle..windows::basic_handle] 
-Protected destructor to prevent deletion through this type. 
-
-
-  ~basic_handle();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:windows__basic_object_handle windows::basic_object_handle]
-
-
-Provides object-oriented handle functionality. 
-
-
-  template<
-      typename ``[link asio.reference.ObjectHandleService ObjectHandleService]`` = object_handle_service>
-  class basic_object_handle :
-    public windows::basic_handle< ObjectHandleService >
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.windows__basic_object_handle.executor_type [*executor_type]]]
-    [The type of the executor associated with the object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_object_handle.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_object_handle.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_handle is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_object_handle.native_handle_type [*native_handle_type]]]
-    [The native representation of a handle. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_object_handle.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__basic_object_handle.assign [*assign]]]
-    [Assign an existing native handle to the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.async_wait [*async_wait]]]
-    [Start an asynchronous wait on the object handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.basic_object_handle [*basic_object_handle]]]
-    [Construct a basic_object_handle without opening it. 
-
-     Construct a basic_object_handle on an existing native handle. 
-
-     Move-construct a basic_object_handle from another. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.close [*close]]]
-    [Close the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.get_executor [*get_executor]]]
-    [Get the executor associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.get_io_context [*get_io_context]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.is_open [*is_open]]]
-    [Determine whether the handle is open. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.lowest_layer [*lowest_layer]]]
-    [Get a reference to the lowest layer. 
-
-     Get a const reference to the lowest layer. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.native_handle [*native_handle]]]
-    [Get the native handle representation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.operator_eq_ [*operator=]]]
-    [Move-assign a basic_object_handle from another. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.wait [*wait]]]
-    [Perform a blocking wait on the object handle. ]
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__basic_object_handle.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-]
-
-The [link asio.reference.windows__basic_object_handle `windows::basic_object_handle`] class template provides asynchronous and blocking object-oriented handle functionality.
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe. 
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_object_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign windows::basic_object_handle::assign]
-
-[indexterm2 assign..windows::basic_object_handle] 
-Assign an existing native handle to the handle. 
-
-
-  void ``[link asio.reference.windows__basic_object_handle.assign.overload1 assign]``(
-      const native_handle_type & handle);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.assign.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.windows__basic_object_handle.assign.overload2 assign]``(
-      const native_handle_type & handle,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.assign.overload2 more...]]``
-
-
-[section:overload1 windows::basic_object_handle::assign (1 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Assign an existing native handle to the handle. 
-
-
-  void assign(
-      const native_handle_type & handle);
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_object_handle::assign (2 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Assign an existing native handle to the handle. 
-
-
-  asio::error_code assign(
-      const native_handle_type & handle,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_wait windows::basic_object_handle::async_wait]
-
-[indexterm2 async_wait..windows::basic_object_handle] 
-Start an asynchronous wait on the object handle. 
-
-
-  template<
-      typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      WaitHandler && handler);
-
-
-This function is be used to initiate an asynchronous wait against the object handle. It always returns immediately.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[handler][The handler to be called when the object handle is set to the signalled state. Copies will be made of the handler as required. The function signature of the handler must be: 
-``
-   void handler(
-     const asio::error_code& error // Result of operation.
-   ); 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[section:basic_object_handle windows::basic_object_handle::basic_object_handle]
-
-[indexterm2 basic_object_handle..windows::basic_object_handle] 
-Construct a [link asio.reference.windows__basic_object_handle `windows::basic_object_handle`] without opening it. 
-
-
-  explicit ``[link asio.reference.windows__basic_object_handle.basic_object_handle.overload1 basic_object_handle]``(
+  explicit ``[link asio.reference.windows__object_handle.object_handle.overload1 object_handle]``(
       asio::io_context & io_context);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.basic_object_handle.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.object_handle.overload1 more...]]``
 
 
-Construct a [link asio.reference.windows__basic_object_handle `windows::basic_object_handle`] on an existing native handle. 
+Construct an [link asio.reference.windows__object_handle `windows::object_handle`] on an existing native handle. 
 
 
-  ``[link asio.reference.windows__basic_object_handle.basic_object_handle.overload2 basic_object_handle]``(
+  ``[link asio.reference.windows__object_handle.object_handle.overload2 object_handle]``(
       asio::io_context & io_context,
       const native_handle_type & native_handle);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.basic_object_handle.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.object_handle.overload2 more...]]``
 
 
-Move-construct a [link asio.reference.windows__basic_object_handle `windows::basic_object_handle`] from another. 
+Move-construct an [link asio.reference.windows__object_handle `windows::object_handle`] from another. 
 
 
-  ``[link asio.reference.windows__basic_object_handle.basic_object_handle.overload3 basic_object_handle]``(
-      basic_object_handle && other);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.basic_object_handle.overload3 more...]]``
+  ``[link asio.reference.windows__object_handle.object_handle.overload3 object_handle]``(
+      object_handle && other);
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.object_handle.overload3 more...]]``
 
 
-[section:overload1 windows::basic_object_handle::basic_object_handle (1 of 3 overloads)]
+[section:overload1 windows::object_handle::object_handle (1 of 3 overloads)]
 
 
-Construct a [link asio.reference.windows__basic_object_handle `windows::basic_object_handle`] without opening it. 
+Construct an [link asio.reference.windows__object_handle `windows::object_handle`] without opening it. 
 
 
-  basic_object_handle(
+  object_handle(
       asio::io_context & io_context);
 
 
@@ -124166,13 +107097,13 @@
 
 
 
-[section:overload2 windows::basic_object_handle::basic_object_handle (2 of 3 overloads)]
+[section:overload2 windows::object_handle::object_handle (2 of 3 overloads)]
 
 
-Construct a [link asio.reference.windows__basic_object_handle `windows::basic_object_handle`] on an existing native handle. 
+Construct an [link asio.reference.windows__object_handle `windows::object_handle`] on an existing native handle. 
 
 
-  basic_object_handle(
+  object_handle(
       asio::io_context & io_context,
       const native_handle_type & native_handle);
 
@@ -124208,14 +107139,14 @@
 
 
 
-[section:overload3 windows::basic_object_handle::basic_object_handle (3 of 3 overloads)]
+[section:overload3 windows::object_handle::object_handle (3 of 3 overloads)]
 
 
-Move-construct a [link asio.reference.windows__basic_object_handle `windows::basic_object_handle`] from another. 
+Move-construct an [link asio.reference.windows__object_handle `windows::object_handle`] from another. 
 
 
-  basic_object_handle(
-      basic_object_handle && other);
+  object_handle(
+      object_handle && other);
 
 
 This constructor moves an object handle from one object to another.
@@ -124226,170 +107157,14 @@
 
 [variablelist
   
-[[other][The other [link asio.reference.windows__basic_object_handle `windows::basic_object_handle`] object from which the move will occur.]]
+[[other][The other [link asio.reference.windows__object_handle `windows::object_handle`] object from which the move will occur.]]
 
 ]
 
 
 [heading Remarks]
       
-Following the move, the moved-from object is in the same state as if constructed using the `basic_object_handle(io_context&) constructor`. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:cancel windows::basic_object_handle::cancel]
-
-[indexterm2 cancel..windows::basic_object_handle] 
-Cancel all asynchronous operations associated with the handle. 
-
-
-  void ``[link asio.reference.windows__basic_object_handle.cancel.overload1 cancel]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.cancel.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.windows__basic_object_handle.cancel.overload2 cancel]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.cancel.overload2 more...]]``
-
-
-[section:overload1 windows::basic_object_handle::cancel (1 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Cancel all asynchronous operations associated with the handle. 
-
-
-  void cancel();
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_object_handle::cancel (2 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Cancel all asynchronous operations associated with the handle. 
-
-
-  asio::error_code cancel(
-      asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close windows::basic_object_handle::close]
-
-[indexterm2 close..windows::basic_object_handle] 
-Close the handle. 
-
-
-  void ``[link asio.reference.windows__basic_object_handle.close.overload1 close]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.close.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.windows__basic_object_handle.close.overload2 close]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.close.overload2 more...]]``
-
-
-[section:overload1 windows::basic_object_handle::close (1 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Close the handle. 
-
-
-  void close();
-
-
-This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_object_handle::close (2 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Close the handle. 
-
-
-  asio::error_code close(
-      asio::error_code & ec);
-
-
-This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
+Following the move, the moved-from object is in the same state as if constructed using the `object_handle(io_context&) constructor`. 
 
 
 
@@ -124400,575 +107175,14 @@
 [endsect]
 
 
-[section:executor_type windows::basic_object_handle::executor_type]
+[section:operator_eq_ windows::object_handle::operator=]
 
+[indexterm2 asio.indexterm.windows__object_handle.operator_eq_..operator=..windows::object_handle] 
+Move-assign an [link asio.reference.windows__object_handle `windows::object_handle`] from another. 
 
-['Inherited from basic_io_object.]
 
-[indexterm2 executor_type..windows::basic_object_handle] 
-The type of the executor associated with the object. 
-
-
-  typedef asio::io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.io_context__executor_type.context [*context]]]
-    [Obtain the underlying execution context. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.defer [*defer]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
-    [Inform the io_context that some work is no longer outstanding. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
-    [Inform the io_context that it has some outstanding work to do. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.post [*post]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
-    [Determine whether the io_context is running in the current thread. ]
-  ]
-  
-]
-
-[heading Friends]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
-    [Compare two executors for inequality. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
-    [Compare two executors for equality. ]
-  ]
-  
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_object_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor windows::basic_object_handle::get_executor]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..windows::basic_object_handle] 
-Get the executor associated with the object. 
-
-
-  executor_type get_executor();
-
-
-
-[endsect]
-
-
-[section:get_implementation windows::basic_object_handle::get_implementation]
-
-[indexterm2 get_implementation..windows::basic_object_handle] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.windows__basic_object_handle.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.windows__basic_object_handle.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.get_implementation.overload2 more...]]``
-
-
-[section:overload1 windows::basic_object_handle::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_object_handle::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_io_context windows::basic_object_handle::get_io_context]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..windows::basic_object_handle] 
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
-
-
-  asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-      
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service windows::basic_object_handle::get_io_service]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..windows::basic_object_handle] 
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
-
-
-  asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-      
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-[section:get_service windows::basic_object_handle::get_service]
-
-[indexterm2 get_service..windows::basic_object_handle] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.windows__basic_object_handle.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.windows__basic_object_handle.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.get_service.overload2 more...]]``
-
-
-[section:overload1 windows::basic_object_handle::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_object_handle::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type windows::basic_object_handle::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..windows::basic_object_handle] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_object_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:is_open windows::basic_object_handle::is_open]
-
-
-['Inherited from windows::basic_handle.]
-
-[indexterm2 is_open..windows::basic_object_handle] 
-Determine whether the handle is open. 
-
-
-  bool is_open() const;
-
-
-
-[endsect]
-
-
-[section:lowest_layer windows::basic_object_handle::lowest_layer]
-
-[indexterm2 lowest_layer..windows::basic_object_handle] 
-Get a reference to the lowest layer. 
-
-
-  lowest_layer_type & ``[link asio.reference.windows__basic_object_handle.lowest_layer.overload1 lowest_layer]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer. 
-
-
-  const lowest_layer_type & ``[link asio.reference.windows__basic_object_handle.lowest_layer.overload2 lowest_layer]``() const;
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 windows::basic_object_handle::lowest_layer (1 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Get a reference to the lowest layer. 
-
-
-  lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.windows__basic_handle `windows::basic_handle`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-      
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_object_handle::lowest_layer (2 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Get a const reference to the lowest layer. 
-
-
-  const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.windows__basic_handle `windows::basic_handle`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-      
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type windows::basic_object_handle::lowest_layer_type]
-
-
-['Inherited from windows::basic_handle.]
-
-[indexterm2 lowest_layer_type..windows::basic_object_handle] 
-A [link asio.reference.windows__basic_handle `windows::basic_handle`] is always the lowest layer. 
-
-
-  typedef basic_handle< ObjectHandleService > lowest_layer_type;
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.executor_type [*executor_type]]]
-    [The type of the executor associated with the object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_handle is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.native_handle_type [*native_handle_type]]]
-    [The native representation of a handle. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__basic_handle.assign [*assign]]]
-    [Assign an existing native handle to the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.basic_handle [*basic_handle]]]
-    [Construct a basic_handle without opening it. 
-
-     Construct a basic_handle on an existing native handle. 
-
-     Move-construct a basic_handle from another. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.close [*close]]]
-    [Close the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.get_executor [*get_executor]]]
-    [Get the executor associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.get_io_context [*get_io_context]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.is_open [*is_open]]]
-    [Determine whether the handle is open. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.lowest_layer [*lowest_layer]]]
-    [Get a reference to the lowest layer. 
-
-     Get a const reference to the lowest layer. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.native_handle [*native_handle]]]
-    [Get the native handle representation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.operator_eq_ [*operator=]]]
-    [Move-assign a basic_handle from another. ]
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__basic_handle.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle._basic_handle [*~basic_handle]]]
-    [Protected destructor to prevent deletion through this type. ]
-  ]
-  
-]
-
-The [link asio.reference.windows__basic_handle `windows::basic_handle`] class template provides the ability to wrap a Windows handle.
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe. 
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_object_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:native_handle windows::basic_object_handle::native_handle]
-
-
-['Inherited from windows::basic_handle.]
-
-[indexterm2 native_handle..windows::basic_object_handle] 
-Get the native handle representation. 
-
-
-  native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the handle. This is intended to allow access to native handle functionality that is not otherwise provided. 
-
-
-[endsect]
-
-
-
-[section:native_handle_type windows::basic_object_handle::native_handle_type]
-
-[indexterm2 native_handle_type..windows::basic_object_handle] 
-The native representation of a handle. 
-
-
-  typedef ObjectHandleService::native_handle_type native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_object_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ windows::basic_object_handle::operator=]
-
-[indexterm2 operator=..windows::basic_object_handle] 
-Move-assign a [link asio.reference.windows__basic_object_handle `windows::basic_object_handle`] from another. 
-
-
-  basic_object_handle & operator=(
-      basic_object_handle && other);
+  object_handle & operator=(
+      object_handle && other);
 
 
 This assignment operator moves an object handle from one object to another.
@@ -124979,14 +107193,14 @@
 
 [variablelist
   
-[[other][The other [link asio.reference.windows__basic_object_handle `windows::basic_object_handle`] object from which the move will occur.]]
+[[other][The other [link asio.reference.windows__object_handle `windows::object_handle`] object from which the move will occur.]]
 
 ]
 
 
 [heading Remarks]
       
-Following the move, the moved-from object is in the same state as if constructed using the `basic_object_handle(io_context&) constructor`. 
+Following the move, the moved-from object is in the same state as if constructed using the `object_handle(io_context&) constructor`. 
 
 
 
@@ -124994,45 +107208,21 @@
 [endsect]
 
 
+[section:wait windows::object_handle::wait]
 
-[section:service_type windows::basic_object_handle::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..windows::basic_object_handle] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef ObjectHandleService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_object_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:wait windows::basic_object_handle::wait]
-
-[indexterm2 wait..windows::basic_object_handle] 
+[indexterm2 asio.indexterm.windows__object_handle.wait..wait..windows::object_handle] 
 Perform a blocking wait on the object handle. 
 
 
-  void ``[link asio.reference.windows__basic_object_handle.wait.overload1 wait]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.wait.overload1 more...]]``
+  void ``[link asio.reference.windows__object_handle.wait.overload1 wait]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.wait.overload1 more...]]``
 
-  void ``[link asio.reference.windows__basic_object_handle.wait.overload2 wait]``(
+  void ``[link asio.reference.windows__object_handle.wait.overload2 wait]``(
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_object_handle.wait.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.windows__object_handle.wait.overload2 more...]]``
 
 
-[section:overload1 windows::basic_object_handle::wait (1 of 2 overloads)]
+[section:overload1 windows::object_handle::wait (1 of 2 overloads)]
 
 
 Perform a blocking wait on the object handle. 
@@ -125060,7 +107250,7 @@
 
 
 
-[section:overload2 windows::basic_object_handle::wait (2 of 2 overloads)]
+[section:overload2 windows::object_handle::wait (2 of 2 overloads)]
 
 
 Perform a blocking wait on the object handle. 
@@ -125093,16 +107283,13 @@
 
 [endsect]
 
-[section:windows__basic_random_access_handle windows::basic_random_access_handle]
+[section:windows__overlapped_handle windows::overlapped_handle]
 
 
-Provides random-access handle functionality. 
+Provides Windows handle functionality for objects that support overlapped I/O. 
 
 
-  template<
-      typename ``[link asio.reference.RandomAccessHandleService RandomAccessHandleService]`` = random_access_handle_service>
-  class basic_random_access_handle :
-    public windows::basic_handle< RandomAccessHandleService >
+  class overlapped_handle
 
 
 [heading Types]
@@ -125111,39 +107298,25 @@
 
   [
 
-    [[link asio.reference.windows__basic_random_access_handle.executor_type [*executor_type]]]
+    [[link asio.reference.windows__overlapped_handle.executor_type [*executor_type]]]
     [The type of the executor associated with the object. ]
   
   ]
 
   [
 
-    [[link asio.reference.windows__basic_random_access_handle.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
+    [[link asio.reference.windows__overlapped_handle.lowest_layer_type [*lowest_layer_type]]]
+    [An overlapped_handle is always the lowest layer. ]
   
   ]
 
   [
 
-    [[link asio.reference.windows__basic_random_access_handle.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_handle is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_random_access_handle.native_handle_type [*native_handle_type]]]
+    [[link asio.reference.windows__overlapped_handle.native_handle_type [*native_handle_type]]]
     [The native representation of a handle. ]
   
   ]
 
-  [
-
-    [[link asio.reference.windows__basic_random_access_handle.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -125151,84 +107324,64 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.windows__basic_random_access_handle.assign [*assign]]]
+    [[link asio.reference.windows__overlapped_handle.assign [*assign]]]
     [Assign an existing native handle to the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.async_read_some_at [*async_read_some_at]]]
-    [Start an asynchronous read at the specified offset. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_random_access_handle.async_write_some_at [*async_write_some_at]]]
-    [Start an asynchronous write at the specified offset. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_random_access_handle.basic_random_access_handle [*basic_random_access_handle]]]
-    [Construct a basic_random_access_handle without opening it. 
-
-     Construct a basic_random_access_handle on an existing native handle. 
-
-     Move-construct a basic_random_access_handle from another. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_random_access_handle.cancel [*cancel]]]
+    [[link asio.reference.windows__overlapped_handle.cancel [*cancel]]]
     [Cancel all asynchronous operations associated with the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.close [*close]]]
+    [[link asio.reference.windows__overlapped_handle.close [*close]]]
     [Close the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.get_executor [*get_executor]]]
+    [[link asio.reference.windows__overlapped_handle.get_executor [*get_executor]]]
     [Get the executor associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.get_io_context [*get_io_context]]]
+    [[link asio.reference.windows__overlapped_handle.get_io_context [*get_io_context]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.get_io_service [*get_io_service]]]
+    [[link asio.reference.windows__overlapped_handle.get_io_service [*get_io_service]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.is_open [*is_open]]]
+    [[link asio.reference.windows__overlapped_handle.is_open [*is_open]]]
     [Determine whether the handle is open. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.lowest_layer [*lowest_layer]]]
+    [[link asio.reference.windows__overlapped_handle.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. 
 
      Get a const reference to the lowest layer. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.native_handle [*native_handle]]]
+    [[link asio.reference.windows__overlapped_handle.native_handle [*native_handle]]]
     [Get the native handle representation. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.operator_eq_ [*operator=]]]
-    [Move-assign a basic_random_access_handle from another. ]
+    [[link asio.reference.windows__overlapped_handle.operator_eq_ [*operator=]]]
+    [Move-assign an overlapped_handle from another. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.read_some_at [*read_some_at]]]
-    [Read some data from the handle at the specified offset. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_random_access_handle.write_some_at [*write_some_at]]]
-    [Write some data to the handle at the specified offset. ]
+    [[link asio.reference.windows__overlapped_handle.overlapped_handle [*overlapped_handle]]]
+    [Construct an overlapped_handle without opening it. 
+
+     Construct an overlapped_handle on an existing native handle. 
+
+     Move-construct an overlapped_handle from another. ]
   ]
   
 ]
@@ -125238,18 +107391,13 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.windows__basic_random_access_handle.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_random_access_handle.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.windows__overlapped_handle._overlapped_handle [*~overlapped_handle]]]
+    [Protected destructor to prevent deletion through this type. ]
   ]
   
 ]
 
-The [link asio.reference.windows__basic_random_access_handle `windows::basic_random_access_handle`] class template provides asynchronous and blocking random-access handle functionality.
+The [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] class provides the ability to wrap a Windows handle. The underlying object referred to by the handle must support overlapped I/O.
 
 
 [heading Thread Safety]
@@ -125262,30 +107410,27 @@
 
 [heading Requirements]
 
-['Header: ][^asio/windows/basic_random_access_handle.hpp]
+['Header: ][^asio/windows/overlapped_handle.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
-[section:assign windows::basic_random_access_handle::assign]
+[section:assign windows::overlapped_handle::assign]
 
-[indexterm2 assign..windows::basic_random_access_handle] 
+[indexterm2 asio.indexterm.windows__overlapped_handle.assign..assign..windows::overlapped_handle] 
 Assign an existing native handle to the handle. 
 
 
-  void ``[link asio.reference.windows__basic_random_access_handle.assign.overload1 assign]``(
+  void ``[link asio.reference.windows__overlapped_handle.assign.overload1 assign]``(
       const native_handle_type & handle);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.assign.overload1 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.windows__overlapped_handle.assign.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.windows__basic_random_access_handle.assign.overload2 assign]``(
+  void ``[link asio.reference.windows__overlapped_handle.assign.overload2 assign]``(
       const native_handle_type & handle,
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.assign.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.windows__overlapped_handle.assign.overload2 more...]]``
 
 
-[section:overload1 windows::basic_random_access_handle::assign (1 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
+[section:overload1 windows::overlapped_handle::assign (1 of 2 overloads)]
 
 
 Assign an existing native handle to the handle. 
@@ -125300,16 +107445,13 @@
 
 
 
-[section:overload2 windows::basic_random_access_handle::assign (2 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
+[section:overload2 windows::overlapped_handle::assign (2 of 2 overloads)]
 
 
 Assign an existing native handle to the handle. 
 
 
-  asio::error_code assign(
+  void assign(
       const native_handle_type & handle,
       asio::error_code & ec);
 
@@ -125320,278 +107462,21 @@
 
 [endsect]
 
+[section:cancel windows::overlapped_handle::cancel]
 
-[section:async_read_some_at windows::basic_random_access_handle::async_read_some_at]
-
-[indexterm2 async_read_some_at..windows::basic_random_access_handle] 
-Start an asynchronous read at the specified offset. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some_at(
-      uint64_t offset,
-      const MutableBufferSequence & buffers,
-      ReadHandler && handler);
-
-
-This function is used to asynchronously read data from the random-access handle. The function call always returns immediately.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[offset][The offset at which the data will be read.]]
-
-[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
-``
-   void handler(
-     const asio::error_code& error, // Result of operation.
-     std::size_t bytes_transferred           // Number of bytes read.
-   ); 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-      
-The read operation may not read all of the requested number of bytes. Consider using the [link asio.reference.async_read_at `async_read_at`]  function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
-
-
-[heading Example]
-  
-To read into a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
-
-   handle.async_read_some_at(42, asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`]  documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
-
-
-
-
-[endsect]
-
-
-
-[section:async_write_some_at windows::basic_random_access_handle::async_write_some_at]
-
-[indexterm2 async_write_some_at..windows::basic_random_access_handle] 
-Start an asynchronous write at the specified offset. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some_at(
-      uint64_t offset,
-      const ConstBufferSequence & buffers,
-      WriteHandler && handler);
-
-
-This function is used to asynchronously write data to the random-access handle. The function call always returns immediately.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[offset][The offset at which the data will be written.]]
-
-[[buffers][One or more data buffers to be written to the handle. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
-``
-   void handler(
-     const asio::error_code& error, // Result of operation.
-     std::size_t bytes_transferred           // Number of bytes written.
-   ); 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-      
-The write operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write_at `async_write_at`]  function if you need to ensure that all data is written before the asynchronous operation completes.
-
-
-[heading Example]
-  
-To write a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
-
-   handle.async_write_some_at(42, asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`]  documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
-
-
-
-
-[endsect]
-
-
-[section:basic_random_access_handle windows::basic_random_access_handle::basic_random_access_handle]
-
-[indexterm2 basic_random_access_handle..windows::basic_random_access_handle] 
-Construct a [link asio.reference.windows__basic_random_access_handle `windows::basic_random_access_handle`] without opening it. 
-
-
-  explicit ``[link asio.reference.windows__basic_random_access_handle.basic_random_access_handle.overload1 basic_random_access_handle]``(
-      asio::io_context & io_context);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.basic_random_access_handle.overload1 more...]]``
-
-
-Construct a [link asio.reference.windows__basic_random_access_handle `windows::basic_random_access_handle`] on an existing native handle. 
-
-
-  ``[link asio.reference.windows__basic_random_access_handle.basic_random_access_handle.overload2 basic_random_access_handle]``(
-      asio::io_context & io_context,
-      const native_handle_type & handle);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.basic_random_access_handle.overload2 more...]]``
-
-
-Move-construct a [link asio.reference.windows__basic_random_access_handle `windows::basic_random_access_handle`] from another. 
-
-
-  ``[link asio.reference.windows__basic_random_access_handle.basic_random_access_handle.overload3 basic_random_access_handle]``(
-      basic_random_access_handle && other);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.basic_random_access_handle.overload3 more...]]``
-
-
-[section:overload1 windows::basic_random_access_handle::basic_random_access_handle (1 of 3 overloads)]
-
-
-Construct a [link asio.reference.windows__basic_random_access_handle `windows::basic_random_access_handle`] without opening it. 
-
-
-  basic_random_access_handle(
-      asio::io_context & io_context);
-
-
-This constructor creates a random-access handle without opening it. The handle needs to be opened before data can be written to or read from it.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the random-access handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_random_access_handle::basic_random_access_handle (2 of 3 overloads)]
-
-
-Construct a [link asio.reference.windows__basic_random_access_handle `windows::basic_random_access_handle`] on an existing native handle. 
-
-
-  basic_random_access_handle(
-      asio::io_context & io_context,
-      const native_handle_type & handle);
-
-
-This constructor creates a random-access handle object to hold an existing native handle.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the random-access handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
-
-[[handle][The new underlying handle implementation.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 windows::basic_random_access_handle::basic_random_access_handle (3 of 3 overloads)]
-
-
-Move-construct a [link asio.reference.windows__basic_random_access_handle `windows::basic_random_access_handle`] from another. 
-
-
-  basic_random_access_handle(
-      basic_random_access_handle && other);
-
-
-This constructor moves a random-access handle from one object to another.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[other][The other [link asio.reference.windows__basic_random_access_handle `windows::basic_random_access_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-      
-Following the move, the moved-from object is in the same state as if constructed using the `basic_random_access_handle(io_context&)` constructor. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:cancel windows::basic_random_access_handle::cancel]
-
-[indexterm2 cancel..windows::basic_random_access_handle] 
+[indexterm2 asio.indexterm.windows__overlapped_handle.cancel..cancel..windows::overlapped_handle] 
 Cancel all asynchronous operations associated with the handle. 
 
 
-  void ``[link asio.reference.windows__basic_random_access_handle.cancel.overload1 cancel]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.cancel.overload1 more...]]``
+  void ``[link asio.reference.windows__overlapped_handle.cancel.overload1 cancel]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__overlapped_handle.cancel.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.windows__basic_random_access_handle.cancel.overload2 cancel]``(
+  void ``[link asio.reference.windows__overlapped_handle.cancel.overload2 cancel]``(
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.cancel.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.windows__overlapped_handle.cancel.overload2 more...]]``
 
 
-[section:overload1 windows::basic_random_access_handle::cancel (1 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
+[section:overload1 windows::overlapped_handle::cancel (1 of 2 overloads)]
 
 
 Cancel all asynchronous operations associated with the handle. 
@@ -125619,16 +107504,13 @@
 
 
 
-[section:overload2 windows::basic_random_access_handle::cancel (2 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
+[section:overload2 windows::overlapped_handle::cancel (2 of 2 overloads)]
 
 
 Cancel all asynchronous operations associated with the handle. 
 
 
-  asio::error_code cancel(
+  void cancel(
       asio::error_code & ec);
 
 
@@ -125652,24 +107534,21 @@
 
 [endsect]
 
-[section:close windows::basic_random_access_handle::close]
+[section:close windows::overlapped_handle::close]
 
-[indexterm2 close..windows::basic_random_access_handle] 
+[indexterm2 asio.indexterm.windows__overlapped_handle.close..close..windows::overlapped_handle] 
 Close the handle. 
 
 
-  void ``[link asio.reference.windows__basic_random_access_handle.close.overload1 close]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.close.overload1 more...]]``
+  void ``[link asio.reference.windows__overlapped_handle.close.overload1 close]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__overlapped_handle.close.overload1 more...]]``
 
-  asio::error_code ``[link asio.reference.windows__basic_random_access_handle.close.overload2 close]``(
+  void ``[link asio.reference.windows__overlapped_handle.close.overload2 close]``(
       asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.close.overload2 more...]]``
+  ``  [''''&raquo;''' [link asio.reference.windows__overlapped_handle.close.overload2 more...]]``
 
 
-[section:overload1 windows::basic_random_access_handle::close (1 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
+[section:overload1 windows::overlapped_handle::close (1 of 2 overloads)]
 
 
 Close the handle. 
@@ -125697,16 +107576,13 @@
 
 
 
-[section:overload2 windows::basic_random_access_handle::close (2 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
+[section:overload2 windows::overlapped_handle::close (2 of 2 overloads)]
 
 
 Close the handle. 
 
 
-  asio::error_code close(
+  void close(
       asio::error_code & ec);
 
 
@@ -125731,16 +107607,13 @@
 [endsect]
 
 
-[section:executor_type windows::basic_random_access_handle::executor_type]
+[section:executor_type windows::overlapped_handle::executor_type]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 executor_type..windows::basic_random_access_handle] 
+[indexterm2 asio.indexterm.windows__overlapped_handle.executor_type..executor_type..windows::overlapped_handle] 
 The type of the executor associated with the object. 
 
 
-  typedef asio::io_context::executor_type executor_type;
+  typedef io_context::executor_type executor_type;
 
 
 [heading Member Functions]
@@ -125803,7 +107676,7 @@
 
 [heading Requirements]
 
-['Header: ][^asio/windows/basic_random_access_handle.hpp]
+['Header: ][^asio/windows/overlapped_handle.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -125812,12 +107685,9 @@
 
 
 
-[section:get_executor windows::basic_random_access_handle::get_executor]
+[section:get_executor windows::overlapped_handle::get_executor]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..windows::basic_random_access_handle] 
+[indexterm2 asio.indexterm.windows__overlapped_handle.get_executor..get_executor..windows::overlapped_handle] 
 Get the executor associated with the object. 
 
 
@@ -125828,61 +107698,10 @@
 [endsect]
 
 
-[section:get_implementation windows::basic_random_access_handle::get_implementation]
 
-[indexterm2 get_implementation..windows::basic_random_access_handle] 
-Get the underlying implementation of the I/O object. 
+[section:get_io_context windows::overlapped_handle::get_io_context]
 
-
-  implementation_type & ``[link asio.reference.windows__basic_random_access_handle.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.windows__basic_random_access_handle.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.get_implementation.overload2 more...]]``
-
-
-[section:overload1 windows::basic_random_access_handle::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_random_access_handle::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_io_context windows::basic_random_access_handle::get_io_context]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..windows::basic_random_access_handle] 
+[indexterm2 asio.indexterm.windows__overlapped_handle.get_io_context..get_io_context..windows::overlapped_handle] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -125903,12 +107722,9 @@
 
 
 
-[section:get_io_service windows::basic_random_access_handle::get_io_service]
+[section:get_io_service windows::overlapped_handle::get_io_service]
 
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..windows::basic_random_access_handle] 
+[indexterm2 asio.indexterm.windows__overlapped_handle.get_io_service..get_io_service..windows::overlapped_handle] 
 (Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
 
 
@@ -125928,85 +107744,10 @@
 [endsect]
 
 
-[section:get_service windows::basic_random_access_handle::get_service]
 
-[indexterm2 get_service..windows::basic_random_access_handle] 
-Get the service associated with the I/O object. 
+[section:is_open windows::overlapped_handle::is_open]
 
-
-  service_type & ``[link asio.reference.windows__basic_random_access_handle.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.windows__basic_random_access_handle.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.get_service.overload2 more...]]``
-
-
-[section:overload1 windows::basic_random_access_handle::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_random_access_handle::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type windows::basic_random_access_handle::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..windows::basic_random_access_handle] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_random_access_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:is_open windows::basic_random_access_handle::is_open]
-
-
-['Inherited from windows::basic_handle.]
-
-[indexterm2 is_open..windows::basic_random_access_handle] 
+[indexterm2 asio.indexterm.windows__overlapped_handle.is_open..is_open..windows::overlapped_handle] 
 Determine whether the handle is open. 
 
 
@@ -126017,27 +107758,24 @@
 [endsect]
 
 
-[section:lowest_layer windows::basic_random_access_handle::lowest_layer]
+[section:lowest_layer windows::overlapped_handle::lowest_layer]
 
-[indexterm2 lowest_layer..windows::basic_random_access_handle] 
+[indexterm2 asio.indexterm.windows__overlapped_handle.lowest_layer..lowest_layer..windows::overlapped_handle] 
 Get a reference to the lowest layer. 
 
 
-  lowest_layer_type & ``[link asio.reference.windows__basic_random_access_handle.lowest_layer.overload1 lowest_layer]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.lowest_layer.overload1 more...]]``
+  lowest_layer_type & ``[link asio.reference.windows__overlapped_handle.lowest_layer.overload1 lowest_layer]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__overlapped_handle.lowest_layer.overload1 more...]]``
 
 
 Get a const reference to the lowest layer. 
 
 
-  const lowest_layer_type & ``[link asio.reference.windows__basic_random_access_handle.lowest_layer.overload2 lowest_layer]``() const;
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.lowest_layer.overload2 more...]]``
+  const lowest_layer_type & ``[link asio.reference.windows__overlapped_handle.lowest_layer.overload2 lowest_layer]``() const;
+  ``  [''''&raquo;''' [link asio.reference.windows__overlapped_handle.lowest_layer.overload2 more...]]``
 
 
-[section:overload1 windows::basic_random_access_handle::lowest_layer (1 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
+[section:overload1 windows::overlapped_handle::lowest_layer (1 of 2 overloads)]
 
 
 Get a reference to the lowest layer. 
@@ -126046,7 +107784,7 @@
   lowest_layer_type & lowest_layer();
 
 
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.windows__basic_handle `windows::basic_handle`] cannot contain any further layers, it simply returns a reference to itself.
+This function returns a reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] cannot contain any further layers, it simply returns a reference to itself.
 
 
 [heading Return Value]
@@ -126060,10 +107798,7 @@
 
 
 
-[section:overload2 windows::basic_random_access_handle::lowest_layer (2 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
+[section:overload2 windows::overlapped_handle::lowest_layer (2 of 2 overloads)]
 
 
 Get a const reference to the lowest layer. 
@@ -126072,7 +107807,7 @@
   const lowest_layer_type & lowest_layer() const;
 
 
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.windows__basic_handle `windows::basic_handle`] cannot contain any further layers, it simply returns a reference to itself.
+This function returns a const reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] cannot contain any further layers, it simply returns a reference to itself.
 
 
 [heading Return Value]
@@ -126088,16 +107823,13 @@
 [endsect]
 
 
-[section:lowest_layer_type windows::basic_random_access_handle::lowest_layer_type]
+[section:lowest_layer_type windows::overlapped_handle::lowest_layer_type]
+
+[indexterm2 asio.indexterm.windows__overlapped_handle.lowest_layer_type..lowest_layer_type..windows::overlapped_handle] 
+An [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] is always the lowest layer. 
 
 
-['Inherited from windows::basic_handle.]
-
-[indexterm2 lowest_layer_type..windows::basic_random_access_handle] 
-A [link asio.reference.windows__basic_handle `windows::basic_handle`] is always the lowest layer. 
-
-
-  typedef basic_handle< RandomAccessHandleService > lowest_layer_type;
+  typedef overlapped_handle lowest_layer_type;
 
 
 [heading Types]
@@ -126106,39 +107838,25 @@
 
   [
 
-    [[link asio.reference.windows__basic_handle.executor_type [*executor_type]]]
+    [[link asio.reference.windows__overlapped_handle.executor_type [*executor_type]]]
     [The type of the executor associated with the object. ]
   
   ]
 
   [
 
-    [[link asio.reference.windows__basic_handle.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
+    [[link asio.reference.windows__overlapped_handle.lowest_layer_type [*lowest_layer_type]]]
+    [An overlapped_handle is always the lowest layer. ]
   
   ]
 
   [
 
-    [[link asio.reference.windows__basic_handle.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_handle is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.native_handle_type [*native_handle_type]]]
+    [[link asio.reference.windows__overlapped_handle.native_handle_type [*native_handle_type]]]
     [The native representation of a handle. ]
   
   ]
 
-  [
-
-    [[link asio.reference.windows__basic_handle.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -126146,64 +107864,64 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.windows__basic_handle.assign [*assign]]]
+    [[link asio.reference.windows__overlapped_handle.assign [*assign]]]
     [Assign an existing native handle to the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.basic_handle [*basic_handle]]]
-    [Construct a basic_handle without opening it. 
-
-     Construct a basic_handle on an existing native handle. 
-
-     Move-construct a basic_handle from another. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.cancel [*cancel]]]
+    [[link asio.reference.windows__overlapped_handle.cancel [*cancel]]]
     [Cancel all asynchronous operations associated with the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.close [*close]]]
+    [[link asio.reference.windows__overlapped_handle.close [*close]]]
     [Close the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.get_executor [*get_executor]]]
+    [[link asio.reference.windows__overlapped_handle.get_executor [*get_executor]]]
     [Get the executor associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.get_io_context [*get_io_context]]]
+    [[link asio.reference.windows__overlapped_handle.get_io_context [*get_io_context]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.get_io_service [*get_io_service]]]
+    [[link asio.reference.windows__overlapped_handle.get_io_service [*get_io_service]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.is_open [*is_open]]]
+    [[link asio.reference.windows__overlapped_handle.is_open [*is_open]]]
     [Determine whether the handle is open. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.lowest_layer [*lowest_layer]]]
+    [[link asio.reference.windows__overlapped_handle.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. 
 
      Get a const reference to the lowest layer. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.native_handle [*native_handle]]]
+    [[link asio.reference.windows__overlapped_handle.native_handle [*native_handle]]]
     [Get the native handle representation. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_handle.operator_eq_ [*operator=]]]
-    [Move-assign a basic_handle from another. ]
+    [[link asio.reference.windows__overlapped_handle.operator_eq_ [*operator=]]]
+    [Move-assign an overlapped_handle from another. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.overlapped_handle [*overlapped_handle]]]
+    [Construct an overlapped_handle without opening it. 
+
+     Construct an overlapped_handle on an existing native handle. 
+
+     Move-construct an overlapped_handle from another. ]
   ]
   
 ]
@@ -126213,23 +107931,13 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.windows__basic_handle.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle._basic_handle [*~basic_handle]]]
+    [[link asio.reference.windows__overlapped_handle._overlapped_handle [*~overlapped_handle]]]
     [Protected destructor to prevent deletion through this type. ]
   ]
   
 ]
 
-The [link asio.reference.windows__basic_handle `windows::basic_handle`] class template provides the ability to wrap a Windows handle.
+The [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] class provides the ability to wrap a Windows handle. The underlying object referred to by the handle must support overlapped I/O.
 
 
 [heading Thread Safety]
@@ -126243,7 +107951,7 @@
 
 [heading Requirements]
 
-['Header: ][^asio/windows/basic_random_access_handle.hpp]
+['Header: ][^asio/windows/overlapped_handle.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -126252,12 +107960,9 @@
 
 
 
-[section:native_handle windows::basic_random_access_handle::native_handle]
+[section:native_handle windows::overlapped_handle::native_handle]
 
-
-['Inherited from windows::basic_handle.]
-
-[indexterm2 native_handle..windows::basic_random_access_handle] 
+[indexterm2 asio.indexterm.windows__overlapped_handle.native_handle..native_handle..windows::overlapped_handle] 
 Get the native handle representation. 
 
 
@@ -126271,2393 +107976,19 @@
 
 
 
-[section:native_handle_type windows::basic_random_access_handle::native_handle_type]
+[section:native_handle_type windows::overlapped_handle::native_handle_type]
 
-[indexterm2 native_handle_type..windows::basic_random_access_handle] 
+[indexterm2 asio.indexterm.windows__overlapped_handle.native_handle_type..native_handle_type..windows::overlapped_handle] 
 The native representation of a handle. 
 
 
-  typedef RandomAccessHandleService::native_handle_type native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_random_access_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ windows::basic_random_access_handle::operator=]
-
-[indexterm2 operator=..windows::basic_random_access_handle] 
-Move-assign a [link asio.reference.windows__basic_random_access_handle `windows::basic_random_access_handle`] from another. 
-
-
-  basic_random_access_handle & operator=(
-      basic_random_access_handle && other);
-
-
-This assignment operator moves a random-access handle from one object to another.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[other][The other [link asio.reference.windows__basic_random_access_handle `windows::basic_random_access_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-      
-Following the move, the moved-from object is in the same state as if constructed using the `basic_random_access_handle(io_context&)` constructor. 
-
-
-
-
-[endsect]
-
-
-[section:read_some_at windows::basic_random_access_handle::read_some_at]
-
-[indexterm2 read_some_at..windows::basic_random_access_handle] 
-Read some data from the handle at the specified offset. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.windows__basic_random_access_handle.read_some_at.overload1 read_some_at]``(
-      uint64_t offset,
-      const MutableBufferSequence & buffers);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.read_some_at.overload1 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.windows__basic_random_access_handle.read_some_at.overload2 read_some_at]``(
-      uint64_t offset,
-      const MutableBufferSequence & buffers,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.read_some_at.overload2 more...]]``
-
-
-[section:overload1 windows::basic_random_access_handle::read_some_at (1 of 2 overloads)]
-
-
-Read some data from the handle at the specified offset. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t read_some_at(
-      uint64_t offset,
-      const MutableBufferSequence & buffers);
-
-
-This function is used to read data from the random-access handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[offset][The offset at which the data will be read.]]
-
-[[buffers][One or more buffers into which the data will be read.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes read.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-      
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read_at `read_at`]  function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-[heading Example]
-  
-To read into a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
-
-   handle.read_some_at(42, asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`]  documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_random_access_handle::read_some_at (2 of 2 overloads)]
-
-
-Read some data from the handle at the specified offset. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t read_some_at(
-      uint64_t offset,
-      const MutableBufferSequence & buffers,
-      asio::error_code & ec);
-
-
-This function is used to read data from the random-access handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[offset][The offset at which the data will be read.]]
-
-[[buffers][One or more buffers into which the data will be read.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes read. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-      
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read_at `read_at`]  function if you need to ensure that the requested amount of data is read before the blocking operation completes. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:service_type windows::basic_random_access_handle::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..windows::basic_random_access_handle] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef RandomAccessHandleService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_random_access_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:write_some_at windows::basic_random_access_handle::write_some_at]
-
-[indexterm2 write_some_at..windows::basic_random_access_handle] 
-Write some data to the handle at the specified offset. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.windows__basic_random_access_handle.write_some_at.overload1 write_some_at]``(
-      uint64_t offset,
-      const ConstBufferSequence & buffers);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.write_some_at.overload1 more...]]``
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.windows__basic_random_access_handle.write_some_at.overload2 write_some_at]``(
-      uint64_t offset,
-      const ConstBufferSequence & buffers,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_random_access_handle.write_some_at.overload2 more...]]``
-
-
-[section:overload1 windows::basic_random_access_handle::write_some_at (1 of 2 overloads)]
-
-
-Write some data to the handle at the specified offset. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t write_some_at(
-      uint64_t offset,
-      const ConstBufferSequence & buffers);
-
-
-This function is used to write data to the random-access handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[offset][The offset at which the data will be written.]]
-
-[[buffers][One or more data buffers to be written to the handle.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes written.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-      
-The write\_some\_at operation may not write all of the data. Consider using the [link asio.reference.write_at `write_at`]  function if you need to ensure that all data is written before the blocking operation completes.
-
-
-[heading Example]
-  
-To write a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
-
-   handle.write_some_at(42, asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`]  documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_random_access_handle::write_some_at (2 of 2 overloads)]
-
-
-Write some data to the handle at the specified offset. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t write_some_at(
-      uint64_t offset,
-      const ConstBufferSequence & buffers,
-      asio::error_code & ec);
-
-
-This function is used to write data to the random-access handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[offset][The offset at which the data will be written.]]
-
-[[buffers][One or more data buffers to be written to the handle.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes written. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-      
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write_at `write_at`]  function if you need to ensure that all data is written before the blocking operation completes. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:windows__basic_stream_handle windows::basic_stream_handle]
-
-
-Provides stream-oriented handle functionality. 
-
-
-  template<
-      typename ``[link asio.reference.StreamHandleService StreamHandleService]`` = stream_handle_service>
-  class basic_stream_handle :
-    public windows::basic_handle< StreamHandleService >
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.windows__basic_stream_handle.executor_type [*executor_type]]]
-    [The type of the executor associated with the object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_stream_handle.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_stream_handle.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_handle is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_stream_handle.native_handle_type [*native_handle_type]]]
-    [The native representation of a handle. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_stream_handle.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__basic_stream_handle.assign [*assign]]]
-    [Assign an existing native handle to the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.async_read_some [*async_read_some]]]
-    [Start an asynchronous read. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.async_write_some [*async_write_some]]]
-    [Start an asynchronous write. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.basic_stream_handle [*basic_stream_handle]]]
-    [Construct a basic_stream_handle without opening it. 
-
-     Construct a basic_stream_handle on an existing native handle. 
-
-     Move-construct a basic_stream_handle from another. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.close [*close]]]
-    [Close the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.get_executor [*get_executor]]]
-    [Get the executor associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.get_io_context [*get_io_context]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.is_open [*is_open]]]
-    [Determine whether the handle is open. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.lowest_layer [*lowest_layer]]]
-    [Get a reference to the lowest layer. 
-
-     Get a const reference to the lowest layer. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.native_handle [*native_handle]]]
-    [Get the native handle representation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.operator_eq_ [*operator=]]]
-    [Move-assign a basic_stream_handle from another. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.read_some [*read_some]]]
-    [Read some data from the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.write_some [*write_some]]]
-    [Write some data to the handle. ]
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__basic_stream_handle.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-]
-
-The [link asio.reference.windows__basic_stream_handle `windows::basic_stream_handle`] class template provides asynchronous and blocking stream-oriented handle functionality.
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_stream_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign windows::basic_stream_handle::assign]
-
-[indexterm2 assign..windows::basic_stream_handle] 
-Assign an existing native handle to the handle. 
-
-
-  void ``[link asio.reference.windows__basic_stream_handle.assign.overload1 assign]``(
-      const native_handle_type & handle);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.assign.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.windows__basic_stream_handle.assign.overload2 assign]``(
-      const native_handle_type & handle,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.assign.overload2 more...]]``
-
-
-[section:overload1 windows::basic_stream_handle::assign (1 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Assign an existing native handle to the handle. 
-
-
-  void assign(
-      const native_handle_type & handle);
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_stream_handle::assign (2 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Assign an existing native handle to the handle. 
-
-
-  asio::error_code assign(
-      const native_handle_type & handle,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_read_some windows::basic_stream_handle::async_read_some]
-
-[indexterm2 async_read_some..windows::basic_stream_handle] 
-Start an asynchronous read. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some(
-      const MutableBufferSequence & buffers,
-      ReadHandler && handler);
-
-
-This function is used to asynchronously read data from the stream handle. The function call always returns immediately.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
-``
-   void handler(
-     const asio::error_code& error, // Result of operation.
-     std::size_t bytes_transferred           // Number of bytes read.
-   ); 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-      
-The read operation may not read all of the requested number of bytes. Consider using the [link asio.reference.async_read `async_read`]  function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
-
-
-[heading Example]
-  
-To read into a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
-
-   handle.async_read_some(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`]  documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
-
-
-
-
-[endsect]
-
-
-
-[section:async_write_some windows::basic_stream_handle::async_write_some]
-
-[indexterm2 async_write_some..windows::basic_stream_handle] 
-Start an asynchronous write. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some(
-      const ConstBufferSequence & buffers,
-      WriteHandler && handler);
-
-
-This function is used to asynchronously write data to the stream handle. The function call always returns immediately.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[buffers][One or more data buffers to be written to the handle. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
-``
-   void handler(
-     const asio::error_code& error, // Result of operation.
-     std::size_t bytes_transferred           // Number of bytes written.
-   ); 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-      
-The write operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write `async_write`]  function if you need to ensure that all data is written before the asynchronous operation completes.
-
-
-[heading Example]
-  
-To write a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
-
-   handle.async_write_some(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`]  documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
-
-
-
-
-[endsect]
-
-
-[section:basic_stream_handle windows::basic_stream_handle::basic_stream_handle]
-
-[indexterm2 basic_stream_handle..windows::basic_stream_handle] 
-Construct a [link asio.reference.windows__basic_stream_handle `windows::basic_stream_handle`] without opening it. 
-
-
-  explicit ``[link asio.reference.windows__basic_stream_handle.basic_stream_handle.overload1 basic_stream_handle]``(
-      asio::io_context & io_context);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.basic_stream_handle.overload1 more...]]``
-
-
-Construct a [link asio.reference.windows__basic_stream_handle `windows::basic_stream_handle`] on an existing native handle. 
-
-
-  ``[link asio.reference.windows__basic_stream_handle.basic_stream_handle.overload2 basic_stream_handle]``(
-      asio::io_context & io_context,
-      const native_handle_type & handle);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.basic_stream_handle.overload2 more...]]``
-
-
-Move-construct a [link asio.reference.windows__basic_stream_handle `windows::basic_stream_handle`] from another. 
-
-
-  ``[link asio.reference.windows__basic_stream_handle.basic_stream_handle.overload3 basic_stream_handle]``(
-      basic_stream_handle && other);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.basic_stream_handle.overload3 more...]]``
-
-
-[section:overload1 windows::basic_stream_handle::basic_stream_handle (1 of 3 overloads)]
-
-
-Construct a [link asio.reference.windows__basic_stream_handle `windows::basic_stream_handle`] without opening it. 
-
-
-  basic_stream_handle(
-      asio::io_context & io_context);
-
-
-This constructor creates a stream handle without opening it. The handle needs to be opened and then connected or accepted before data can be sent or received on it.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the stream handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_stream_handle::basic_stream_handle (2 of 3 overloads)]
-
-
-Construct a [link asio.reference.windows__basic_stream_handle `windows::basic_stream_handle`] on an existing native handle. 
-
-
-  basic_stream_handle(
-      asio::io_context & io_context,
-      const native_handle_type & handle);
-
-
-This constructor creates a stream handle object to hold an existing native handle.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[io_context][The [link asio.reference.io_context `io_context`] object that the stream handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
-
-[[handle][The new underlying handle implementation.]]
-
-]
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 windows::basic_stream_handle::basic_stream_handle (3 of 3 overloads)]
-
-
-Move-construct a [link asio.reference.windows__basic_stream_handle `windows::basic_stream_handle`] from another. 
-
-
-  basic_stream_handle(
-      basic_stream_handle && other);
-
-
-This constructor moves a stream handle from one object to another.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[other][The other [link asio.reference.windows__basic_stream_handle `windows::basic_stream_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-      
-Following the move, the moved-from object is in the same state as if constructed using the `basic_stream_handle(io_context&) constructor`. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:cancel windows::basic_stream_handle::cancel]
-
-[indexterm2 cancel..windows::basic_stream_handle] 
-Cancel all asynchronous operations associated with the handle. 
-
-
-  void ``[link asio.reference.windows__basic_stream_handle.cancel.overload1 cancel]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.cancel.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.windows__basic_stream_handle.cancel.overload2 cancel]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.cancel.overload2 more...]]``
-
-
-[section:overload1 windows::basic_stream_handle::cancel (1 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Cancel all asynchronous operations associated with the handle. 
-
-
-  void cancel();
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_stream_handle::cancel (2 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Cancel all asynchronous operations associated with the handle. 
-
-
-  asio::error_code cancel(
-      asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close windows::basic_stream_handle::close]
-
-[indexterm2 close..windows::basic_stream_handle] 
-Close the handle. 
-
-
-  void ``[link asio.reference.windows__basic_stream_handle.close.overload1 close]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.close.overload1 more...]]``
-
-  asio::error_code ``[link asio.reference.windows__basic_stream_handle.close.overload2 close]``(
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.close.overload2 more...]]``
-
-
-[section:overload1 windows::basic_stream_handle::close (1 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Close the handle. 
-
-
-  void close();
-
-
-This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_stream_handle::close (2 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Close the handle. 
-
-
-  asio::error_code close(
-      asio::error_code & ec);
-
-
-This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type windows::basic_stream_handle::executor_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 executor_type..windows::basic_stream_handle] 
-The type of the executor associated with the object. 
-
-
-  typedef asio::io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.io_context__executor_type.context [*context]]]
-    [Obtain the underlying execution context. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.defer [*defer]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
-    [Inform the io_context that some work is no longer outstanding. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
-    [Inform the io_context that it has some outstanding work to do. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.post [*post]]]
-    [Request the io_context to invoke the given function object. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
-    [Determine whether the io_context is running in the current thread. ]
-  ]
-  
-]
-
-[heading Friends]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
-    [Compare two executors for inequality. ]
-  ]
-  
-  [
-    [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
-    [Compare two executors for equality. ]
-  ]
-  
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_stream_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor windows::basic_stream_handle::get_executor]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_executor..windows::basic_stream_handle] 
-Get the executor associated with the object. 
-
-
-  executor_type get_executor();
-
-
-
-[endsect]
-
-
-[section:get_implementation windows::basic_stream_handle::get_implementation]
-
-[indexterm2 get_implementation..windows::basic_stream_handle] 
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & ``[link asio.reference.windows__basic_stream_handle.get_implementation.overload1 get_implementation]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.get_implementation.overload1 more...]]``
-
-  const implementation_type & ``[link asio.reference.windows__basic_stream_handle.get_implementation.overload2 get_implementation]``() const;
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.get_implementation.overload2 more...]]``
-
-
-[section:overload1 windows::basic_stream_handle::get_implementation (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_stream_handle::get_implementation (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the underlying implementation of the I/O object. 
-
-
-  const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_io_context windows::basic_stream_handle::get_io_context]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_context..windows::basic_stream_handle] 
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
-
-
-  asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-      
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service windows::basic_stream_handle::get_io_service]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 get_io_service..windows::basic_stream_handle] 
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
-
-
-  asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-      
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-[section:get_service windows::basic_stream_handle::get_service]
-
-[indexterm2 get_service..windows::basic_stream_handle] 
-Get the service associated with the I/O object. 
-
-
-  service_type & ``[link asio.reference.windows__basic_stream_handle.get_service.overload1 get_service]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.get_service.overload1 more...]]``
-
-  const service_type & ``[link asio.reference.windows__basic_stream_handle.get_service.overload2 get_service]``() const;
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.get_service.overload2 more...]]``
-
-
-[section:overload1 windows::basic_stream_handle::get_service (1 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_stream_handle::get_service (2 of 2 overloads)]
-
-
-['Inherited from basic_io_object.]
-
-
-Get the service associated with the I/O object. 
-
-
-  const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type windows::basic_stream_handle::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 implementation_type..windows::basic_stream_handle] 
-The underlying implementation type of I/O object. 
-
-
-  typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_stream_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:is_open windows::basic_stream_handle::is_open]
-
-
-['Inherited from windows::basic_handle.]
-
-[indexterm2 is_open..windows::basic_stream_handle] 
-Determine whether the handle is open. 
-
-
-  bool is_open() const;
-
-
-
-[endsect]
-
-
-[section:lowest_layer windows::basic_stream_handle::lowest_layer]
-
-[indexterm2 lowest_layer..windows::basic_stream_handle] 
-Get a reference to the lowest layer. 
-
-
-  lowest_layer_type & ``[link asio.reference.windows__basic_stream_handle.lowest_layer.overload1 lowest_layer]``();
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer. 
-
-
-  const lowest_layer_type & ``[link asio.reference.windows__basic_stream_handle.lowest_layer.overload2 lowest_layer]``() const;
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 windows::basic_stream_handle::lowest_layer (1 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Get a reference to the lowest layer. 
-
-
-  lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.windows__basic_handle `windows::basic_handle`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-      
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_stream_handle::lowest_layer (2 of 2 overloads)]
-
-
-['Inherited from windows::basic_handle.]
-
-
-Get a const reference to the lowest layer. 
-
-
-  const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.windows__basic_handle `windows::basic_handle`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-      
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type windows::basic_stream_handle::lowest_layer_type]
-
-
-['Inherited from windows::basic_handle.]
-
-[indexterm2 lowest_layer_type..windows::basic_stream_handle] 
-A [link asio.reference.windows__basic_handle `windows::basic_handle`] is always the lowest layer. 
-
-
-  typedef basic_handle< StreamHandleService > lowest_layer_type;
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.executor_type [*executor_type]]]
-    [The type of the executor associated with the object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_handle is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.native_handle_type [*native_handle_type]]]
-    [The native representation of a handle. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_handle.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__basic_handle.assign [*assign]]]
-    [Assign an existing native handle to the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.basic_handle [*basic_handle]]]
-    [Construct a basic_handle without opening it. 
-
-     Construct a basic_handle on an existing native handle. 
-
-     Move-construct a basic_handle from another. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.close [*close]]]
-    [Close the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.get_executor [*get_executor]]]
-    [Get the executor associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.get_io_context [*get_io_context]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.is_open [*is_open]]]
-    [Determine whether the handle is open. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.lowest_layer [*lowest_layer]]]
-    [Get a reference to the lowest layer. 
-
-     Get a const reference to the lowest layer. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.native_handle [*native_handle]]]
-    [Get the native handle representation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.operator_eq_ [*operator=]]]
-    [Move-assign a basic_handle from another. ]
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__basic_handle.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_handle._basic_handle [*~basic_handle]]]
-    [Protected destructor to prevent deletion through this type. ]
-  ]
-  
-]
-
-The [link asio.reference.windows__basic_handle `windows::basic_handle`] class template provides the ability to wrap a Windows handle.
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe. 
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_stream_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:native_handle windows::basic_stream_handle::native_handle]
-
-
-['Inherited from windows::basic_handle.]
-
-[indexterm2 native_handle..windows::basic_stream_handle] 
-Get the native handle representation. 
-
-
-  native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the handle. This is intended to allow access to native handle functionality that is not otherwise provided. 
-
-
-[endsect]
-
-
-
-[section:native_handle_type windows::basic_stream_handle::native_handle_type]
-
-[indexterm2 native_handle_type..windows::basic_stream_handle] 
-The native representation of a handle. 
-
-
-  typedef StreamHandleService::native_handle_type native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_stream_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ windows::basic_stream_handle::operator=]
-
-[indexterm2 operator=..windows::basic_stream_handle] 
-Move-assign a [link asio.reference.windows__basic_stream_handle `windows::basic_stream_handle`] from another. 
-
-
-  basic_stream_handle & operator=(
-      basic_stream_handle && other);
-
-
-This assignment operator moves a stream handle from one object to another.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[other][The other [link asio.reference.windows__basic_stream_handle `windows::basic_stream_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-      
-Following the move, the moved-from object is in the same state as if constructed using the `basic_stream_handle(io_context&) constructor`. 
-
-
-
-
-[endsect]
-
-
-[section:read_some windows::basic_stream_handle::read_some]
-
-[indexterm2 read_some..windows::basic_stream_handle] 
-Read some data from the handle. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.windows__basic_stream_handle.read_some.overload1 read_some]``(
-      const MutableBufferSequence & buffers);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.read_some.overload1 more...]]``
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t ``[link asio.reference.windows__basic_stream_handle.read_some.overload2 read_some]``(
-      const MutableBufferSequence & buffers,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.read_some.overload2 more...]]``
-
-
-[section:overload1 windows::basic_stream_handle::read_some (1 of 2 overloads)]
-
-
-Read some data from the handle. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t read_some(
-      const MutableBufferSequence & buffers);
-
-
-This function is used to read data from the stream handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[buffers][One or more buffers into which the data will be read.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes read.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-      
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`]  function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-[heading Example]
-  
-To read into a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
-
-   handle.read_some(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`]  documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_stream_handle::read_some (2 of 2 overloads)]
-
-
-Read some data from the handle. 
-
-
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
-  std::size_t read_some(
-      const MutableBufferSequence & buffers,
-      asio::error_code & ec);
-
-
-This function is used to read data from the stream handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[buffers][One or more buffers into which the data will be read.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes read. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-      
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`]  function if you need to ensure that the requested amount of data is read before the blocking operation completes. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:service_type windows::basic_stream_handle::service_type]
-
-
-['Inherited from basic_io_object.]
-
-[indexterm2 service_type..windows::basic_stream_handle] 
-The type of the service that will be used to provide I/O operations. 
-
-
-  typedef StreamHandleService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/basic_stream_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:write_some windows::basic_stream_handle::write_some]
-
-[indexterm2 write_some..windows::basic_stream_handle] 
-Write some data to the handle. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.windows__basic_stream_handle.write_some.overload1 write_some]``(
-      const ConstBufferSequence & buffers);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.write_some.overload1 more...]]``
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t ``[link asio.reference.windows__basic_stream_handle.write_some.overload2 write_some]``(
-      const ConstBufferSequence & buffers,
-      asio::error_code & ec);
-  ``  [''''&raquo;''' [link asio.reference.windows__basic_stream_handle.write_some.overload2 more...]]``
-
-
-[section:overload1 windows::basic_stream_handle::write_some (1 of 2 overloads)]
-
-
-Write some data to the handle. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t write_some(
-      const ConstBufferSequence & buffers);
-
-
-This function is used to write data to the stream handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[buffers][One or more data buffers to be written to the handle.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes written.
-
-
-[heading Exceptions]
-    
-
-[variablelist
-  
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-      
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`]  function if you need to ensure that all data is written before the blocking operation completes.
-
-
-[heading Example]
-  
-To write a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
-
-   handle.write_some(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`]  documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::basic_stream_handle::write_some (2 of 2 overloads)]
-
-
-Write some data to the handle. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
-  std::size_t write_some(
-      const ConstBufferSequence & buffers,
-      asio::error_code & ec);
-
-
-This function is used to write data to the stream handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-    
-
-[variablelist
-  
-[[buffers][One or more data buffers to be written to the handle.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-      
-The number of bytes written. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-      
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`]  function if you need to ensure that all data is written before the blocking operation completes. 
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:windows__object_handle windows::object_handle]
-
-[indexterm1 windows::object_handle] 
-Typedef for the typical usage of an object handle. 
-
-
-  typedef basic_object_handle object_handle;
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.windows__basic_object_handle.executor_type [*executor_type]]]
-    [The type of the executor associated with the object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_object_handle.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_object_handle.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_handle is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_object_handle.native_handle_type [*native_handle_type]]]
-    [The native representation of a handle. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_object_handle.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__basic_object_handle.assign [*assign]]]
-    [Assign an existing native handle to the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.async_wait [*async_wait]]]
-    [Start an asynchronous wait on the object handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.basic_object_handle [*basic_object_handle]]]
-    [Construct a basic_object_handle without opening it. 
-
-     Construct a basic_object_handle on an existing native handle. 
-
-     Move-construct a basic_object_handle from another. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.close [*close]]]
-    [Close the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.get_executor [*get_executor]]]
-    [Get the executor associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.get_io_context [*get_io_context]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.get_io_service [*get_io_service]]]
-    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.is_open [*is_open]]]
-    [Determine whether the handle is open. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.lowest_layer [*lowest_layer]]]
-    [Get a reference to the lowest layer. 
-
-     Get a const reference to the lowest layer. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.native_handle [*native_handle]]]
-    [Get the native handle representation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.operator_eq_ [*operator=]]]
-    [Move-assign a basic_object_handle from another. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.wait [*wait]]]
-    [Perform a blocking wait on the object handle. ]
-  ]
-  
-]
-
-[heading Protected Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__basic_object_handle.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_object_handle.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
-  ]
-  
-]
-
-The [link asio.reference.windows__basic_object_handle `windows::basic_object_handle`] class template provides asynchronous and blocking object-oriented handle functionality.
-
-
-[heading Thread Safety]
-  
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe. 
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/object_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:windows__object_handle_service windows::object_handle_service]
-
-
-Default service implementation for an object handle. 
-
-
-  class object_handle_service :
-    public io_context::service
-
-
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.windows__object_handle_service.implementation_type [*implementation_type]]]
-    [The type of an object handle implementation. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__object_handle_service.native_handle_type [*native_handle_type]]]
-    [The native handle type. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__object_handle_service.assign [*assign]]]
-    [Assign an existing native handle to an object handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.async_wait [*async_wait]]]
-    [Start an asynchronous wait. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.close [*close]]]
-    [Close an object handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.construct [*construct]]]
-    [Construct a new object handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.destroy [*destroy]]]
-    [Destroy an object handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.is_open [*is_open]]]
-    [Determine whether the handle is open. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.move_assign [*move_assign]]]
-    [Move-assign from another object handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.move_construct [*move_construct]]]
-    [Move-construct a new object handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.native_handle [*native_handle]]]
-    [Get the native handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.object_handle_service [*object_handle_service]]]
-    [Construct a new object handle service for the specified io_context. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__object_handle_service.wait [*wait]]]
-    []
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__object_handle_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/windows/object_handle_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:assign windows::object_handle_service::assign]
-
-[indexterm2 assign..windows::object_handle_service] 
-Assign an existing native handle to an object handle. 
-
-
-  asio::error_code assign(
-      implementation_type & impl,
-      const native_handle_type & handle,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:async_wait windows::object_handle_service::async_wait]
-
-[indexterm2 async_wait..windows::object_handle_service] 
-Start an asynchronous wait. 
-
-
-  template<
-      typename ``[link asio.reference.WaitHandler WaitHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_wait(
-      implementation_type & impl,
-      WaitHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:cancel windows::object_handle_service::cancel]
-
-[indexterm2 cancel..windows::object_handle_service] 
-Cancel all asynchronous operations associated with the handle. 
-
-
-  asio::error_code cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:close windows::object_handle_service::close]
-
-[indexterm2 close..windows::object_handle_service] 
-Close an object handle implementation. 
-
-
-  asio::error_code close(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct windows::object_handle_service::construct]
-
-[indexterm2 construct..windows::object_handle_service] 
-Construct a new object handle implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:destroy windows::object_handle_service::destroy]
-
-[indexterm2 destroy..windows::object_handle_service] 
-Destroy an object handle implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:get_io_context windows::object_handle_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..windows::object_handle_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service windows::object_handle_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..windows::object_handle_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:id windows::object_handle_service::id]
-
-[indexterm2 id..windows::object_handle_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type windows::object_handle_service::implementation_type]
-
-[indexterm2 implementation_type..windows::object_handle_service] 
-The type of an object handle implementation. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/object_handle_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:is_open windows::object_handle_service::is_open]
-
-[indexterm2 is_open..windows::object_handle_service] 
-Determine whether the handle is open. 
-
-
-  bool is_open(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:move_assign windows::object_handle_service::move_assign]
-
-[indexterm2 move_assign..windows::object_handle_service] 
-Move-assign from another object handle implementation. 
-
-
-  void move_assign(
-      implementation_type & impl,
-      object_handle_service & other_service,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:move_construct windows::object_handle_service::move_construct]
-
-[indexterm2 move_construct..windows::object_handle_service] 
-Move-construct a new object handle implementation. 
-
-
-  void move_construct(
-      implementation_type & impl,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle windows::object_handle_service::native_handle]
-
-[indexterm2 native_handle..windows::object_handle_service] 
-Get the native handle implementation. 
-
-
-  native_handle_type native_handle(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle_type windows::object_handle_service::native_handle_type]
-
-[indexterm2 native_handle_type..windows::object_handle_service] 
-The native handle type. 
-
-
   typedef implementation_defined native_handle_type;
 
 
 
 [heading Requirements]
 
-['Header: ][^asio/windows/object_handle_service.hpp]
+['Header: ][^asio/windows/overlapped_handle.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -128666,14 +107997,89 @@
 
 
 
-[section:object_handle_service windows::object_handle_service::object_handle_service]
+[section:operator_eq_ windows::overlapped_handle::operator=]
 
-[indexterm2 object_handle_service..windows::object_handle_service] 
-Construct a new object handle service for the specified [link asio.reference.io_context `io_context`]. 
+[indexterm2 asio.indexterm.windows__overlapped_handle.operator_eq_..operator=..windows::overlapped_handle] 
+Move-assign an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] from another. 
 
 
-  object_handle_service(
+  overlapped_handle & operator=(
+      overlapped_handle && other);
+
+
+This assignment operator moves a handle from one object to another.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] object from which the move will occur.]]
+
+]
+
+
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `overlapped_handle(io_context&) constructor`. 
+
+
+
+
+[endsect]
+
+
+[section:overlapped_handle windows::overlapped_handle::overlapped_handle]
+
+[indexterm2 asio.indexterm.windows__overlapped_handle.overlapped_handle..overlapped_handle..windows::overlapped_handle] 
+Construct an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] without opening it. 
+
+
+  explicit ``[link asio.reference.windows__overlapped_handle.overlapped_handle.overload1 overlapped_handle]``(
       asio::io_context & io_context);
+  ``  [''''&raquo;''' [link asio.reference.windows__overlapped_handle.overlapped_handle.overload1 more...]]``
+
+
+Construct an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] on an existing native handle. 
+
+
+  ``[link asio.reference.windows__overlapped_handle.overlapped_handle.overload2 overlapped_handle]``(
+      asio::io_context & io_context,
+      const native_handle_type & handle);
+  ``  [''''&raquo;''' [link asio.reference.windows__overlapped_handle.overlapped_handle.overload2 more...]]``
+
+
+Move-construct an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] from another. 
+
+
+  ``[link asio.reference.windows__overlapped_handle.overlapped_handle.overload3 overlapped_handle]``(
+      overlapped_handle && other);
+  ``  [''''&raquo;''' [link asio.reference.windows__overlapped_handle.overlapped_handle.overload3 more...]]``
+
+
+[section:overload1 windows::overlapped_handle::overlapped_handle (1 of 3 overloads)]
+
+
+Construct an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] without opening it. 
+
+
+  overlapped_handle(
+      asio::io_context & io_context);
+
+
+This constructor creates a handle without opening it.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
+
+]
+
 
 
 
@@ -128681,15 +108087,95 @@
 
 
 
-[section:wait windows::object_handle_service::wait]
+[section:overload2 windows::overlapped_handle::overlapped_handle (2 of 3 overloads)]
 
-[indexterm2 wait..windows::object_handle_service] 
 
-  void wait(
-      implementation_type & impl,
-      asio::error_code & ec);
+Construct an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] on an existing native handle. 
 
 
+  overlapped_handle(
+      asio::io_context & io_context,
+      const native_handle_type & handle);
+
+
+This constructor creates a handle object to hold an existing native handle.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
+
+[[handle][A native handle.]]
+
+]
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload3 windows::overlapped_handle::overlapped_handle (3 of 3 overloads)]
+
+
+Move-construct an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] from another. 
+
+
+  overlapped_handle(
+      overlapped_handle && other);
+
+
+This constructor moves a handle from one object to another.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] object from which the move will occur.]]
+
+]
+
+
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `overlapped_handle(io_context&) constructor`. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:_overlapped_handle windows::overlapped_handle::~overlapped_handle]
+
+[indexterm2 asio.indexterm.windows__overlapped_handle._overlapped_handle..~overlapped_handle..windows::overlapped_handle] 
+Protected destructor to prevent deletion through this type. 
+
+
+  ~overlapped_handle();
+
+
+This function destroys the handle, cancelling any outstanding asynchronous wait operations associated with the handle as if by calling `cancel`. 
+
 
 [endsect]
 
@@ -128767,7 +108253,7 @@
 
 [section:complete windows::overlapped_ptr::complete]
 
-[indexterm2 complete..windows::overlapped_ptr] 
+[indexterm2 asio.indexterm.windows__overlapped_ptr.complete..complete..windows::overlapped_ptr] 
 Post completion notification for overlapped operation. Releases ownership. 
 
 
@@ -128782,7 +108268,7 @@
 
 [section:get windows::overlapped_ptr::get]
 
-[indexterm2 get..windows::overlapped_ptr] 
+[indexterm2 asio.indexterm.windows__overlapped_ptr.get..get..windows::overlapped_ptr] 
 Get the contained OVERLAPPED object. 
 
 
@@ -128824,7 +108310,7 @@
 
 [section:overlapped_ptr windows::overlapped_ptr::overlapped_ptr]
 
-[indexterm2 overlapped_ptr..windows::overlapped_ptr] 
+[indexterm2 asio.indexterm.windows__overlapped_ptr.overlapped_ptr..overlapped_ptr..windows::overlapped_ptr] 
 Construct an empty [link asio.reference.windows__overlapped_ptr `windows::overlapped_ptr`]. 
 
 
@@ -128879,7 +108365,7 @@
 
 [section:release windows::overlapped_ptr::release]
 
-[indexterm2 release..windows::overlapped_ptr] 
+[indexterm2 asio.indexterm.windows__overlapped_ptr.release..release..windows::overlapped_ptr] 
 Release ownership of the OVERLAPPED object. 
 
 
@@ -128892,7 +108378,7 @@
 
 [section:reset windows::overlapped_ptr::reset]
 
-[indexterm2 reset..windows::overlapped_ptr] 
+[indexterm2 asio.indexterm.windows__overlapped_ptr.reset..reset..windows::overlapped_ptr] 
 Reset to empty. 
 
 
@@ -128947,7 +108433,7 @@
 
 [section:_overlapped_ptr windows::overlapped_ptr::~overlapped_ptr]
 
-[indexterm2 ~overlapped_ptr..windows::overlapped_ptr] 
+[indexterm2 asio.indexterm.windows__overlapped_ptr._overlapped_ptr..~overlapped_ptr..windows::overlapped_ptr] 
 Destructor automatically frees the OVERLAPPED object unless released. 
 
 
@@ -128961,14 +108447,14 @@
 
 [endsect]
 
-
 [section:windows__random_access_handle windows::random_access_handle]
 
-[indexterm1 windows::random_access_handle] 
-Typedef for the typical usage of a random-access handle. 
+
+Provides random-access handle functionality. 
 
 
-  typedef basic_random_access_handle random_access_handle;
+  class random_access_handle :
+    public windows::overlapped_handle
 
 
 [heading Types]
@@ -128977,39 +108463,25 @@
 
   [
 
-    [[link asio.reference.windows__basic_random_access_handle.executor_type [*executor_type]]]
+    [[link asio.reference.windows__random_access_handle.executor_type [*executor_type]]]
     [The type of the executor associated with the object. ]
   
   ]
 
   [
 
-    [[link asio.reference.windows__basic_random_access_handle.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
+    [[link asio.reference.windows__random_access_handle.lowest_layer_type [*lowest_layer_type]]]
+    [An overlapped_handle is always the lowest layer. ]
   
   ]
 
   [
 
-    [[link asio.reference.windows__basic_random_access_handle.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_handle is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_random_access_handle.native_handle_type [*native_handle_type]]]
+    [[link asio.reference.windows__random_access_handle.native_handle_type [*native_handle_type]]]
     [The native representation of a handle. ]
   
   ]
 
-  [
-
-    [[link asio.reference.windows__basic_random_access_handle.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -129017,105 +108489,791 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.windows__basic_random_access_handle.assign [*assign]]]
+    [[link asio.reference.windows__random_access_handle.assign [*assign]]]
     [Assign an existing native handle to the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.async_read_some_at [*async_read_some_at]]]
+    [[link asio.reference.windows__random_access_handle.async_read_some_at [*async_read_some_at]]]
     [Start an asynchronous read at the specified offset. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.async_write_some_at [*async_write_some_at]]]
+    [[link asio.reference.windows__random_access_handle.async_write_some_at [*async_write_some_at]]]
     [Start an asynchronous write at the specified offset. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.basic_random_access_handle [*basic_random_access_handle]]]
-    [Construct a basic_random_access_handle without opening it. 
-
-     Construct a basic_random_access_handle on an existing native handle. 
-
-     Move-construct a basic_random_access_handle from another. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_random_access_handle.cancel [*cancel]]]
+    [[link asio.reference.windows__random_access_handle.cancel [*cancel]]]
     [Cancel all asynchronous operations associated with the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.close [*close]]]
+    [[link asio.reference.windows__random_access_handle.close [*close]]]
     [Close the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.get_executor [*get_executor]]]
+    [[link asio.reference.windows__random_access_handle.get_executor [*get_executor]]]
     [Get the executor associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.get_io_context [*get_io_context]]]
+    [[link asio.reference.windows__random_access_handle.get_io_context [*get_io_context]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.get_io_service [*get_io_service]]]
+    [[link asio.reference.windows__random_access_handle.get_io_service [*get_io_service]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.is_open [*is_open]]]
+    [[link asio.reference.windows__random_access_handle.is_open [*is_open]]]
     [Determine whether the handle is open. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.lowest_layer [*lowest_layer]]]
+    [[link asio.reference.windows__random_access_handle.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. 
 
      Get a const reference to the lowest layer. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.native_handle [*native_handle]]]
+    [[link asio.reference.windows__random_access_handle.native_handle [*native_handle]]]
     [Get the native handle representation. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.operator_eq_ [*operator=]]]
-    [Move-assign a basic_random_access_handle from another. ]
+    [[link asio.reference.windows__random_access_handle.operator_eq_ [*operator=]]]
+    [Move-assign a random_access_handle from another. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.read_some_at [*read_some_at]]]
+    [[link asio.reference.windows__random_access_handle.random_access_handle [*random_access_handle]]]
+    [Construct a random_access_handle without opening it. 
+
+     Construct a random_access_handle on an existing native handle. 
+
+     Move-construct a random_access_handle from another. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__random_access_handle.read_some_at [*read_some_at]]]
     [Read some data from the handle at the specified offset. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_random_access_handle.write_some_at [*write_some_at]]]
+    [[link asio.reference.windows__random_access_handle.write_some_at [*write_some_at]]]
     [Write some data to the handle at the specified offset. ]
   ]
   
 ]
 
+The [link asio.reference.windows__random_access_handle `windows::random_access_handle`] class provides asynchronous and blocking random-access handle functionality.
+
+
+[heading Thread Safety]
+  
+['Distinct] ['objects:] Safe.
+
+['Shared] ['objects:] Unsafe. 
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/windows/random_access_handle.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+[section:assign windows::random_access_handle::assign]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.assign..assign..windows::random_access_handle] 
+Assign an existing native handle to the handle. 
+
+
+  void ``[link asio.reference.windows__random_access_handle.assign.overload1 assign]``(
+      const native_handle_type & handle);
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.assign.overload1 more...]]``
+
+  void ``[link asio.reference.windows__random_access_handle.assign.overload2 assign]``(
+      const native_handle_type & handle,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.assign.overload2 more...]]``
+
+
+[section:overload1 windows::random_access_handle::assign (1 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Assign an existing native handle to the handle. 
+
+
+  void assign(
+      const native_handle_type & handle);
+
+
+
+[endsect]
+
+
+
+[section:overload2 windows::random_access_handle::assign (2 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Assign an existing native handle to the handle. 
+
+
+  void assign(
+      const native_handle_type & handle,
+      asio::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:async_read_some_at windows::random_access_handle::async_read_some_at]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.async_read_some_at..async_read_some_at..windows::random_access_handle] 
+Start an asynchronous read at the specified offset. 
+
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
+      typename ``[link asio.reference.ReadHandler ReadHandler]``>
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some_at(
+      uint64_t offset,
+      const MutableBufferSequence & buffers,
+      ReadHandler && handler);
+
+
+This function is used to asynchronously read data from the random-access handle. The function call always returns immediately.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[offset][The offset at which the data will be read.]]
+
+[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
+``
+   void handler(
+     const asio::error_code& error, // Result of operation.
+     std::size_t bytes_transferred           // Number of bytes read.
+   ); 
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
+
+]
+
+
+[heading Remarks]
+      
+The read operation may not read all of the requested number of bytes. Consider using the [link asio.reference.async_read_at `async_read_at`]  function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
+
+
+[heading Example]
+  
+To read into a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
+
+   handle.async_read_some_at(42, asio::buffer(data, size), handler);
+
+
+See the [link asio.reference.buffer `buffer`]  documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
+
+
+
+
+[endsect]
+
+
+
+[section:async_write_some_at windows::random_access_handle::async_write_some_at]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.async_write_some_at..async_write_some_at..windows::random_access_handle] 
+Start an asynchronous write at the specified offset. 
+
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
+      typename ``[link asio.reference.WriteHandler WriteHandler]``>
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some_at(
+      uint64_t offset,
+      const ConstBufferSequence & buffers,
+      WriteHandler && handler);
+
+
+This function is used to asynchronously write data to the random-access handle. The function call always returns immediately.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[offset][The offset at which the data will be written.]]
+
+[[buffers][One or more data buffers to be written to the handle. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
+``
+   void handler(
+     const asio::error_code& error, // Result of operation.
+     std::size_t bytes_transferred           // Number of bytes written.
+   ); 
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
+
+]
+
+
+[heading Remarks]
+      
+The write operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write_at `async_write_at`]  function if you need to ensure that all data is written before the asynchronous operation completes.
+
+
+[heading Example]
+  
+To write a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
+
+   handle.async_write_some_at(42, asio::buffer(data, size), handler);
+
+
+See the [link asio.reference.buffer `buffer`]  documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
+
+
+
+
+[endsect]
+
+
+[section:cancel windows::random_access_handle::cancel]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.cancel..cancel..windows::random_access_handle] 
+Cancel all asynchronous operations associated with the handle. 
+
+
+  void ``[link asio.reference.windows__random_access_handle.cancel.overload1 cancel]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.cancel.overload1 more...]]``
+
+  void ``[link asio.reference.windows__random_access_handle.cancel.overload2 cancel]``(
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.cancel.overload2 more...]]``
+
+
+[section:overload1 windows::random_access_handle::cancel (1 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Cancel all asynchronous operations associated with the handle. 
+
+
+  void cancel();
+
+
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 windows::random_access_handle::cancel (2 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Cancel all asynchronous operations associated with the handle. 
+
+
+  void cancel(
+      asio::error_code & ec);
+
+
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:close windows::random_access_handle::close]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.close..close..windows::random_access_handle] 
+Close the handle. 
+
+
+  void ``[link asio.reference.windows__random_access_handle.close.overload1 close]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.close.overload1 more...]]``
+
+  void ``[link asio.reference.windows__random_access_handle.close.overload2 close]``(
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.close.overload2 more...]]``
+
+
+[section:overload1 windows::random_access_handle::close (1 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Close the handle. 
+
+
+  void close();
+
+
+This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 windows::random_access_handle::close (2 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Close the handle. 
+
+
+  void close(
+      asio::error_code & ec);
+
+
+This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:executor_type windows::random_access_handle::executor_type]
+
+
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.executor_type..executor_type..windows::random_access_handle] 
+The type of the executor associated with the object. 
+
+
+  typedef io_context::executor_type executor_type;
+
+
+[heading Member Functions]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.io_context__executor_type.context [*context]]]
+    [Obtain the underlying execution context. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.defer [*defer]]]
+    [Request the io_context to invoke the given function object. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
+    [Request the io_context to invoke the given function object. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
+    [Inform the io_context that some work is no longer outstanding. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
+    [Inform the io_context that it has some outstanding work to do. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.post [*post]]]
+    [Request the io_context to invoke the given function object. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
+    [Determine whether the io_context is running in the current thread. ]
+  ]
+  
+]
+
+[heading Friends]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
+    [Compare two executors for inequality. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
+    [Compare two executors for equality. ]
+  ]
+  
+]
+
+
+[heading Requirements]
+
+['Header: ][^asio/windows/random_access_handle.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
+
+[section:get_executor windows::random_access_handle::get_executor]
+
+
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.get_executor..get_executor..windows::random_access_handle] 
+Get the executor associated with the object. 
+
+
+  executor_type get_executor();
+
+
+
+[endsect]
+
+
+
+[section:get_io_context windows::random_access_handle::get_io_context]
+
+
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.get_io_context..get_io_context..windows::random_access_handle] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
+
+
+  asio::io_context & get_io_context();
+
+
+This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+      
+A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
+
+
+
+
+[endsect]
+
+
+
+[section:get_io_service windows::random_access_handle::get_io_service]
+
+
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.get_io_service..get_io_service..windows::random_access_handle] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
+
+
+  asio::io_context & get_io_service();
+
+
+This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+      
+A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
+
+
+
+
+[endsect]
+
+
+
+[section:is_open windows::random_access_handle::is_open]
+
+
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.is_open..is_open..windows::random_access_handle] 
+Determine whether the handle is open. 
+
+
+  bool is_open() const;
+
+
+
+[endsect]
+
+
+[section:lowest_layer windows::random_access_handle::lowest_layer]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.lowest_layer..lowest_layer..windows::random_access_handle] 
+Get a reference to the lowest layer. 
+
+
+  lowest_layer_type & ``[link asio.reference.windows__random_access_handle.lowest_layer.overload1 lowest_layer]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.lowest_layer.overload1 more...]]``
+
+
+Get a const reference to the lowest layer. 
+
+
+  const lowest_layer_type & ``[link asio.reference.windows__random_access_handle.lowest_layer.overload2 lowest_layer]``() const;
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.lowest_layer.overload2 more...]]``
+
+
+[section:overload1 windows::random_access_handle::lowest_layer (1 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Get a reference to the lowest layer. 
+
+
+  lowest_layer_type & lowest_layer();
+
+
+This function returns a reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] cannot contain any further layers, it simply returns a reference to itself.
+
+
+[heading Return Value]
+      
+A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 windows::random_access_handle::lowest_layer (2 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Get a const reference to the lowest layer. 
+
+
+  const lowest_layer_type & lowest_layer() const;
+
+
+This function returns a const reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] cannot contain any further layers, it simply returns a reference to itself.
+
+
+[heading Return Value]
+      
+A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:lowest_layer_type windows::random_access_handle::lowest_layer_type]
+
+
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.lowest_layer_type..lowest_layer_type..windows::random_access_handle] 
+An [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] is always the lowest layer. 
+
+
+  typedef overlapped_handle lowest_layer_type;
+
+
+[heading Types]
+[table
+  [[Name][Description]]
+
+  [
+
+    [[link asio.reference.windows__overlapped_handle.executor_type [*executor_type]]]
+    [The type of the executor associated with the object. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.windows__overlapped_handle.lowest_layer_type [*lowest_layer_type]]]
+    [An overlapped_handle is always the lowest layer. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.windows__overlapped_handle.native_handle_type [*native_handle_type]]]
+    [The native representation of a handle. ]
+  
+  ]
+
+]
+
+[heading Member Functions]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.windows__overlapped_handle.assign [*assign]]]
+    [Assign an existing native handle to the handle. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.cancel [*cancel]]]
+    [Cancel all asynchronous operations associated with the handle. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.close [*close]]]
+    [Close the handle. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.get_executor [*get_executor]]]
+    [Get the executor associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.get_io_context [*get_io_context]]]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.get_io_service [*get_io_service]]]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.is_open [*is_open]]]
+    [Determine whether the handle is open. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.lowest_layer [*lowest_layer]]]
+    [Get a reference to the lowest layer. 
+
+     Get a const reference to the lowest layer. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.native_handle [*native_handle]]]
+    [Get the native handle representation. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.operator_eq_ [*operator=]]]
+    [Move-assign an overlapped_handle from another. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.overlapped_handle [*overlapped_handle]]]
+    [Construct an overlapped_handle without opening it. 
+
+     Construct an overlapped_handle on an existing native handle. 
+
+     Move-construct an overlapped_handle from another. ]
+  ]
+  
+]
+
 [heading Protected Member Functions]
 [table
   [[Name][Description]]
 
   [
-    [[link asio.reference.windows__basic_random_access_handle.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_random_access_handle.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.windows__overlapped_handle._overlapped_handle [*~overlapped_handle]]]
+    [Protected destructor to prevent deletion through this type. ]
   ]
   
 ]
 
-The [link asio.reference.windows__basic_random_access_handle `windows::basic_random_access_handle`] class template provides asynchronous and blocking random-access handle functionality.
+The [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] class provides the ability to wrap a Windows handle. The underlying object referred to by the handle must support overlapped I/O.
 
 
 [heading Thread Safety]
@@ -129137,397 +109295,33 @@
 [endsect]
 
 
-[section:windows__random_access_handle_service windows::random_access_handle_service]
+
+[section:native_handle windows::random_access_handle::native_handle]
 
 
-Default service implementation for a random-access handle. 
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.native_handle..native_handle..windows::random_access_handle] 
+Get the native handle representation. 
 
 
-  class random_access_handle_service :
-    public io_context::service
+  native_handle_type native_handle();
 
 
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.windows__random_access_handle_service.implementation_type [*implementation_type]]]
-    [The type of a random-access handle implementation. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__random_access_handle_service.native_handle_type [*native_handle_type]]]
-    [The native handle type. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__random_access_handle_service.assign [*assign]]]
-    [Assign an existing native handle to a random-access handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.async_read_some_at [*async_read_some_at]]]
-    [Start an asynchronous read at the specified offset. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.async_write_some_at [*async_write_some_at]]]
-    [Start an asynchronous write at the specified offset. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.close [*close]]]
-    [Close a random-access handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.construct [*construct]]]
-    [Construct a new random-access handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.destroy [*destroy]]]
-    [Destroy a random-access handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.is_open [*is_open]]]
-    [Determine whether the handle is open. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.move_assign [*move_assign]]]
-    [Move-assign from another random-access handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.move_construct [*move_construct]]]
-    [Move-construct a new random-access handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.native_handle [*native_handle]]]
-    [Get the native handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.random_access_handle_service [*random_access_handle_service]]]
-    [Construct a new random-access handle service for the specified io_context. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.read_some_at [*read_some_at]]]
-    [Read some data from the specified offset. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__random_access_handle_service.write_some_at [*write_some_at]]]
-    [Write the given data at the specified offset. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__random_access_handle_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/windows/random_access_handle_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:assign windows::random_access_handle_service::assign]
-
-[indexterm2 assign..windows::random_access_handle_service] 
-Assign an existing native handle to a random-access handle. 
-
-
-  asio::error_code assign(
-      implementation_type & impl,
-      const native_handle_type & handle,
-      asio::error_code & ec);
-
+This function may be used to obtain the underlying representation of the handle. This is intended to allow access to native handle functionality that is not otherwise provided. 
 
 
 [endsect]
 
 
 
-[section:async_read_some_at windows::random_access_handle_service::async_read_some_at]
+[section:native_handle_type windows::random_access_handle::native_handle_type]
 
-[indexterm2 async_read_some_at..windows::random_access_handle_service] 
-Start an asynchronous read at the specified offset. 
 
+['Inherited from windows::overlapped_handle.]
 
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some_at(
-      implementation_type & impl,
-      uint64_t offset,
-      const MutableBufferSequence & buffers,
-      ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_write_some_at windows::random_access_handle_service::async_write_some_at]
-
-[indexterm2 async_write_some_at..windows::random_access_handle_service] 
-Start an asynchronous write at the specified offset. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some_at(
-      implementation_type & impl,
-      uint64_t offset,
-      const ConstBufferSequence & buffers,
-      WriteHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:cancel windows::random_access_handle_service::cancel]
-
-[indexterm2 cancel..windows::random_access_handle_service] 
-Cancel all asynchronous operations associated with the handle. 
-
-
-  asio::error_code cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:close windows::random_access_handle_service::close]
-
-[indexterm2 close..windows::random_access_handle_service] 
-Close a random-access handle implementation. 
-
-
-  asio::error_code close(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct windows::random_access_handle_service::construct]
-
-[indexterm2 construct..windows::random_access_handle_service] 
-Construct a new random-access handle implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:destroy windows::random_access_handle_service::destroy]
-
-[indexterm2 destroy..windows::random_access_handle_service] 
-Destroy a random-access handle implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:get_io_context windows::random_access_handle_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..windows::random_access_handle_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service windows::random_access_handle_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..windows::random_access_handle_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:id windows::random_access_handle_service::id]
-
-[indexterm2 id..windows::random_access_handle_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type windows::random_access_handle_service::implementation_type]
-
-[indexterm2 implementation_type..windows::random_access_handle_service] 
-The type of a random-access handle implementation. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/random_access_handle_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:is_open windows::random_access_handle_service::is_open]
-
-[indexterm2 is_open..windows::random_access_handle_service] 
-Determine whether the handle is open. 
-
-
-  bool is_open(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:move_assign windows::random_access_handle_service::move_assign]
-
-[indexterm2 move_assign..windows::random_access_handle_service] 
-Move-assign from another random-access handle implementation. 
-
-
-  void move_assign(
-      implementation_type & impl,
-      random_access_handle_service & other_service,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:move_construct windows::random_access_handle_service::move_construct]
-
-[indexterm2 move_construct..windows::random_access_handle_service] 
-Move-construct a new random-access handle implementation. 
-
-
-  void move_construct(
-      implementation_type & impl,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle windows::random_access_handle_service::native_handle]
-
-[indexterm2 native_handle..windows::random_access_handle_service] 
-Get the native handle implementation. 
-
-
-  native_handle_type native_handle(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle_type windows::random_access_handle_service::native_handle_type]
-
-[indexterm2 native_handle_type..windows::random_access_handle_service] 
-The native handle type. 
+[indexterm2 asio.indexterm.windows__random_access_handle.native_handle_type..native_handle_type..windows::random_access_handle] 
+The native representation of a handle. 
 
 
   typedef implementation_defined native_handle_type;
@@ -129536,7 +109330,7 @@
 
 [heading Requirements]
 
-['Header: ][^asio/windows/random_access_handle_service.hpp]
+['Header: ][^asio/windows/random_access_handle.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -129545,14 +109339,89 @@
 
 
 
-[section:random_access_handle_service windows::random_access_handle_service::random_access_handle_service]
+[section:operator_eq_ windows::random_access_handle::operator=]
 
-[indexterm2 random_access_handle_service..windows::random_access_handle_service] 
-Construct a new random-access handle service for the specified [link asio.reference.io_context `io_context`]. 
+[indexterm2 asio.indexterm.windows__random_access_handle.operator_eq_..operator=..windows::random_access_handle] 
+Move-assign a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] from another. 
 
 
-  random_access_handle_service(
+  random_access_handle & operator=(
+      random_access_handle && other);
+
+
+This assignment operator moves a random-access handle from one object to another.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.windows__random_access_handle `windows::random_access_handle`] object from which the move will occur.]]
+
+]
+
+
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `random_access_handle(io_context&)` constructor. 
+
+
+
+
+[endsect]
+
+
+[section:random_access_handle windows::random_access_handle::random_access_handle]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.random_access_handle..random_access_handle..windows::random_access_handle] 
+Construct a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] without opening it. 
+
+
+  explicit ``[link asio.reference.windows__random_access_handle.random_access_handle.overload1 random_access_handle]``(
       asio::io_context & io_context);
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.random_access_handle.overload1 more...]]``
+
+
+Construct a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] on an existing native handle. 
+
+
+  ``[link asio.reference.windows__random_access_handle.random_access_handle.overload2 random_access_handle]``(
+      asio::io_context & io_context,
+      const native_handle_type & handle);
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.random_access_handle.overload2 more...]]``
+
+
+Move-construct a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] from another. 
+
+
+  ``[link asio.reference.windows__random_access_handle.random_access_handle.overload3 random_access_handle]``(
+      random_access_handle && other);
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.random_access_handle.overload3 more...]]``
+
+
+[section:overload1 windows::random_access_handle::random_access_handle (1 of 3 overloads)]
+
+
+Construct a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] without opening it. 
+
+
+  random_access_handle(
+      asio::io_context & io_context);
+
+
+This constructor creates a random-access handle without opening it. The handle needs to be opened before data can be written to or read from it.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the random-access handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
+
+]
+
 
 
 
@@ -129560,56 +109429,362 @@
 
 
 
-[section:read_some_at windows::random_access_handle_service::read_some_at]
+[section:overload2 windows::random_access_handle::random_access_handle (2 of 3 overloads)]
 
-[indexterm2 read_some_at..windows::random_access_handle_service] 
-Read some data from the specified offset. 
+
+Construct a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] on an existing native handle. 
+
+
+  random_access_handle(
+      asio::io_context & io_context,
+      const native_handle_type & handle);
+
+
+This constructor creates a random-access handle object to hold an existing native handle.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the random-access handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
+
+[[handle][The new underlying handle implementation.]]
+
+]
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload3 windows::random_access_handle::random_access_handle (3 of 3 overloads)]
+
+
+Move-construct a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] from another. 
+
+
+  random_access_handle(
+      random_access_handle && other);
+
+
+This constructor moves a random-access handle from one object to another.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.windows__random_access_handle `windows::random_access_handle`] object from which the move will occur.]]
+
+]
+
+
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `random_access_handle(io_context&)` constructor. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:read_some_at windows::random_access_handle::read_some_at]
+
+[indexterm2 asio.indexterm.windows__random_access_handle.read_some_at..read_some_at..windows::random_access_handle] 
+Read some data from the handle at the specified offset. 
+
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
+  std::size_t ``[link asio.reference.windows__random_access_handle.read_some_at.overload1 read_some_at]``(
+      uint64_t offset,
+      const MutableBufferSequence & buffers);
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.read_some_at.overload1 more...]]``
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
+  std::size_t ``[link asio.reference.windows__random_access_handle.read_some_at.overload2 read_some_at]``(
+      uint64_t offset,
+      const MutableBufferSequence & buffers,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.read_some_at.overload2 more...]]``
+
+
+[section:overload1 windows::random_access_handle::read_some_at (1 of 2 overloads)]
+
+
+Read some data from the handle at the specified offset. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
   std::size_t read_some_at(
-      implementation_type & impl,
+      uint64_t offset,
+      const MutableBufferSequence & buffers);
+
+
+This function is used to read data from the random-access handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[offset][The offset at which the data will be read.]]
+
+[[buffers][One or more buffers into which the data will be read.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of bytes read.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
+
+]
+
+
+[heading Remarks]
+      
+The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read_at `read_at`]  function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+
+
+[heading Example]
+  
+To read into a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
+
+   handle.read_some_at(42, asio::buffer(data, size));
+
+
+See the [link asio.reference.buffer `buffer`]  documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 windows::random_access_handle::read_some_at (2 of 2 overloads)]
+
+
+Read some data from the handle at the specified offset. 
+
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
+  std::size_t read_some_at(
       uint64_t offset,
       const MutableBufferSequence & buffers,
       asio::error_code & ec);
 
 
+This function is used to read data from the random-access handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[offset][The offset at which the data will be read.]]
+
+[[buffers][One or more buffers into which the data will be read.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of bytes read. Returns 0 if an error occurred.
+
+
+[heading Remarks]
+      
+The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read_at `read_at`]  function if you need to ensure that the requested amount of data is read before the blocking operation completes. 
+
+
+
 
 [endsect]
 
 
+[endsect]
 
-[section:write_some_at windows::random_access_handle_service::write_some_at]
+[section:write_some_at windows::random_access_handle::write_some_at]
 
-[indexterm2 write_some_at..windows::random_access_handle_service] 
-Write the given data at the specified offset. 
+[indexterm2 asio.indexterm.windows__random_access_handle.write_some_at..write_some_at..windows::random_access_handle] 
+Write some data to the handle at the specified offset. 
+
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
+  std::size_t ``[link asio.reference.windows__random_access_handle.write_some_at.overload1 write_some_at]``(
+      uint64_t offset,
+      const ConstBufferSequence & buffers);
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.write_some_at.overload1 more...]]``
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
+  std::size_t ``[link asio.reference.windows__random_access_handle.write_some_at.overload2 write_some_at]``(
+      uint64_t offset,
+      const ConstBufferSequence & buffers,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.windows__random_access_handle.write_some_at.overload2 more...]]``
+
+
+[section:overload1 windows::random_access_handle::write_some_at (1 of 2 overloads)]
+
+
+Write some data to the handle at the specified offset. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
   std::size_t write_some_at(
-      implementation_type & impl,
+      uint64_t offset,
+      const ConstBufferSequence & buffers);
+
+
+This function is used to write data to the random-access handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[offset][The offset at which the data will be written.]]
+
+[[buffers][One or more data buffers to be written to the handle.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of bytes written.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
+
+]
+
+
+[heading Remarks]
+      
+The write\_some\_at operation may not write all of the data. Consider using the [link asio.reference.write_at `write_at`]  function if you need to ensure that all data is written before the blocking operation completes.
+
+
+[heading Example]
+  
+To write a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
+
+   handle.write_some_at(42, asio::buffer(data, size));
+
+
+See the [link asio.reference.buffer `buffer`]  documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 windows::random_access_handle::write_some_at (2 of 2 overloads)]
+
+
+Write some data to the handle at the specified offset. 
+
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
+  std::size_t write_some_at(
       uint64_t offset,
       const ConstBufferSequence & buffers,
       asio::error_code & ec);
 
 
+This function is used to write data to the random-access handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
 
-[endsect]
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[offset][The offset at which the data will be written.]]
+
+[[buffers][One or more data buffers to be written to the handle.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of bytes written. Returns 0 if an error occurred.
+
+
+[heading Remarks]
+      
+The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write_at `write_at`]  function if you need to ensure that all data is written before the blocking operation completes. 
+
 
 
 
 [endsect]
 
 
+[endsect]
+
+
+[endsect]
+
 [section:windows__stream_handle windows::stream_handle]
 
-[indexterm1 windows::stream_handle] 
-Typedef for the typical usage of a stream-oriented handle. 
+
+Provides stream-oriented handle functionality. 
 
 
-  typedef basic_stream_handle stream_handle;
+  class stream_handle :
+    public windows::overlapped_handle
 
 
 [heading Types]
@@ -129618,39 +109793,25 @@
 
   [
 
-    [[link asio.reference.windows__basic_stream_handle.executor_type [*executor_type]]]
+    [[link asio.reference.windows__stream_handle.executor_type [*executor_type]]]
     [The type of the executor associated with the object. ]
   
   ]
 
   [
 
-    [[link asio.reference.windows__basic_stream_handle.implementation_type [*implementation_type]]]
-    [The underlying implementation type of I/O object. ]
+    [[link asio.reference.windows__stream_handle.lowest_layer_type [*lowest_layer_type]]]
+    [An overlapped_handle is always the lowest layer. ]
   
   ]
 
   [
 
-    [[link asio.reference.windows__basic_stream_handle.lowest_layer_type [*lowest_layer_type]]]
-    [A basic_handle is always the lowest layer. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__basic_stream_handle.native_handle_type [*native_handle_type]]]
+    [[link asio.reference.windows__stream_handle.native_handle_type [*native_handle_type]]]
     [The native representation of a handle. ]
   
   ]
 
-  [
-
-    [[link asio.reference.windows__basic_stream_handle.service_type [*service_type]]]
-    [The type of the service that will be used to provide I/O operations. ]
-  
-  ]
-
 ]
 
 [heading Member Functions]
@@ -129658,113 +109819,793 @@
   [[Name][Description]]
 
   [
-    [[link asio.reference.windows__basic_stream_handle.assign [*assign]]]
+    [[link asio.reference.windows__stream_handle.assign [*assign]]]
     [Assign an existing native handle to the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.async_read_some [*async_read_some]]]
+    [[link asio.reference.windows__stream_handle.async_read_some [*async_read_some]]]
     [Start an asynchronous read. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.async_write_some [*async_write_some]]]
+    [[link asio.reference.windows__stream_handle.async_write_some [*async_write_some]]]
     [Start an asynchronous write. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.basic_stream_handle [*basic_stream_handle]]]
-    [Construct a basic_stream_handle without opening it. 
-
-     Construct a basic_stream_handle on an existing native handle. 
-
-     Move-construct a basic_stream_handle from another. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.cancel [*cancel]]]
+    [[link asio.reference.windows__stream_handle.cancel [*cancel]]]
     [Cancel all asynchronous operations associated with the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.close [*close]]]
+    [[link asio.reference.windows__stream_handle.close [*close]]]
     [Close the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.get_executor [*get_executor]]]
+    [[link asio.reference.windows__stream_handle.get_executor [*get_executor]]]
     [Get the executor associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.get_io_context [*get_io_context]]]
+    [[link asio.reference.windows__stream_handle.get_io_context [*get_io_context]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.get_io_service [*get_io_service]]]
+    [[link asio.reference.windows__stream_handle.get_io_service [*get_io_service]]]
     [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.is_open [*is_open]]]
+    [[link asio.reference.windows__stream_handle.is_open [*is_open]]]
     [Determine whether the handle is open. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.lowest_layer [*lowest_layer]]]
+    [[link asio.reference.windows__stream_handle.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. 
 
      Get a const reference to the lowest layer. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.native_handle [*native_handle]]]
+    [[link asio.reference.windows__stream_handle.native_handle [*native_handle]]]
     [Get the native handle representation. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.operator_eq_ [*operator=]]]
-    [Move-assign a basic_stream_handle from another. ]
+    [[link asio.reference.windows__stream_handle.operator_eq_ [*operator=]]]
+    [Move-assign a stream_handle from another. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.read_some [*read_some]]]
+    [[link asio.reference.windows__stream_handle.read_some [*read_some]]]
     [Read some data from the handle. ]
   ]
   
   [
-    [[link asio.reference.windows__basic_stream_handle.write_some [*write_some]]]
+    [[link asio.reference.windows__stream_handle.stream_handle [*stream_handle]]]
+    [Construct a stream_handle without opening it. 
+
+     Construct a stream_handle on an existing native handle. 
+
+     Move-construct a stream_handle from another. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__stream_handle.write_some [*write_some]]]
     [Write some data to the handle. ]
   ]
   
 ]
 
+The [link asio.reference.windows__stream_handle `windows::stream_handle`] class provides asynchronous and blocking stream-oriented handle functionality.
+
+
+[heading Thread Safety]
+  
+['Distinct] ['objects:] Safe.
+
+['Shared] ['objects:] Unsafe.
+
+
+
+
+[heading Requirements]
+
+['Header: ][^asio/windows/stream_handle.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+[section:assign windows::stream_handle::assign]
+
+[indexterm2 asio.indexterm.windows__stream_handle.assign..assign..windows::stream_handle] 
+Assign an existing native handle to the handle. 
+
+
+  void ``[link asio.reference.windows__stream_handle.assign.overload1 assign]``(
+      const native_handle_type & handle);
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.assign.overload1 more...]]``
+
+  void ``[link asio.reference.windows__stream_handle.assign.overload2 assign]``(
+      const native_handle_type & handle,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.assign.overload2 more...]]``
+
+
+[section:overload1 windows::stream_handle::assign (1 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Assign an existing native handle to the handle. 
+
+
+  void assign(
+      const native_handle_type & handle);
+
+
+
+[endsect]
+
+
+
+[section:overload2 windows::stream_handle::assign (2 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Assign an existing native handle to the handle. 
+
+
+  void assign(
+      const native_handle_type & handle,
+      asio::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:async_read_some windows::stream_handle::async_read_some]
+
+[indexterm2 asio.indexterm.windows__stream_handle.async_read_some..async_read_some..windows::stream_handle] 
+Start an asynchronous read. 
+
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
+      typename ``[link asio.reference.ReadHandler ReadHandler]``>
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
+      const MutableBufferSequence & buffers,
+      ReadHandler && handler);
+
+
+This function is used to asynchronously read data from the stream handle. The function call always returns immediately.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
+``
+   void handler(
+     const asio::error_code& error, // Result of operation.
+     std::size_t bytes_transferred           // Number of bytes read.
+   ); 
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
+
+]
+
+
+[heading Remarks]
+      
+The read operation may not read all of the requested number of bytes. Consider using the [link asio.reference.async_read `async_read`]  function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
+
+
+[heading Example]
+  
+To read into a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
+
+   handle.async_read_some(asio::buffer(data, size), handler);
+
+
+See the [link asio.reference.buffer `buffer`]  documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
+
+
+
+
+[endsect]
+
+
+
+[section:async_write_some windows::stream_handle::async_write_some]
+
+[indexterm2 asio.indexterm.windows__stream_handle.async_write_some..async_write_some..windows::stream_handle] 
+Start an asynchronous write. 
+
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
+      typename ``[link asio.reference.WriteHandler WriteHandler]``>
+  ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
+      const ConstBufferSequence & buffers,
+      WriteHandler && handler);
+
+
+This function is used to asynchronously write data to the stream handle. The function call always returns immediately.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[buffers][One or more data buffers to be written to the handle. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be: 
+``
+   void handler(
+     const asio::error_code& error, // Result of operation.
+     std::size_t bytes_transferred           // Number of bytes written.
+   ); 
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
+
+]
+
+
+[heading Remarks]
+      
+The write operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write `async_write`]  function if you need to ensure that all data is written before the asynchronous operation completes.
+
+
+[heading Example]
+  
+To write a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
+
+   handle.async_write_some(asio::buffer(data, size), handler);
+
+
+See the [link asio.reference.buffer `buffer`]  documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
+
+
+
+
+[endsect]
+
+
+[section:cancel windows::stream_handle::cancel]
+
+[indexterm2 asio.indexterm.windows__stream_handle.cancel..cancel..windows::stream_handle] 
+Cancel all asynchronous operations associated with the handle. 
+
+
+  void ``[link asio.reference.windows__stream_handle.cancel.overload1 cancel]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.cancel.overload1 more...]]``
+
+  void ``[link asio.reference.windows__stream_handle.cancel.overload2 cancel]``(
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.cancel.overload2 more...]]``
+
+
+[section:overload1 windows::stream_handle::cancel (1 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Cancel all asynchronous operations associated with the handle. 
+
+
+  void cancel();
+
+
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 windows::stream_handle::cancel (2 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Cancel all asynchronous operations associated with the handle. 
+
+
+  void cancel(
+      asio::error_code & ec);
+
+
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:close windows::stream_handle::close]
+
+[indexterm2 asio.indexterm.windows__stream_handle.close..close..windows::stream_handle] 
+Close the handle. 
+
+
+  void ``[link asio.reference.windows__stream_handle.close.overload1 close]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.close.overload1 more...]]``
+
+  void ``[link asio.reference.windows__stream_handle.close.overload2 close]``(
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.close.overload2 more...]]``
+
+
+[section:overload1 windows::stream_handle::close (1 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Close the handle. 
+
+
+  void close();
+
+
+This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 windows::stream_handle::close (2 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Close the handle. 
+
+
+  void close(
+      asio::error_code & ec);
+
+
+This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:executor_type windows::stream_handle::executor_type]
+
+
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__stream_handle.executor_type..executor_type..windows::stream_handle] 
+The type of the executor associated with the object. 
+
+
+  typedef io_context::executor_type executor_type;
+
+
+[heading Member Functions]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.io_context__executor_type.context [*context]]]
+    [Obtain the underlying execution context. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.defer [*defer]]]
+    [Request the io_context to invoke the given function object. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
+    [Request the io_context to invoke the given function object. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
+    [Inform the io_context that some work is no longer outstanding. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
+    [Inform the io_context that it has some outstanding work to do. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.post [*post]]]
+    [Request the io_context to invoke the given function object. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
+    [Determine whether the io_context is running in the current thread. ]
+  ]
+  
+]
+
+[heading Friends]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
+    [Compare two executors for inequality. ]
+  ]
+  
+  [
+    [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
+    [Compare two executors for equality. ]
+  ]
+  
+]
+
+
+[heading Requirements]
+
+['Header: ][^asio/windows/stream_handle.hpp]
+
+['Convenience header: ][^asio.hpp]
+
+
+[endsect]
+
+
+
+[section:get_executor windows::stream_handle::get_executor]
+
+
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__stream_handle.get_executor..get_executor..windows::stream_handle] 
+Get the executor associated with the object. 
+
+
+  executor_type get_executor();
+
+
+
+[endsect]
+
+
+
+[section:get_io_context windows::stream_handle::get_io_context]
+
+
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__stream_handle.get_io_context..get_io_context..windows::stream_handle] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
+
+
+  asio::io_context & get_io_context();
+
+
+This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+      
+A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
+
+
+
+
+[endsect]
+
+
+
+[section:get_io_service windows::stream_handle::get_io_service]
+
+
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__stream_handle.get_io_service..get_io_service..windows::stream_handle] 
+(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object. 
+
+
+  asio::io_context & get_io_service();
+
+
+This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+      
+A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller. 
+
+
+
+
+[endsect]
+
+
+
+[section:is_open windows::stream_handle::is_open]
+
+
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__stream_handle.is_open..is_open..windows::stream_handle] 
+Determine whether the handle is open. 
+
+
+  bool is_open() const;
+
+
+
+[endsect]
+
+
+[section:lowest_layer windows::stream_handle::lowest_layer]
+
+[indexterm2 asio.indexterm.windows__stream_handle.lowest_layer..lowest_layer..windows::stream_handle] 
+Get a reference to the lowest layer. 
+
+
+  lowest_layer_type & ``[link asio.reference.windows__stream_handle.lowest_layer.overload1 lowest_layer]``();
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.lowest_layer.overload1 more...]]``
+
+
+Get a const reference to the lowest layer. 
+
+
+  const lowest_layer_type & ``[link asio.reference.windows__stream_handle.lowest_layer.overload2 lowest_layer]``() const;
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.lowest_layer.overload2 more...]]``
+
+
+[section:overload1 windows::stream_handle::lowest_layer (1 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Get a reference to the lowest layer. 
+
+
+  lowest_layer_type & lowest_layer();
+
+
+This function returns a reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] cannot contain any further layers, it simply returns a reference to itself.
+
+
+[heading Return Value]
+      
+A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 windows::stream_handle::lowest_layer (2 of 2 overloads)]
+
+
+['Inherited from windows::overlapped_handle.]
+
+
+Get a const reference to the lowest layer. 
+
+
+  const lowest_layer_type & lowest_layer() const;
+
+
+This function returns a const reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] cannot contain any further layers, it simply returns a reference to itself.
+
+
+[heading Return Value]
+      
+A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:lowest_layer_type windows::stream_handle::lowest_layer_type]
+
+
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__stream_handle.lowest_layer_type..lowest_layer_type..windows::stream_handle] 
+An [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] is always the lowest layer. 
+
+
+  typedef overlapped_handle lowest_layer_type;
+
+
+[heading Types]
+[table
+  [[Name][Description]]
+
+  [
+
+    [[link asio.reference.windows__overlapped_handle.executor_type [*executor_type]]]
+    [The type of the executor associated with the object. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.windows__overlapped_handle.lowest_layer_type [*lowest_layer_type]]]
+    [An overlapped_handle is always the lowest layer. ]
+  
+  ]
+
+  [
+
+    [[link asio.reference.windows__overlapped_handle.native_handle_type [*native_handle_type]]]
+    [The native representation of a handle. ]
+  
+  ]
+
+]
+
+[heading Member Functions]
+[table
+  [[Name][Description]]
+
+  [
+    [[link asio.reference.windows__overlapped_handle.assign [*assign]]]
+    [Assign an existing native handle to the handle. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.cancel [*cancel]]]
+    [Cancel all asynchronous operations associated with the handle. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.close [*close]]]
+    [Close the handle. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.get_executor [*get_executor]]]
+    [Get the executor associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.get_io_context [*get_io_context]]]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.get_io_service [*get_io_service]]]
+    [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.is_open [*is_open]]]
+    [Determine whether the handle is open. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.lowest_layer [*lowest_layer]]]
+    [Get a reference to the lowest layer. 
+
+     Get a const reference to the lowest layer. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.native_handle [*native_handle]]]
+    [Get the native handle representation. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.operator_eq_ [*operator=]]]
+    [Move-assign an overlapped_handle from another. ]
+  ]
+  
+  [
+    [[link asio.reference.windows__overlapped_handle.overlapped_handle [*overlapped_handle]]]
+    [Construct an overlapped_handle without opening it. 
+
+     Construct an overlapped_handle on an existing native handle. 
+
+     Move-construct an overlapped_handle from another. ]
+  ]
+  
+]
+
 [heading Protected Member Functions]
 [table
   [[Name][Description]]
 
   [
-    [[link asio.reference.windows__basic_stream_handle.get_implementation [*get_implementation]]]
-    [Get the underlying implementation of the I/O object. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__basic_stream_handle.get_service [*get_service]]]
-    [Get the service associated with the I/O object. ]
+    [[link asio.reference.windows__overlapped_handle._overlapped_handle [*~overlapped_handle]]]
+    [Protected destructor to prevent deletion through this type. ]
   ]
   
 ]
 
-The [link asio.reference.windows__basic_stream_handle `windows::basic_stream_handle`] class template provides asynchronous and blocking stream-oriented handle functionality.
+The [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] class provides the ability to wrap a Windows handle. The underlying object referred to by the handle must support overlapped I/O.
 
 
 [heading Thread Safety]
   
 ['Distinct] ['objects:] Safe.
 
-['Shared] ['objects:] Unsafe.
-
+['Shared] ['objects:] Unsafe. 
 
 
 
@@ -129779,395 +110620,33 @@
 [endsect]
 
 
-[section:windows__stream_handle_service windows::stream_handle_service]
+
+[section:native_handle windows::stream_handle::native_handle]
 
 
-Default service implementation for a stream handle. 
+['Inherited from windows::overlapped_handle.]
+
+[indexterm2 asio.indexterm.windows__stream_handle.native_handle..native_handle..windows::stream_handle] 
+Get the native handle representation. 
 
 
-  class stream_handle_service :
-    public io_context::service
+  native_handle_type native_handle();
 
 
-[heading Types]
-[table
-  [[Name][Description]]
-
-  [
-
-    [[link asio.reference.windows__stream_handle_service.implementation_type [*implementation_type]]]
-    [The type of a stream handle implementation. ]
-  
-  ]
-
-  [
-
-    [[link asio.reference.windows__stream_handle_service.native_handle_type [*native_handle_type]]]
-    [The native handle type. ]
-  
-  ]
-
-]
-
-[heading Member Functions]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__stream_handle_service.assign [*assign]]]
-    [Assign an existing native handle to a stream handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.async_read_some [*async_read_some]]]
-    [Start an asynchronous read. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.async_write_some [*async_write_some]]]
-    [Start an asynchronous write. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.cancel [*cancel]]]
-    [Cancel all asynchronous operations associated with the handle. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.close [*close]]]
-    [Close a stream handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.construct [*construct]]]
-    [Construct a new stream handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.destroy [*destroy]]]
-    [Destroy a stream handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.get_io_context [*get_io_context]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.get_io_service [*get_io_service]]]
-    [Get the io_context object that owns the service. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.is_open [*is_open]]]
-    [Determine whether the handle is open. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.move_assign [*move_assign]]]
-    [Move-assign from another stream handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.move_construct [*move_construct]]]
-    [Move-construct a new stream handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.native_handle [*native_handle]]]
-    [Get the native handle implementation. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.read_some [*read_some]]]
-    [Read some data from the stream. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.stream_handle_service [*stream_handle_service]]]
-    [Construct a new stream handle service for the specified io_context. ]
-  ]
-  
-  [
-    [[link asio.reference.windows__stream_handle_service.write_some [*write_some]]]
-    [Write the given data to the stream. ]
-  ]
-  
-]
-
-[heading Data Members]
-[table
-  [[Name][Description]]
-
-  [
-    [[link asio.reference.windows__stream_handle_service.id [*id]]]
-    [The unique service identifier. ]
-  ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/windows/stream_handle_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:assign windows::stream_handle_service::assign]
-
-[indexterm2 assign..windows::stream_handle_service] 
-Assign an existing native handle to a stream handle. 
-
-
-  asio::error_code assign(
-      implementation_type & impl,
-      const native_handle_type & handle,
-      asio::error_code & ec);
-
+This function may be used to obtain the underlying representation of the handle. This is intended to allow access to native handle functionality that is not otherwise provided. 
 
 
 [endsect]
 
 
 
-[section:async_read_some windows::stream_handle_service::async_read_some]
+[section:native_handle_type windows::stream_handle::native_handle_type]
 
-[indexterm2 async_read_some..windows::stream_handle_service] 
-Start an asynchronous read. 
 
+['Inherited from windows::overlapped_handle.]
 
-  template<
-      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
-      typename ``[link asio.reference.ReadHandler ReadHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_read_some(
-      implementation_type & impl,
-      const MutableBufferSequence & buffers,
-      ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_write_some windows::stream_handle_service::async_write_some]
-
-[indexterm2 async_write_some..windows::stream_handle_service] 
-Start an asynchronous write. 
-
-
-  template<
-      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename ``[link asio.reference.WriteHandler WriteHandler]``>
-  ``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]`` async_write_some(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      WriteHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:cancel windows::stream_handle_service::cancel]
-
-[indexterm2 cancel..windows::stream_handle_service] 
-Cancel all asynchronous operations associated with the handle. 
-
-
-  asio::error_code cancel(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:close windows::stream_handle_service::close]
-
-[indexterm2 close..windows::stream_handle_service] 
-Close a stream handle implementation. 
-
-
-  asio::error_code close(
-      implementation_type & impl,
-      asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct windows::stream_handle_service::construct]
-
-[indexterm2 construct..windows::stream_handle_service] 
-Construct a new stream handle implementation. 
-
-
-  void construct(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:destroy windows::stream_handle_service::destroy]
-
-[indexterm2 destroy..windows::stream_handle_service] 
-Destroy a stream handle implementation. 
-
-
-  void destroy(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:get_io_context windows::stream_handle_service::get_io_context]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_context..windows::stream_handle_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service windows::stream_handle_service::get_io_service]
-
-
-['Inherited from io_context.]
-
-[indexterm2 get_io_service..windows::stream_handle_service] 
-Get the [link asio.reference.io_context `io_context`] object that owns the service. 
-
-
-  asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:id windows::stream_handle_service::id]
-
-[indexterm2 id..windows::stream_handle_service] 
-The unique service identifier. 
-
-
-  static asio::io_context::id id;
-
-
-
-[endsect]
-
-
-
-[section:implementation_type windows::stream_handle_service::implementation_type]
-
-[indexterm2 implementation_type..windows::stream_handle_service] 
-The type of a stream handle implementation. 
-
-
-  typedef implementation_defined implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/stream_handle_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:is_open windows::stream_handle_service::is_open]
-
-[indexterm2 is_open..windows::stream_handle_service] 
-Determine whether the handle is open. 
-
-
-  bool is_open(
-      const implementation_type & impl) const;
-
-
-
-[endsect]
-
-
-
-[section:move_assign windows::stream_handle_service::move_assign]
-
-[indexterm2 move_assign..windows::stream_handle_service] 
-Move-assign from another stream handle implementation. 
-
-
-  void move_assign(
-      implementation_type & impl,
-      stream_handle_service & other_service,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:move_construct windows::stream_handle_service::move_construct]
-
-[indexterm2 move_construct..windows::stream_handle_service] 
-Move-construct a new stream handle implementation. 
-
-
-  void move_construct(
-      implementation_type & impl,
-      implementation_type & other_impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle windows::stream_handle_service::native_handle]
-
-[indexterm2 native_handle..windows::stream_handle_service] 
-Get the native handle implementation. 
-
-
-  native_handle_type native_handle(
-      implementation_type & impl);
-
-
-
-[endsect]
-
-
-
-[section:native_handle_type windows::stream_handle_service::native_handle_type]
-
-[indexterm2 native_handle_type..windows::stream_handle_service] 
-The native handle type. 
+[indexterm2 asio.indexterm.windows__stream_handle.native_handle_type..native_handle_type..windows::stream_handle] 
+The native representation of a handle. 
 
 
   typedef implementation_defined native_handle_type;
@@ -130176,7 +110655,7 @@
 
 [heading Requirements]
 
-['Header: ][^asio/windows/stream_handle_service.hpp]
+['Header: ][^asio/windows/stream_handle.hpp]
 
 ['Convenience header: ][^asio.hpp]
 
@@ -130185,52 +110664,373 @@
 
 
 
-[section:read_some windows::stream_handle_service::read_some]
+[section:operator_eq_ windows::stream_handle::operator=]
 
-[indexterm2 read_some..windows::stream_handle_service] 
-Read some data from the stream. 
+[indexterm2 asio.indexterm.windows__stream_handle.operator_eq_..operator=..windows::stream_handle] 
+Move-assign a [link asio.reference.windows__stream_handle `windows::stream_handle`] from another. 
+
+
+  stream_handle & operator=(
+      stream_handle && other);
+
+
+This assignment operator moves a stream handle from one object to another.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.windows__stream_handle `windows::stream_handle`] object from which the move will occur.]]
+
+]
+
+
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `stream_handle(io_context&) constructor`. 
+
+
+
+
+[endsect]
+
+
+[section:read_some windows::stream_handle::read_some]
+
+[indexterm2 asio.indexterm.windows__stream_handle.read_some..read_some..windows::stream_handle] 
+Read some data from the handle. 
+
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
+  std::size_t ``[link asio.reference.windows__stream_handle.read_some.overload1 read_some]``(
+      const MutableBufferSequence & buffers);
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.read_some.overload1 more...]]``
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
+  std::size_t ``[link asio.reference.windows__stream_handle.read_some.overload2 read_some]``(
+      const MutableBufferSequence & buffers,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.read_some.overload2 more...]]``
+
+
+[section:overload1 windows::stream_handle::read_some (1 of 2 overloads)]
+
+
+Read some data from the handle. 
 
 
   template<
       typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
   std::size_t read_some(
-      implementation_type & impl,
+      const MutableBufferSequence & buffers);
+
+
+This function is used to read data from the stream handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[buffers][One or more buffers into which the data will be read.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of bytes read.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
+
+]
+
+
+[heading Remarks]
+      
+The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`]  function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+
+
+[heading Example]
+  
+To read into a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
+
+   handle.read_some(asio::buffer(data, size));
+
+
+See the [link asio.reference.buffer `buffer`]  documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 windows::stream_handle::read_some (2 of 2 overloads)]
+
+
+Read some data from the handle. 
+
+
+  template<
+      typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
+  std::size_t read_some(
       const MutableBufferSequence & buffers,
       asio::error_code & ec);
 
 
+This function is used to read data from the stream handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[buffers][One or more buffers into which the data will be read.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of bytes read. Returns 0 if an error occurred.
+
+
+[heading Remarks]
+      
+The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`]  function if you need to ensure that the requested amount of data is read before the blocking operation completes. 
+
+
+
 
 [endsect]
 
 
+[endsect]
 
-[section:stream_handle_service windows::stream_handle_service::stream_handle_service]
+[section:stream_handle windows::stream_handle::stream_handle]
 
-[indexterm2 stream_handle_service..windows::stream_handle_service] 
-Construct a new stream handle service for the specified [link asio.reference.io_context `io_context`]. 
+[indexterm2 asio.indexterm.windows__stream_handle.stream_handle..stream_handle..windows::stream_handle] 
+Construct a [link asio.reference.windows__stream_handle `windows::stream_handle`] without opening it. 
 
 
-  stream_handle_service(
+  explicit ``[link asio.reference.windows__stream_handle.stream_handle.overload1 stream_handle]``(
+      asio::io_context & io_context);
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.stream_handle.overload1 more...]]``
+
+
+Construct a [link asio.reference.windows__stream_handle `windows::stream_handle`] on an existing native handle. 
+
+
+  ``[link asio.reference.windows__stream_handle.stream_handle.overload2 stream_handle]``(
+      asio::io_context & io_context,
+      const native_handle_type & handle);
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.stream_handle.overload2 more...]]``
+
+
+Move-construct a [link asio.reference.windows__stream_handle `windows::stream_handle`] from another. 
+
+
+  ``[link asio.reference.windows__stream_handle.stream_handle.overload3 stream_handle]``(
+      stream_handle && other);
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.stream_handle.overload3 more...]]``
+
+
+[section:overload1 windows::stream_handle::stream_handle (1 of 3 overloads)]
+
+
+Construct a [link asio.reference.windows__stream_handle `windows::stream_handle`] without opening it. 
+
+
+  stream_handle(
       asio::io_context & io_context);
 
 
+This constructor creates a stream handle without opening it. The handle needs to be opened and then connected or accepted before data can be sent or received on it.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the stream handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
+
+]
+
+
+
 
 [endsect]
 
 
 
-[section:write_some windows::stream_handle_service::write_some]
+[section:overload2 windows::stream_handle::stream_handle (2 of 3 overloads)]
 
-[indexterm2 write_some..windows::stream_handle_service] 
-Write the given data to the stream. 
+
+Construct a [link asio.reference.windows__stream_handle `windows::stream_handle`] on an existing native handle. 
+
+
+  stream_handle(
+      asio::io_context & io_context,
+      const native_handle_type & handle);
+
+
+This constructor creates a stream handle object to hold an existing native handle.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[io_context][The [link asio.reference.io_context `io_context`] object that the stream handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
+
+[[handle][The new underlying handle implementation.]]
+
+]
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. ]]
+
+]
+
+
+
+
+[endsect]
+
+
+
+[section:overload3 windows::stream_handle::stream_handle (3 of 3 overloads)]
+
+
+Move-construct a [link asio.reference.windows__stream_handle `windows::stream_handle`] from another. 
+
+
+  stream_handle(
+      stream_handle && other);
+
+
+This constructor moves a stream handle from one object to another.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[other][The other [link asio.reference.windows__stream_handle `windows::stream_handle`] object from which the move will occur.]]
+
+]
+
+
+[heading Remarks]
+      
+Following the move, the moved-from object is in the same state as if constructed using the `stream_handle(io_context&) constructor`. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:write_some windows::stream_handle::write_some]
+
+[indexterm2 asio.indexterm.windows__stream_handle.write_some..write_some..windows::stream_handle] 
+Write some data to the handle. 
+
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
+  std::size_t ``[link asio.reference.windows__stream_handle.write_some.overload1 write_some]``(
+      const ConstBufferSequence & buffers);
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.write_some.overload1 more...]]``
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
+  std::size_t ``[link asio.reference.windows__stream_handle.write_some.overload2 write_some]``(
+      const ConstBufferSequence & buffers,
+      asio::error_code & ec);
+  ``  [''''&raquo;''' [link asio.reference.windows__stream_handle.write_some.overload2 more...]]``
+
+
+[section:overload1 windows::stream_handle::write_some (1 of 2 overloads)]
+
+
+Write some data to the handle. 
 
 
   template<
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
   std::size_t write_some(
-      implementation_type & impl,
-      const ConstBufferSequence & buffers,
-      asio::error_code & ec);
+      const ConstBufferSequence & buffers);
+
+
+This function is used to write data to the stream handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[buffers][One or more data buffers to be written to the handle.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of bytes written.
+
+
+[heading Exceptions]
+    
+
+[variablelist
+  
+[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
+
+]
+
+
+[heading Remarks]
+      
+The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`]  function if you need to ensure that all data is written before the blocking operation completes.
+
+
+[heading Example]
+  
+To write a single data buffer use the [link asio.reference.buffer `buffer`]  function as follows: 
+
+   handle.write_some(asio::buffer(data, size));
+
+
+See the [link asio.reference.buffer `buffer`]  documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. 
+
 
 
 
@@ -130238,11 +111038,57 @@
 
 
 
+[section:overload2 windows::stream_handle::write_some (2 of 2 overloads)]
+
+
+Write some data to the handle. 
+
+
+  template<
+      typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
+  std::size_t write_some(
+      const ConstBufferSequence & buffers,
+      asio::error_code & ec);
+
+
+This function is used to write data to the stream handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
+
+
+[heading Parameters]
+    
+
+[variablelist
+  
+[[buffers][One or more data buffers to be written to the handle.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+
+[heading Return Value]
+      
+The number of bytes written. Returns 0 if an error occurred.
+
+
+[heading Remarks]
+      
+The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`]  function if you need to ensure that all data is written before the blocking operation completes. 
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
 [endsect]
 
 [section:write write]
 
-[indexterm1 write] 
+[indexterm1 asio.indexterm.write..write] 
 Write a certain amount of data to a stream before returning. 
 
       
@@ -130268,7 +111114,7 @@
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.write.overload3 write]``(
       SyncWriteStream & s,
       const ConstBufferSequence & buffers,
@@ -130279,7 +111125,7 @@
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.write.overload4 write]``(
       SyncWriteStream & s,
       const ConstBufferSequence & buffers,
@@ -130290,44 +111136,44 @@
 
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t ``[link asio.reference.write.overload5 write]``(
       SyncWriteStream & s,
-      DynamicBufferSequence && buffers,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      DynamicBuffer && buffers,
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.write.overload5 more...]]``
 
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t ``[link asio.reference.write.overload6 write]``(
       SyncWriteStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       asio::error_code & ec,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.write.overload6 more...]]``
 
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.write.overload7 write]``(
       SyncWriteStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       CompletionCondition completion_condition,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.write.overload7 more...]]``
 
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.write.overload8 write]``(
       SyncWriteStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       CompletionCondition completion_condition,
       asio::error_code & ec,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
   ``  [''''&raquo;''' [link asio.reference.write.overload8 more...]]``
 
   template<
@@ -130350,7 +111196,7 @@
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.write.overload11 write]``(
       SyncWriteStream & s,
       basic_streambuf< Allocator > & b,
@@ -130360,7 +111206,7 @@
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.write.overload12 write]``(
       SyncWriteStream & s,
       basic_streambuf< Allocator > & b,
@@ -130539,7 +111385,7 @@
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t write(
       SyncWriteStream & s,
       const ConstBufferSequence & buffers,
@@ -130623,7 +111469,7 @@
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t write(
       SyncWriteStream & s,
       const ConstBufferSequence & buffers,
@@ -130688,11 +111534,11 @@
 
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t write(
       SyncWriteStream & s,
-      DynamicBufferSequence && buffers,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      DynamicBuffer && buffers,
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
 
 
 This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
@@ -130759,12 +111605,12 @@
 
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
   std::size_t write(
       SyncWriteStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       asio::error_code & ec,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
 
 
 This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
@@ -130823,13 +111669,13 @@
 
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t write(
       SyncWriteStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       CompletionCondition completion_condition,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
 
 
 This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
@@ -130896,14 +111742,14 @@
 
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
-      typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t write(
       SyncWriteStream & s,
-      DynamicBufferSequence && buffers,
+      DynamicBuffer && buffers,
       CompletionCondition completion_condition,
       asio::error_code & ec,
-      typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type *  = 0);
+      typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type *  = 0);
 
 
 This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
@@ -131096,7 +111942,7 @@
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t write(
       SyncWriteStream & s,
       basic_streambuf< Allocator > & b,
@@ -131168,7 +112014,7 @@
   template<
       typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t write(
       SyncWriteStream & s,
       basic_streambuf< Allocator > & b,
@@ -131227,7 +112073,7 @@
 
 [section:write_at write_at]
 
-[indexterm1 write_at] 
+[indexterm1 asio.indexterm.write_at..write_at] 
 Write a certain amount of data at a specified offset before returning. 
 
       
@@ -131253,7 +112099,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.write_at.overload3 write_at]``(
       SyncRandomAccessWriteDevice & d,
       uint64_t offset,
@@ -131264,7 +112110,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.write_at.overload4 write_at]``(
       SyncRandomAccessWriteDevice & d,
       uint64_t offset,
@@ -131295,7 +112141,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.write_at.overload7 write_at]``(
       SyncRandomAccessWriteDevice & d,
       uint64_t offset,
@@ -131306,7 +112152,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t ``[link asio.reference.write_at.overload8 write_at]``(
       SyncRandomAccessWriteDevice & d,
       uint64_t offset,
@@ -131491,7 +112337,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t write_at(
       SyncRandomAccessWriteDevice & d,
       uint64_t offset,
@@ -131577,7 +112423,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
       typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t write_at(
       SyncRandomAccessWriteDevice & d,
       uint64_t offset,
@@ -131784,7 +112630,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t write_at(
       SyncRandomAccessWriteDevice & d,
       uint64_t offset,
@@ -131859,7 +112705,7 @@
   template<
       typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
       typename Allocator,
-      typename CompletionCondition>
+      typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
   std::size_t write_at(
       SyncRandomAccessWriteDevice & d,
       uint64_t offset,
@@ -131922,7 +112768,7 @@
 
 [section:yield_context yield_context]
 
-[indexterm1 yield_context] 
+[indexterm1 asio.indexterm.yield_context..yield_context] 
 Context object that represents the currently executing coroutine. 
 
 
diff --git a/asio/src/doc/reference.xsl b/asio/src/doc/reference.xsl
index effb691..e652cd9 100644
--- a/asio/src/doc/reference.xsl
+++ b/asio/src/doc/reference.xsl
@@ -2,7 +2,7 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
 <!--
-  Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
   Distributed under the Boost Software License, Version 1.0. (See accompanying
   file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -26,7 +26,7 @@
 -->
 <xsl:template match="/doxygen">
 <xsl:text>[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -37,6 +37,9 @@
 [xinclude quickref.xml]
 
 [include requirements/asynchronous_operations.qbk]
+[include requirements/read_write_operations.qbk]
+[include requirements/synchronous_socket_operations.qbk]
+[include requirements/asynchronous_socket_operations.qbk]
 [include requirements/AcceptableProtocol.qbk]
 [include requirements/AcceptHandler.qbk]
 [include requirements/AsyncRandomAccessReadDevice.qbk]
@@ -44,54 +47,41 @@
 [include requirements/AsyncReadStream.qbk]
 [include requirements/AsyncWriteStream.qbk]
 [include requirements/BufferedHandshakeHandler.qbk]
+[include requirements/CompletionCondition.qbk]
 [include requirements/CompletionHandler.qbk]
+[include requirements/ConnectCondition.qbk]
 [include requirements/ConnectHandler.qbk]
 [include requirements/ConstBufferSequence.qbk]
-[include requirements/ConvertibleToConstBuffer.qbk]
-[include requirements/ConvertibleToMutableBuffer.qbk]
-[include requirements/DatagramSocketService.qbk]
-[include requirements/DescriptorService.qbk]
-[include requirements/DynamicBufferSequence.qbk]
+[include requirements/DynamicBuffer.qbk]
 [include requirements/Endpoint.qbk]
+[include requirements/EndpointSequence.qbk]
+[include requirements/ExecutionContext.qbk]
 [include requirements/Executor.qbk]
 [include requirements/GettableSerialPortOption.qbk]
 [include requirements/GettableSocketOption.qbk]
 [include requirements/Handler.qbk]
-[include requirements/HandleService.qbk]
 [include requirements/HandshakeHandler.qbk]
 [include requirements/InternetProtocol.qbk]
 [include requirements/IoControlCommand.qbk]
 [include requirements/IoObjectService.qbk]
 [include requirements/IteratorConnectHandler.qbk]
+[include requirements/MoveAcceptHandler.qbk]
 [include requirements/MutableBufferSequence.qbk]
-[include requirements/ObjectHandleService.qbk]
+[include requirements/ProtoAllocator.qbk]
 [include requirements/Protocol.qbk]
-[include requirements/RandomAccessHandleService.qbk]
 [include requirements/RangeConnectHandler.qbk]
-[include requirements/RawSocketService.qbk]
 [include requirements/ReadHandler.qbk]
 [include requirements/ResolveHandler.qbk]
-[include requirements/ResolverService.qbk]
-[include requirements/SeqPacketSocketService.qbk]
-[include requirements/SerialPortService.qbk]
 [include requirements/Service.qbk]
 [include requirements/SettableSerialPortOption.qbk]
 [include requirements/SettableSocketOption.qbk]
 [include requirements/ShutdownHandler.qbk]
 [include requirements/SignalHandler.qbk]
-[include requirements/SignalSetService.qbk]
-[include requirements/SocketAcceptorService.qbk]
-[include requirements/SocketService.qbk]
-[include requirements/StreamDescriptorService.qbk]
-[include requirements/StreamHandleService.qbk]
-[include requirements/StreamSocketService.qbk]
 [include requirements/SyncRandomAccessReadDevice.qbk]
 [include requirements/SyncRandomAccessWriteDevice.qbk]
 [include requirements/SyncReadStream.qbk]
 [include requirements/SyncWriteStream.qbk]
 [include requirements/TimeTraits.qbk]
-[include requirements/TimerService.qbk]
-[include requirements/WaitableTimerService.qbk]
 [include requirements/WaitHandler.qbk]
 [include requirements/WaitTraits.qbk]
 [include requirements/WriteHandler.qbk]
@@ -109,7 +99,9 @@
             contains(compoundname, 'asio::') and
             not(contains(compoundname, '::detail')) and
             not(contains(compoundname, '::service::key')) and
-            (contains(compoundname, 'packaged_handler') or not(contains(compoundname, '_handler')))">
+            not(contains(compoundname, '_handler')) and
+            not(contains(compoundname, 'thread_function')) and
+            not(contains(compoundname, 'context_impl'))">
           <xsl:call-template name="class"/>
         </xsl:if>
       </xsl:when>
@@ -119,7 +111,8 @@
             not(contains(ancestor::*/compoundname, '::service::key')) and
             not(contains(ancestor::*/compoundname, '_helper')) and
             not(contains(name, '_helper')) and
-            not(contains(name, 'io_service_impl'))">
+            not(contains(name, 'thread_function')) and
+            not(contains(name, 'io_context_impl'))">
           <xsl:call-template name="namespace-memberdef"/>
         </xsl:if>
       </xsl:otherwise>
@@ -198,7 +191,7 @@
   </xsl:variable>
   <xsl:choose>
     <xsl:when test="$type='void_or_deduced'">
-      <xsl:text>``[link asio.reference.asynchronous_operations.return_type_of_an_initiating_function ['void-or-deduced]]``</xsl:text>
+      <xsl:text>``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]``</xsl:text>
     </xsl:when>   
     <xsl:otherwise>
       <xsl:value-of select="$type"/>
@@ -306,6 +299,18 @@
          select="concat(substring-before($name, '~'), '_', substring-after($name, '~'))"/>
       </xsl:call-template>
     </xsl:when>
+    <xsl:when test="contains($name, ',')">
+      <xsl:call-template name="make-id">
+        <xsl:with-param name="name"
+         select="concat(substring-before($name, ','), '_comma_', substring-after($name, ','))"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="contains($name, '...')">
+      <xsl:call-template name="make-id">
+        <xsl:with-param name="name"
+         select="concat(substring-before($name, '...'), '_ellipsis_', substring-after($name, '...'))"/>
+      </xsl:call-template>
+    </xsl:when>
     <xsl:when test="contains($name, ' ')">
       <xsl:call-template name="make-id">
         <xsl:with-param name="name"
@@ -599,6 +604,13 @@
         <xsl:with-param name="text" select="substring-after($text, ']')"/>
       </xsl:call-template>
     </xsl:when>
+    <xsl:when test="contains($text, '...')">
+      <xsl:value-of select="substring-before($text, '...')"/>
+      <xsl:text>\.\.\.</xsl:text>
+      <xsl:call-template name="escape-name">
+        <xsl:with-param name="text" select="substring-after($text, '...')"/>
+      </xsl:call-template>
+    </xsl:when>
     <xsl:otherwise>
       <xsl:value-of select="$text"/>
     </xsl:otherwise>
@@ -847,7 +859,7 @@
   [[Name][Description]]
 <xsl:for-each select="
     sectiondef[@kind='public-type']/memberdef |
-    innerclass[@prot='public' and not(contains(., '_handler'))]" mode="class-table">
+    innerclass[@prot='public' and not(contains(., '_handler')) and not(contains(., 'thread_function'))]" mode="class-table">
   <xsl:sort select="concat(name, (.)[not(name)])"/>
   [
 <xsl:choose>
@@ -1198,6 +1210,11 @@
       <xsl:with-param name="text" select="$name"/>
     </xsl:call-template>
   </xsl:variable>
+  <xsl:variable name="escaped-class-name">
+    <xsl:call-template name="escape-name">
+      <xsl:with-param name="text" select="$class-name"/>
+    </xsl:call-template>
+  </xsl:variable>
   <xsl:variable name="id">
     <xsl:call-template name="make-id">
       <xsl:with-param name="name" select="$name"/>
@@ -1222,9 +1239,14 @@
 <xsl:value-of select="$class-name"/>::<xsl:value-of select="$escaped-name"/>]
 
 <xsl:text>[indexterm2 </xsl:text>
+<xsl:text>asio.indexterm.</xsl:text>
+<xsl:value-of select="$class-id"/>
+<xsl:text>.</xsl:text>
+<xsl:value-of select="$id"/>
+<xsl:text>..</xsl:text>
 <xsl:value-of select="$escaped-name"/>
 <xsl:text>..</xsl:text>
-<xsl:value-of select="$class-name"/>
+<xsl:value-of select="$escaped-class-name"/>
 <xsl:text>] </xsl:text>
 
 <xsl:apply-templates select="briefdescription" mode="markup"/><xsl:text>
@@ -1279,9 +1301,14 @@
 
 <xsl:if test="$overload-count = 1">
   <xsl:text>[indexterm2 </xsl:text>
+  <xsl:text>asio.indexterm.</xsl:text>
+  <xsl:value-of select="$class-id"/>
+  <xsl:text>.</xsl:text>
+  <xsl:value-of select="$id"/>
+  <xsl:text>..</xsl:text>
   <xsl:value-of select="$escaped-name"/>
   <xsl:text>..</xsl:text>
-  <xsl:value-of select="$class-name"/>
+  <xsl:value-of select="$escaped-class-name"/>
   <xsl:text>] </xsl:text>
 </xsl:if>
 
@@ -1300,6 +1327,7 @@
     <xsl:when test="@kind='enum'">
       <xsl:call-template name="enum" mode="class-detail">
         <xsl:with-param name="enum-name" select="$class-name"/>
+        <xsl:with-param name="id" select="concat($class-id, '.', $id)"/>
       </xsl:call-template>
     </xsl:when>
     <xsl:when test="@kind='function'">
@@ -1372,11 +1400,17 @@
 
 <xsl:template name="enum">
 <xsl:param name="enum-name"/>
+<xsl:param name="id"/>
   enum <xsl:value-of select="name"/><xsl:text>
 </xsl:text><xsl:if test="count(enumvalue) &gt; 0">
 <xsl:value-of select="$newline"/>
 <xsl:for-each select="enumvalue">
   <xsl:text>[indexterm2 </xsl:text>
+  <xsl:text>asio.indexterm.</xsl:text>
+  <xsl:value-of select="$id"/>
+  <xsl:text>.</xsl:text>
+  <xsl:value-of select="name"/>
+  <xsl:text>..</xsl:text>
   <xsl:value-of select="name"/>
   <xsl:text>..</xsl:text>
   <xsl:value-of select="$enum-name"/>
@@ -1447,19 +1481,19 @@
         <xsl:when test="declname = 'ByteType'">
           <xsl:value-of select="declname"/>
         </xsl:when>
-        <xsl:when test="declname = 'Clock'">
+        <xsl:when test="declname = 'C'">
           <xsl:value-of select="declname"/>
         </xsl:when>
-        <xsl:when test="declname = 'CompletionCondition'">
+        <xsl:when test="declname = 'Clock'">
           <xsl:value-of select="declname"/>
         </xsl:when>
         <xsl:when test="declname = 'CompletionToken'">
           <xsl:value-of select="declname"/>
         </xsl:when>
-        <xsl:when test="declname = 'ConnectCondition'">
+        <xsl:when test="declname = 'Context_Service'">
           <xsl:value-of select="declname"/>
         </xsl:when>
-        <xsl:when test="declname = 'Context_Service'">
+        <xsl:when test="declname = 'Duration'">
           <xsl:value-of select="declname"/>
         </xsl:when>
         <xsl:when test="declname = 'DatagramSocketService1'">
@@ -1504,6 +1538,9 @@
         <xsl:when test="declname = 'PasswordCallback'">
           <xsl:value-of select="declname"/>
         </xsl:when>
+        <xsl:when test="declname = 'Period'">
+          <xsl:value-of select="declname"/>
+        </xsl:when>
         <xsl:when test="declname = 'PodType'">
           <xsl:value-of select="declname"/>
         </xsl:when>
@@ -1516,6 +1553,12 @@
         <xsl:when test="declname = 'RawSocketService1'">
           <xsl:value-of select="concat('``[link asio.reference.RawSocketService ', declname, ']``')"/>
         </xsl:when>
+        <xsl:when test="declname = 'Rep'">
+          <xsl:value-of select="declname"/>
+        </xsl:when>
+        <xsl:when test="declname = 'Result'">
+          <xsl:value-of select="declname"/>
+        </xsl:when>
         <xsl:when test="declname = 'SeqPacketSocketService1'">
           <xsl:value-of select="concat('``[link asio.reference.SeqPacketSocketService ', declname, ']``')"/>
         </xsl:when>
@@ -1630,6 +1673,9 @@
 [section:<xsl:value-of select="$id"/><xsl:text> </xsl:text><xsl:value-of select="$name"/>]
 
 <xsl:text>[indexterm1 </xsl:text>
+<xsl:text>asio.indexterm.</xsl:text>
+<xsl:value-of select="$id"/>
+<xsl:text>..</xsl:text>
 <xsl:value-of select="$name"/>
 <xsl:text>] </xsl:text>
 
@@ -1683,6 +1729,9 @@
 
 <xsl:if test="$overload-count = 1">
   <xsl:text>[indexterm1 </xsl:text>
+  <xsl:text>asio.indexterm.</xsl:text>
+  <xsl:value-of select="$id"/>
+  <xsl:text>..</xsl:text>
   <xsl:value-of select="$name"/>
   <xsl:text>] </xsl:text>
 </xsl:if>
@@ -1702,6 +1751,7 @@
     <xsl:when test="@kind='enum'">
       <xsl:call-template name="enum">
         <xsl:with-param name="enum-name" select="$name"/>
+        <xsl:with-param name="id" select="$id"/>
       </xsl:call-template>
     </xsl:when>
     <xsl:when test="@kind='function'">
diff --git a/asio/src/doc/requirements/AcceptHandler.qbk b/asio/src/doc/requirements/AcceptHandler.qbk
index b594ab7..ae5ea3f 100644
--- a/asio/src/doc/requirements/AcceptHandler.qbk
+++ b/asio/src/doc/requirements/AcceptHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/AcceptableProtocol.qbk b/asio/src/doc/requirements/AcceptableProtocol.qbk
index 2cd3bf2..3768387 100644
--- a/asio/src/doc/requirements/AcceptableProtocol.qbk
+++ b/asio/src/doc/requirements/AcceptableProtocol.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,18 +7,18 @@
 
 [section:AcceptableProtocol Acceptable protocol requirements]
 
-An acceptable protocol must meet the requirements for a [link
-asio.reference.Protocol protocol] as well as the additional requirements listed
-below.
-
-In the table below, `X` denotes an acceptable protocol class.
+A type `X` meets the `AcceptableProtocol` requirements if it satisfies the
+requirements of [link asio.reference.Protocol `Protocol`] as well as the
+additional requirements listed below.
 
 [table AcceptableProtocol requirements
   [[expression] [return type] [assertion/note\npre/post-conditions]]
   [
     [`X::socket`]
-    [`
-    [The type of a socket for the protocol.]
+    [A type that satisfies the requirements of `Destructible` (C++Std
+     \[destructible\]) and `MoveConstructible` (C++Std \[moveconstructible\]),
+     and that is publicly and unambiguously derived from `basic_socket<X>`.]
+    []
   ]
 ]
 
diff --git a/asio/src/doc/requirements/AsyncRandomAccessReadDevice.qbk b/asio/src/doc/requirements/AsyncRandomAccessReadDevice.qbk
index efb262c..4109c01 100644
--- a/asio/src/doc/requirements/AsyncRandomAccessReadDevice.qbk
+++ b/asio/src/doc/requirements/AsyncRandomAccessReadDevice.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,10 +17,9 @@
 [table Buffer-oriented asynchronous random-access read device requirements
   [[operation] [type] [semantics, pre/post-conditions]]
   [
-    [`a.get_io_service();`]
-    [`io_service&`]
-    [Returns the `io_service` object through which the `async_read_some_at`
-    handler `h` will be invoked.]
+    [`a.get_executor()`]
+    [A type satisfying the [link asio.reference.Executor1 Executor requirements].]
+    [Returns the associated I/O executor.]
   ]
   [
     [`a.async_read_some_at(o, mb, h);`]
diff --git a/asio/src/doc/requirements/AsyncRandomAccessWriteDevice.qbk b/asio/src/doc/requirements/AsyncRandomAccessWriteDevice.qbk
index b13268c..bd9ecbd 100644
--- a/asio/src/doc/requirements/AsyncRandomAccessWriteDevice.qbk
+++ b/asio/src/doc/requirements/AsyncRandomAccessWriteDevice.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,10 +17,9 @@
 [table Buffer-oriented asynchronous random-access write device requirements
   [[operation] [type] [semantics, pre/post-conditions]]
   [
-    [`a.get_io_service();`]
-    [`io_service&`]
-    [Returns the `io_service` object through which the `async_write_some_at`
-    handler `h` will be invoked.]
+    [`a.get_executor()`]
+    [A type satisfying the [link asio.reference.Executor1 Executor requirements].]
+    [Returns the associated I/O executor.]
   ]
   [
     [`a.async_write_some_at(o, cb, h);`]
diff --git a/asio/src/doc/requirements/AsyncReadStream.qbk b/asio/src/doc/requirements/AsyncReadStream.qbk
index 6bbc753..0fcd42f 100644
--- a/asio/src/doc/requirements/AsyncReadStream.qbk
+++ b/asio/src/doc/requirements/AsyncReadStream.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,48 +7,42 @@
 
 [section:AsyncReadStream Buffer-oriented asynchronous read stream requirements]
 
-In the table below, `a` denotes an asynchronous read stream object, `mb`
-denotes an object satisfying [link
-asio.reference.MutableBufferSequence mutable buffer sequence]
-requirements, and `h` denotes an object satisfying [link
-asio.reference.ReadHandler read handler] requirements.
+A type `X` meets the `AsyncReadStream` requirements if it satisfies the
+requirements listed below.
 
-[table Buffer-oriented asynchronous read stream requirements
+In the table below, `a` denotes a value of type `X`, `mb` denotes a (possibly
+const) value satisfying the [link asio.reference.MutableBufferSequence
+`MutableBufferSequence`] requirements, and `t` is a completion token.
+
+[table AsyncReadStream requirements
   [[operation] [type] [semantics, pre/post-conditions]]
   [
-    [`a.get_io_service();`]
-    [`io_service&`]
-    [Returns the `io_service` object through which the `async_read_some`
-    handler `h` will be invoked.]
+    [`a.get_executor()`]
+    [A type satisfying the [link asio.reference.Executor1 Executor requirements].]
+    [Returns the associated I/O executor.]
   ]
   [
-    [`a.async_read_some(mb, h);`]
-    [`void`]
+    [`a.async_read_some(mb,t)`]
     [
-      Initiates an asynchronous operation to read one or more bytes of data
-      from the stream `a`. The operation is performed via the `io_service`
-      object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
+      The return type is determined according to the requirements for an
+      [link asio.reference.asynchronous_operations asynchronous operation].
+    ]
+    [
+      Meets the requirements for a [link asio.reference.read_write_operations
+      read operation] and an [link asio.reference.asynchronous_operations
+      asynchronous operation] with completion signature `void(error_code ec,
+      size_t n)`.\n
       \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The `async_read_some` operation shall always fill a buffer in
-      the sequence completely before proceeding to the next.\n
+      If `buffer_size(mb) > 0`, initiates an asynchronous operation to read one
+      or more bytes of data from the stream `a` into the buffer sequence `mb`.
+      If successful, `ec` is set such that `!ec` is `true`, and `n` is the
+      number of bytes read. If an error occurred, `ec` is set such that `!!ec`
+      is `true`, and `n` is 0. If all data has been read from the stream, and
+      the stream performed an orderly shutdown, `ec` is
+      `stream_errc::eof` and `n` is 0.\n
       \n
-      The implementation shall maintain one or more copies of `mb` until such
-      time as the read operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `mb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous read operation is invoked,\n
-      \n
-      whichever comes first.\n
-      \n
-      If the total size of all buffers in the sequence `mb` is `0`, the
-      asynchronous read operation shall complete immediately and pass `0` as
-      the argument to the handler that specifies the number of bytes read.
+      If `buffer_size(mb) == 0`, the operation completes immediately. `ec` is
+      set such that `!ec` is `true`, and `n` is 0.
     ]
   ]
 ]
diff --git a/asio/src/doc/requirements/AsyncWriteStream.qbk b/asio/src/doc/requirements/AsyncWriteStream.qbk
index 8d3edfd..ee53b23 100644
--- a/asio/src/doc/requirements/AsyncWriteStream.qbk
+++ b/asio/src/doc/requirements/AsyncWriteStream.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,47 +7,40 @@
 
 [section:AsyncWriteStream Buffer-oriented asynchronous write stream requirements]
 
-In the table below, `a` denotes an asynchronous write stream object, `cb`
-denotes an object satisfying [link asio.reference.ConstBufferSequence
-constant buffer sequence] requirements, and `h` denotes an object satisfying
-[link asio.reference.WriteHandler write handler] requirements.
+A type `X` meets the `AsyncWriteStream` requirements if it satisfies the
+requirements listed below.
 
-[table Buffer-oriented asynchronous write stream requirements
+In the table below, `a` denotes a value of type `X`, `cb` denotes a (possibly
+const) value satisfying the [link asio.reference.ConstBufferSequence
+`ConstBufferSequence`] requirements, and `t` is a completion token.
+
+[table AsyncWriteStream requirements
   [[operation] [type] [semantics, pre/post-conditions]]
   [
-    [`a.get_io_service();`]
-    [`io_service&`]
-    [Returns the `io_service` object through which the `async_write_some`
-    handler `h` will be invoked.]
+    [`a.get_executor()`]
+    [A type satisfying the [link asio.reference.Executor1 Executor requirements].]
+    [Returns the associated I/O executor.]
   ]
   [
-    [`a.async_write_some(cb, h);`]
-    [`void`]
+    [`a.async_write_some(cb,t)`]
     [
-      Initiates an asynchronous operation to write one or more bytes of data to
-      the stream `a`. The operation is performed via the `io_service` object
-      `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
+      The return type is determined according to the requirements for an
+      [link asio.reference.asynchronous_operations asynchronous operation].
+    ]
+    [
+      Meets the requirements for a [link asio.reference.read_write_operations
+      write operation] and an [link asio.reference.asynchronous_operations
+      asynchronous operation] with completion signature `void(error_code ec,
+      size_t n)`.\n
       \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The `async_write_some` operation shall always write a
-      buffer in the sequence completely before proceeding to the next.\n
+      If `buffer_size(cb) > 0`, initiates an asynchronous operation to write
+      one or more bytes of data to the stream `a` from the buffer sequence
+      `cb`. If successful, `ec` is set such that `!ec` is `true`, and `n` is
+      the number of bytes written. If an error occurred, `ec` is set such that
+      `!!ec` is `true`, and `n` is 0.\n
       \n
-      The implementation shall maintain one or more copies of `cb` until such
-      time as the write operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `cb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous write operation is invoked,\n
-      \n
-      whichever comes first.\n
-      \n
-      If the total size of all buffers in the sequence `cb` is `0`, the
-      asynchronous write operation shall complete immediately and pass `0` as
-      the argument to the handler that specifies the number of bytes written.
+      If `buffer_size(cb) == 0`, the operation completes immediately. `ec` is
+      set such that `!ec` is `true`, and `n` is 0.
     ]
   ]
 ]
diff --git a/asio/src/doc/requirements/BufferedHandshakeHandler.qbk b/asio/src/doc/requirements/BufferedHandshakeHandler.qbk
index 7b2a814..6e6bbf2 100644
--- a/asio/src/doc/requirements/BufferedHandshakeHandler.qbk
+++ b/asio/src/doc/requirements/BufferedHandshakeHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/CompletionCondition.qbk b/asio/src/doc/requirements/CompletionCondition.qbk
new file mode 100644
index 0000000..1575613
--- /dev/null
+++ b/asio/src/doc/requirements/CompletionCondition.qbk
@@ -0,0 +1,42 @@
+[/
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ /
+ / Distributed under the Boost Software License, Version 1.0. (See accompanying
+ / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ /]
+
+[section:CompletionCondition Completion condition requirements]
+
+A ['completion condition] is a function object that is used with the algorithms
+[link asio.reference.read `read`], [link asio.reference.async_read
+`async_read`], [link asio.reference.write `write`], and [link
+asio.reference.async_write `async_write`] to determine when the algorithm has
+completed transferring data.
+
+A type `X` meets the `CompletionCondition` requirements if it satisfies the
+requirements of `Destructible` (C++Std [destructible]) and
+`CopyConstructible` (C++Std [copyconstructible]), as well as the additional
+requirements listed below.
+
+In the table below, `x` denotes a value of type `X`, `ec` denotes a (possibly
+const) value of type `error_code`, and `n` denotes a (possibly const) value of
+type `size_t`.
+
+[table CompletionCondition requirements
+  [[expression] [return type] [assertion/note\npre/post-condition]]
+  [
+    [`x(ec, n)`]
+    [`size_t`]
+    [
+      Let `n` be the total number of bytes transferred by the read or write
+      algorithm so far.\n
+      \n
+      Returns the maximum number of bytes to be transferred on the next
+      `read_some`, `async_read_some`, `write_some`, or `async_write_some`
+      operation performed by the algorithm. Returns `0` to indicate that the
+      algorithm is complete.
+    ]
+  ]
+]
+
+[endsect]
diff --git a/asio/src/doc/requirements/CompletionHandler.qbk b/asio/src/doc/requirements/CompletionHandler.qbk
index c27618f..28d158b 100644
--- a/asio/src/doc/requirements/CompletionHandler.qbk
+++ b/asio/src/doc/requirements/CompletionHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/ConnectCondition.qbk b/asio/src/doc/requirements/ConnectCondition.qbk
new file mode 100644
index 0000000..995398c
--- /dev/null
+++ b/asio/src/doc/requirements/ConnectCondition.qbk
@@ -0,0 +1,34 @@
+[/
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ /
+ / Distributed under the Boost Software License, Version 1.0. (See accompanying
+ / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ /]
+
+[section:ConnectCondition Connect condition requirements]
+
+A type `X` meets the `ConnectCondition` requirements if it satisfies the
+requirements of `Destructible` (C++Std [destructible]) and
+`CopyConstructible` (C++Std [copyconstructible]), as well as the additional
+requirements listed below.
+
+In the table below, `x` denotes a value of type `X`, `ec` denotes a (possibly
+const) value of type `error_code`, and `ep` denotes a (possibly const) value of
+some type satisfying the [link asio.reference.Endpoint endpoint] requirements.
+
+[table ConnectCondition requirements
+  [[expression] [return type] [assertion/note\npre/post-condition]]
+  [
+    [`x(ec, ep)`]
+    [`bool`]
+    [
+      Returns `true` to indicate that the `connect` or `async_connect`
+      algorithm should attempt a connection to the endpoint `ep`. Otherwise,
+      returns `false` to indicate that the algorithm should not attempt
+      connection to the endpoint `ep`, and should instead skip to the next
+      endpoint in the sequence.
+    ]
+  ]
+]
+
+[endsect]
diff --git a/asio/src/doc/requirements/ConnectHandler.qbk b/asio/src/doc/requirements/ConnectHandler.qbk
index bf3815c..14b57d2 100644
--- a/asio/src/doc/requirements/ConnectHandler.qbk
+++ b/asio/src/doc/requirements/ConnectHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/ConstBufferSequence.qbk b/asio/src/doc/requirements/ConstBufferSequence.qbk
index 6682f73..1ff91eb 100644
--- a/asio/src/doc/requirements/ConstBufferSequence.qbk
+++ b/asio/src/doc/requirements/ConstBufferSequence.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,96 +7,49 @@
 
 [section:ConstBufferSequence Constant buffer sequence requirements]
 
-In the table below, `X` denotes a class containing objects of type `T`, `a`
-denotes a value of type `X` and `u` denotes an identifier.
+A ['constant buffer sequence] represents a set of memory regions that may be
+used as input to an operation, such as the `send` operation of a socket.
+
+A type `X` meets the `ConstBufferSequence` requirements if it satisfies the
+requirements of `Destructible` (C++Std [destructible]) and
+`CopyConstructible` (C++Std [copyconstructible]), as well as the additional
+requirements listed below.
+
+In the table below, `x` denotes a (possibly const) value of type `X`, and `u`
+denotes an identifier.
 
 [table ConstBufferSequence requirements
   [[expression] [return type] [assertion/note\npre/post-condition]]
   [
-    [`X::value_type`]
-    [`T`]
-    [`T` meets the requirements for [link
-     asio.reference.ConvertibleToConstBuffer
-     ConvertibleToConstBuffer].]
-  ]
-  [
-    [`X::const_iterator`]
-    [iterator type pointing to `T`]
-    [`const_iterator` meets the requirements for bidirectional iterators
-     (C++ Std, 24.1.4).]
-  ]
-  [
-    [`X(a);`]
+    [`asio::buffer_sequence_begin(x)`\n
+     `asio::buffer_sequence_end(x)`]
+    [An iterator type meeting the requirements for bidirectional iterators
+     (C++Std \[bidirectional.iterators\]) whose value type is convertible to
+     `const_buffer`.]
     []
-    [post: `equal_const_buffer_seq(a, X(a))` where the binary predicate
-     `equal_const_buffer_seq` is defined as
+  ]
+  [
+    [``
+      X u(x);
+    ``]
+    []
+    [post:\n
      ``
-       bool equal_const_buffer_seq(
-         const X& x1, const X& x2)
-       {
-         return
-           distance(x1.begin(), x1.end())
-             == distance(x2.begin(), x2.end())
-               && equal(x1.begin(), x1.end(),
-                        x2.begin(), equal_buffer);
-       }
-     ``
-     and the binary predicate `equal_buffer` is defined as
-     ``
-      bool equal_buffer(
-        const X::value_type& v1,
-        const X::value_type& v2)
-      {
-        const_buffer b1(v1);
-        const_buffer b2(v2);
-        return
-          buffer_cast<const void*>(b1)
-            == buffer_cast<const void*>(b2)
-              && buffer_size(b1) == buffer_size(b2);
-      }
+       equal(
+         asio::buffer_sequence_begin(x),
+         asio::buffer_sequence_end(x),
+         asio::buffer_sequence_begin(u),
+         asio::buffer_sequence_end(u),
+         [](const typename X::value_type& v1,
+            const typename X::value_type& v2)
+          {
+            const_buffer b1(v1);
+            const_buffer b2(v2);
+            return b1.data() == b2.data()
+                && b1.size() == b2.size();
+          })
      ``]
   ]
-  [
-    [`X u(a);`]
-    []
-    [post:
-     ``
-      distance(a.begin(), a.end())
-        == distance(u.begin(), u.end())
-          && equal(a.begin(), a.end(),
-                   u.begin(), equal_buffer)
-     ``
-     where the binary predicate `equal_buffer` is defined as
-     ``
-      bool equal_buffer(
-        const X::value_type& v1,
-        const X::value_type& v2)
-      {
-        const_buffer b1(v1);
-        const_buffer b2(v2);
-        return
-          buffer_cast<const void*>(b1)
-            == buffer_cast<const void*>(b2)
-              && buffer_size(b1) == buffer_size(b2);
-      }
-     ``]
-  ]
-  [
-    [`(&a)->~X();`]
-    [`void`]
-    [note: the destructor is applied to every element of `a`; all the memory
-     is deallocated.]
-  ]
-  [
-    [`a.begin();`]
-    [`const_iterator` or convertible to `const_iterator`]
-    []
-  ]
-  [
-    [`a.end();`]
-    [`const_iterator` or convertible to `const_iterator`]
-    []
-  ]
 ]
 
 [endsect]
diff --git a/asio/src/doc/requirements/ConvertibleToConstBuffer.qbk b/asio/src/doc/requirements/ConvertibleToConstBuffer.qbk
deleted file mode 100644
index a81194b..0000000
--- a/asio/src/doc/requirements/ConvertibleToConstBuffer.qbk
+++ /dev/null
@@ -1,96 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:ConvertibleToConstBuffer Convertible to const buffer requirements]
-
-A type that meets the requirements for convertibility to a const buffer must
-meet the requirements of `CopyConstructible` types (C++ Std, 20.1.3), and the
-requirements of `Assignable` types (C++ Std, 23.1).
-
-In the table below, `X` denotes a class meeting the requirements for
-convertibility to a const buffer, `a` and `b` denote values of type `X`, and
-`u`, `v` and `w` denote identifiers.
-
-[table ConvertibleToConstBuffer requirements
-  [[expression][postcondition]]
-  [
-    [``
-      const_buffer u(a);
-      const_buffer v(a);
-    ``]
-    [``
-      buffer_cast<const void*>(u) == buffer_cast<const void*>(v)
-        && buffer_size(u) == buffer_size(v)
-    ``]
-  ]
-  [
-    [``
-      const_buffer u(a);
-      const_buffer v = a;
-    ``]
-    [``
-      buffer_cast<const void*>(u) == buffer_cast<const void*>(v)
-        && buffer_size(u) == buffer_size(v)
-    ``]
-  ]
-  [
-    [``
-      const_buffer u(a);
-      const_buffer v; v = a;
-    ``]
-    [``
-      buffer_cast<const void*>(u) == buffer_cast<const void*>(v)
-        && buffer_size(u) == buffer_size(v)
-    ``]
-  ]
-  [
-    [``
-      const_buffer u(a);
-      const X& v = a;
-      const_buffer w(v);
-    ``]
-    [``
-      buffer_cast<const void*>(u) == buffer_cast<const void*>(w)
-        && buffer_size(u) == buffer_size(w)
-    ``]
-  ]
-  [
-    [``
-      const_buffer u(a);
-      X v(a);
-      const_buffer w(v);
-    ``]
-    [``
-      buffer_cast<const void*>(u) == buffer_cast<const void*>(w)
-        && buffer_size(u) == buffer_size(w)
-    ``]
-  ]
-  [
-    [``
-      const_buffer u(a);
-      X v = a;
-      const_buffer w(v);
-    ``]
-    [``
-      buffer_cast<const void*>(u) == buffer_cast<const void*>(w)
-        && buffer_size(u) == buffer_size(w)
-    ``]
-  ]
-  [
-    [``
-      const_buffer u(a);
-      X v(b); v = a;
-      const_buffer w(v);
-    ``]
-    [``
-      buffer_cast<const void*>(u) == buffer_cast<const void*>(w)
-        && buffer_size(u) == buffer_size(w)
-    ``]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/ConvertibleToMutableBuffer.qbk b/asio/src/doc/requirements/ConvertibleToMutableBuffer.qbk
deleted file mode 100644
index e4e6cc1..0000000
--- a/asio/src/doc/requirements/ConvertibleToMutableBuffer.qbk
+++ /dev/null
@@ -1,96 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:ConvertibleToMutableBuffer Convertible to mutable buffer requirements]
-
-A type that meets the requirements for convertibility to a mutable buffer must
-meet the requirements of `CopyConstructible` types (C++ Std, 20.1.3), and the
-requirements of `Assignable` types (C++ Std, 23.1).
-
-In the table below, `X` denotes a class meeting the requirements for
-convertibility to a mutable buffer, `a` and `b` denote values of type `X`, and
-`u`, `v` and `w` denote identifiers.
-
-[table ConvertibleToMutableBuffer requirements
-  [[expression][postcondition]]
-  [
-    [``
-      mutable_buffer u(a);
-      mutable_buffer v(a);
-    ``]
-    [``
-      buffer_cast<void*>(u) == buffer_cast<void*>(v)
-        && buffer_size(u) == buffer_size(v)
-    ``]
-  ]
-  [
-    [``
-      mutable_buffer u(a);
-      mutable_buffer v = a;
-    ``]
-    [``
-      buffer_cast<void*>(u) == buffer_cast<void*>(v)
-        && buffer_size(u) == buffer_size(v)
-    ``]
-  ]
-  [
-    [``
-      mutable_buffer u(a);
-      mutable_buffer v; v = a;
-    ``]
-    [``
-      buffer_cast<void*>(u) == buffer_cast<void*>(v)
-        && buffer_size(u) == buffer_size(v)
-    ``]
-  ]
-  [
-    [``
-      mutable_buffer u(a);
-      const X& v = a;
-      mutable_buffer w(v);
-    ``]
-    [``
-      buffer_cast<void*>(u) == buffer_cast<void*>(w)
-        && buffer_size(u) == buffer_size(w)
-    ``]
-  ]
-  [
-    [``
-      mutable_buffer u(a);
-      X v(a);
-      mutable_buffer w(v);
-    ``]
-    [``
-      buffer_cast<void*>(u) == buffer_cast<void*>(w)
-        && buffer_size(u) == buffer_size(w)
-    ``]
-  ]
-  [
-    [``
-      mutable_buffer u(a);
-      X v = a;
-      mutable_buffer w(v);
-    ``]
-    [``
-      buffer_cast<void*>(u) == buffer_cast<void*>(w)
-        && buffer_size(u) == buffer_size(w)
-    ``]
-  ]
-  [
-    [``
-      mutable_buffer u(a);
-      X v(b); v = a;
-      mutable_buffer w(v);
-    ``]
-    [``
-      buffer_cast<void*>(u) == buffer_cast<void*>(w)
-        && buffer_size(u) == buffer_size(w)
-    ``]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/DatagramSocketService.qbk b/asio/src/doc/requirements/DatagramSocketService.qbk
deleted file mode 100644
index da2f298..0000000
--- a/asio/src/doc/requirements/DatagramSocketService.qbk
+++ /dev/null
@@ -1,227 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:DatagramSocketService Datagram socket service requirements]
-
-A datagram socket service must meet the requirements for a [link
-asio.reference.SocketService socket service], as well as the
-additional requirements listed below.
-
-In the table below, `X` denotes a datagram socket service class for protocol
-[link asio.reference.Protocol `Protocol`], `a` denotes a value of type
-`X`, `b` denotes a value of type `X::implementation_type`, `e` denotes a value
-of type `Protocol::endpoint`, `ec` denotes a value of type `error_code`, `f`
-denotes a value of type `socket_base::message_flags`, `mb` denotes a value
-satisfying [link asio.reference.MutableBufferSequence mutable buffer
-sequence] requirements, `rh` denotes a value meeting [link
-asio.reference.ReadHandler `ReadHandler`] requirements, `cb` denotes a
-value satisfying [link asio.reference.ConstBufferSequence constant
-buffer sequence] requirements, and `wh` denotes a value meeting [link
-asio.reference.WriteHandler `WriteHandler`] requirements.
-
-[table DatagramSocketService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`a.receive(b, mb, f, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Reads one or more bytes of data from a connected socket `b`.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes read. Otherwise returns `0`.
-    ]
-  ]
-  [
-    [`a.async_receive(b, mb, f, rh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to read one or more bytes of data
-      from a connected socket `b`. The operation is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `mb` until such
-      time as the read operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `mb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first.\n
-      \n
-      If the operation completes successfully, the `ReadHandler` object
-      `rh` is invoked with the number of bytes transferred. Otherwise it is
-      invoked with `0`.
-    ]
-  ]
-  [
-    [`a.receive_from(b, mb, e, f, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Reads one or more bytes of data from an unconnected socket `b`.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes read. Otherwise returns `0`.
-    ]
-  ]
-  [
-    [`a.async_receive_from(b, mb, e, f, rh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to read one or more bytes of data
-      from an unconnected socket `b`. The operation is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `mb` until such
-      time as the read operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `mb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first.\n
-      \n
-      The program must ensure the object `e` is valid until the handler
-      for the asynchronous operation is invoked.\n
-      \n
-      If the operation completes successfully, the `ReadHandler` object
-      `rh` is invoked with the number of bytes transferred. Otherwise it is
-      invoked with `0`.
-    ]
-  ]
-  [
-    [`a.send(b, cb, f, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Writes one or more bytes of data to a connected socket `b`.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes written. Otherwise returns `0`.
-    ]
-  ]
-  [
-    [`a.async_send(b, cb, f, wh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to write one or more bytes of data to
-      a connected socket `b`. The operation is performed via the `io_service`
-      object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `cb` until such
-      time as the write operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `cb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first.\n
-      \n
-      If the operation completes successfully, the `WriteHandler` object `wh`
-      is invoked with the number of bytes transferred. Otherwise it is invoked
-      with `0`.
-    ]
-  ]
-  [
-    [``
-      const typename Protocol::endpoint& u = e;
-      a.send_to(b, cb, u, f, ec);
-    ``]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Writes one or more bytes of data to an unconnected socket `b`.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes written. Otherwise returns `0`.
-    ]
-  ]
-  [
-    [``
-      const typename Protocol::endpoint& u = e;
-      a.async_send(b, cb, u, f, wh);
-    ``]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to write one or more bytes of data to
-      an unconnected socket `b`. The operation is performed via the `io_service`
-      object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `cb` until such
-      time as the write operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `cb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first.\n
-      \n
-      If the operation completes successfully, the `WriteHandler` object `wh`
-      is invoked with the number of bytes transferred. Otherwise it is invoked
-      with `0`.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/DescriptorService.qbk b/asio/src/doc/requirements/DescriptorService.qbk
deleted file mode 100644
index ca39c5a..0000000
--- a/asio/src/doc/requirements/DescriptorService.qbk
+++ /dev/null
@@ -1,167 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:DescriptorService Descriptor service requirements]
-
-A descriptor service must meet the requirements for an [link
-asio.reference.IoObjectService I/O object service] with support for movability,
-as well as the additional requirements listed below.
-
-In the table below, `X` denotes a descriptor service class, `a` and `ao` denote
-values of type `X`, `b` and `c` denote values of type `X::implementation_type`,
-`n` denotes a value of type `X::native_handle_type`, `ec` denotes a value of type
-`error_code`, `i` denotes a value meeting [link asio.reference.IoControlCommand
-`IoControlCommand`] requirements, `w` denotes a value of type
-`descriptor_base::wait_type`, `wh` denotes a value meeting [link
-asio.reference.WaitHandler `WaitHandler`] requirements, and `u` and `v` denote
-identifiers.
-
-[table DescriptorService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`X::native_handle_type`]
-    []
-    [
-      The implementation-defined native representation of a descriptor. Must
-      satisfy the requirements of `CopyConstructible` types (C++ Std, 20.1.3),
-      and the requirements of `Assignable` types (C++ Std, 23.1).
-    ]
-  ]
-  [
-    [`a.construct(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements.\n
-      post: `!a.is_open(b)`.
-    ]
-  ]
-  [
-    [`a.destroy(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements. Implicitly cancels asynchronous operations, as if by calling
-      `a.close(b, ec)`.
-    ]
-  ]
-  [
-    [``
-      a.move_construct(b, c);
-    ``]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService] requirements.
-      The underlying native representation is moved from `c` to `b`.
-    ]
-  ]
-  [
-    [``
-      a.move_assign(b, ao, c);
-    ``]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService] requirements.
-      Implicitly cancels asynchronous operations associated with `b`, as if by
-      calling `a.close(b, ec)`. Then the underlying native representation is
-      moved from `c` to `b`.
-    ]
-  ]
-  [
-    [``
-      a.assign(b, n, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `!a.is_open(b)`.\n
-      post: `!!ec || a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.is_open(b);
-    ``]
-    [`bool`]
-    [
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.is_open(v);
-    ``]
-    [`bool`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.close(b, ec);
-    ``]
-    [`error_code`]
-    [
-      If `a.is_open()` is true, causes any outstanding asynchronous operations
-      to complete as soon as possible. Handlers for cancelled operations shall
-      be passed the error code `error::operation_aborted`.\n
-      post: `!a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.native_handle(b);
-    ``]
-    [`X::native_handle_type`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.cancel(b, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.\n
-      Causes any outstanding asynchronous operations to complete as soon as
-      possible. Handlers for cancelled operations shall be passed the error
-      code `error::operation_aborted`.
-    ]
-  ]
-  [
-    [``
-      a.io_control(b, i, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.wait(b, w, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.async_wait(b, w, wh);
-    ``]
-    []
-    [
-      pre: `a.is_open(b)`.\n
-      Initiates an asynchronous wait operation that is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/DynamicBufferSequence.qbk b/asio/src/doc/requirements/DynamicBuffer.qbk
similarity index 65%
rename from asio/src/doc/requirements/DynamicBufferSequence.qbk
rename to asio/src/doc/requirements/DynamicBuffer.qbk
index d73aafb..4e0cd88 100644
--- a/asio/src/doc/requirements/DynamicBufferSequence.qbk
+++ b/asio/src/doc/requirements/DynamicBuffer.qbk
@@ -1,30 +1,28 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  /]
 
-[section:DynamicBufferSequence Dynamic buffer sequence requirements]
+[section:DynamicBuffer Dynamic buffer requirements]
 
-A dynamic buffer sequence encapsulates memory storage that may be automatically
-resized as required, where the memory is divided into an input sequence
-followed by an output sequence. These memory regions are internal to the
-dynamic buffer sequence, but direct access to the elements is provided to
-permit them to be efficiently used with I/O operations, such as the `send` or
-`receive` operations of a socket. Data written to the output sequence of a
-dynamic buffer sequence object is appended to the input sequence of the same
-object.
+A dynamic buffer encapsulates memory storage that may be automatically resized
+as required, where the memory is divided into an input sequence followed by an
+output sequence. These memory regions are internal to the dynamic buffer
+sequence, but direct access to the elements is provided to permit them to be
+efficiently used with I/O operations, such as the `send` or `receive`
+operations of a socket. Data written to the output sequence of a dynamic buffer
+sequence object is appended to the input sequence of the same object.
 
-A dynamic buffer sequence type `X` shall satisfy the requirements of
-`MoveConstructible` (C++ Std, [moveconstructible]) types in addition to those
-listed below.
+A dynamic buffer type `X` shall satisfy the requirements of `MoveConstructible`
+(C++ Std, [moveconstructible]) types in addition to those listed below.
 
-In the table below, `X` denotes a dynamic buffer sequence class, `x` denotes a
+In the table below, `X` denotes a dynamic buffer class, `x` denotes a
 value of type `X&`, `x1` denotes values of type `const X&`, and `n` denotes a
 value of type `size_t`, and `u` denotes an identifier.
 
-[table DynamicBufferSequence requirements
+[table DynamicBuffer requirements
   [[expression] [type] [assertion/note\npre/post-conditions]]
   [
     [`X::const_buffers_type`]
@@ -53,8 +51,7 @@
     [`x1.capacity()`]
     [`size_t`]
     [Returns the maximum sum of the sizes of the input sequence and output
-     sequence that the dynamic buffer sequence can hold without requiring
-     reallocation.]
+     sequence that the dynamic buffer can hold without requiring reallocation.]
   ]
   [
     [`x1.data()`]
@@ -68,9 +65,9 @@
     [Requires: `size() + n <= max_size()`.\n
      \n
      Returns a mutable buffer sequence `u` representing the output sequence, and
-     where `buffer_size(u) == n`. The dynamic buffer sequence reallocates
-     memory as required. All constant or mutable buffer sequences previously
-     obtained using `data()` or `prepare()` are invalidated.\n
+     where `buffer_size(u) == n`. The dynamic buffer reallocates memory as
+     required. All constant or mutable buffer sequences previously obtained
+     using `data()` or `prepare()` are invalidated.\n
      \n
      Throws: `length_error` if `size() + n > max_size()`.]
   ]
diff --git a/asio/src/doc/requirements/Endpoint.qbk b/asio/src/doc/requirements/Endpoint.qbk
index 160245a..4940dae 100644
--- a/asio/src/doc/requirements/Endpoint.qbk
+++ b/asio/src/doc/requirements/Endpoint.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,84 +7,85 @@
 
 [section:Endpoint Endpoint requirements]
 
-An endpoint must meet the requirements of `CopyConstructible` types (C++ Std,
-20.1.3), and the requirements of `Assignable` types (C++ Std, 23.1).
+A type `X` meets the `Endpoint` requirements if it satisfies the requirements
+of `Destructible` (C++Std [destructible]), `DefaultConstructible` (C++Std
+[defaultconstructible]), `CopyConstructible` (C++Std [copyconstructible]),
+and `CopyAssignable` (C++Std [copyassignable]), as well as the additional
+requirements listed below.
 
-In the table below, `X` denotes an endpoint class, `a` denotes a value of type
-`X`, `s` denotes a size in bytes, and `u` denotes an identifier.
+In the table below, `a` denotes a (possibly const) value of type `X`, and `u`
+denotes an identifier.
 
 [table Endpoint requirements
   [[expression] [type] [assertion/note\npre/post-conditions]]
   [
     [`X::protocol_type`]
-    [type meeting [link asio.reference.Protocol protocol] requirements]
+    [type meeting [link asio.reference.Protocol `Protocol`] requirements]
     []
   ]
   [
-    [`X u;`]
-    []
-    []
-  ]
-  [
-    [`X();`]
-    []
-    []
-  ]
-  [
-    [`a.protocol();`]
+    [`a.protocol()`]
     [`protocol_type`]
     []
   ]
+]
+
+In the table below, `a` denotes a (possibly const) value of type `X`, `b`
+denotes a value of type `X`, and `s` denotes a (possibly const) value of a type
+that is convertible to `size_t` and denotes a size in bytes.
+
+[table Endpoint requirements for extensible implementations
+  [[expression] [type] [assertion/note\npre/post-conditions]]
   [
-    [`a.data();`]
-    [a pointer]
+    [`a.data()`]
+    [`const void*`]
     [
       Returns a pointer suitable for passing as the /address/ argument to
-      __POSIX__ functions such as __accept__, __getpeername__, __getsockname__
-      and __recvfrom__. The implementation shall perform a
-      `reinterpret_cast` on the pointer to convert it to `sockaddr*`.
-    ]
-  ]
-  [
-    [`const X& u = a;
-      u.data();`]
-    [a pointer]
-    [
-      Returns a pointer suitable for passing as the /address/ argument to
-      __POSIX__ functions such as __connect__, or as the /dest_addr/ argument
-      to __POSIX__ functions such as  __sendto__. The implementation shall
-      perform a `reinterpret_cast` on the pointer to convert it to `const
+      functions such as __POSIX__ __connect__, or as the /dest_addr/ argument
+      to functions such as  __POSIX__ __sendto__. The implementation shall
+      perform a `static_cast` on the pointer to convert it to `const
       sockaddr*`.
     ]
   ]
   [
-    [`a.size();`]
+    [`b.data()`]
+    [`void*`]
+    [
+      Returns a pointer suitable for passing as the /address/ argument to
+      functions such as __POSIX__ __accept__, __getpeername__, __getsockname__
+      and __recvfrom__. The implementation shall perform a `static_cast` on the
+      pointer to convert it to `sockaddr*`.
+    ]
+  ]
+  [
+    [`a.size()`]
     [`size_t`]
     [
       Returns a value suitable for passing as the /address_len/ argument
-      to __POSIX__ functions such as __connect__, or as the /dest_len/ argument
-      to __POSIX__ functions such as __sendto__, after appropriate integer
+      to functions such as __POSIX__ __connect__, or as the /dest_len/ argument
+      to functions such as __POSIX__ __sendto__, after appropriate integer
       conversion has been performed.
     ]
   ]
   [
-    [`a.resize(s);`]
+    [`b.resize(s)`]
     []
     [
+      pre: `s >= 0`\n
       post: `a.size() == s`\n
-      Passed the value contained in the /address_len/ argument to __POSIX__
-      functions such as __accept__, __getpeername__, __getsockname__ and
+      Passed the value contained in the /address_len/ argument to functions
+      such as __POSIX__ __accept__, __getpeername__, __getsockname__ and
       __recvfrom__, after successful completion of the function. Permitted to
-      throw an exception if the protocol associated with the endpoint object `a`
-      does not support the specified size.
+      throw an exception if the protocol associated with the endpoint object
+      `a` does not support the specified size.
     ]
   ]
   [
-    [`a.capacity();`]
+    [`a.capacity()`]
     [`size_t`]
     [
       Returns a value suitable for passing as the /address_len/ argument to
-      __POSIX__ functions such as __accept__, __getpeername__, __getsockname__
+      functions such as __POSIX__ __accept__, __getpeername__, __getsockname__
       and __recvfrom__, after appropriate integer conversion has been performed.
     ]
   ]
diff --git a/asio/src/doc/requirements/EndpointSequence.qbk b/asio/src/doc/requirements/EndpointSequence.qbk
new file mode 100644
index 0000000..1e1648e
--- /dev/null
+++ b/asio/src/doc/requirements/EndpointSequence.qbk
@@ -0,0 +1,30 @@
+[/
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ /
+ / Distributed under the Boost Software License, Version 1.0. (See accompanying
+ / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ /]
+
+[section:EndpointSequence Endpoint sequence requirements]
+
+A type `X` meets the `EndpointSequence` requirements if it satisfies the
+requirements of `Destructible` (C++Std [destructible]) and `CopyConstructible`
+(C++Std [copyconstructible]), as well as the additional requirements listed
+below.
+
+In the table below, `x` denotes a (possibly const) value of type `X`.
+
+[table EndpointSequence requirements
+  [[expression] [return type] [assertion/note\npre/post-condition]]
+  [
+    [`x.begin()`\n
+     `x.end()`]
+    [A type meeting the requirements for forward iterators
+     (C++Std \[forward.iterators\]) whose value type is convertible to
+     a type satisfying the [link asio.reference.Endpoint `Endpoint`]
+     requirements.]
+    [[half_open_range `x.begin()`,`x.end()`] is a valid range.]
+  ]
+]
+
+[endsect]
diff --git a/asio/src/doc/requirements/ExecutionContext.qbk b/asio/src/doc/requirements/ExecutionContext.qbk
new file mode 100644
index 0000000..94d1cd1
--- /dev/null
+++ b/asio/src/doc/requirements/ExecutionContext.qbk
@@ -0,0 +1,36 @@
+[/
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ /
+ / Distributed under the Boost Software License, Version 1.0. (See accompanying
+ / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ /]
+
+[section:ExecutionContext Execution context requirements]
+
+A type `X` meets the `ExecutionContext` requirements if it is publicly and
+unambiguously derived from `execution_context`, and satisfies the additional
+requirements listed below.
+
+In the table below, `x` denotes a value of type `X`.
+
+[table ExecutionContext requirements
+  [[expression] [return type] [assertion/note\npre/post-condition]]
+  [
+    [`X::executor_type`]
+    [type meeting [link asio.reference.Executor1 `Executor`] requirements]
+    []
+  ]
+  [
+    [`x.~X()`]
+    []
+    [Destroys all unexecuted function objects that were submitted via an
+     executor object that is associated with the execution context.]
+  ]
+  [
+    [`x.get_executor()`]
+    [`X::executor_type`]
+    [Returns an executor object that is associated with the execution context.]
+  ]
+]
+
+[endsect]
diff --git a/asio/src/doc/requirements/Executor.qbk b/asio/src/doc/requirements/Executor.qbk
index 569410c..0754860 100644
--- a/asio/src/doc/requirements/Executor.qbk
+++ b/asio/src/doc/requirements/Executor.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -74,7 +74,7 @@
   [
     [`x1.context()`]
     [`execution_context&`, or `E&` where `E` is a type that satifisfies the
-     [link requirements.execution_context `ExecutionContext`] requirements.]
+     [link asio.reference.ExecutionContext `ExecutionContext`] requirements.]
     [Shall not exit via an exception.\n
      \n
      The comparison operators and member functions defined in these
diff --git a/asio/src/doc/requirements/GettableSerialPortOption.qbk b/asio/src/doc/requirements/GettableSerialPortOption.qbk
index 2126753..8da158d 100644
--- a/asio/src/doc/requirements/GettableSerialPortOption.qbk
+++ b/asio/src/doc/requirements/GettableSerialPortOption.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/GettableSocketOption.qbk b/asio/src/doc/requirements/GettableSocketOption.qbk
index b17140e..e859a54 100644
--- a/asio/src/doc/requirements/GettableSocketOption.qbk
+++ b/asio/src/doc/requirements/GettableSocketOption.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,14 +7,19 @@
 
 [section:GettableSocketOption Gettable socket option requirements]
 
-In the table below, `X` denotes a socket option class, `a` denotes a value of
-`X`, `p` denotes a value that meets the [link asio.reference.Protocol
-protocol] requirements, and `u` denotes an identifier.
+A type `X` meets the `GettableSocketOption` requirements if it satisfies the
+requirements listed below.
 
-[table GettableSocketOption requirements
+In the table below, `a` denotes a (possibly const) value of type `X`, `b`
+denotes a value of type `X`, `p` denotes a (possibly const) value that meets
+the [link asio.reference.Protocol `Protocol`] requirements, and `s` denotes a
+(possibly const) value of a type that is convertible to `size_t` and denotes a
+size in bytes.
+
+[table GettableSocketOption requirements for extensible implementations
   [[expression] [type] [assertion/note\npre/post-conditions]]
   [
-    [`a.level(p);`]
+    [`a.level(p)`]
     [`int`]
     [
       Returns a value suitable for passing as the /level/ argument to __POSIX__
@@ -22,7 +27,7 @@
     ]
   ]
   [
-    [`a.name(p);`]
+    [`a.name(p)`]
     [`int`]
     [
       Returns a value suitable for passing as the /option_name/ argument to
@@ -30,15 +35,15 @@
     ]
   ]
   [
-    [`a.data(p);`]
-    [a pointer, convertible to `void*`]
+    [`b.data(p)`]
+    [`void*`]
     [
       Returns a pointer suitable for passing as the /option_value/ argument to
       __POSIX__ __getsockopt__ (or equivalent).
     ]
   ]
   [
-    [`a.size(p);`]
+    [`a.size(p)`]
     [`size_t`]
     [
       Returns a value suitable for passing as the /option_len/ argument to
@@ -47,13 +52,13 @@
     ]
   ]
   [
-    [`a.resize(p, s);`]
+    [`b.resize(p,s)`]
     []
     [
-      post: `a.size(p) == s`.\n
+      post: `b.size(p) == s`.\n
       Passed the value contained in the /option_len/ argument to __POSIX__
       __getsockopt__ (or equivalent) after successful completion of the
-      function. Permitted to throw an exception if the socket option object `a`
+      function. Permitted to throw an exception if the socket option object `b`
       does not support the specified size.
     ]
   ]
diff --git a/asio/src/doc/requirements/HandleService.qbk b/asio/src/doc/requirements/HandleService.qbk
deleted file mode 100644
index 3f0ab22..0000000
--- a/asio/src/doc/requirements/HandleService.qbk
+++ /dev/null
@@ -1,132 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:HandleService Handle service requirements]
-
-A handle service must meet the requirements for an [link
-asio.reference.IoObjectService I/O object service] with support for movability,
-as well as the additional requirements listed below.
-
-In the table below, `X` denotes a handle service class, `a` and `ao` denote
-values of type `X`, `b` and `c` denote values of type `X::implementation_type`,
-`n` denotes a value of type `X::native_handle_type`, `ec` denotes a value of
-type `error_code`, and `u` and `v` denote identifiers.
-
-[table HandleService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`X::native_handle_type`]
-    []
-    [
-      The implementation-defined native representation of a handle. Must
-      satisfy the requirements of `CopyConstructible` types (C++ Std, 20.1.3),
-      and the requirements of `Assignable` types (C++ Std, 23.1).
-    ]
-  ]
-  [
-    [`a.construct(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements.\n
-      post: `!a.is_open(b)`.
-    ]
-  ]
-  [
-    [`a.destroy(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements. Implicitly cancels asynchronous operations, as if by calling
-      `a.close(b, ec)`.
-    ]
-  ]
-  [
-    [``
-      a.move_construct(b, c);
-    ``]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService] requirements.
-      The underlying native representation is moved from `c` to `b`.
-    ]
-  ]
-  [
-    [``
-      a.move_assign(b, ao, c);
-    ``]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService] requirements.
-      Implicitly cancels asynchronous operations associated with `b`, as if by
-      calling `a.close(b, ec)`. Then the underlying native representation is
-      moved from `c` to `b`.
-    ]
-  ]
-  [
-    [``
-      a.assign(b, n, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `!a.is_open(b)`.\n
-      post: `!!ec || a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.is_open(b);
-    ``]
-    [`bool`]
-    [
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.is_open(v);
-    ``]
-    [`bool`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.close(b, ec);
-    ``]
-    [`error_code`]
-    [
-      If `a.is_open()` is true, causes any outstanding asynchronous operations
-      to complete as soon as possible. Handlers for cancelled operations shall
-      be passed the error code `error::operation_aborted`.\n
-      post: `!a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.native_handle(b);
-    ``]
-    [`X::native_handle_type`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.cancel(b, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.\n
-      Causes any outstanding asynchronous operations to complete as soon as
-      possible. Handlers for cancelled operations shall be passed the error
-      code `error::operation_aborted`.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/Handler.qbk b/asio/src/doc/requirements/Handler.qbk
index 6d7dae8..74dcd05 100644
--- a/asio/src/doc/requirements/Handler.qbk
+++ b/asio/src/doc/requirements/Handler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/HandshakeHandler.qbk b/asio/src/doc/requirements/HandshakeHandler.qbk
index 4e7a3d8..98891bf 100644
--- a/asio/src/doc/requirements/HandshakeHandler.qbk
+++ b/asio/src/doc/requirements/HandshakeHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/InternetProtocol.qbk b/asio/src/doc/requirements/InternetProtocol.qbk
index 38ee3c2..70ab668 100644
--- a/asio/src/doc/requirements/InternetProtocol.qbk
+++ b/asio/src/doc/requirements/InternetProtocol.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,12 +7,12 @@
 
 [section:InternetProtocol Internet protocol requirements]
 
-An internet protocol must meet the requirements for a [link
-asio.reference.Protocol protocol] as well as the additional
-requirements listed below.
+A type `X` meets the `InternetProtocol` requirements if it satisfies the
+requirements of [link asio.reference.AcceptableProtocol `AcceptableProtocol`],
+as well as the additional requirements listed below.
 
-In the table below, `X` denotes an internet protocol class, `a` denotes a value
-of type `X`, and `b` denotes a value of type `X`.
+In the table below, `a` denotes a (possibly const) value of type `X`, and `b`
+denotes a (possibly const) value of type `X`.
 
 [table InternetProtocol requirements
   [[expression] [return type] [assertion/note\npre/post-conditions]]
@@ -34,7 +34,8 @@
   [
     [`a == b`]
     [convertible to `bool`]
-    [Returns whether two protocol objects are equal.]
+    [Returns `true` if `a` and `b` represent the same IP protocol version,
+     otherwise `false`.]
   ]
   [
     [`a != b`]
diff --git a/asio/src/doc/requirements/IoControlCommand.qbk b/asio/src/doc/requirements/IoControlCommand.qbk
index 17e52ae..8809335 100644
--- a/asio/src/doc/requirements/IoControlCommand.qbk
+++ b/asio/src/doc/requirements/IoControlCommand.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,13 +7,16 @@
 
 [section:IoControlCommand I/O control command requirements]
 
-In the table below, `X` denotes an I/O control command class, `a` denotes a
-value of `X`, and `u` denotes an identifier.
+A type `X` meets the `IoControlCommand` requirements if it satisfies the
+requirements listed below.
 
-[table IoControlCommand requirements
+In the table below, `a` denotes a (possibly const) value of type `X`, and `b`
+denotes a value of type `X`.
+
+[table IoControlCommand requirements for extensible implementations
   [[expression] [type] [assertion/note\npre/post-conditions]]
   [
-    [`a.name();`]
+    [`a.name()`]
     [`int`]
     [
       Returns a value suitable for passing as the /request/ argument to
@@ -21,8 +24,8 @@
     ]
   ]
   [
-    [`a.data();`]
-    [a pointer, convertible to `void*`]
+    [`b.data()`]
+    [`void*`]
     [
     ]
   ]
diff --git a/asio/src/doc/requirements/IteratorConnectHandler.qbk b/asio/src/doc/requirements/IteratorConnectHandler.qbk
index 2ff9804..db2aee4 100644
--- a/asio/src/doc/requirements/IteratorConnectHandler.qbk
+++ b/asio/src/doc/requirements/IteratorConnectHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/MoveAcceptHandler.qbk b/asio/src/doc/requirements/MoveAcceptHandler.qbk
index 53dc95e..d545497 100644
--- a/asio/src/doc/requirements/MoveAcceptHandler.qbk
+++ b/asio/src/doc/requirements/MoveAcceptHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/MutableBufferSequence.qbk b/asio/src/doc/requirements/MutableBufferSequence.qbk
index e373968..7683a68 100644
--- a/asio/src/doc/requirements/MutableBufferSequence.qbk
+++ b/asio/src/doc/requirements/MutableBufferSequence.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,96 +7,50 @@
 
 [section:MutableBufferSequence Mutable buffer sequence requirements]
 
-In the table below, `X` denotes a class containing objects of type `T`, `a`
-denotes a value of type `X` and `u` denotes an identifier.
+A ['mutable buffer sequence] represents a set of memory regions that may be
+used to receive the output of an operation, such as the `receive` operation of
+a socket.
+
+A type `X` meets the `MutableBufferSequence` requirements if it satisfies the
+requirements of `Destructible` (C++Std [destructible]) and
+`CopyConstructible` (C++Std [copyconstructible]), as well as the additional
+requirements listed below.
+
+In the table below, `x` denotes a (possibly const) value of type `X`, and `u`
+denotes an identifier.
 
 [table MutableBufferSequence requirements
   [[expression] [return type] [assertion/note\npre/post-condition]]
   [
-    [`X::value_type`]
-    [`T`]
-    [`T` meets the requirements for [link
-     asio.reference.ConvertibleToMutableBuffer
-     ConvertibleToMutableBuffer].]
-  ]
-  [
-    [`X::const_iterator`]
-    [iterator type pointing to `T`]
-    [`const_iterator` meets the requirements for bidirectional iterators
-     (C++ Std, 24.1.4).]
-  ]
-  [
-    [`X(a);`]
+    [`asio::buffer_sequence_begin(x)`\n
+     `asio::buffer_sequence_end(x)`]
+    [An iterator type meeting the requirements for bidirectional iterators
+     (C++Std \[bidirectional.iterators\]) whose value type is convertible to
+     `mutable_buffer`.]
     []
-    [post: `equal_mutable_buffer_seq(a, X(a))` where the binary predicate
-     `equal_mutable_buffer_seq` is defined as
+  ]
+  [
+    [``
+      X u(x);
+    ``]
+    []
+    [post:\n
      ``
-       bool equal_mutable_buffer_seq(
-         const X& x1, const X& x2)
-       {
-         return
-           distance(x1.begin(), x1.end())
-             == distance(x2.begin(), x2.end())
-               && equal(x1.begin(), x1.end(),
-                        x2.begin(), equal_buffer);
-       }
-     ``
-     and the binary predicate `equal_buffer` is defined as
-     ``
-      bool equal_buffer(
-        const X::value_type& v1,
-        const X::value_type& v2)
-      {
-        mutable_buffer b1(v1);
-        mutable_buffer b2(v2);
-        return
-          buffer_cast<const void*>(b1)
-            == buffer_cast<const void*>(b2)
-              && buffer_size(b1) == buffer_size(b2);
-      }
+       equal(
+         asio::buffer_sequence_begin(x),
+         asio::buffer_sequence_end(x),
+         asio::buffer_sequence_begin(u),
+         asio::buffer_sequence_end(u),
+         [](const typename X::value_type& v1,
+            const typename X::value_type& v2)
+          {
+            mutable_buffer b1(v1);
+            mutable_buffer b2(v2);
+            return b1.data() == b2.data()
+                && b1.size() == b2.size();
+          })
      ``]
   ]
-  [
-    [`X u(a);`]
-    []
-    [post:
-     ``
-      distance(a.begin(), a.end())
-        == distance(u.begin(), u.end())
-          && equal(a.begin(), a.end(),
-                   u.begin(), equal_buffer)
-     ``
-     where the binary predicate `equal_buffer` is defined as
-     ``
-      bool equal_buffer(
-        const X::value_type& v1,
-        const X::value_type& v2)
-      {
-        mutable_buffer b1(v1);
-        mutable_buffer b2(v2);
-        return
-          buffer_cast<const void*>(b1)
-            == buffer_cast<const void*>(b2)
-              && buffer_size(b1) == buffer_size(b2);
-      }
-     ``]
-  ]
-  [
-    [`(&a)->~X();`]
-    [`void`]
-    [note: the destructor is applied to every element of `a`; all the memory
-     is deallocated.]
-  ]
-  [
-    [`a.begin();`]
-    [`const_iterator` or convertible to `const_iterator`]
-    []
-  ]
-  [
-    [`a.end();`]
-    [`const_iterator` or convertible to `const_iterator`]
-    []
-  ]
 ]
 
 [endsect]
diff --git a/asio/src/doc/requirements/ObjectHandleService.qbk b/asio/src/doc/requirements/ObjectHandleService.qbk
deleted file mode 100644
index 809ab9e..0000000
--- a/asio/src/doc/requirements/ObjectHandleService.qbk
+++ /dev/null
@@ -1,46 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:ObjectHandleService Object handle service requirements]
-
-An object handle service must meet the requirements for a [link
-asio.reference.HandleService handle service], as well as the additional
-requirements listed below.
-
-In the table below, `X` denotes an object handle service class, `a` denotes a
-value of type `X`, `b` denotes a value of type `X::implementation_type`, `ec`
-denotes a value of type `error_code`, and `wh` denotes a value meeting [link
-asio.reference.WaitHandler `WaitHandler`] requirements.
-
-[table ObjectHandleService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`a.wait(b, ec);`]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Synchronously waits for the object represented by handle `b` to become
-      signalled.
-    ]
-  ]
-  [
-    [`a.async_wait(b, wh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to wait for the object represented by
-      handle `b` to become signalled. The operation is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/ProtoAllocator.qbk b/asio/src/doc/requirements/ProtoAllocator.qbk
new file mode 100644
index 0000000..2d318f2
--- /dev/null
+++ b/asio/src/doc/requirements/ProtoAllocator.qbk
@@ -0,0 +1,19 @@
+[/
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ /
+ / Distributed under the Boost Software License, Version 1.0. (See accompanying
+ / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ /]
+
+[section:ProtoAllocator Proto-allocator requirements]
+
+A type `A` meets the proto-allocator requirements if `A` is `CopyConstructible`
+(C++Std [copyconstructible]), `Destructible` (C++Std [destructible]), and
+`allocator_traits<A>::rebind_alloc<U>` meets the allocator requirements (C++Std
+[allocator.requirements]), where `U` is an object type. [inline_note For
+example, `std::allocator<void>` meets the proto-allocator requirements but not
+the allocator requirements.] No constructor, comparison operator, copy
+operation, move operation, or swap operation on these types shall exit via an
+exception.
+
+[endsect]
diff --git a/asio/src/doc/requirements/Protocol.qbk b/asio/src/doc/requirements/Protocol.qbk
index 3f57054..7a55d14 100644
--- a/asio/src/doc/requirements/Protocol.qbk
+++ b/asio/src/doc/requirements/Protocol.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,11 +7,10 @@
 
 [section:Protocol Protocol requirements]
 
-A protocol must meet the requirements of `CopyConstructible` types (C++ Std,
-20.1.3), and the requirements of `Assignable` types (C++ Std, 23.1).
-
-In the table below, `X` denotes a protocol class, and `a` denotes a value of
-`X`.
+A type `X` meets the `Protocol` requirements if it satisfies the requirements
+of `Destructible` (C++Std [destructible]), `CopyConstructible` (C++Std
+[copyconstructible]), and `CopyAssignable` (C++Std [copyassignable]), as well
+as the additional requirements listed below.
 
 [table Protocol requirements
   [[expression] [return type] [assertion/note\npre/post-conditions]]
@@ -20,6 +19,12 @@
     [type meeting [link asio.reference.Endpoint endpoint] requirements]
     []
   ]
+]
+
+In the table below, `a` denotes a (possibly const) value of type `X`.
+
+[table Protocol requirements for extensible implementations
+  [[expression] [return type] [assertion/note\npre/post-conditions]]
   [
     [`a.family()`]
     [`int`]
diff --git a/asio/src/doc/requirements/RandomAccessHandleService.qbk b/asio/src/doc/requirements/RandomAccessHandleService.qbk
deleted file mode 100644
index 23b35a2..0000000
--- a/asio/src/doc/requirements/RandomAccessHandleService.qbk
+++ /dev/null
@@ -1,133 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:RandomAccessHandleService Random access handle service requirements]
-
-A random access handle service must meet the requirements for a [link
-asio.reference.HandleService handle service], as well as the additional
-requirements listed below.
-
-In the table below, `X` denotes a random access handle service class, `a`
-denotes a value of type `X`, `b` denotes a value of type
-`X::implementation_type`, `ec` denotes a value of type `error_code`, `o`
-denotes an offset of type boost::uint64_t, `mb` denotes a value satisfying
-[link asio.reference.MutableBufferSequence mutable buffer sequence]
-requirements, `rh` denotes a value meeting [link asio.reference.ReadHandler
-`ReadHandler`] requirements, `cb` denotes a value satisfying [link
-asio.reference.ConstBufferSequence constant buffer sequence] requirements, and
-`wh` denotes a value meeting [link asio.reference.WriteHandler `WriteHandler`]
-requirements.
-
-[table RandomAccessHandleService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`a.read_some_at(b, o, mb, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Reads one or more bytes of data from a handle `b` at offset `o`.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes read. Otherwise returns `0`.
-      If the total size of all buffers in the sequence `mb` is `0`, the
-      function shall return `0` immediately.
-    ]
-  ]
-  [
-    [`a.async_read_some_at(b, o, mb, rh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to read one or more bytes of data
-      from a handle `b` at offset `o`. The operation is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `mb` until such
-      time as the read operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `mb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first. If the total size of all buffers in the sequence
-      `mb` is `0`, the asynchronous read operation shall complete immediately
-      and pass `0` as the argument to the handler that specifies the number of
-      bytes read.\n
-      \n
-      If the operation completes successfully, the `ReadHandler` object
-      `rh` is invoked with the number of bytes transferred. Otherwise it is
-      invoked with `0`.
-    ]
-  ]
-  [
-    [`a.write_some_at(b, o, cb, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Writes one or more bytes of data to a handle `b` at offset `o`.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes written. Otherwise returns `0`.
-      If the total size of all buffers in the sequence `cb` is `0`, the
-      function shall return `0` immediately.
-    ]
-  ]
-  [
-    [`a.async_write_some_at(b, o, cb, wh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to write one or more bytes of data to
-      a handle `b` at offset `o`. The operation is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `cb` until such
-      time as the write operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `cb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first. If the total size of all buffers in the sequence
-      `cb` is `0`, the asynchronous operation shall complete immediately and
-      pass `0` as the argument to the handler that specifies the number of
-      bytes read.\n
-      \n
-      If the operation completes successfully, the `WriteHandler` object `wh`
-      is invoked with the number of bytes transferred. Otherwise it is invoked
-      with `0`.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/RangeConnectHandler.qbk b/asio/src/doc/requirements/RangeConnectHandler.qbk
index 074b9fd..4300af1 100644
--- a/asio/src/doc/requirements/RangeConnectHandler.qbk
+++ b/asio/src/doc/requirements/RangeConnectHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/RawSocketService.qbk b/asio/src/doc/requirements/RawSocketService.qbk
deleted file mode 100644
index 99092c4..0000000
--- a/asio/src/doc/requirements/RawSocketService.qbk
+++ /dev/null
@@ -1,227 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:RawSocketService Raw socket service requirements]
-
-A raw socket service must meet the requirements for a [link
-asio.reference.SocketService socket service], as well as the additional
-requirements listed below.
-
-In the table below, `X` denotes a raw socket service class for protocol
-[link asio.reference.Protocol `Protocol`], `a` denotes a value of type
-`X`, `b` denotes a value of type `X::implementation_type`, `e` denotes a value
-of type `Protocol::endpoint`, `ec` denotes a value of type `error_code`, `f`
-denotes a value of type `socket_base::message_flags`, `mb` denotes a value
-satisfying [link asio.reference.MutableBufferSequence mutable buffer
-sequence] requirements, `rh` denotes a value meeting [link
-asio.reference.ReadHandler `ReadHandler`] requirements, `cb` denotes a
-value satisfying [link asio.reference.ConstBufferSequence constant
-buffer sequence] requirements, and `wh` denotes a value meeting [link
-asio.reference.WriteHandler `WriteHandler`] requirements.
-
-[table RawSocketService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`a.receive(b, mb, f, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Reads one or more bytes of data from a connected socket `b`.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes read. Otherwise returns `0`.
-    ]
-  ]
-  [
-    [`a.async_receive(b, mb, f, rh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to read one or more bytes of data
-      from a connected socket `b`. The operation is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `mb` until such
-      time as the read operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `mb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first.\n
-      \n
-      If the operation completes successfully, the `ReadHandler` object
-      `rh` is invoked with the number of bytes transferred. Otherwise it is
-      invoked with `0`.
-    ]
-  ]
-  [
-    [`a.receive_from(b, mb, e, f, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Reads one or more bytes of data from an unconnected socket `b`.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes read. Otherwise returns `0`.
-    ]
-  ]
-  [
-    [`a.async_receive_from(b, mb, e, f, rh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to read one or more bytes of data
-      from an unconnected socket `b`. The operation is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `mb` until such
-      time as the read operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `mb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first.\n
-      \n
-      The program must ensure the object `e` is valid until the handler
-      for the asynchronous operation is invoked.\n
-      \n
-      If the operation completes successfully, the `ReadHandler` object
-      `rh` is invoked with the number of bytes transferred. Otherwise it is
-      invoked with `0`.
-    ]
-  ]
-  [
-    [`a.send(b, cb, f, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Writes one or more bytes of data to a connected socket `b`.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes written. Otherwise returns `0`.
-    ]
-  ]
-  [
-    [`a.async_send(b, cb, f, wh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to write one or more bytes of data to
-      a connected socket `b`. The operation is performed via the `io_service`
-      object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `cb` until such
-      time as the write operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `cb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first.\n
-      \n
-      If the operation completes successfully, the `WriteHandler` object `wh`
-      is invoked with the number of bytes transferred. Otherwise it is invoked
-      with `0`.
-    ]
-  ]
-  [
-    [``
-      const typename Protocol::endpoint& u = e;
-      a.send_to(b, cb, u, f, ec);
-    ``]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Writes one or more bytes of data to an unconnected socket `b`.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes written. Otherwise returns `0`.
-    ]
-  ]
-  [
-    [``
-      const typename Protocol::endpoint& u = e;
-      a.async_send(b, cb, u, f, wh);
-    ``]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to write one or more bytes of data to
-      an unconnected socket `b`. The operation is performed via the `io_service`
-      object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `cb` until such
-      time as the write operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `cb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first.\n
-      \n
-      If the operation completes successfully, the `WriteHandler` object `wh`
-      is invoked with the number of bytes transferred. Otherwise it is invoked
-      with `0`.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/ReadHandler.qbk b/asio/src/doc/requirements/ReadHandler.qbk
index ad58b30..373af87 100644
--- a/asio/src/doc/requirements/ReadHandler.qbk
+++ b/asio/src/doc/requirements/ReadHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/ResolveHandler.qbk b/asio/src/doc/requirements/ResolveHandler.qbk
index d5dab33..0ba9385 100644
--- a/asio/src/doc/requirements/ResolveHandler.qbk
+++ b/asio/src/doc/requirements/ResolveHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -12,7 +12,7 @@
 expression `h(ec, r)`, where `ec` is an lvalue of type `const error_code` and
 `r` is an lvalue of type `const ip::basic_resolver_results<InternetProtocol>`.
 `InternetProtocol` is the template parameter of the [link
-asio.reference.ip__resolver_service `resolver_service`] which is used to
+asio.reference.ip__basic_resolver `ip::basic_resolver<>`] which is used to
 initiate the asynchronous operation.
 
 [heading Examples]
diff --git a/asio/src/doc/requirements/ResolverService.qbk b/asio/src/doc/requirements/ResolverService.qbk
deleted file mode 100644
index 744686d..0000000
--- a/asio/src/doc/requirements/ResolverService.qbk
+++ /dev/null
@@ -1,108 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:ResolverService Resolver service requirements]
-
-A resolver service must meet the requirements for an [link
-asio.reference.IoObjectService I/O object service], as well as the
-additional requirements listed below.
-
-In the table below, `X` denotes a resolver service class for protocol
-`InternetProtocol`, `a` denotes a value of type `X`, `b` denotes a value of
-type `X::implementation_type`, `q` denotes a value of type
-`ip::basic_resolver_query<InternetProtocol>`, `e` denotes a value of type
-`ip::basic_endpoint<InternetProtocol>`, `ec` denotes a value of type
-`error_code`, and `h` denotes a value meeting [link
-asio.reference.ResolveHandler `ResolveHandler`] requirements.
-
-[table ResolverService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`a.destroy(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements. Implicitly cancels asynchronous resolve operations, as if by
-      calling `a.cancel(b, ec)`.
-    ]
-  ]
-  [
-    [``
-      a.cancel(b, ec);
-    ``]
-    [`error_code`]
-    [
-      Causes any outstanding asynchronous resolve operations to complete as
-      soon as possible. Handlers for cancelled operations shall be passed the
-      error code `error::operation_aborted`.
-    ]
-  ]
-  [
-    [``
-      a.resolve(b, q, ec);
-    ``]
-    [``
-      ip::basic_resolver_iterator<
-        InternetProtocol>
-    ``]
-    [
-      On success, returns an iterator `i` such that `i !=
-      ip::basic_resolver_iterator<InternetProtocol>()`. Otherwise returns
-      `ip::basic_resolver_iterator<InternetProtocol>()`.
-    ]
-  ]
-  [
-    [``
-      a.async_resolve(b, q, h);
-    ``]
-    []
-    [
-      Initiates an asynchronous resolve operation that is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      If the operation completes successfully, the `ResolveHandler` object `h`
-      shall be invoked with an iterator object `i` such that the condition `i
-      != ip::basic_resolver_iterator<InternetProtocol>()` holds. Otherwise it
-      is invoked with `ip::basic_resolver_iterator<InternetProtocol>()`.
-    ]
-  ]
-  [
-    [``
-      a.resolve(b, e, ec);
-    ``]
-    [``
-      ip::basic_resolver_iterator<
-        InternetProtocol>
-    ``]
-    [
-      On success, returns an iterator `i` such that `i !=
-      ip::basic_resolver_iterator<InternetProtocol>()`. Otherwise returns
-      `ip::basic_resolver_iterator<InternetProtocol>()`.
-    ]
-  ]
-  [
-    [``
-      a.async_resolve(b, e, h);
-    ``]
-    []
-    [
-      Initiates an asynchronous resolve operation that is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      If the operation completes successfully, the `ResolveHandler` object `h`
-      shall be invoked with an iterator object `i` such that the condition `i
-      != ip::basic_resolver_iterator<InternetProtocol>()` holds. Otherwise it
-      is invoked with `ip::basic_resolver_iterator<InternetProtocol>()`.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/SeqPacketSocketService.qbk b/asio/src/doc/requirements/SeqPacketSocketService.qbk
deleted file mode 100644
index b8b2689..0000000
--- a/asio/src/doc/requirements/SeqPacketSocketService.qbk
+++ /dev/null
@@ -1,127 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:SeqPacketSocketService Sequenced packet socket service requirements]
-
-A sequenced packet socket service must meet the requirements for a [link
-asio.reference.SocketService socket service], as well as the additional
-requirements listed below.
-
-In the table below, `X` denotes a stream socket service class, `a` denotes a
-value of type `X`, `b` denotes a value of type `X::implementation_type`, `ec`
-denotes a value of type `error_code`, `f` denotes a value of type
-`socket_base::message_flags`, `g` denotes an lvalue of type
-`socket_base::message_flags`, `mb` denotes a value satisfying [link
-asio.reference.MutableBufferSequence mutable buffer sequence] requirements,
-`rh` denotes a value meeting [link asio.reference.ReadHandler `ReadHandler`]
-requirements, `cb` denotes a value satisfying [link
-asio.reference.ConstBufferSequence constant buffer sequence] requirements, and
-`wh` denotes a value meeting [link asio.reference.WriteHandler `WriteHandler`]
-requirements.
-
-[table StreamSocketService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`a.receive(b, mb, f, g, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Reads one or more bytes of data from a connected socket `b`.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      If successful, sets `g` to the flags associated with the received data,
-      and returns the number of bytes read. Otherwise, sets `g` to `0` and
-      returns `0`.
-    ]
-  ]
-  [
-    [`a.async_receive(b, mb, f, g, rh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to read one or more bytes of data
-      from a connected socket `b`. The operation is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `mb` until such
-      time as the read operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `mb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first.\n
-      \n
-      If the operation completes successfully, sets `g` to the flags associated
-      with the received data, then invokes the `ReadHandler` object `rh` with
-      the number of bytes transferred. Otherwise, sets `g` to `0` and invokes
-      `rh` with `0` bytes transferred.
-    ]
-  ]
-  [
-    [`a.send(b, cb, f, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Writes one or more bytes of data to a connected socket `b`.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes written. Otherwise returns `0`.
-    ]
-  ]
-  [
-    [`a.async_send(b, cb, f, wh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to write one or more bytes of data to
-      a connected socket `b`. The operation is performed via the `io_service`
-      object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `cb` until such
-      time as the write operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `cb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first.\n
-      \n
-      If the operation completes successfully, the `WriteHandler` object `wh`
-      is invoked with the number of bytes transferred. Otherwise it is invoked
-      with `0`.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/SerialPortService.qbk b/asio/src/doc/requirements/SerialPortService.qbk
deleted file mode 100644
index 02ecfd0..0000000
--- a/asio/src/doc/requirements/SerialPortService.qbk
+++ /dev/null
@@ -1,301 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:SerialPortService Serial port service requirements]
-
-A serial port service must meet the requirements for an [link
-asio.reference.IoObjectService I/O object service] with support for movability,
-as well as the additional requirements listed below.
-
-In the table below, `X` denotes a serial port service class, `a` and `ao` denote
-values of type `X`, `d` denotes a serial port device name of type `std::string`,
-`b` and `c` denote values of type `X::implementation_type`, `n` denotes a value
-of type `X::native_handle_type`, `ec` denotes a value of type `error_code`, `s`
-denotes a value meeting [link asio.reference.SettableSerialPortOption
-`SettableSerialPortOption`] requirements, `g` denotes a value meeting [link
-asio.reference.GettableSerialPortOption `GettableSerialPortOption`]
-requirements, `mb` denotes a value satisfying [link
-asio.reference.MutableBufferSequence mutable buffer sequence] requirements,
-`rh` denotes a value meeting [link asio.reference.ReadHandler `ReadHandler`]
-requirements, `cb` denotes a value satisfying [link
-asio.reference.ConstBufferSequence constant buffer sequence] requirements, and
-`wh` denotes a value meeting [link asio.reference.WriteHandler `WriteHandler`]
-requirements. and `u` and `v` denote identifiers.
-
-[table SerialPortService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`X::native_handle_type`]
-    []
-    [
-      The implementation-defined native representation of a serial port. Must
-      satisfy the requirements of `CopyConstructible` types (C++ Std, 20.1.3),
-      and the requirements of `Assignable` types (C++ Std, 23.1).
-    ]
-  ]
-  [
-    [`a.construct(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements.\n
-      post: `!a.is_open(b)`.
-    ]
-  ]
-  [
-    [`a.destroy(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements. Implicitly cancels asynchronous operations, as if by calling
-      `a.close(b, ec)`.
-    ]
-  ]
-  [
-    [``
-      a.move_construct(b, c);
-    ``]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService] requirements.
-      The underlying native representation is moved from `c` to `b`.
-    ]
-  ]
-  [
-    [``
-      a.move_assign(b, ao, c);
-    ``]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService] requirements.
-      Implicitly cancels asynchronous operations associated with `b`, as if by
-      calling `a.close(b, ec)`. Then the underlying native representation is
-      moved from `c` to `b`.
-    ]
-  ]
-  [
-    [``
-      const std::string& u = d;
-      a.open(b, u, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `!a.is_open(b)`.\n
-      post: `!!ec || a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.assign(b, n, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `!a.is_open(b)`.\n
-      post: `!!ec || a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.is_open(b);
-    ``]
-    [`bool`]
-    [
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.is_open(v);
-    ``]
-    [`bool`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.close(b, ec);
-    ``]
-    [`error_code`]
-    [
-      If `a.is_open()` is true, causes any outstanding asynchronous operations
-      to complete as soon as possible. Handlers for cancelled operations shall
-      be passed the error code `error::operation_aborted`.\n
-      post: `!a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.native_handle(b);
-    ``]
-    [`X::native_handle_type`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.cancel(b, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.\n
-      Causes any outstanding asynchronous operations to complete as soon as
-      possible. Handlers for cancelled operations shall be passed the error
-      code `error::operation_aborted`.
-    ]
-  ]
-  [
-    [``
-      a.set_option(b, s, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.get_option(b, g, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.get_option(v, g, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.send_break(b, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [`a.read_some(b, mb, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Reads one or more bytes of data from a serial port `b`.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes read. Otherwise returns `0`.
-      If the total size of all buffers in the sequence `mb` is `0`, the
-      function shall return `0` immediately.\n
-      \n
-      If the operation completes due to graceful connection closure by the
-      peer, the operation shall fail with `error::eof`.
-    ]
-  ]
-  [
-    [`a.async_read_some(b, mb, rh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to read one or more bytes of data
-      from a serial port `b`. The operation is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `mb` until such
-      time as the read operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `mb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first. If the total size of all buffers in the sequence
-      `mb` is `0`, the asynchronous read operation shall complete immediately
-      and pass `0` as the argument to the handler that specifies the number of
-      bytes read.\n
-      \n
-      If the operation completes due to graceful connection closure by the
-      peer, the operation shall fail with `error::eof`.\n
-      \n
-      If the operation completes successfully, the `ReadHandler` object
-      `rh` is invoked with the number of bytes transferred. Otherwise it is
-      invoked with `0`.
-    ]
-  ]
-  [
-    [`a.write_some(b, cb, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Writes one or more bytes of data to a serial port `b`.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes written. Otherwise returns `0`.
-      If the total size of all buffers in the sequence `cb` is `0`, the
-      function shall return `0` immediately.
-    ]
-  ]
-  [
-    [`a.async_write_some(b, cb, wh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to write one or more bytes of data to
-      a serial port `b`. The operation is performed via the `io_service`
-      object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `cb` until such
-      time as the write operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `cb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first. If the total size of all buffers in the sequence
-      `cb` is `0`, the asynchronous operation shall complete immediately and
-      pass `0` as the argument to the handler that specifies the number of
-      bytes read.\n
-      \n
-      If the operation completes successfully, the `WriteHandler` object `wh`
-      is invoked with the number of bytes transferred. Otherwise it is invoked
-      with `0`.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/Service.qbk b/asio/src/doc/requirements/Service.qbk
index 7963cb3..24a1ae5 100644
--- a/asio/src/doc/requirements/Service.qbk
+++ b/asio/src/doc/requirements/Service.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,27 +7,34 @@
 
 [section:Service Service requirements]
 
-A class is a service if it is publicly derived from another service, or if it
-is a class derived from `io_service::service` and contains a
-publicly-accessible declaration as follows:
+A class is a ['service] if it is publicly and unambiguously derived from
+`execution_context::service`, or if it is publicly and unambiguously derived
+from another service. For a service `S`, `S::key_type` shall be valid and
+denote a type (C++Std [temp.deduct]), `is_base_of_v<typename S::key_type, S>`
+shall be `true`, and `S` shall satisfy the `Destructible` requirements (C++Std
+[destructible]).
 
-  static io_service::id id;
+The first parameter of all service constructors shall be an lvalue reference to
+`execution_context`. This parameter denotes the `execution_context` object that
+represents a set of services, of which the service object will be a member.
+[inline_note These constructors may be called by the `make_service` function.]
 
-All services define a one-argument constructor that takes a reference to the
-`io_service` object that owns the service. This constructor is /explicit/,
-preventing its participation in automatic conversions. For example:
+A service shall provide an explicit constructor with a single parameter of
+lvalue reference to `execution_context`. [inline_note This constructor may be
+called by the `use_service` function.]
 
-  class my_service : public io_service::service
+  class my_service : public execution_context::service
   {
   public:
-    static io_service::id id;
-    explicit my_service(io_service& ios);
+    typedef my_service key_type;
+    explicit my_service(execution_context& ctx);
+    my_service(execution_context& ctx, int some_value);
   private:
-    virtual void shutdown_service();
+    virtual void shutdown() noexcept override;
     ...
   };
 
-A service's `shutdown_service` member function must cause all copies of
-user-defined handler objects that are held by the service to be destroyed.
+A service's `shutdown` member function shall destroy all copies of user-defined
+function objects that are held by the service.
 
 [endsect]
diff --git a/asio/src/doc/requirements/SettableSerialPortOption.qbk b/asio/src/doc/requirements/SettableSerialPortOption.qbk
index d217fa8..5cbe5f1 100644
--- a/asio/src/doc/requirements/SettableSerialPortOption.qbk
+++ b/asio/src/doc/requirements/SettableSerialPortOption.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/SettableSocketOption.qbk b/asio/src/doc/requirements/SettableSocketOption.qbk
index 7d46f86..162c0a9 100644
--- a/asio/src/doc/requirements/SettableSocketOption.qbk
+++ b/asio/src/doc/requirements/SettableSocketOption.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,14 +7,17 @@
 
 [section:SettableSocketOption Settable socket option requirements]
 
-In the table below, `X` denotes a socket option class, `a` denotes a value of
-`X`, `p` denotes a value that meets the [link asio.reference.Protocol
-protocol] requirements, and `u` denotes an identifier.
+A type `X` meets the `SettableSocketOption` requirements if it satisfies the
+requirements listed below.
 
-[table SettableSocketOption requirements
+In the table below, `a` denotes a (possibly const) value of type `X`, `p`
+denotes a (possibly const) value that meets the [link asio.reference.Protocol
+`Protocol`] requirements, and `u` denotes an identifier.
+
+[table SettableSocketOption requirements for extensible implementations
   [[expression] [type] [assertion/note\npre/post-conditions]]
   [
-    [`a.level(p);`]
+    [`a.level(p)`]
     [`int`]
     [
       Returns a value suitable for passing as the /level/ argument to __POSIX__
@@ -22,7 +25,7 @@
     ]
   ]
   [
-    [`a.name(p);`]
+    [`a.name(p)`]
     [`int`]
     [
       Returns a value suitable for passing as the /option_name/ argument to
@@ -30,16 +33,15 @@
     ]
   ]
   [
-    [`const X& u = a;
-      u.data(p);`]
-    [a pointer, convertible to `const void*`]
+    [`a.data(p)`]
+    [`const void*`]
     [
       Returns a pointer suitable for passing as the /option_value/ argument to
       __POSIX__ __setsockopt__ (or equivalent).
     ]
   ]
   [
-    [`a.size(p);`]
+    [`a.size(p)`]
     [`size_t`]
     [
       Returns a value suitable for passing as the /option_len/ argument to
diff --git a/asio/src/doc/requirements/ShutdownHandler.qbk b/asio/src/doc/requirements/ShutdownHandler.qbk
index 9c321f3..601c625 100644
--- a/asio/src/doc/requirements/ShutdownHandler.qbk
+++ b/asio/src/doc/requirements/ShutdownHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/SignalHandler.qbk b/asio/src/doc/requirements/SignalHandler.qbk
index 1ee476b..cfd806a 100644
--- a/asio/src/doc/requirements/SignalHandler.qbk
+++ b/asio/src/doc/requirements/SignalHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/SignalSetService.qbk b/asio/src/doc/requirements/SignalSetService.qbk
deleted file mode 100644
index 04f60ef..0000000
--- a/asio/src/doc/requirements/SignalSetService.qbk
+++ /dev/null
@@ -1,91 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:SignalSetService Signal set service requirements]
-
-A signal set service must meet the requirements for an [link
-asio.reference.IoObjectService I/O object service], as well as the
-additional requirements listed below.
-
-In the table below, `X` denotes a signal set service class, `a` denotes a value
-of type `X`, `b` denotes a value of type `X::implementation_type`, `ec` denotes
-a value of type `error_code`, `n` denotes a value of type `int`, and `sh`
-denotes a value meeting [link asio.reference.SignalHandler `SignalHandler`]
-requirements.
-
-[table SignalSetService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`a.construct(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements.\n
-    ]
-  ]
-  [
-    [`a.destroy(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements. Implicitly clears the registered signals as if by calling
-      `a.clear(b, ec)`, then implicitly cancels outstanding asynchronous
-      operations as if by calling `a.cancel(b, ec)`.
-    ]
-  ]
-  [
-    [``
-      a.add(b, n, ec);
-    ``]
-    [`error_code`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.remove(b, n, ec);
-    ``]
-    [`error_code`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.clear(b, ec);
-    ``]
-    [`error_code`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.cancel(b, ec);
-    ``]
-    [`error_code`]
-    [
-    ]
-  ]
-  [
-    [`a.async_wait(b, sh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to wait for the delivery of one of the
-      signals registered for the signal set `b`. The operation is performed via
-      the `io_service` object `a.get_io_service()` and behaves according to
-      [link asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      If the operation completes successfully, the `SignalHandler` object
-      `sh` is invoked with the number identifying the delivered signal. Otherwise
-      it is invoked with `0`.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/SocketAcceptorService.qbk b/asio/src/doc/requirements/SocketAcceptorService.qbk
deleted file mode 100644
index d40a22c..0000000
--- a/asio/src/doc/requirements/SocketAcceptorService.qbk
+++ /dev/null
@@ -1,270 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:SocketAcceptorService Socket acceptor service requirements]
-
-A socket acceptor service must meet the requirements for an [link
-asio.reference.IoObjectService I/O object service], as well as the
-additional requirements listed below.
-
-In the table below, `X` denotes a socket acceptor service class for protocol
-[link asio.reference.Protocol `Protocol`], `a` and `ao` denote values of type
-`X`, `b` and `c` denote values of type `X::implementation_type`, `p` denotes a
-value of type `Protocol`, `n` denotes a value of type `X::native_handle_type`,
-`e` denotes a value of type `Protocol::endpoint`, `ec` denotes a value of type
-`error_code`, `s` denotes a value meeting [link
-asio.reference.SettableSocketOption `SettableSocketOption`] requirements, `g`
-denotes a value meeting [link asio.reference.GettableSocketOption
-`GettableSocketOption`] requirements, `i` denotes a value meeting [link
-asio.reference.IoControlCommand `IoControlCommand`] requirements, `k` denotes a
-value of type `basic_socket<Protocol, SocketService>` where `SocketService` is
-a type meeting [link asio.reference.SocketService socket service] requirements,
-`ah` denotes a value meeting [link asio.reference.AcceptHandler
-`AcceptHandler`] requirements, and `u` and `v` denote identifiers.
-
-[table SocketAcceptorService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`X::native_handle_type`]
-    []
-    [
-      The implementation-defined native representation of a socket acceptor.
-      Must satisfy the requirements of `CopyConstructible` types (C++ Std,
-      20.1.3), and the requirements of `Assignable` types (C++ Std, 23.1).
-    ]
-  ]
-  [
-    [`a.construct(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements.\n
-      post: `!a.is_open(b)`.
-    ]
-  ]
-  [
-    [`a.destroy(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements. Implicitly cancels asynchronous operations, as if by calling
-      `a.close(b, ec)`.
-    ]
-  ]
-  [
-    [``
-      a.move_construct(b, c);
-    ``]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService] requirements.
-      The underlying native representation is moved from `c` to `b`.
-    ]
-  ]
-  [
-    [``
-      a.move_assign(b, ao, c);
-    ``]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService] requirements.
-      Implicitly cancels asynchronous operations associated with `b`, as if by
-      calling `a.close(b, ec)`. Then the underlying native representation is
-      moved from `c` to `b`.
-    ]
-  ]
-  [
-    [``
-      a.open(b, p, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `!a.is_open(b)`.\n
-      post: `!!ec || a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.assign(b, p, n, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `!a.is_open(b)`.\n
-      post: `!!ec || a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.is_open(b);
-    ``]
-    [`bool`]
-    [
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.is_open(v);
-    ``]
-    [`bool`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.close(b, ec);
-    ``]
-    [`error_code`]
-    [
-      If `a.is_open()` is true, causes any outstanding asynchronous operations
-      to complete as soon as possible. Handlers for cancelled operations shall
-      be passed the error code `error::operation_aborted`.\n
-      post: `!a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.native_handle(b);
-    ``]
-    [`X::native_handle_type`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.cancel(b, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.\n
-      Causes any outstanding asynchronous operations to complete as soon as
-      possible. Handlers for cancelled operations shall be passed the error
-      code `error::operation_aborted`.
-    ]
-  ]
-  [
-    [``
-      a.set_option(b, s, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.get_option(b, g, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.get_option(v, g, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.io_control(b, i, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      const typename Protocol::endpoint& u = e;
-      a.bind(b, u, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.local_endpoint(b, ec);
-    ``]
-    [`Protocol::endpoint`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.local_endpoint(v, ec);
-    ``]
-    [`Protocol::endpoint`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.accept(b, k, &e, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b) && !k.is_open()`.\n
-      post: `k.is_open()`
-    ]
-  ]
-  [
-    [``
-      a.accept(b, k, 0, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b) && !k.is_open()`.\n
-      post: `k.is_open()`
-    ]
-  ]
-  [
-    [``
-      a.async_accept(b, k, &e, ah);
-    ``]
-    []
-    [
-      pre: `a.is_open(b) && !k.is_open()`.\n
-      Initiates an asynchronous accept operation that is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n\n
-      The program must ensure the objects `k` and `e` are valid until the
-      handler for the asynchronous operation is invoked.
-    ]
-  ]
-  [
-    [``
-      a.async_accept(b, k, 0, ah);
-    ``]
-    []
-    [
-      pre: `a.is_open(b) && !k.is_open()`.\n
-      Initiates an asynchronous accept operation that is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n\n
-      The program must ensure the object `k` is valid until the handler for the
-      asynchronous operation is invoked.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/SocketService.qbk b/asio/src/doc/requirements/SocketService.qbk
deleted file mode 100644
index 0245900..0000000
--- a/asio/src/doc/requirements/SocketService.qbk
+++ /dev/null
@@ -1,336 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:SocketService Socket service requirements]
-
-A socket service must meet the requirements for an [link
-asio.reference.IoObjectService I/O object service] with support for movability,
-as well as the  additional requirements listed below.
-
-In the table below, `X` denotes a socket service class for protocol [link
-asio.reference.Protocol `Protocol`], `a` and `ao` denote values of type `X`,
-`b` and `c` denote values of type `X::implementation_type`, `p` denotes a value
-of type `Protocol`, `n` denotes a value of type `X::native_handle_type`, `e`
-denotes a value of type `Protocol::endpoint`, `ec` denotes a value of type
-`error_code`, `s` denotes a value meeting [link
-asio.reference.SettableSocketOption `SettableSocketOption`] requirements, `g`
-denotes a value meeting [link asio.reference.GettableSocketOption
-`GettableSocketOption`] requirements, `i` denotes a value meeting [link
-asio.reference.IoControlCommand `IoControlCommand`] requirements, `h` denotes a
-value of type `socket_base::shutdown_type`, `ch` denotes a value meeting [link
-asio.reference.ConnectHandler `ConnectHandler`] requirements, `w` denotes a
-value of type `socket_base::wait_type`, `wh` denotes a value meeting [link
-asio.reference.WaitHandler `WaitHandler`] requirements, and `u` and `v` denote
-identifiers.
-
-[table SocketService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`X::native_handle_type`]
-    []
-    [
-      The implementation-defined native representation of a socket. Must
-      satisfy the requirements of `CopyConstructible` types (C++ Std, 20.1.3),
-      and the requirements of `Assignable` types (C++ Std, 23.1).
-    ]
-  ]
-  [
-    [`a.construct(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements.\n
-      post: `!a.is_open(b)`.
-    ]
-  ]
-  [
-    [`a.destroy(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements. Implicitly cancels asynchronous operations, as if by calling
-      `a.close(b, ec)`.
-    ]
-  ]
-  [
-    [``
-      a.move_construct(b, c);
-    ``]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService] requirements.
-      The underlying native representation is moved from `c` to `b`.
-    ]
-  ]
-  [
-    [``
-      a.move_assign(b, ao, c);
-    ``]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService] requirements.
-      Implicitly cancels asynchronous operations associated with `b`, as if by
-      calling `a.close(b, ec)`. Then the underlying native representation is
-      moved from `c` to `b`.
-    ]
-  ]
-  [
-    [``
-      a.open(b, p, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `!a.is_open(b)`.\n
-      post: `!!ec || a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.assign(b, p, n, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `!a.is_open(b)`.\n
-      post: `!!ec || a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.is_open(b);
-    ``]
-    [`bool`]
-    [
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.is_open(v);
-    ``]
-    [`bool`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.close(b, ec);
-    ``]
-    [`error_code`]
-    [
-      If `a.is_open()` is true, causes any outstanding asynchronous operations
-      to complete as soon as possible. Handlers for cancelled operations shall
-      be passed the error code `error::operation_aborted`.\n
-      post: `!a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.native_handle(b);
-    ``]
-    [`X::native_handle_type`]
-    [
-    ]
-  ]
-  [
-    [``
-      a.cancel(b, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.\n
-      Causes any outstanding asynchronous operations to complete as soon as
-      possible. Handlers for cancelled operations shall be passed the error
-      code `error::operation_aborted`.
-    ]
-  ]
-  [
-    [``
-      a.set_option(b, s, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.get_option(b, g, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.get_option(v, g, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.io_control(b, i, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.at_mark(b, ec);
-    ``]
-    [`bool`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.at_mark(v, ec);
-    ``]
-    [`bool`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.available(b, ec);
-    ``]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.available(v, ec);
-    ``]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      const typename Protocol::endpoint& u = e;
-      a.bind(b, u, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.shutdown(b, h, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.local_endpoint(b, ec);
-    ``]
-    [`Protocol::endpoint`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.local_endpoint(v, ec);
-    ``]
-    [`Protocol::endpoint`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.remote_endpoint(b, ec);
-    ``]
-    [`Protocol::endpoint`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      const X& u = a;
-      const X::implementation_type& v = b;
-      u.remote_endpoint(v, ec);
-    ``]
-    [`Protocol::endpoint`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      const typename Protocol::endpoint& u = e;
-      a.connect(b, u, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      const typename Protocol::endpoint& u = e;
-      a.async_connect(b, u, ch);
-    ``]
-    []
-    [
-      pre: `a.is_open(b)`.\n
-      Initiates an asynchronous connect operation that is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.
-    ]
-  ]
-  [
-    [``
-      a.wait(b, w, ec);
-    ``]
-    [`error_code`]
-    [
-      pre: `a.is_open(b)`.
-    ]
-  ]
-  [
-    [``
-      a.async_wait(b, w, wh);
-    ``]
-    []
-    [
-      pre: `a.is_open(b)`.\n
-      Initiates an asynchronous wait operation that is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/StreamDescriptorService.qbk b/asio/src/doc/requirements/StreamDescriptorService.qbk
deleted file mode 100644
index 958b089..0000000
--- a/asio/src/doc/requirements/StreamDescriptorService.qbk
+++ /dev/null
@@ -1,138 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:StreamDescriptorService Stream descriptor service requirements]
-
-A stream descriptor service must meet the requirements for a [link
-asio.reference.DescriptorService descriptor service], as well as the additional
-requirements listed below.
-
-In the table below, `X` denotes a stream descriptor service class, `a` denotes
-a value of type `X`, `b` denotes a value of type `X::implementation_type`, `ec`
-denotes a value of type `error_code`, `mb` denotes a value satisfying [link
-asio.reference.MutableBufferSequence mutable buffer sequence] requirements,
-`rh` denotes a value meeting [link asio.reference.ReadHandler `ReadHandler`]
-requirements, `cb` denotes a value satisfying [link
-asio.reference.ConstBufferSequence constant buffer sequence] requirements, and
-`wh` denotes a value meeting [link asio.reference.WriteHandler `WriteHandler`]
-requirements.
-
-[table StreamDescriptorService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`a.read_some(b, mb, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Reads one or more bytes of data from a descriptor `b`.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes read. Otherwise returns `0`.
-      If the total size of all buffers in the sequence `mb` is `0`, the
-      function shall return `0` immediately.\n
-      \n
-      If the operation completes due to graceful connection closure by the
-      peer, the operation shall fail with `error::eof`.
-    ]
-  ]
-  [
-    [`a.async_read_some(b, mb, rh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to read one or more bytes of data
-      from a descriptor `b`. The operation is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `mb` until such
-      time as the read operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `mb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first. If the total size of all buffers in the sequence
-      `mb` is `0`, the asynchronous read operation shall complete immediately
-      and pass `0` as the argument to the handler that specifies the number of
-      bytes read.\n
-      \n
-      If the operation completes due to graceful connection closure by the
-      peer, the operation shall fail with `error::eof`.\n
-      \n
-      If the operation completes successfully, the `ReadHandler` object
-      `rh` is invoked with the number of bytes transferred. Otherwise it is
-      invoked with `0`.
-    ]
-  ]
-  [
-    [`a.write_some(b, cb, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Writes one or more bytes of data to a descriptor `b`.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes written. Otherwise returns `0`.
-      If the total size of all buffers in the sequence `cb` is `0`, the
-      function shall return `0` immediately.
-    ]
-  ]
-  [
-    [`a.async_write_some(b, cb, wh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to write one or more bytes of data to
-      a descriptor `b`. The operation is performed via the `io_service`
-      object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `cb` until such
-      time as the write operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `cb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first. If the total size of all buffers in the sequence
-      `cb` is `0`, the asynchronous operation shall complete immediately and
-      pass `0` as the argument to the handler that specifies the number of
-      bytes read.\n
-      \n
-      If the operation completes successfully, the `WriteHandler` object `wh`
-      is invoked with the number of bytes transferred. Otherwise it is invoked
-      with `0`.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/StreamHandleService.qbk b/asio/src/doc/requirements/StreamHandleService.qbk
deleted file mode 100644
index b73ab89..0000000
--- a/asio/src/doc/requirements/StreamHandleService.qbk
+++ /dev/null
@@ -1,138 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:StreamHandleService Stream handle service requirements]
-
-A stream handle service must meet the requirements for a [link
-asio.reference.HandleService handle service], as well as the additional
-requirements listed below.
-
-In the table below, `X` denotes a stream handle service class, `a` denotes
-a value of type `X`, `b` denotes a value of type `X::implementation_type`, `ec`
-denotes a value of type `error_code`, `mb` denotes a value satisfying [link
-asio.reference.MutableBufferSequence mutable buffer sequence] requirements,
-`rh` denotes a value meeting [link asio.reference.ReadHandler `ReadHandler`]
-requirements, `cb` denotes a value satisfying [link
-asio.reference.ConstBufferSequence constant buffer sequence] requirements, and
-`wh` denotes a value meeting [link asio.reference.WriteHandler `WriteHandler`]
-requirements.
-
-[table StreamHandleService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`a.read_some(b, mb, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Reads one or more bytes of data from a handle `b`.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes read. Otherwise returns `0`.
-      If the total size of all buffers in the sequence `mb` is `0`, the
-      function shall return `0` immediately.\n
-      \n
-      If the operation completes due to graceful connection closure by the
-      peer, the operation shall fail with `error::eof`.
-    ]
-  ]
-  [
-    [`a.async_read_some(b, mb, rh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to read one or more bytes of data
-      from a handle `b`. The operation is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `mb` until such
-      time as the read operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `mb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first. If the total size of all buffers in the sequence
-      `mb` is `0`, the asynchronous read operation shall complete immediately
-      and pass `0` as the argument to the handler that specifies the number of
-      bytes read.\n
-      \n
-      If the operation completes due to graceful connection closure by the
-      peer, the operation shall fail with `error::eof`.\n
-      \n
-      If the operation completes successfully, the `ReadHandler` object
-      `rh` is invoked with the number of bytes transferred. Otherwise it is
-      invoked with `0`.
-    ]
-  ]
-  [
-    [`a.write_some(b, cb, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Writes one or more bytes of data to a handle `b`.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes written. Otherwise returns `0`.
-      If the total size of all buffers in the sequence `cb` is `0`, the
-      function shall return `0` immediately.
-    ]
-  ]
-  [
-    [`a.async_write_some(b, cb, wh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to write one or more bytes of data to
-      a handle `b`. The operation is performed via the `io_service`
-      object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `cb` until such
-      time as the write operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `cb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first. If the total size of all buffers in the sequence
-      `cb` is `0`, the asynchronous operation shall complete immediately and
-      pass `0` as the argument to the handler that specifies the number of
-      bytes read.\n
-      \n
-      If the operation completes successfully, the `WriteHandler` object `wh`
-      is invoked with the number of bytes transferred. Otherwise it is invoked
-      with `0`.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/StreamSocketService.qbk b/asio/src/doc/requirements/StreamSocketService.qbk
deleted file mode 100644
index b3ecd11..0000000
--- a/asio/src/doc/requirements/StreamSocketService.qbk
+++ /dev/null
@@ -1,139 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:StreamSocketService Stream socket service requirements]
-
-A stream socket service must meet the requirements for a [link
-asio.reference.SocketService socket service], as well as the additional
-requirements listed below.
-
-In the table below, `X` denotes a stream socket service class, `a` denotes a
-value of type `X`, `b` denotes a value of type `X::implementation_type`, `ec`
-denotes a value of type `error_code`, `f` denotes a value of type
-`socket_base::message_flags`, `mb` denotes a value satisfying [link
-asio.reference.MutableBufferSequence mutable buffer sequence]
-requirements, `rh` denotes a value meeting [link
-asio.reference.ReadHandler `ReadHandler`] requirements, `cb` denotes a
-value satisfying [link asio.reference.ConstBufferSequence constant
-buffer sequence] requirements, and `wh` denotes a value meeting [link
-asio.reference.WriteHandler `WriteHandler`] requirements.
-
-[table StreamSocketService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`a.receive(b, mb, f, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Reads one or more bytes of data from a connected socket `b`.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes read. Otherwise returns `0`.
-      If the total size of all buffers in the sequence `mb` is `0`, the
-      function shall return `0` immediately.\n
-      \n
-      If the operation completes due to graceful connection closure by the
-      peer, the operation shall fail with `error::eof`.
-    ]
-  ]
-  [
-    [`a.async_receive(b, mb, f, rh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to read one or more bytes of data
-      from a connected socket `b`. The operation is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The operation shall always fill a buffer in the sequence
-      completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `mb` until such
-      time as the read operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `mb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first. If the total size of all buffers in the sequence
-      `mb` is `0`, the asynchronous read operation shall complete immediately
-      and pass `0` as the argument to the handler that specifies the number of
-      bytes read.\n
-      \n
-      If the operation completes due to graceful connection closure by the
-      peer, the operation shall fail with `error::eof`.\n
-      \n
-      If the operation completes successfully, the `ReadHandler` object
-      `rh` is invoked with the number of bytes transferred. Otherwise it is
-      invoked with `0`.
-    ]
-  ]
-  [
-    [`a.send(b, cb, f, ec);`]
-    [`size_t`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Writes one or more bytes of data to a connected socket `b`.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      If successful, returns the number of bytes written. Otherwise returns `0`.
-      If the total size of all buffers in the sequence `cb` is `0`, the
-      function shall return `0` immediately.
-    ]
-  ]
-  [
-    [`a.async_send(b, cb, f, wh);`]
-    [`void`]
-    [
-      pre: `a.is_open(b)`.\n
-      \n
-      Initiates an asynchronous operation to write one or more bytes of data to
-      a connected socket `b`. The operation is performed via the `io_service`
-      object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The operation shall always write a buffer in the
-      sequence completely before proceeding to the next.\n
-      \n
-      The implementation shall maintain one or more copies of `cb` until such
-      time as the write operation no longer requires access to the memory
-      specified by the buffers in the sequence. The program must ensure the
-      memory is valid until:\n
-      \n
-      [mdash] the last copy of `cb` is destroyed, or\n
-      \n
-      [mdash] the handler for the asynchronous operation is invoked,\n
-      \n
-      whichever comes first. If the total size of all buffers in the sequence
-      `cb` is `0`, the asynchronous operation shall complete immediately and
-      pass `0` as the argument to the handler that specifies the number of
-      bytes read.\n
-      \n
-      If the operation completes successfully, the `WriteHandler` object `wh`
-      is invoked with the number of bytes transferred. Otherwise it is invoked
-      with `0`.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/SyncRandomAccessReadDevice.qbk b/asio/src/doc/requirements/SyncRandomAccessReadDevice.qbk
index 7d95161..4e960b0 100644
--- a/asio/src/doc/requirements/SyncRandomAccessReadDevice.qbk
+++ b/asio/src/doc/requirements/SyncRandomAccessReadDevice.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/SyncRandomAccessWriteDevice.qbk b/asio/src/doc/requirements/SyncRandomAccessWriteDevice.qbk
index 78bc5aa..c7a2686 100644
--- a/asio/src/doc/requirements/SyncRandomAccessWriteDevice.qbk
+++ b/asio/src/doc/requirements/SyncRandomAccessWriteDevice.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/SyncReadStream.qbk b/asio/src/doc/requirements/SyncReadStream.qbk
index 777662a..48d3c23 100644
--- a/asio/src/doc/requirements/SyncReadStream.qbk
+++ b/asio/src/doc/requirements/SyncReadStream.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,40 +7,33 @@
 
 [section:SyncReadStream Buffer-oriented synchronous read stream requirements]
 
-In the table below, `a` denotes a synchronous read stream object, `mb` denotes
-an object satisfying [link asio.reference.MutableBufferSequence
-mutable buffer sequence] requirements, and `ec` denotes an object of type
+A type `X` meets the `SyncReadStream` requirements if it satisfies the
+requirements listed below.
+
+In the table below, `a` denotes a value of type `X`, `mb` denotes a (possibly
+const) value satisfying the [link asio.reference.MutableBufferSequence
+`MutableBufferSequence`] requirements, and `ec` denotes an object of type
 `error_code`.
 
-[table Buffer-oriented synchronous read stream requirements
+[table SyncReadStream requirements
   [[operation] [type] [semantics, pre/post-conditions]]
   [
-    [`a.read_some(mb);`]
-    [`size_t`]
-    [Equivalent to:
-     ``
-       error_code ec;
-       size_t s = a.read_some(mb, ec);
-       if (ec) throw system_error(ec);
-       return s;
-     ``]
-  ]
-  [
-    [`a.read_some(mb, ec);`]
+    [`a.read_some(mb)`\n
+     `a.read_some(mb,ec)`]
     [`size_t`]
     [
-      Reads one or more bytes of data from the stream `a`.\n
+      Meets the requirements for a [link asio.reference.read_write_operations
+      read operation].\n
       \n
-      The mutable buffer sequence `mb` specifies memory where the data should
-      be placed. The `read_some` operation shall always fill a buffer in the
-      sequence completely before proceeding to the next.\n
+      If `buffer_size(mb) > 0`, reads one or more bytes of data from the stream
+      `a` into the buffer sequence `mb`. If successful, sets `ec` such that
+      `!ec` is `true`, and returns the number of bytes read. If an error
+      occurred, sets `ec` such that `!!ec` is `true`, and returns 0. If all
+      data has been read from the stream, and the stream performed an orderly
+      shutdown, sets `ec` to `stream_errc::eof` and returns 0.\n
       \n
-      If successful, returns the number of bytes read and sets `ec` such that
-      `!ec` is true. If an error occurred, returns `0` and sets `ec` such that
-      `!!ec` is true.\n
-      \n
-      If the total size of all buffers in the sequence `mb` is `0`, the
-      function shall return `0` immediately.
+      If `buffer_size(mb) == 0`, the operation shall not block. Sets `ec` such
+      that `!ec` is `true`, and returns 0.
     ]
   ]
 ]
diff --git a/asio/src/doc/requirements/SyncWriteStream.qbk b/asio/src/doc/requirements/SyncWriteStream.qbk
index 854b6b8..713050c 100644
--- a/asio/src/doc/requirements/SyncWriteStream.qbk
+++ b/asio/src/doc/requirements/SyncWriteStream.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,39 +7,31 @@
 
 [section:SyncWriteStream Buffer-oriented synchronous write stream requirements]
 
-In the table below, `a` denotes a synchronous write stream object, `cb` denotes
-an object satisfying [link asio.reference.ConstBufferSequence constant
-buffer sequence] requirements, and `ec` denotes an object of type `error_code`.
+A type `X` meets the `SyncWriteStream` requirements if it satisfies the
+requirements listed below.
 
-[table Buffer-oriented synchronous write stream requirements
+In the table below, `a` denotes a value of type `X`, `cb` denotes a (possibly
+const) value satisfying the [link asio.reference.ConstBufferSequence
+`ConstBufferSequence`] requirements, and `ec` denotes an object of type
+`error_code`.
+
+[table SyncWriteStream requirements
   [[operation] [type] [semantics, pre/post-conditions]]
   [
-    [`a.write_some(cb);`]
-    [`size_t`]
-    [Equivalent to:
-     ``
-       error_code ec;
-       size_t s = a.write_some(cb, ec);
-       if (ec) throw system_error(ec);
-       return s;
-     ``]
-  ]
-  [
-    [`a.write_some(cb, ec);`]
+    [`a.write_some(cb)`\n
+     `a.write_some(cb,ec)`]
     [`size_t`]
     [
-      Writes one or more bytes of data to the stream `a`.\n
+      Meets the requirements for a [link asio.reference.read_write_operations
+      write operation].\n
       \n
-      The constant buffer sequence `cb` specifies memory where the data to be
-      written is located. The `write_some` operation shall always write a
-      buffer in the sequence completely before proceeding to the next.\n
+      If `buffer_size(cb) > 0`, writes one or more bytes of data to the stream
+      `a` from the buffer sequence `cb`. If successful, sets `ec` such that
+      `!ec` is `true`, and returns the number of bytes written. If an error
+      occurred, sets `ec` such that `!!ec` is `true`, and returns 0.\n
       \n
-      If successful, returns the number of bytes written and sets `ec` such
-      that `!ec` is true. If an error occurred, returns `0` and sets `ec` such
-      that `!!ec` is true.\n
-      \n
-      If the total size of all buffers in the sequence `cb` is `0`, the
-      function shall return `0` immediately.
+      If `buffer_size(cb) == 0`, the operation shall not block. Sets `ec` such
+      that `!ec` is `true`, and returns 0.
     ]
   ]
 ]
diff --git a/asio/src/doc/requirements/TimeTraits.qbk b/asio/src/doc/requirements/TimeTraits.qbk
index 6ac7fef..edd01b8 100644
--- a/asio/src/doc/requirements/TimeTraits.qbk
+++ b/asio/src/doc/requirements/TimeTraits.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/TimerService.qbk b/asio/src/doc/requirements/TimerService.qbk
deleted file mode 100644
index 12a6228..0000000
--- a/asio/src/doc/requirements/TimerService.qbk
+++ /dev/null
@@ -1,105 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:TimerService Timer service requirements]
-
-A timer service must meet the requirements for an [link
-asio.reference.IoObjectService I/O object service], as well as the
-additional requirements listed below.
-
-In the table below, `X` denotes a timer service class for time type `Time` and
-traits type `TimeTraits`, `a` denotes a value of type `X`, `b` denotes a value
-of type `X::implementation_type`, `t` denotes a value of type `Time`, `d`
-denotes a value of type `TimeTraits::duration_type`, `e` denotes a value of
-type `error_code`, and `h` denotes a value meeting [link
-asio.reference.WaitHandler `WaitHandler`] requirements.
-
-[table TimerService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`a.destroy(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements. Implicitly cancels asynchronous wait operations, as if by
-      calling `a.cancel(b, e)`.
-    ]
-  ]
-  [
-    [``
-      a.cancel(b, e);
-    ``]
-    [`size_t`]
-    [
-      Causes any outstanding asynchronous wait operations to complete as soon
-      as possible. Handlers for cancelled operations shall be passed the error
-      code `error::operation_aborted`. Sets `e` to indicate success or failure.
-      Returns the number of operations that were cancelled.
-    ]
-  ]
-  [
-    [`a.expires_at(b);`]
-    [`Time`]
-    []
-  ]
-  [
-    [``
-      a.expires_at(b, t, e);
-    ``]
-    [`size_t`]
-    [
-      Implicitly cancels asynchronous wait operations, as if by calling
-      `a.cancel(b, e)`. Returns the number of operations that were cancelled.\n
-      post: `a.expires_at(b) == t`.
-    ]
-  ]
-  [
-    [`a.expires_from_now(b);`]
-    [`TimeTraits::duration_type`]
-    [
-      Returns a value equivalent to `TimeTraits::subtract(a.expires_at(b),
-      TimeTraits::now())`.
-    ]
-  ]
-  [
-    [``
-      a.expires_from_now(b, d, e);
-    ``]
-    [`size_t`]
-    [
-      Equivalent to `a.expires_at(b, TimeTraits::add(TimeTraits::now(), d), e)`.
-    ]
-  ]
-  [
-    [``
-      a.wait(b, e);
-    ``]
-    [`error_code`]
-    [
-      Sets `e` to indicate success or failure. Returns `e`.\n
-      post: `!!e || !TimeTraits::lt(TimeTraits::now(), a.expires_at(b))`.
-    ]
-  ]
-  [
-    [``
-      a.async_wait(b, h);
-    ``]
-    []
-    [
-      Initiates an asynchronous wait operation that is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The handler shall be posted for execution only if the condition
-      `!!ec || !TimeTraits::lt(TimeTraits::now(), a.expires_at(b))`
-      holds, where `ec` is the error code to be passed to the handler.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/WaitHandler.qbk b/asio/src/doc/requirements/WaitHandler.qbk
index 38a5ec7..a7135f0 100644
--- a/asio/src/doc/requirements/WaitHandler.qbk
+++ b/asio/src/doc/requirements/WaitHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/WaitTraits.qbk b/asio/src/doc/requirements/WaitTraits.qbk
index 100164d..13eb748 100644
--- a/asio/src/doc/requirements/WaitTraits.qbk
+++ b/asio/src/doc/requirements/WaitTraits.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,27 +7,44 @@
 
 [section:WaitTraits Wait traits requirements]
 
-In the table below, `X` denotes a wait traits class for clock type `Clock`,
-where `Clock` meets the C++11 type requirements for a clock, `t` denotes a
-value of type `Clock::time_point`, and `d` denotes a value of type
+The `basic_waitable_timer` template uses wait traits to allow programs to
+customize `wait` and `async_wait` behavior.
+[inline_note Possible uses of wait traits include:\n
+[mdash] To enable timers based on non-realtime clocks.\n
+[mdash] Determining how quickly wallclock-based timers respond to system time
+changes.\n
+[mdash] Correcting for errors or rounding timeouts to boundaries.\n
+[mdash] Preventing duration overflow. That is, a program may set a timer's
+expiry `e` to be `Clock::max()` (meaning never reached) or `Clock::min()`
+(meaning always in the past). As a result, computing the duration until timer
+expiry as `e - Clock::now()` may cause overflow.]
+
+For a type `Clock` meeting the `Clock` requirements (C++Std
+[time.clock.req]), a type `X` meets the `WaitTraits` requirements if it
+satisfies the requirements listed below.
+
+In the table below, `t` denotes a (possibly const) value of type
+`Clock::time_point`; and `d` denotes a (possibly const) value of type
 `Clock::duration`.
 
 [table WaitTraits requirements
   [[expression] [return type] [assertion/note\npre/post-condition]]
   [
-    [`X::to_wait_duration(d);`]
+    [`X::to_wait_duration(d)`]
     [`Clock::duration`]
     [
-      Returns the maximum duration to be used for an individual,
-      implementation-defined wait operation for the duration `d`.
+      Returns a `Clock::duration` value to be used in a `wait` or `async_wait`
+      operation. [inline_note The return value is typically representative of
+      the duration `d`.]
     ]
   ]
   [
-    [`X::to_wait_duration(t);`]
+    [`X::to_wait_duration(t)`]
     [`Clock::duration`]
     [
-      Returns the maximum duration to be used for an individual,
-      implementation-defined wait operation until the time point `t`.
+      Returns a `Clock::duration` value to be used in a `wait` or `async_wait`
+      operation. [inline_note The return value is typically representative of
+      the duration from `Clock::now()` until the time point `t`.]
     ]
   ]
 ]
diff --git a/asio/src/doc/requirements/WaitableTimerService.qbk b/asio/src/doc/requirements/WaitableTimerService.qbk
deleted file mode 100644
index 47ccb86..0000000
--- a/asio/src/doc/requirements/WaitableTimerService.qbk
+++ /dev/null
@@ -1,97 +0,0 @@
-[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- /
- / Distributed under the Boost Software License, Version 1.0. (See accompanying
- / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- /]
-
-[section:WaitableTimerService Waitable timer service requirements]
-
-A waitable timer service must meet the requirements for an [link
-asio.reference.IoObjectService I/O object service], as well as the
-additional requirements listed below.
-
-In the table below, `X` denotes a waitable timer service class for clock type
-`Clock`, where `Clock` meets the C++11 clock type requirements, `a` denotes a
-value of type `X`, `b` denotes a value of type `X::implementation_type`, `t`
-denotes a value of type `Clock::time_point`, `d` denotes a value of type
-`Clock::duration`, `e` denotes a value of type `error_code`, and `h` denotes a
-value meeting [link asio.reference.WaitHandler `WaitHandler`] requirements.
-
-[table WaitableTimerService requirements
-  [[expression] [return type] [assertion/note\npre/post-condition]]
-  [
-    [`a.destroy(b);`]
-    []
-    [
-      From [link asio.reference.IoObjectService IoObjectService]
-      requirements. Implicitly cancels asynchronous wait operations, as if by
-      calling `a.cancel(b, e)`.
-    ]
-  ]
-  [
-    [``
-      a.cancel(b, e);
-    ``]
-    [`size_t`]
-    [
-      Causes any outstanding asynchronous wait operations to complete as soon
-      as possible. Handlers for cancelled operations shall be passed the error
-      code `error::operation_aborted`. Sets `e` to indicate success or failure.
-      Returns the number of operations that were cancelled.
-    ]
-  ]
-  [
-    [`a.expiry(b);`]
-    [`Clock::time_point`]
-    []
-  ]
-  [
-    [``
-      a.expires_at(b, t, e);
-    ``]
-    [`size_t`]
-    [
-      Implicitly cancels asynchronous wait operations, as if by calling
-      `a.cancel(b, e)`. Returns the number of operations that were cancelled.\n
-      post: `a.expires_at(b) == t`.
-    ]
-  ]
-  [
-    [``
-      a.expires_after(b, d, e);
-    ``]
-    [`size_t`]
-    [
-      Equivalent to `a.expires_at(b, Clock::now() + d, e)`.
-    ]
-  ]
-  [
-    [``
-      a.wait(b, e);
-    ``]
-    [`error_code`]
-    [
-      Sets `e` to indicate success or failure. Returns `e`.\n
-      post: `!!e || !(Clock::now() < a.expires_at(b))`.
-    ]
-  ]
-  [
-    [``
-      a.async_wait(b, h);
-    ``]
-    []
-    [
-      Initiates an asynchronous wait operation that is performed via the
-      `io_service` object `a.get_io_service()` and behaves according to [link
-      asio.reference.asynchronous_operations asynchronous operation]
-      requirements.\n
-      \n
-      The handler shall be posted for execution only if the condition
-      `!!ec || !(Clock::now() < a.expires_at(b))`
-      holds, where `ec` is the error code to be passed to the handler.
-    ]
-  ]
-]
-
-[endsect]
diff --git a/asio/src/doc/requirements/WriteHandler.qbk b/asio/src/doc/requirements/WriteHandler.qbk
index e70026c..29987ad 100644
--- a/asio/src/doc/requirements/WriteHandler.qbk
+++ b/asio/src/doc/requirements/WriteHandler.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/requirements/asynchronous_operations.qbk b/asio/src/doc/requirements/asynchronous_operations.qbk
index a0f6623..40ccccf 100644
--- a/asio/src/doc/requirements/asynchronous_operations.qbk
+++ b/asio/src/doc/requirements/asynchronous_operations.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,211 +7,275 @@
 
 [section:asynchronous_operations Requirements on asynchronous operations]
 
-In Asio, an asynchronous operation is initiated by a function that is
-named with the prefix `async_`. These functions will be referred to as
-['initiating functions].
+This section uses the names `Alloc1`, `Alloc2`, `alloc1`, `alloc2`, `Args`,
+`CompletionHandler`, `completion_handler`, `Executor1`, `Executor2`, `ex1`,
+`ex2`, `f`, [^['i]], [^['N]], `Signature`, `token`, [^T[sub ['i]]], [^t[sub
+['i]]], `work1`, and `work2` as placeholders for specifying the requirements
+below.
 
-All initiating functions in Asio take a function object meeting [link
-asio.reference.Handler handler] requirements as the final parameter.
-These handlers accept as their first parameter an lvalue of type `const
-error_code`.
+[section General asynchronous operation concepts]
 
-Implementations of asynchronous operations in Asio may call the
-application programming interface (API) provided by the operating system. If
-such an operating system API call results in an error, the handler will be
-invoked with a `const error_code` lvalue that evaluates to true. Otherwise the
-handler will be invoked with a `const error_code` lvalue that evaluates to
-false.
+An ['initiating function] is a function which may be called to start an
+asynchronous operation. A ['completion handler] is a function object that will
+be invoked, at most once, with the result of the asynchronous operation.
 
-Unless otherwise noted, when the behaviour of an asynchronous operation is
-defined "as if" implemented by a __POSIX__ function, the handler will be
-invoked with a value of type `error_code` that corresponds to the failure
-condition described by __POSIX__ for that function, if any. Otherwise the
-handler will be invoked with an implementation-defined `error_code` value that
-reflects the operating system error.
+The lifecycle of an asynchronous operation is comprised of the following events
+and phases:
 
-Asynchronous operations will not fail with an error condition that indicates
-interruption by a signal (__POSIX__ `EINTR`). Asynchronous operations will not
-fail with any error condition associated with non-blocking operations
-(__POSIX__ `EWOULDBLOCK`, `EAGAIN` or `EINPROGRESS`; __Windows__
-`WSAEWOULDBLOCK` or `WSAEINPROGRESS`).
+[mdash] Event 1: The asynchronous operation is started by a call to the
+initiating function.
 
-All asynchronous operations have an associated `io_service` object. Where the
-initiating function is a member function, the associated `io_service` is that
-returned by the `get_io_service()` member function on the same object. Where the
-initiating function is not a member function, the associated `io_service` is
-that returned by the `get_io_service()` member function of the first argument to
-the initiating function.
+[mdash] Phase 1: The asynchronous operation is now ['outstanding].
 
-Arguments to initiating functions will be treated as follows:
+[mdash] Event 2: The externally observable side effects of the asynchronous
+operation, if any, are fully established. The completion handler is submitted
+to an executor.
 
-[mdash] If the parameter is declared as a const reference or by-value, the
-program is not required to guarantee the validity of the argument after the
-initiating function completes. The implementation may make copies of the
-argument, and all copies will be destroyed no later than immediately after
-invocation of the handler.
+[mdash] Phase 2: The asynchronous operation is now ['completed].
 
-[mdash] If the parameter is declared as a non-const reference, const pointer or
-non-const pointer, the program must guarantee the validity of the argument
-until the handler is invoked.
-
-The library implementation is only permitted to make calls to an initiating
-function's arguments' copy constructors or destructors from a thread that
-satisfies one of the following conditions:
-
-[mdash] The thread is executing any member function of the associated
-`io_service` object.
-
-[mdash] The thread is executing the destructor of the associated `io_service`
-object.
-
-[mdash] The thread is executing one of the `io_service` service access
-functions `use_service`, `add_service` or `has_service`, where the first
-argument is the associated `io_service` object.
-
-[mdash] The thread is executing any member function, constructor or destructor
-of an object of a class defined in this clause, where the object's
-`get_io_service()` member function returns the associated `io_service` object.
-
-[mdash] The thread is executing any function defined in this clause, where any
-argument to the function has an `get_io_service()` member function that returns
-the associated `io_service` object.
-
-[blurb Asio may use one or more hidden threads to emulate asynchronous
-functionality. The above requirements are intended to prevent these hidden
-threads from making calls to program code. This means that a program can, for
-example, use thread-unsafe reference counting in handler objects, provided the
-program ensures that all calls to an `io_service` and related objects occur
-from the one thread.]
-
-The `io_service` object associated with an asynchronous operation will have
-unfinished work, as if by maintaining the existence of one or more objects of
-class `io_service::work` constructed using the `io_service`, until immediately
-after the handler for the asynchronous operation has been invoked.
-
-When an asynchronous operation is complete, the handler for the operation will
-be invoked as if by:
-
-# Constructing a bound completion handler `bch` for the handler, as described
-  below.
-
-# Calling `ios.post(bch)` to schedule the handler for deferred invocation,
-  where `ios` is the associated `io_service`.
-
-This implies that the handler must not be called directly from within
-the initiating function, even if the asynchronous operation completes
-immediately.
-
-A bound completion handler is a handler object that contains a copy of a
-user-supplied handler, where the user-supplied handler accepts one or more
-arguments. The bound completion handler does not accept any arguments, and
-contains values to be passed as arguments to the user-supplied handler. The
-bound completion handler forwards the `asio_handler_allocate()`,
-`asio_handler_deallocate()`, and `asio_handler_invoke()` calls to the
-corresponding functions for the user-supplied handler. A bound completion
-handler meets the requirements for a [link
-asio.reference.CompletionHandler completion handler].
-
-For example, a bound completion handler for a `ReadHandler` may be implemented
-as follows:
-
-  template<class ReadHandler>
-  struct bound_read_handler
-  {
-    bound_read_handler(ReadHandler handler, const error_code& ec, size_t s)
-      : handler_(handler), ec_(ec), s_(s)
-    {
-    }
-
-    void operator()()
-    {
-      handler_(ec_, s_);
-    }
-
-    ReadHandler handler_;
-    const error_code ec_;
-    const size_t s_;
-  };
-
-  template<class ReadHandler>
-  void* asio_handler_allocate(size_t size,
-                              bound_read_handler<ReadHandler>* this_handler)
-  {
-    using asio::asio_handler_allocate;
-    return asio_handler_allocate(size, &this_handler->handler_);
-  }
-
-  template<class ReadHandler>
-  void asio_handler_deallocate(void* pointer, std::size_t size,
-                               bound_read_handler<ReadHandler>* this_handler)
-  {
-    using asio::asio_handler_deallocate;
-    asio_handler_deallocate(pointer, size, &this_handler->handler_);
-  }
-
-  template<class F, class ReadHandler>
-  void asio_handler_invoke(const F& f,
-                           bound_read_handler<ReadHandler>* this_handler)
-  {
-    using asio::asio_handler_invoke;
-    asio_handler_invoke(f, &this_handler->handler_);
-  }
-
-If the thread that initiates an asynchronous operation terminates before the
-associated handler is invoked, the behaviour is implementation-defined.
-Specifically, on __Windows__ versions prior to Vista, unfinished operations are
-cancelled when the initiating thread exits.
-
-The handler argument to an initiating function defines a handler identity. That
-is, the original handler argument and any copies of the handler argument will
-be considered equivalent. If the implementation needs to allocate storage for
-an asynchronous operation, the implementation will perform
-`asio_handler_allocate(size, &h)`, where `size` is the required size in bytes,
-and `h` is the handler. The implementation will perform
-`asio_handler_deallocate(p, size, &h)`, where `p` is a pointer to the storage,
-to deallocate the storage prior to the invocation of the handler via
-`asio_handler_invoke`. Multiple storage blocks may be allocated for a single
+[mdash] Event 3: The completion handler is called with the result of the
 asynchronous operation.
 
-[heading Return type of an initiating function]
+In this library, all functions with the prefix `async_` are initiating
+functions.
 
-By default, initiating functions return `void`. This is always the case when
-the handler is a function pointer, C++11 lambda, or a function object produced
-by `boost::bind` or `std::bind`.
+[endsect]
 
-For other types, the return type may be customised via a two-step process:
+[section:completion_token Completion tokens and handlers]
 
-# A specialisation of the [link asio.reference.handler_type `handler_type`]
-template, which is used to determine the true handler type based on the
-asynchronous operation's handler's signature.
+Initiating functions:
 
-# A specialisation of the [link asio.reference.async_result `async_result`]
-template, which is used both to determine the return type and to extract the
-return value from the handler.
+[mdash] are function templates with template parameter `CompletionToken`;
 
-These two templates have been specialised to provide support for [link
-asio.overview.core.spawn stackful coroutines] and the C++11 `std::future`
-class.
+[mdash] accept, as the final parameter, a ['completion token] object `token`
+of type `CompletionToken`;
 
-As an example, consider what happens when enabling `std::future` support by
-using the `asio::use_future` special value, as in:
+[mdash] specify a ['completion signature], which is a call signature (C++Std
+[func.def]) `Signature` that determines the arguments to the completion
+handler.
 
-  std::future<std::size_t> length =
-    my_socket.async_read_some(my_buffer, asio::use_future);
+An initiating function determines the type `CompletionHandler` of its
+completion handler function object by performing `typename
+async_result<decay_t<CompletionToken>, Signature>::completion_handler_type`.
+The completion handler object `completion_handler` is initialized with
+`forward<CompletionToken>(token)`. [inline_note No other requirements are
+placed on the type `CompletionToken`.]
 
-When a handler signature has the form:
+The type `CompletionHandler` must satisfy the requirements of `Destructible`
+(C++Std [destructible]) and `MoveConstructible` (C++Std
+[moveconstructible]), and be callable with the specified call signature.
 
-  void handler(error_code ec, result_type result);
+In this library, all initiating functions specify a ['Completion signature]
+element that defines the call signature `Signature`. The ['Completion
+signature] elements in this Technical Specification have named parameters, and
+the results of an asynchronous operation are specified in terms of these names.
 
-the initiating function returns a `std::future` templated on `result_type`. In
-the above `async_read_some` example, this is `std::size_t`. If the asynchronous
-operation fails, the `error_code` is converted into a `system_error` exception
-and passed back to the caller through the future.
+[endsect]
 
-Where a handler signature has the form:
+[section Automatic deduction of initiating function return type]
 
-  void handler(error_code ec);
+The return type of an initiating function is `typename
+async_result<decay_t<CompletionToken>, Signature>::return_type`.
 
-the initiating function instead returns `std::future<void>`.
+For the sake of exposition, this library sometimes annotates functions with a
+return type ['[^DEDUCED]]. For every function declaration that returns
+['[^DEDUCED]], the meaning is equivalent to specifying the return type as
+`typename async_result<decay_t<CompletionToken>, Signature>::return_type`.
+
+[endsect]
+
+[section Production of initiating function return value]
+
+An initiating function produces its return type as follows:
+
+[mdash] constructing an object `result` of type
+`async_result<decay_t<CompletionToken>, Signature>`, initialized as
+`result(completion_handler)`; and
+
+[mdash] using `result.get()` as the operand of the return statement.
+
+\[['Example:] Given an asynchronous operation with ['Completion signature]
+`void(R1 r1, R2 r2)`, an initiating function meeting these requirements may be
+implemented as follows:
+
+  template<class CompletionToken>
+  auto async_xyz(T1 t1, T2 t2, CompletionToken&& token)
+  {
+    typename async_result<decay_t<CompletionToken>, void(R1, R2)>::completion_handler_type
+      completion_handler(forward<CompletionToken>(token));
+
+    async_result<decay_t<CompletionToken>, void(R1, R2)> result(completion_handler);
+
+    // initiate the operation and cause completion_handler to be invoked with
+    // the result
+
+    return result.get();
+  }
+
+For convenience, initiating functions may be implemented using the
+`async_completion` template:
+
+  template<class CompletionToken>
+  auto async_xyz(T1 t1, T2 t2, CompletionToken&& token)
+  {
+    async_completion<CompletionToken, void(R1, R2)> init(token);
+
+    // initiate the operation and cause init.completion_handler to be invoked
+    // with the result
+
+    return init.result.get();
+  }
+
+'''&mdash;'''['end example]\]
+
+[endsect]
+
+[section Lifetime of initiating function arguments]
+
+Unless otherwise specified, the lifetime of arguments to initiating functions
+shall be treated as follows:
+
+[mdash] If the parameter has a pointer type or has a type of lvalue reference
+to non-const, the implementation may assume the validity of the pointee or
+referent, respectively, until the completion handler is invoked. [inline_note
+In other words, the program must guarantee the validity of the argument until
+the completion handler is invoked.]
+
+[mdash] Otherwise, the implementation must not assume the validity of the
+argument after the initiating function completes. [inline_note In other words,
+the program is not required to guarantee the validity of the argument after the
+initiating function completes.] The implementation may make copies of the
+argument, and all copies shall be destroyed no later than immediately after
+invocation of the completion handler.
+
+[endsect]
+
+[section Non-blocking requirements on initiating functions]
+
+An initiating function shall not block (C++Std [defns.block]) the calling
+thread pending completion of the outstanding operation.
+
+[std_note Initiating functions may still block the calling thread for other
+reasons. For example, an initiating function may lock a mutex in order to
+synchronize access to shared data.]
+
+[endsect]
+
+[section Associated executor]
+
+Certain objects that participate in asynchronous operations have an
+['associated executor]. These are obtained as specified below.
+
+[endsect]
+
+[section I/O executor]
+
+An asynchronous operation has an associated executor satisfying the [link
+asio.reference.Executor1 `Executor`] requirements. If not otherwise specified by
+the asynchronous operation, this associated executor is an object of type
+`system_executor`.
+
+All asynchronous operations in this library have an associated executor object
+that is determined as follows:
+
+[mdash] If the initiating function is a member function, the associated
+executor is that returned by the `get_executor` member function on the same
+object.
+
+[mdash] If the initiating function is not a member function, the associated
+executor is that returned by the `get_executor` member function of the first
+argument to the initiating function.
+
+Let `Executor1` be the type of the associated executor. Let `ex1` be a value of
+type `Executor1`, representing the associated executor object obtained as
+described above.
+
+[endsect]
+
+[section Completion handler executor]
+
+A completion handler object of type `CompletionHandler` has an associated
+executor of type `Executor2` satisfying the [link asio.reference.Executor1
+Executor requirements]. The type `Executor2` is
+`associated_executor_t<CompletionHandler, Executor1>`. Let `ex2` be a value of
+type `Executor2` obtained by performing
+`get_associated_executor(completion_handler, ex1)`.
+
+[endsect]
+
+[section Outstanding work]
+
+Until the asynchronous operation has completed, the asynchronous operation
+shall maintain:
+
+[mdash] an object `work1` of type `executor_work_guard<Executor1>`, initialized
+as `work1(ex1)`, and where `work1.owns_work() == true`; and
+
+[mdash] an object `work2` of type `executor_work_guard<Executor2>`, initialized
+as `work2(ex2)`, and where `work2.owns_work() == true`.
+
+[endsect]
+
+[section Allocation of intermediate storage]
+
+Asynchronous operations may allocate memory. [inline_note Such as a data
+structure to store copies of the `completion_handler` object and the initiating
+function's arguments.]
+
+Let `Alloc1` be a type, satisfying the [link asio.reference.ProtoAllocator
+`ProtoAllocator`] requirements, that represents the asynchronous operation's
+default allocation strategy. [inline_note Typically `std::allocator<void>`.]
+Let `alloc1` be a value of type `Alloc1`.
+
+A completion handler object of type `CompletionHandler` has an associated
+allocator object `alloc2` of type `Alloc2` satisfying the [link
+asio.reference.ProtoAllocator `ProtoAllocator`] requirements. The type `Alloc2`
+is `associated_allocator_t<CompletionHandler, Alloc1>`. Let `alloc2` be a value
+of type `Alloc2` obtained by performing
+`get_associated_allocator(completion_handler, alloc1)`.
+
+The asynchronous operations defined in this library:
+
+[mdash] If required, allocate memory using only the completion handler's
+associated allocator.
+
+[mdash] Prior to completion handler execution, deallocate any memory allocated
+using the completion handler's associated allocator.
+
+[std_note The implementation may perform operating system or underlying API
+calls that perform memory allocations not using the associated allocator.
+Invocations of the allocator functions may not introduce data races (See C++Std
+\[res.on.data.races\]).]
+
+[endsect]
+
+[section Execution of completion handler on completion of asynchronous operation]
+
+Let `Args...` be the argument types of the completion signature `Signature` and
+let [^['N]] be `sizeof...(Args)`. Let [^['i]] be in the range [half_open_range
+`0`,[^['N]]]. Let [^T[sub ['i]]] be the [^['i]]th type in `Args...` and let
+[^t[sub ['i]]] be the [^['i]]th completion handler argument associated with
+[^T[sub ['i]]].
+
+Let `f` be a function object, callable as `f()`, that invokes
+`completion_handler` as if by [^completion_handler(forward<T[sub ['0]]>(t[sub
+['0]]), ..., forward<T[sub ['N-1]]>(t[sub ['N-1]]))].
+
+If an asynchonous operation completes immediately (that is, within the thread
+of execution calling the initiating function, and before the initiating
+function returns), the completion handler shall be submitted for execution as
+if by performing `ex2.post(std::move(f), alloc2)`. Otherwise, the completion
+handler shall be submitted for execution as if by performing
+`ex2.dispatch(std::move(f), alloc2)`.
+
+[endsect]
+
+[section Completion handlers and exceptions]
+
+Completion handlers are permitted to throw exceptions. The effect of any
+exception propagated from the execution of a completion handler is determined
+by the executor which is executing the completion handler.
+
+[endsect]
 
 [endsect]
diff --git a/asio/src/doc/requirements/asynchronous_socket_operations.qbk b/asio/src/doc/requirements/asynchronous_socket_operations.qbk
new file mode 100644
index 0000000..c055528
--- /dev/null
+++ b/asio/src/doc/requirements/asynchronous_socket_operations.qbk
@@ -0,0 +1,39 @@
+[/
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ /
+ / Distributed under the Boost Software License, Version 1.0. (See accompanying
+ / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ /]
+
+[section:asynchronous_socket_operations Requirements on asynchronous socket operations]
+
+In this library, ['asynchronous socket operations] are those member functions
+having prefix `async_`.
+
+For an object `s`, a program may initiate asynchronous socket operations such
+that there are multiple simultaneously outstanding asynchronous operations.
+
+When there are multiple outstanding asynchronous [link
+asio.reference.read_write_operations read operations] on `s`:
+
+[mdash] having no argument `flags` of type `socket_base::message_flags`, or
+
+[mdash] having an argument `flags` of type `socket_base::message_flags` but
+where `(flags & socket_base::message_out_of_band) == 0`
+
+then the `buffers` are filled in the order in which these operations were
+issued. The order of invocation of the completion handlers for these operations
+is unspecified.
+
+When there are multiple outstanding asynchronous [link
+asio.reference.read_write_operations read operations] on `s` having an argument
+`flags` of type `socket_base::message_flags` where `(flags &
+socket_base::message_out_of_band) != 0` then the `buffers` are filled in the
+order in which these operations were issued.
+
+When there are multiple outstanding asynchronous [link
+asio.reference.read_write_operations write operations] on `s`, the `buffers`
+are transmitted in the order in which these operations were issued. The order
+of invocation of the completion handlers for these operations is unspecified.
+
+[endsect]
diff --git a/asio/src/doc/requirements/read_write_operations.qbk b/asio/src/doc/requirements/read_write_operations.qbk
new file mode 100644
index 0000000..d7185a9
--- /dev/null
+++ b/asio/src/doc/requirements/read_write_operations.qbk
@@ -0,0 +1,34 @@
+[/
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ /
+ / Distributed under the Boost Software License, Version 1.0. (See accompanying
+ / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ /]
+
+[section:read_write_operations Requirements on read and write operations]
+
+A ['read operation] is an operation that reads data into a mutable buffer
+sequence argument of a type meeting [link asio.reference.MutableBufferSequence
+`MutableBufferSequence`] requirements. The mutable buffer sequence specifies
+memory where the data should be placed. A read operation shall always fill a
+buffer in the sequence completely before proceeding to the next.
+
+A ['write operation] is an operation that writes data from a constant buffer
+sequence argument of a type meeting [link asio.reference.ConstBufferSequence
+`ConstBufferSequence`] requirements. The constant buffer sequence specifies
+memory where the data to be written is located. A write operation shall always
+write a buffer in the sequence completely before proceeding to the next.
+
+If a read or write operation is also an [link
+asio.reference.asynchronous_operations asynchronous operation], the operation
+shall maintain one or more copies of the buffer sequence until such time as the
+operation no longer requires access to the memory specified by the buffers in
+the sequence. The program shall ensure the memory remains valid until:
+
+[mdash] the last copy of the buffer sequence is destroyed, or
+
+[mdash] the completion handler for the asynchronous operation is invoked,
+
+whichever comes first.
+
+[endsect]
diff --git a/asio/src/doc/requirements/synchronous_socket_operations.qbk b/asio/src/doc/requirements/synchronous_socket_operations.qbk
new file mode 100644
index 0000000..e6d5250
--- /dev/null
+++ b/asio/src/doc/requirements/synchronous_socket_operations.qbk
@@ -0,0 +1,37 @@
+[/
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ /
+ / Distributed under the Boost Software License, Version 1.0. (See accompanying
+ / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ /]
+
+[section:synchronous_socket_operations Requirements on synchronous socket operations]
+
+In this section, ['synchronous socket operations] are those member functions
+specified as two overloads, with and without an argument of type `error_code&`:
+
+  ``[*['R f]]``(``['[*A1]]`` a1, ``['[*A2]]`` a2, ..., ``['[*AN]]`` aN);
+  ``[*['R f]]``(``['[*A1]]`` a1, ``['[*A2]]`` a2, ..., ``['[*AN]]`` aN, error_code& ec);
+
+For an object `s`, the conditions under which its synchronous socket operations
+may block the calling thread (C++Std [defns.block]) are determined as follows.
+
+If:
+
+[mdash] `s.non_blocking() == true`,
+
+[mdash] the synchronous socket operation is specified in terms of a __POSIX__
+function other than `__poll__`,
+
+[mdash] that __POSIX__ function lists `EWOULDBLOCK` or `EAGAIN`
+in its failure conditions, and
+
+[mdash] the effects of the operation cannot be established immediately
+
+then the synchronous socket operation shall not block the calling thread.
+[inline_note And the effects of the operation are not established.]
+
+Otherwise, the synchronous socket operation shall block the calling thread
+until the effects are established.
+
+[endsect]
diff --git a/asio/src/doc/tutorial.qbk b/asio/src/doc/tutorial.qbk
index be3a2c7..e68c936 100644
--- a/asio/src/doc/tutorial.qbk
+++ b/asio/src/doc/tutorial.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -129,7 +129,7 @@
   ``''''''``// timer.cpp
   ``''''''``// ~~~~~~~~~
   ``''''''``//
-  ``''''''``// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  ``''''''``// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
   ``''''''``//
   ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying
   ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -196,13 +196,13 @@
 
 
 
-Finally, we must call the asio::io\_service::run() member function on the io\_service object.
+Finally, we must call the [link asio.reference.io_context.run io_service::run()] member function on the io\_service object.
 
-The asio library provides a guarantee that callback handlers will only be called from threads that are currently calling asio::io\_service::run(). Therefore unless the asio::io\_service::run() function is called the callback for the asynchronous wait completion will never be invoked.
+The asio library provides a guarantee that callback handlers will only be called from threads that are currently calling [link asio.reference.io_context.run io_service::run()]. Therefore unless the [link asio.reference.io_context.run io_service::run()] function is called the callback for the asynchronous wait completion will never be invoked.
 
-The asio::io\_service::run() function will also continue to run while there is still "work" to do. In this example, the work is the asynchronous wait on the timer, so the call will not return until the timer has expired and the callback has completed.
+The [link asio.reference.io_context.run io_service::run()] function will also continue to run while there is still "work" to do. In this example, the work is the asynchronous wait on the timer, so the call will not return until the timer has expired and the callback has completed.
 
-It is important to remember to give the io\_service some work to do before calling asio::io\_service::run(). For example, if we had omitted the above call to [link asio.reference.basic_deadline_timer.async_wait deadline_timer::async_wait()], the io\_service would not have had any work to do, and consequently asio::io\_service::run() would have returned immediately.
+It is important to remember to give the io\_service some work to do before calling [link asio.reference.io_context.run io_service::run()]. For example, if we had omitted the above call to [link asio.reference.basic_deadline_timer.async_wait deadline_timer::async_wait()], the io\_service would not have had any work to do, and consequently [link asio.reference.io_context.run io_service::run()] would have returned immediately.
 
 
   ``''''''``  io.run();
@@ -229,7 +229,7 @@
   ``''''''``// timer.cpp
   ``''''''``// ~~~~~~~~~
   ``''''''``//
-  ``''''''``// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  ``''''''``// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
   ``''''''``//
   ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying
   ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -294,7 +294,7 @@
 
 
 
-As mentioned above, this tutorial program uses a counter to stop running when the timer fires for the sixth time. However you will observe that there is no explicit call to ask the io\_service to stop. Recall that in tutorial Timer.2 we learnt that the asio::io\_service::run() function completes when there is no more "work" to do. By not starting a new asynchronous wait on the timer when `count` reaches 5, the io\_service will run out of work and stop running.
+As mentioned above, this tutorial program uses a counter to stop running when the timer fires for the sixth time. However you will observe that there is no explicit call to ask the io\_service to stop. Recall that in tutorial Timer.2 we learnt that the [link asio.reference.io_context.run io_service::run()] function completes when there is no more "work" to do. By not starting a new asynchronous wait on the timer when `count` reaches 5, the io\_service will run out of work and stop running.
 
 
   ``''''''``  if (*count < 5)
@@ -357,7 +357,7 @@
   ``''''''``// timer.cpp
   ``''''''``// ~~~~~~~~~
   ``''''''``//
-  ``''''''``// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  ``''''''``// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
   ``''''''``//
   ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying
   ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -518,7 +518,7 @@
   ``''''''``// timer.cpp
   ``''''''``// ~~~~~~~~~
   ``''''''``//
-  ``''''''``// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  ``''''''``// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
   ``''''''``//
   ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying
   ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -580,7 +580,7 @@
 
 This tutorial demonstrates the use of the asio::io\_service::strand class to synchronise callback handlers in a multithreaded program.
 
-The previous four tutorials avoided the issue of handler synchronisation by calling the asio::io\_service::run() function from one thread only. As you already know, the asio library provides a guarantee that callback handlers will only be called from threads that are currently calling asio::io\_service::run(). Consequently, calling asio::io\_service::run() from only one thread ensures that callback handlers cannot run concurrently.
+The previous four tutorials avoided the issue of handler synchronisation by calling the [link asio.reference.io_context.run io_service::run()] function from one thread only. As you already know, the asio library provides a guarantee that callback handlers will only be called from threads that are currently calling [link asio.reference.io_context.run io_service::run()]. Consequently, calling [link asio.reference.io_context.run io_service::run()] from only one thread ensures that callback handlers cannot run concurrently.
 
 The single threaded approach is usually the best place to start when developing applications using asio. The downside is the limitations it places on programs, particularly servers, including:
 
@@ -592,7 +592,7 @@
 
 
 
-If you find yourself running into these limitations, an alternative approach is to have a pool of threads calling asio::io\_service::run(). However, as this allows handlers to execute concurrently, we need a method of synchronisation when handlers might be accessing a shared, thread-unsafe resource.
+If you find yourself running into these limitations, an alternative approach is to have a pool of threads calling [link asio.reference.io_context.run io_service::run()]. However, as this allows handlers to execute concurrently, we need a method of synchronisation when handlers might be accessing a shared, thread-unsafe resource.
 
 
 
@@ -618,7 +618,7 @@
 
 In addition to initialising a pair of asio::deadline\_timer members, the constructor initialises the `strand_` member, an object of type asio::io\_service::strand.
 
-An asio::io\_service::strand is an executor that guarantees that, for those handlers that are dispatched through it, an executing handler will be allowed to complete before the next one is started. This is guaranteed irrespective of the number of threads that are calling asio::io\_service::run(). Of course, the handlers may still execute concurrently with other handlers that were not dispatched through an asio::io\_service::strand, or were dispatched through a different asio::io\_service::strand object.
+An asio::io\_service::strand is an executor that guarantees that, for those handlers that are dispatched through it, an executing handler will be allowed to complete before the next one is started. This is guaranteed irrespective of the number of threads that are calling [link asio.reference.io_context.run io_service::run()]. Of course, the handlers may still execute concurrently with other handlers that were not dispatched through an asio::io\_service::strand, or were dispatched through a different asio::io\_service::strand object.
 
 
   ``''''''``  printer(asio::io_context& io)
@@ -688,10 +688,10 @@
 
 
 
-The `main` function now causes asio::io\_service::run() to be called from two threads: the main thread and one additional thread. This is accomplished using an 
+The `main` function now causes [link asio.reference.io_context.run io_service::run()] to be called from two threads: the main thread and one additional thread. This is accomplished using an 
 [link asio.reference.thread thread] object.
 
-Just as it would with a call from a single thread, concurrent calls to asio::io\_service::run() will continue to execute while there is "work" left to do. The background thread will not exit until all asynchronous operations have completed.
+Just as it would with a call from a single thread, concurrent calls to [link asio.reference.io_context.run io_service::run()] will continue to execute while there is "work" left to do. The background thread will not exit until all asynchronous operations have completed.
 
 
 
@@ -725,7 +725,7 @@
   ``''''''``// timer.cpp
   ``''''''``// ~~~~~~~~~
   ``''''''``//
-  ``''''''``// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  ``''''''``// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
   ``''''''``//
   ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying
   ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -909,7 +909,7 @@
   ``''''''``// client.cpp
   ``''''''``// ~~~~~~~~~~
   ``''''''``//
-  ``''''''``// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  ``''''''``// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
   ``''''''``//
   ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying
   ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -1034,7 +1034,7 @@
   ``''''''``// server.cpp
   ``''''''``// ~~~~~~~~~~
   ``''''''``//
-  ``''''''``// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  ``''''''``// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
   ``''''''``//
   ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying
   ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -1284,7 +1284,7 @@
   ``''''''``// server.cpp
   ``''''''``// ~~~~~~~~~~
   ``''''''``//
-  ``''''''``// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  ``''''''``// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
   ``''''''``//
   ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying
   ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -1468,7 +1468,7 @@
   ``''''''``// client.cpp
   ``''''''``// ~~~~~~~~~~
   ``''''''``//
-  ``''''''``// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  ``''''''``// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
   ``''''''``//
   ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying
   ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -1578,7 +1578,7 @@
   ``''''''``// server.cpp
   ``''''''``// ~~~~~~~~~~
   ``''''''``//
-  ``''''''``// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  ``''''''``// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
   ``''''''``//
   ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying
   ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -1794,7 +1794,7 @@
   ``''''''``// server.cpp
   ``''''''``// ~~~~~~~~~~
   ``''''''``//
-  ``''''''``// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  ``''''''``// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
   ``''''''``//
   ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying
   ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -2056,7 +2056,7 @@
   ``''''''``// server.cpp
   ``''''''``// ~~~~~~~~~~
   ``''''''``//
-  ``''''''``// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  ``''''''``// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
   ``''''''``//
   ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying
   ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/tutorial.xsl b/asio/src/doc/tutorial.xsl
index 21c9cb4..da9be49 100644
--- a/asio/src/doc/tutorial.xsl
+++ b/asio/src/doc/tutorial.xsl
@@ -2,7 +2,7 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
 <!--
-  Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+  Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
   Distributed under the Boost Software License, Version 1.0. (See accompanying
   file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -20,7 +20,7 @@
 
 <xsl:template match="/doxygen">
 <xsl:text>[/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/doc/using.qbk b/asio/src/doc/using.qbk
index 9e26a8d..b4bcb01 100644
--- a/asio/src/doc/using.qbk
+++ b/asio/src/doc/using.qbk
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+ / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/Makefile.am b/asio/src/examples/cpp03/Makefile.am
index 0540783..adacab8 100644
--- a/asio/src/examples/cpp03/Makefile.am
+++ b/asio/src/examples/cpp03/Makefile.am
@@ -88,8 +88,7 @@
 	chat/chat_message.hpp \
 	services/basic_logger.hpp \
 	services/logger.hpp \
-	services/logger_service.hpp \
-	services/stream_socket_service.hpp
+	services/logger_service.hpp
 
 AM_CXXFLAGS = -I$(srcdir)/../../../include
 
@@ -191,9 +190,9 @@
 
 if HAVE_BOOST_COROUTINE
 spawn_echo_server_SOURCES = spawn/echo_server.cpp
-spawn_echo_server_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_system
+spawn_echo_server_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
 spawn_parallel_grep_SOURCES = spawn/parallel_grep.cpp
-spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_system
+spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
 endif
 
 EXTRA_DIST = \
@@ -240,7 +239,6 @@
 	services/basic_logger.hpp \
 	services/logger.hpp \
 	services/logger_service.hpp \
-	services/stream_socket_service.hpp \
 	socks4/socks4.hpp \
 	ssl/README \
 	ssl/ca.pem \
diff --git a/asio/src/examples/cpp03/allocation/server.cpp b/asio/src/examples/cpp03/allocation/server.cpp
index e2af6e9..e26eb56 100644
--- a/asio/src/examples/cpp03/allocation/server.cpp
+++ b/asio/src/examples/cpp03/allocation/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/buffers/reference_counted.cpp b/asio/src/examples/cpp03/buffers/reference_counted.cpp
index 14b4a0b..9f7455c 100644
--- a/asio/src/examples/cpp03/buffers/reference_counted.cpp
+++ b/asio/src/examples/cpp03/buffers/reference_counted.cpp
@@ -2,7 +2,7 @@
 // reference_counted.cpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/chat/chat_client.cpp b/asio/src/examples/cpp03/chat/chat_client.cpp
index 1820341..9dd1614 100644
--- a/asio/src/examples/cpp03/chat/chat_client.cpp
+++ b/asio/src/examples/cpp03/chat/chat_client.cpp
@@ -2,7 +2,7 @@
 // chat_client.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/chat/chat_message.hpp b/asio/src/examples/cpp03/chat/chat_message.hpp
index 8f59270..ceeef2f 100644
--- a/asio/src/examples/cpp03/chat/chat_message.hpp
+++ b/asio/src/examples/cpp03/chat/chat_message.hpp
@@ -2,7 +2,7 @@
 // chat_message.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/chat/chat_server.cpp b/asio/src/examples/cpp03/chat/chat_server.cpp
index c5b4f6f..902515b 100644
--- a/asio/src/examples/cpp03/chat/chat_server.cpp
+++ b/asio/src/examples/cpp03/chat/chat_server.cpp
@@ -2,7 +2,7 @@
 // chat_server.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/chat/posix_chat_client.cpp b/asio/src/examples/cpp03/chat/posix_chat_client.cpp
index 9e7dea3..9142882 100644
--- a/asio/src/examples/cpp03/chat/posix_chat_client.cpp
+++ b/asio/src/examples/cpp03/chat/posix_chat_client.cpp
@@ -2,7 +2,7 @@
 // posix_chat_client.cpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/echo/async_tcp_echo_server.cpp b/asio/src/examples/cpp03/echo/async_tcp_echo_server.cpp
index bc93070..c26136e 100644
--- a/asio/src/examples/cpp03/echo/async_tcp_echo_server.cpp
+++ b/asio/src/examples/cpp03/echo/async_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
 // async_tcp_echo_server.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/echo/async_udp_echo_server.cpp b/asio/src/examples/cpp03/echo/async_udp_echo_server.cpp
index 64a4fa4..851c46b 100644
--- a/asio/src/examples/cpp03/echo/async_udp_echo_server.cpp
+++ b/asio/src/examples/cpp03/echo/async_udp_echo_server.cpp
@@ -2,7 +2,7 @@
 // async_udp_echo_server.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp b/asio/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp
index fa19c5d..224b9db 100644
--- a/asio/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp
+++ b/asio/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp
@@ -2,7 +2,7 @@
 // blocking_tcp_echo_client.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp b/asio/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp
index 6dd2f49..163dc2a 100644
--- a/asio/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp
+++ b/asio/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
 // blocking_tcp_echo_server.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/echo/blocking_udp_echo_client.cpp b/asio/src/examples/cpp03/echo/blocking_udp_echo_client.cpp
index fb3601e..ee90081 100644
--- a/asio/src/examples/cpp03/echo/blocking_udp_echo_client.cpp
+++ b/asio/src/examples/cpp03/echo/blocking_udp_echo_client.cpp
@@ -2,7 +2,7 @@
 // blocking_udp_echo_client.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/echo/blocking_udp_echo_server.cpp b/asio/src/examples/cpp03/echo/blocking_udp_echo_server.cpp
index f6b37d0..3cc364c 100644
--- a/asio/src/examples/cpp03/echo/blocking_udp_echo_server.cpp
+++ b/asio/src/examples/cpp03/echo/blocking_udp_echo_server.cpp
@@ -2,7 +2,7 @@
 // blocking_udp_echo_server.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/fork/daemon.cpp b/asio/src/examples/cpp03/fork/daemon.cpp
index e962548..06eef3d 100644
--- a/asio/src/examples/cpp03/fork/daemon.cpp
+++ b/asio/src/examples/cpp03/fork/daemon.cpp
@@ -2,7 +2,7 @@
 // daemon.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/fork/process_per_connection.cpp b/asio/src/examples/cpp03/fork/process_per_connection.cpp
index 1096370..483147e 100644
--- a/asio/src/examples/cpp03/fork/process_per_connection.cpp
+++ b/asio/src/examples/cpp03/fork/process_per_connection.cpp
@@ -2,7 +2,7 @@
 // process_per_connection.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/client/async_client.cpp b/asio/src/examples/cpp03/http/client/async_client.cpp
index 97890ba..83dcc36 100644
--- a/asio/src/examples/cpp03/http/client/async_client.cpp
+++ b/asio/src/examples/cpp03/http/client/async_client.cpp
@@ -2,7 +2,7 @@
 // async_client.cpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/client/sync_client.cpp b/asio/src/examples/cpp03/http/client/sync_client.cpp
index 5505fcf..a11b5c7 100644
--- a/asio/src/examples/cpp03/http/client/sync_client.cpp
+++ b/asio/src/examples/cpp03/http/client/sync_client.cpp
@@ -2,7 +2,7 @@
 // sync_client.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/doc_root/data_1K.html b/asio/src/examples/cpp03/http/doc_root/data_1K.html
index d319913..1372c4d 100644
--- a/asio/src/examples/cpp03/http/doc_root/data_1K.html
+++ b/asio/src/examples/cpp03/http/doc_root/data_1K.html
@@ -1,5 +1,5 @@
 <!--
-Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
 Distributed under the Boost Software License, Version 1.0. (See accompanying
 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/doc_root/data_2K.html b/asio/src/examples/cpp03/http/doc_root/data_2K.html
index 0703e2e..686ce52 100644
--- a/asio/src/examples/cpp03/http/doc_root/data_2K.html
+++ b/asio/src/examples/cpp03/http/doc_root/data_2K.html
@@ -1,5 +1,5 @@
 <!--
-Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
 Distributed under the Boost Software License, Version 1.0. (See accompanying
 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/doc_root/data_4K.html b/asio/src/examples/cpp03/http/doc_root/data_4K.html
index 52b1ab8..f5db0a2 100644
--- a/asio/src/examples/cpp03/http/doc_root/data_4K.html
+++ b/asio/src/examples/cpp03/http/doc_root/data_4K.html
@@ -1,5 +1,5 @@
 <!--
-Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
 Distributed under the Boost Software License, Version 1.0. (See accompanying
 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/doc_root/data_8K.html b/asio/src/examples/cpp03/http/doc_root/data_8K.html
index 1f373ef..0d42f72 100644
--- a/asio/src/examples/cpp03/http/doc_root/data_8K.html
+++ b/asio/src/examples/cpp03/http/doc_root/data_8K.html
@@ -1,5 +1,5 @@
 <!--
-Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
 Distributed under the Boost Software License, Version 1.0. (See accompanying
 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/connection.cpp b/asio/src/examples/cpp03/http/server/connection.cpp
index ab4fedb..acbf637 100644
--- a/asio/src/examples/cpp03/http/server/connection.cpp
+++ b/asio/src/examples/cpp03/http/server/connection.cpp
@@ -2,7 +2,7 @@
 // connection.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/connection.hpp b/asio/src/examples/cpp03/http/server/connection.hpp
index ff4ec42..6193b48 100644
--- a/asio/src/examples/cpp03/http/server/connection.hpp
+++ b/asio/src/examples/cpp03/http/server/connection.hpp
@@ -2,7 +2,7 @@
 // connection.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/connection_manager.cpp b/asio/src/examples/cpp03/http/server/connection_manager.cpp
index 3b0bfb1..8fc9d8f 100644
--- a/asio/src/examples/cpp03/http/server/connection_manager.cpp
+++ b/asio/src/examples/cpp03/http/server/connection_manager.cpp
@@ -2,7 +2,7 @@
 // connection_manager.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/connection_manager.hpp b/asio/src/examples/cpp03/http/server/connection_manager.hpp
index 0868014..e67653f 100644
--- a/asio/src/examples/cpp03/http/server/connection_manager.hpp
+++ b/asio/src/examples/cpp03/http/server/connection_manager.hpp
@@ -2,7 +2,7 @@
 // connection_manager.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/header.hpp b/asio/src/examples/cpp03/http/server/header.hpp
index 524097e..22e3c4a 100644
--- a/asio/src/examples/cpp03/http/server/header.hpp
+++ b/asio/src/examples/cpp03/http/server/header.hpp
@@ -2,7 +2,7 @@
 // header.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/main.cpp b/asio/src/examples/cpp03/http/server/main.cpp
index 4d2f556..32d6f54 100644
--- a/asio/src/examples/cpp03/http/server/main.cpp
+++ b/asio/src/examples/cpp03/http/server/main.cpp
@@ -2,7 +2,7 @@
 // main.cpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/mime_types.cpp b/asio/src/examples/cpp03/http/server/mime_types.cpp
index 05ee50c..80fdfe3 100644
--- a/asio/src/examples/cpp03/http/server/mime_types.cpp
+++ b/asio/src/examples/cpp03/http/server/mime_types.cpp
@@ -2,7 +2,7 @@
 // mime_types.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/mime_types.hpp b/asio/src/examples/cpp03/http/server/mime_types.hpp
index e5881f2..2fc0332 100644
--- a/asio/src/examples/cpp03/http/server/mime_types.hpp
+++ b/asio/src/examples/cpp03/http/server/mime_types.hpp
@@ -2,7 +2,7 @@
 // mime_types.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/reply.cpp b/asio/src/examples/cpp03/http/server/reply.cpp
index 19ac4bf..f3730d3 100644
--- a/asio/src/examples/cpp03/http/server/reply.cpp
+++ b/asio/src/examples/cpp03/http/server/reply.cpp
@@ -2,7 +2,7 @@
 // reply.cpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/reply.hpp b/asio/src/examples/cpp03/http/server/reply.hpp
index d8db838..5189ac4 100644
--- a/asio/src/examples/cpp03/http/server/reply.hpp
+++ b/asio/src/examples/cpp03/http/server/reply.hpp
@@ -2,7 +2,7 @@
 // reply.hpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/request.hpp b/asio/src/examples/cpp03/http/server/request.hpp
index 2a38f39..129a399 100644
--- a/asio/src/examples/cpp03/http/server/request.hpp
+++ b/asio/src/examples/cpp03/http/server/request.hpp
@@ -2,7 +2,7 @@
 // request.hpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/request_handler.cpp b/asio/src/examples/cpp03/http/server/request_handler.cpp
index e9cf1b0..1201ef1 100644
--- a/asio/src/examples/cpp03/http/server/request_handler.cpp
+++ b/asio/src/examples/cpp03/http/server/request_handler.cpp
@@ -2,7 +2,7 @@
 // request_handler.cpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/request_handler.hpp b/asio/src/examples/cpp03/http/server/request_handler.hpp
index 40f187e..56a16dd 100644
--- a/asio/src/examples/cpp03/http/server/request_handler.hpp
+++ b/asio/src/examples/cpp03/http/server/request_handler.hpp
@@ -2,7 +2,7 @@
 // request_handler.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/request_parser.cpp b/asio/src/examples/cpp03/http/server/request_parser.cpp
index 94598b8..80644ee 100644
--- a/asio/src/examples/cpp03/http/server/request_parser.cpp
+++ b/asio/src/examples/cpp03/http/server/request_parser.cpp
@@ -2,7 +2,7 @@
 // request_parser.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/request_parser.hpp b/asio/src/examples/cpp03/http/server/request_parser.hpp
index 9146779..d7da53c 100644
--- a/asio/src/examples/cpp03/http/server/request_parser.hpp
+++ b/asio/src/examples/cpp03/http/server/request_parser.hpp
@@ -2,7 +2,7 @@
 // request_parser.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/server.cpp b/asio/src/examples/cpp03/http/server/server.cpp
index c002856..89e19d0 100644
--- a/asio/src/examples/cpp03/http/server/server.cpp
+++ b/asio/src/examples/cpp03/http/server/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server/server.hpp b/asio/src/examples/cpp03/http/server/server.hpp
index 6c0b680..8b0b1a2 100644
--- a/asio/src/examples/cpp03/http/server/server.hpp
+++ b/asio/src/examples/cpp03/http/server/server.hpp
@@ -2,7 +2,7 @@
 // server.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/connection.cpp b/asio/src/examples/cpp03/http/server2/connection.cpp
index 51bf004..81f4a10 100644
--- a/asio/src/examples/cpp03/http/server2/connection.cpp
+++ b/asio/src/examples/cpp03/http/server2/connection.cpp
@@ -2,7 +2,7 @@
 // connection.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/connection.hpp b/asio/src/examples/cpp03/http/server2/connection.hpp
index 149a1ff..9c624a8 100644
--- a/asio/src/examples/cpp03/http/server2/connection.hpp
+++ b/asio/src/examples/cpp03/http/server2/connection.hpp
@@ -2,7 +2,7 @@
 // connection.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/header.hpp b/asio/src/examples/cpp03/http/server2/header.hpp
index b0bde07..0e44c55 100644
--- a/asio/src/examples/cpp03/http/server2/header.hpp
+++ b/asio/src/examples/cpp03/http/server2/header.hpp
@@ -2,7 +2,7 @@
 // header.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/io_context_pool.cpp b/asio/src/examples/cpp03/http/server2/io_context_pool.cpp
index 61d46e6..049ac98 100644
--- a/asio/src/examples/cpp03/http/server2/io_context_pool.cpp
+++ b/asio/src/examples/cpp03/http/server2/io_context_pool.cpp
@@ -2,7 +2,7 @@
 // io_context_pool.cpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -27,9 +27,8 @@
   for (std::size_t i = 0; i < pool_size; ++i)
   {
     io_context_ptr io_context(new asio::io_context);
-    work_ptr work(new asio::io_context::work(*io_context));
     io_contexts_.push_back(io_context);
-    work_.push_back(work);
+    work_.push_back(asio::make_work_guard(*io_context));
   }
 }
 
diff --git a/asio/src/examples/cpp03/http/server2/io_context_pool.hpp b/asio/src/examples/cpp03/http/server2/io_context_pool.hpp
index 300b675..6a573c5 100644
--- a/asio/src/examples/cpp03/http/server2/io_context_pool.hpp
+++ b/asio/src/examples/cpp03/http/server2/io_context_pool.hpp
@@ -2,7 +2,7 @@
 // io_context_pool.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -38,13 +38,14 @@
 
 private:
   typedef boost::shared_ptr<asio::io_context> io_context_ptr;
-  typedef boost::shared_ptr<asio::io_context::work> work_ptr;
+  typedef asio::executor_work_guard<
+    asio::io_context::executor_type> io_context_work;
 
   /// The pool of io_contexts.
   std::vector<io_context_ptr> io_contexts_;
 
   /// The work that keeps the io_contexts running.
-  std::vector<work_ptr> work_;
+  std::vector<io_context_work> work_;
 
   /// The next io_context to use for a connection.
   std::size_t next_io_context_;
diff --git a/asio/src/examples/cpp03/http/server2/main.cpp b/asio/src/examples/cpp03/http/server2/main.cpp
index 2788ceb..2d224c5 100644
--- a/asio/src/examples/cpp03/http/server2/main.cpp
+++ b/asio/src/examples/cpp03/http/server2/main.cpp
@@ -2,7 +2,7 @@
 // main.cpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/mime_types.cpp b/asio/src/examples/cpp03/http/server2/mime_types.cpp
index 11a47a6..640f3ae 100644
--- a/asio/src/examples/cpp03/http/server2/mime_types.cpp
+++ b/asio/src/examples/cpp03/http/server2/mime_types.cpp
@@ -2,7 +2,7 @@
 // mime_types.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/mime_types.hpp b/asio/src/examples/cpp03/http/server2/mime_types.hpp
index e33c0e5..57d1412 100644
--- a/asio/src/examples/cpp03/http/server2/mime_types.hpp
+++ b/asio/src/examples/cpp03/http/server2/mime_types.hpp
@@ -2,7 +2,7 @@
 // mime_types.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/reply.cpp b/asio/src/examples/cpp03/http/server2/reply.cpp
index f4ed5e2..958577b 100644
--- a/asio/src/examples/cpp03/http/server2/reply.cpp
+++ b/asio/src/examples/cpp03/http/server2/reply.cpp
@@ -2,7 +2,7 @@
 // reply.cpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/reply.hpp b/asio/src/examples/cpp03/http/server2/reply.hpp
index f1e7682..17f11e7 100644
--- a/asio/src/examples/cpp03/http/server2/reply.hpp
+++ b/asio/src/examples/cpp03/http/server2/reply.hpp
@@ -2,7 +2,7 @@
 // reply.hpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/request.hpp b/asio/src/examples/cpp03/http/server2/request.hpp
index 9e14fd2..39070ee 100644
--- a/asio/src/examples/cpp03/http/server2/request.hpp
+++ b/asio/src/examples/cpp03/http/server2/request.hpp
@@ -2,7 +2,7 @@
 // request.hpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/request_handler.cpp b/asio/src/examples/cpp03/http/server2/request_handler.cpp
index 62a638c..9369c10 100644
--- a/asio/src/examples/cpp03/http/server2/request_handler.cpp
+++ b/asio/src/examples/cpp03/http/server2/request_handler.cpp
@@ -2,7 +2,7 @@
 // request_handler.cpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/request_handler.hpp b/asio/src/examples/cpp03/http/server2/request_handler.hpp
index 3addf7b..8d24686 100644
--- a/asio/src/examples/cpp03/http/server2/request_handler.hpp
+++ b/asio/src/examples/cpp03/http/server2/request_handler.hpp
@@ -2,7 +2,7 @@
 // request_handler.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/request_parser.cpp b/asio/src/examples/cpp03/http/server2/request_parser.cpp
index d31e572..ae80b20 100644
--- a/asio/src/examples/cpp03/http/server2/request_parser.cpp
+++ b/asio/src/examples/cpp03/http/server2/request_parser.cpp
@@ -2,7 +2,7 @@
 // request_parser.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/request_parser.hpp b/asio/src/examples/cpp03/http/server2/request_parser.hpp
index 0426326..133a649 100644
--- a/asio/src/examples/cpp03/http/server2/request_parser.hpp
+++ b/asio/src/examples/cpp03/http/server2/request_parser.hpp
@@ -2,7 +2,7 @@
 // request_parser.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/server.cpp b/asio/src/examples/cpp03/http/server2/server.cpp
index 974a746..75d3a48 100644
--- a/asio/src/examples/cpp03/http/server2/server.cpp
+++ b/asio/src/examples/cpp03/http/server2/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server2/server.hpp b/asio/src/examples/cpp03/http/server2/server.hpp
index ca9fc03..6a742a8 100644
--- a/asio/src/examples/cpp03/http/server2/server.hpp
+++ b/asio/src/examples/cpp03/http/server2/server.hpp
@@ -2,7 +2,7 @@
 // server.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/connection.cpp b/asio/src/examples/cpp03/http/server3/connection.cpp
index 8b4d6e0..5db960a 100644
--- a/asio/src/examples/cpp03/http/server3/connection.cpp
+++ b/asio/src/examples/cpp03/http/server3/connection.cpp
@@ -2,7 +2,7 @@
 // connection.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/connection.hpp b/asio/src/examples/cpp03/http/server3/connection.hpp
index 9be2697..2aac1a5 100644
--- a/asio/src/examples/cpp03/http/server3/connection.hpp
+++ b/asio/src/examples/cpp03/http/server3/connection.hpp
@@ -2,7 +2,7 @@
 // connection.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/header.hpp b/asio/src/examples/cpp03/http/server3/header.hpp
index 004efb6..207c629 100644
--- a/asio/src/examples/cpp03/http/server3/header.hpp
+++ b/asio/src/examples/cpp03/http/server3/header.hpp
@@ -2,7 +2,7 @@
 // header.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/main.cpp b/asio/src/examples/cpp03/http/server3/main.cpp
index c626eb7..367efad 100644
--- a/asio/src/examples/cpp03/http/server3/main.cpp
+++ b/asio/src/examples/cpp03/http/server3/main.cpp
@@ -2,7 +2,7 @@
 // main.cpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/mime_types.cpp b/asio/src/examples/cpp03/http/server3/mime_types.cpp
index ee84fb9..0b0c66e 100644
--- a/asio/src/examples/cpp03/http/server3/mime_types.cpp
+++ b/asio/src/examples/cpp03/http/server3/mime_types.cpp
@@ -2,7 +2,7 @@
 // mime_types.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/mime_types.hpp b/asio/src/examples/cpp03/http/server3/mime_types.hpp
index 7945312..502766a 100644
--- a/asio/src/examples/cpp03/http/server3/mime_types.hpp
+++ b/asio/src/examples/cpp03/http/server3/mime_types.hpp
@@ -2,7 +2,7 @@
 // mime_types.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/reply.cpp b/asio/src/examples/cpp03/http/server3/reply.cpp
index 2976b73..79790a1 100644
--- a/asio/src/examples/cpp03/http/server3/reply.cpp
+++ b/asio/src/examples/cpp03/http/server3/reply.cpp
@@ -2,7 +2,7 @@
 // reply.cpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/reply.hpp b/asio/src/examples/cpp03/http/server3/reply.hpp
index 6067ad1..9b057ca 100644
--- a/asio/src/examples/cpp03/http/server3/reply.hpp
+++ b/asio/src/examples/cpp03/http/server3/reply.hpp
@@ -2,7 +2,7 @@
 // reply.hpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/request.hpp b/asio/src/examples/cpp03/http/server3/request.hpp
index 8b1eef7..a5b34e0 100644
--- a/asio/src/examples/cpp03/http/server3/request.hpp
+++ b/asio/src/examples/cpp03/http/server3/request.hpp
@@ -2,7 +2,7 @@
 // request.hpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/request_handler.cpp b/asio/src/examples/cpp03/http/server3/request_handler.cpp
index ffa4ac9..9feb1cf 100644
--- a/asio/src/examples/cpp03/http/server3/request_handler.cpp
+++ b/asio/src/examples/cpp03/http/server3/request_handler.cpp
@@ -2,7 +2,7 @@
 // request_handler.cpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/request_handler.hpp b/asio/src/examples/cpp03/http/server3/request_handler.hpp
index c635a01..bb94cad 100644
--- a/asio/src/examples/cpp03/http/server3/request_handler.hpp
+++ b/asio/src/examples/cpp03/http/server3/request_handler.hpp
@@ -2,7 +2,7 @@
 // request_handler.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/request_parser.cpp b/asio/src/examples/cpp03/http/server3/request_parser.cpp
index 8ab2ca9..98f9128 100644
--- a/asio/src/examples/cpp03/http/server3/request_parser.cpp
+++ b/asio/src/examples/cpp03/http/server3/request_parser.cpp
@@ -2,7 +2,7 @@
 // request_parser.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/request_parser.hpp b/asio/src/examples/cpp03/http/server3/request_parser.hpp
index 0795b27..b680eee 100644
--- a/asio/src/examples/cpp03/http/server3/request_parser.hpp
+++ b/asio/src/examples/cpp03/http/server3/request_parser.hpp
@@ -2,7 +2,7 @@
 // request_parser.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/server.cpp b/asio/src/examples/cpp03/http/server3/server.cpp
index 4bfddc4..2a78bc9 100644
--- a/asio/src/examples/cpp03/http/server3/server.cpp
+++ b/asio/src/examples/cpp03/http/server3/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server3/server.hpp b/asio/src/examples/cpp03/http/server3/server.hpp
index 7ef3e7e..c58c243 100644
--- a/asio/src/examples/cpp03/http/server3/server.hpp
+++ b/asio/src/examples/cpp03/http/server3/server.hpp
@@ -2,7 +2,7 @@
 // server.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/file_handler.cpp b/asio/src/examples/cpp03/http/server4/file_handler.cpp
index ece057e..a4ac912 100644
--- a/asio/src/examples/cpp03/http/server4/file_handler.cpp
+++ b/asio/src/examples/cpp03/http/server4/file_handler.cpp
@@ -2,7 +2,7 @@
 // file_handler.cpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/file_handler.hpp b/asio/src/examples/cpp03/http/server4/file_handler.hpp
index c4f3da2..22055db 100644
--- a/asio/src/examples/cpp03/http/server4/file_handler.hpp
+++ b/asio/src/examples/cpp03/http/server4/file_handler.hpp
@@ -2,7 +2,7 @@
 // file_handler.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/header.hpp b/asio/src/examples/cpp03/http/server4/header.hpp
index acf6290..9c9b89c 100644
--- a/asio/src/examples/cpp03/http/server4/header.hpp
+++ b/asio/src/examples/cpp03/http/server4/header.hpp
@@ -2,7 +2,7 @@
 // header.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/main.cpp b/asio/src/examples/cpp03/http/server4/main.cpp
index 80ccffb..0ebe535 100644
--- a/asio/src/examples/cpp03/http/server4/main.cpp
+++ b/asio/src/examples/cpp03/http/server4/main.cpp
@@ -2,7 +2,7 @@
 // main.cpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/mime_types.cpp b/asio/src/examples/cpp03/http/server4/mime_types.cpp
index 85b9ec5..903dffc 100644
--- a/asio/src/examples/cpp03/http/server4/mime_types.cpp
+++ b/asio/src/examples/cpp03/http/server4/mime_types.cpp
@@ -2,7 +2,7 @@
 // mime_types.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/mime_types.hpp b/asio/src/examples/cpp03/http/server4/mime_types.hpp
index b2c3b08..f702c6f 100644
--- a/asio/src/examples/cpp03/http/server4/mime_types.hpp
+++ b/asio/src/examples/cpp03/http/server4/mime_types.hpp
@@ -2,7 +2,7 @@
 // mime_types.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/reply.cpp b/asio/src/examples/cpp03/http/server4/reply.cpp
index b00aaeb..f508a46 100644
--- a/asio/src/examples/cpp03/http/server4/reply.cpp
+++ b/asio/src/examples/cpp03/http/server4/reply.cpp
@@ -2,7 +2,7 @@
 // reply.cpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/reply.hpp b/asio/src/examples/cpp03/http/server4/reply.hpp
index 9f035de..02743a5 100644
--- a/asio/src/examples/cpp03/http/server4/reply.hpp
+++ b/asio/src/examples/cpp03/http/server4/reply.hpp
@@ -2,7 +2,7 @@
 // reply.hpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/request.hpp b/asio/src/examples/cpp03/http/server4/request.hpp
index bf4ffe1..43947d7 100644
--- a/asio/src/examples/cpp03/http/server4/request.hpp
+++ b/asio/src/examples/cpp03/http/server4/request.hpp
@@ -2,7 +2,7 @@
 // request.hpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/request_parser.cpp b/asio/src/examples/cpp03/http/server4/request_parser.cpp
index d454a6f..0ec31ad 100644
--- a/asio/src/examples/cpp03/http/server4/request_parser.cpp
+++ b/asio/src/examples/cpp03/http/server4/request_parser.cpp
@@ -2,7 +2,7 @@
 // request_parser.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/request_parser.hpp b/asio/src/examples/cpp03/http/server4/request_parser.hpp
index 545ecb5..a61356e 100644
--- a/asio/src/examples/cpp03/http/server4/request_parser.hpp
+++ b/asio/src/examples/cpp03/http/server4/request_parser.hpp
@@ -2,7 +2,7 @@
 // request_parser.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/server.cpp b/asio/src/examples/cpp03/http/server4/server.cpp
index bcb8219..04d81a9 100644
--- a/asio/src/examples/cpp03/http/server4/server.cpp
+++ b/asio/src/examples/cpp03/http/server4/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/http/server4/server.hpp b/asio/src/examples/cpp03/http/server4/server.hpp
index 95aabe8..580ece5 100644
--- a/asio/src/examples/cpp03/http/server4/server.hpp
+++ b/asio/src/examples/cpp03/http/server4/server.hpp
@@ -2,7 +2,7 @@
 // server.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/icmp/icmp_header.hpp b/asio/src/examples/cpp03/icmp/icmp_header.hpp
index 2e4d789..3b7b4bf 100644
--- a/asio/src/examples/cpp03/icmp/icmp_header.hpp
+++ b/asio/src/examples/cpp03/icmp/icmp_header.hpp
@@ -2,7 +2,7 @@
 // icmp_header.hpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/icmp/ipv4_header.hpp b/asio/src/examples/cpp03/icmp/ipv4_header.hpp
index ade9eb8..6785fd7 100644
--- a/asio/src/examples/cpp03/icmp/ipv4_header.hpp
+++ b/asio/src/examples/cpp03/icmp/ipv4_header.hpp
@@ -2,7 +2,7 @@
 // ipv4_header.hpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/icmp/ping.cpp b/asio/src/examples/cpp03/icmp/ping.cpp
index e3a1b67..3a1d278 100644
--- a/asio/src/examples/cpp03/icmp/ping.cpp
+++ b/asio/src/examples/cpp03/icmp/ping.cpp
@@ -2,7 +2,7 @@
 // ping.cpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/invocation/prioritised_handlers.cpp b/asio/src/examples/cpp03/invocation/prioritised_handlers.cpp
index aecc3be..7389794 100644
--- a/asio/src/examples/cpp03/invocation/prioritised_handlers.cpp
+++ b/asio/src/examples/cpp03/invocation/prioritised_handlers.cpp
@@ -2,7 +2,7 @@
 // prioritised_handlers.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/iostreams/daytime_client.cpp b/asio/src/examples/cpp03/iostreams/daytime_client.cpp
index db94b27..4d0f68c 100644
--- a/asio/src/examples/cpp03/iostreams/daytime_client.cpp
+++ b/asio/src/examples/cpp03/iostreams/daytime_client.cpp
@@ -2,7 +2,7 @@
 // daytime_client.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/iostreams/daytime_server.cpp b/asio/src/examples/cpp03/iostreams/daytime_server.cpp
index 6011f39..ed3f94b 100644
--- a/asio/src/examples/cpp03/iostreams/daytime_server.cpp
+++ b/asio/src/examples/cpp03/iostreams/daytime_server.cpp
@@ -2,7 +2,7 @@
 // daytime_server.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -35,7 +35,7 @@
     {
       tcp::iostream stream;
       asio::error_code ec;
-      acceptor.accept(*stream.rdbuf(), ec);
+      acceptor.accept(stream.socket(), ec);
       if (!ec)
       {
         stream << make_daytime_string();
diff --git a/asio/src/examples/cpp03/iostreams/http_client.cpp b/asio/src/examples/cpp03/iostreams/http_client.cpp
index 2101d2f..247df0f 100644
--- a/asio/src/examples/cpp03/iostreams/http_client.cpp
+++ b/asio/src/examples/cpp03/iostreams/http_client.cpp
@@ -2,7 +2,7 @@
 // http_client.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/local/connect_pair.cpp b/asio/src/examples/cpp03/local/connect_pair.cpp
index 09b8e3b..92e0ae8 100644
--- a/asio/src/examples/cpp03/local/connect_pair.cpp
+++ b/asio/src/examples/cpp03/local/connect_pair.cpp
@@ -2,7 +2,7 @@
 // connect_pair.cpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/local/iostream_client.cpp b/asio/src/examples/cpp03/local/iostream_client.cpp
index abc6c78..d28d29e 100644
--- a/asio/src/examples/cpp03/local/iostream_client.cpp
+++ b/asio/src/examples/cpp03/local/iostream_client.cpp
@@ -2,7 +2,7 @@
 // stream_client.cpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/local/stream_client.cpp b/asio/src/examples/cpp03/local/stream_client.cpp
index 689a5f4..6374f8f 100644
--- a/asio/src/examples/cpp03/local/stream_client.cpp
+++ b/asio/src/examples/cpp03/local/stream_client.cpp
@@ -2,7 +2,7 @@
 // stream_client.cpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/local/stream_server.cpp b/asio/src/examples/cpp03/local/stream_server.cpp
index 502bc0b..0bfe278 100644
--- a/asio/src/examples/cpp03/local/stream_server.cpp
+++ b/asio/src/examples/cpp03/local/stream_server.cpp
@@ -2,7 +2,7 @@
 // stream_server.cpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/multicast/receiver.cpp b/asio/src/examples/cpp03/multicast/receiver.cpp
index 7726878..5937050 100644
--- a/asio/src/examples/cpp03/multicast/receiver.cpp
+++ b/asio/src/examples/cpp03/multicast/receiver.cpp
@@ -2,7 +2,7 @@
 // receiver.cpp
 // ~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/multicast/sender.cpp b/asio/src/examples/cpp03/multicast/sender.cpp
index 46b0d94..995f05a 100644
--- a/asio/src/examples/cpp03/multicast/sender.cpp
+++ b/asio/src/examples/cpp03/multicast/sender.cpp
@@ -2,7 +2,7 @@
 // sender.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/nonblocking/third_party_lib.cpp b/asio/src/examples/cpp03/nonblocking/third_party_lib.cpp
index aba111b..8ec06f6 100644
--- a/asio/src/examples/cpp03/nonblocking/third_party_lib.cpp
+++ b/asio/src/examples/cpp03/nonblocking/third_party_lib.cpp
@@ -2,7 +2,7 @@
 // third_party_lib.cpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/porthopper/client.cpp b/asio/src/examples/cpp03/porthopper/client.cpp
index ab4855c..15d8e48 100644
--- a/asio/src/examples/cpp03/porthopper/client.cpp
+++ b/asio/src/examples/cpp03/porthopper/client.cpp
@@ -2,7 +2,7 @@
 // client.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/porthopper/protocol.hpp b/asio/src/examples/cpp03/porthopper/protocol.hpp
index 96e3795..c79bc6b 100644
--- a/asio/src/examples/cpp03/porthopper/protocol.hpp
+++ b/asio/src/examples/cpp03/porthopper/protocol.hpp
@@ -2,7 +2,7 @@
 // protocol.hpp
 // ~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/porthopper/server.cpp b/asio/src/examples/cpp03/porthopper/server.cpp
index dd70301..b98a7d4 100644
--- a/asio/src/examples/cpp03/porthopper/server.cpp
+++ b/asio/src/examples/cpp03/porthopper/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/serialization/client.cpp b/asio/src/examples/cpp03/serialization/client.cpp
index ebbe637..8b83de2 100644
--- a/asio/src/examples/cpp03/serialization/client.cpp
+++ b/asio/src/examples/cpp03/serialization/client.cpp
@@ -2,7 +2,7 @@
 // client.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/serialization/connection.hpp b/asio/src/examples/cpp03/serialization/connection.hpp
index d44aeac..a1fa2a1 100644
--- a/asio/src/examples/cpp03/serialization/connection.hpp
+++ b/asio/src/examples/cpp03/serialization/connection.hpp
@@ -2,7 +2,7 @@
 // connection.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/serialization/server.cpp b/asio/src/examples/cpp03/serialization/server.cpp
index c8d2000..b81b1a4 100644
--- a/asio/src/examples/cpp03/serialization/server.cpp
+++ b/asio/src/examples/cpp03/serialization/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/serialization/stock.hpp b/asio/src/examples/cpp03/serialization/stock.hpp
index 3993cbf..1acbca5 100644
--- a/asio/src/examples/cpp03/serialization/stock.hpp
+++ b/asio/src/examples/cpp03/serialization/stock.hpp
@@ -2,7 +2,7 @@
 // stock.hpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/services/basic_logger.hpp b/asio/src/examples/cpp03/services/basic_logger.hpp
index 48711c2..876086a 100644
--- a/asio/src/examples/cpp03/services/basic_logger.hpp
+++ b/asio/src/examples/cpp03/services/basic_logger.hpp
@@ -2,7 +2,7 @@
 // basic_logger.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/services/daytime_client.cpp b/asio/src/examples/cpp03/services/daytime_client.cpp
index 8817142..e0a6af9 100644
--- a/asio/src/examples/cpp03/services/daytime_client.cpp
+++ b/asio/src/examples/cpp03/services/daytime_client.cpp
@@ -2,7 +2,7 @@
 // daytime_client.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -12,15 +12,13 @@
 #include <boost/bind.hpp>
 #include <iostream>
 #include "logger.hpp"
-#include "stream_socket_service.hpp"
 
-typedef asio::basic_stream_socket<asio::ip::tcp,
-    services::stream_socket_service<asio::ip::tcp> > debug_stream_socket;
+using asio::ip::tcp;
 
 char read_buffer[1024];
 
 void read_handler(const asio::error_code& e,
-    std::size_t bytes_transferred, debug_stream_socket* s)
+    std::size_t bytes_transferred, tcp::socket* s)
 {
   if (!e)
   {
@@ -30,19 +28,33 @@
         boost::bind(read_handler, asio::placeholders::error,
           asio::placeholders::bytes_transferred, s));
   }
+  else
+  {
+    services::logger logger(s->get_executor().context(), "read_handler");
+
+    std::string msg = "Read error: ";
+    msg += e.message();
+    logger.log(msg);
+  }
 }
 
-void connect_handler(const asio::error_code& e, debug_stream_socket* s)
+void connect_handler(const asio::error_code& e, tcp::socket* s)
 {
+  services::logger logger(s->get_executor().context(), "connect_handler");
+
   if (!e)
   {
+    logger.log("Connection established");
+
     s->async_read_some(asio::buffer(read_buffer),
         boost::bind(read_handler, asio::placeholders::error,
           asio::placeholders::bytes_transferred, s));
   }
   else
   {
-    std::cerr << e.message() << std::endl;
+    std::string msg = "Unable to establish connection: ";
+    msg += e.message();
+    logger.log(msg);
   }
 }
 
@@ -63,12 +75,12 @@
     logger.use_file("log.txt");
 
     // Resolve the address corresponding to the given host.
-    asio::ip::tcp::resolver resolver(io_context);
-    asio::ip::tcp::resolver::results_type endpoints =
+    tcp::resolver resolver(io_context);
+    tcp::resolver::results_type endpoints =
       resolver.resolve(argv[1], "daytime");
 
     // Start an asynchronous connect.
-    debug_stream_socket socket(io_context);
+    tcp::socket socket(io_context);
     asio::async_connect(socket, endpoints,
         boost::bind(connect_handler,
           asio::placeholders::error, &socket));
diff --git a/asio/src/examples/cpp03/services/logger.hpp b/asio/src/examples/cpp03/services/logger.hpp
index 4b77b5d..41d17e6 100644
--- a/asio/src/examples/cpp03/services/logger.hpp
+++ b/asio/src/examples/cpp03/services/logger.hpp
@@ -2,7 +2,7 @@
 // logger.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/services/logger_service.cpp b/asio/src/examples/cpp03/services/logger_service.cpp
index fee4757..c3543e4 100644
--- a/asio/src/examples/cpp03/services/logger_service.cpp
+++ b/asio/src/examples/cpp03/services/logger_service.cpp
@@ -2,7 +2,7 @@
 // logger_service.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/services/logger_service.hpp b/asio/src/examples/cpp03/services/logger_service.hpp
index 8bee8ab..9f175df 100644
--- a/asio/src/examples/cpp03/services/logger_service.hpp
+++ b/asio/src/examples/cpp03/services/logger_service.hpp
@@ -2,7 +2,7 @@
 // logger_service.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -44,7 +44,7 @@
   logger_service(asio::io_context& io_context)
     : asio::io_context::service(io_context),
       work_io_context_(),
-      work_(new asio::io_context::work(work_io_context_)),
+      work_(asio::make_work_guard(work_io_context_)),
       work_thread_(new asio::thread(
             boost::bind(&asio::io_context::run, &work_io_context_)))
   {
@@ -130,7 +130,8 @@
   /// Work for the private io_context to perform. If we do not give the
   /// io_context some work to do then the io_context::run() function will exit
   /// immediately.
-  boost::scoped_ptr<asio::io_context::work> work_;
+  asio::executor_work_guard<
+      asio::io_context::executor_type> work_;
 
   /// Thread used for running the work io_context's run loop.
   boost::scoped_ptr<asio::thread> work_thread_;
diff --git a/asio/src/examples/cpp03/services/stream_socket_service.hpp b/asio/src/examples/cpp03/services/stream_socket_service.hpp
deleted file mode 100644
index d4d0c22..0000000
--- a/asio/src/examples/cpp03/services/stream_socket_service.hpp
+++ /dev/null
@@ -1,351 +0,0 @@
-//
-// stream_socket_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef SERVICES_STREAM_SOCKET_SERVICE_HPP
-#define SERVICES_STREAM_SOCKET_SERVICE_HPP
-
-#include <asio.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/lexical_cast.hpp>
-#include "logger.hpp"
-
-namespace services {
-
-/// Debugging stream socket service that wraps the normal stream socket service.
-template <typename Protocol>
-class stream_socket_service
-  : public asio::io_context::service
-{
-private:
-  /// The type of the wrapped stream socket service.
-  typedef asio::stream_socket_service<Protocol> service_impl_type;
-
-public:
-  /// The unique service identifier.
-  static asio::io_context::id id;
-
-  /// The protocol type.
-  typedef Protocol protocol_type;
-
-  /// The endpoint type.
-  typedef typename Protocol::endpoint endpoint_type;
-
-  /// The implementation type of a stream socket.
-  typedef typename service_impl_type::implementation_type implementation_type;
-
-  /// The native type of a stream socket.
-  typedef typename service_impl_type::native_handle_type native_handle_type;
-
-  /// Construct a new stream socket service for the specified io_context.
-  explicit stream_socket_service(asio::io_context& io_context)
-    : asio::io_context::service(io_context),
-      service_impl_(asio::use_service<service_impl_type>(io_context)),
-      logger_(io_context, "stream_socket")
-  {
-  }
-
-  /// Destroy all user-defined handler objects owned by the service.
-  void shutdown()
-  {
-  }
-
-  /// Construct a new stream socket implementation.
-  void construct(implementation_type& impl)
-  {
-    service_impl_.construct(impl);
-  }
-
-  /// Destroy a stream socket implementation.
-  void destroy(implementation_type& impl)
-  {
-    service_impl_.destroy(impl);
-  }
-
-  /// Open a new stream socket implementation.
-  asio::error_code open(implementation_type& impl,
-      const protocol_type& protocol, asio::error_code& ec)
-  {
-    logger_.log("Opening new socket");
-    return service_impl_.open(impl, protocol, ec);
-  }
-
-  /// Open a stream socket from an existing native socket.
-  asio::error_code assign(implementation_type& impl,
-      const protocol_type& protocol, const native_handle_type& native_socket,
-      asio::error_code& ec)
-  {
-    logger_.log("Assigning from a native socket");
-    return service_impl_.assign(impl, protocol, native_socket, ec);
-  }
-
-  /// Determine whether the socket is open.
-  bool is_open(const implementation_type& impl) const
-  {
-    logger_.log("Checking if socket is open");
-    return service_impl_.is_open(impl);
-  }
-
-  /// Close a stream socket implementation.
-  asio::error_code close(implementation_type& impl,
-      asio::error_code& ec)
-  {
-    logger_.log("Closing socket");
-    return service_impl_.close(impl, ec);
-  }
-
-  /// Determine whether the socket is at the out-of-band data mark.
-  bool at_mark(const implementation_type& impl,
-      asio::error_code& ec) const
-  {
-    logger_.log("Checking if socket is at out-of-band data mark");
-    return service_impl_.at_mark(impl, ec);
-  }
-
-  /// Determine the number of bytes available for reading.
-  std::size_t available(const implementation_type& impl,
-      asio::error_code& ec) const
-  {
-    logger_.log("Determining number of bytes available for reading");
-    return service_impl_.available(impl, ec);
-  }
-
-  /// Bind the stream socket to the specified local endpoint.
-  asio::error_code bind(implementation_type& impl,
-      const endpoint_type& endpoint, asio::error_code& ec)
-  {
-    logger_.log("Binding socket");
-    return service_impl_.bind(impl, endpoint, ec);
-  }
-
-  /// Connect the stream socket to the specified endpoint.
-  asio::error_code connect(implementation_type& impl,
-      const endpoint_type& peer_endpoint, asio::error_code& ec)
-  {
-    logger_.log("Connecting socket to " +
-        boost::lexical_cast<std::string>(peer_endpoint));
-    return service_impl_.connect(impl, peer_endpoint, ec);
-  }
-
-  /// Handler to wrap asynchronous connect completion.
-  template <typename Handler>
-  class connect_handler
-  {
-  public:
-    connect_handler(Handler h, logger& l)
-      : handler_(h),
-        logger_(l)
-    {
-    }
-
-    void operator()(const asio::error_code& e)
-    {
-      if (e)
-      {
-        std::string msg = "Asynchronous connect failed: ";
-        msg += e.message();
-        logger_.log(msg);
-      }
-      else
-      {
-        logger_.log("Asynchronous connect succeeded");
-      }
-
-      handler_(e);
-    }
-
-  private:
-    Handler handler_;
-    logger& logger_;
-  };
-
-  /// Start an asynchronous connect.
-  template <typename Handler>
-  void async_connect(implementation_type& impl,
-      const endpoint_type& peer_endpoint, Handler handler)
-  {
-    logger_.log("Starting asynchronous connect to " +
-        boost::lexical_cast<std::string>(peer_endpoint));
-    service_impl_.async_connect(impl, peer_endpoint, 
-        connect_handler<Handler>(handler, logger_));
-  }
-
-  /// Set a socket option.
-  template <typename Option>
-  asio::error_code set_option(implementation_type& impl,
-      const Option& option, asio::error_code& ec)
-  {
-    logger_.log("Setting socket option");
-    return service_impl_.set_option(impl, option, ec);
-  }
-
-  /// Get a socket option.
-  template <typename Option>
-  asio::error_code get_option(const implementation_type& impl,
-      Option& option, asio::error_code& ec) const
-  {
-    logger_.log("Getting socket option");
-    return service_impl_.get_option(impl, option, ec);
-  }
-
-  /// Perform an IO control command on the socket.
-  template <typename IO_Control_Command>
-  asio::error_code io_control(implementation_type& impl,
-      IO_Control_Command& command, asio::error_code& ec)
-  {
-    logger_.log("Performing IO control command on socket");
-    return service_impl_.io_control(impl, command, ec);
-  }
-
-  /// Get the local endpoint.
-  endpoint_type local_endpoint(const implementation_type& impl,
-      asio::error_code& ec) const
-  {
-    logger_.log("Getting socket's local endpoint");
-    return service_impl_.local_endpoint(impl, ec);
-  }
-
-  /// Get the remote endpoint.
-  endpoint_type remote_endpoint(const implementation_type& impl,
-      asio::error_code& ec) const
-  {
-    logger_.log("Getting socket's remote endpoint");
-    return service_impl_.remote_endpoint(impl, ec);
-  }
-
-  /// Disable sends or receives on the socket.
-  asio::error_code shutdown(implementation_type& impl,
-      asio::socket_base::shutdown_type what,
-      asio::error_code& ec)
-  {
-    logger_.log("Shutting down socket");
-    return service_impl_.shutdown(impl, what, ec);
-  }
-
-  /// Send the given data to the peer.
-  template <typename Const_Buffers>
-  std::size_t send(implementation_type& impl, const Const_Buffers& buffers,
-      asio::socket_base::message_flags flags,
-      asio::error_code& ec)
-  {
-    logger_.log("Sending data on socket");
-    return service_impl_.send(impl, buffers, flags, ec);
-  }
-
-  /// Handler to wrap asynchronous send completion.
-  template <typename Handler>
-  class send_handler
-  {
-  public:
-    send_handler(Handler h, logger& l)
-      : handler_(h),
-        logger_(l)
-    {
-    }
-
-    void operator()(const asio::error_code& e,
-        std::size_t bytes_transferred)
-    {
-      if (e)
-      {
-        std::string msg = "Asynchronous send failed: ";
-        msg += e.message();
-        logger_.log(msg);
-      }
-      else
-      {
-        logger_.log("Asynchronous send succeeded");
-      }
-
-      handler_(e, bytes_transferred);
-    }
-
-  private:
-    Handler handler_;
-    logger& logger_;
-  };
-
-  /// Start an asynchronous send.
-  template <typename Const_Buffers, typename Handler>
-  void async_send(implementation_type& impl, const Const_Buffers& buffers,
-      asio::socket_base::message_flags flags, Handler handler)
-  {
-    logger_.log("Starting asynchronous send");
-    service_impl_.async_send(impl, buffers, flags,
-        send_handler<Handler>(handler, logger_));
-  }
-
-  /// Receive some data from the peer.
-  template <typename Mutable_Buffers>
-  std::size_t receive(implementation_type& impl,
-      const Mutable_Buffers& buffers,
-      asio::socket_base::message_flags flags,
-      asio::error_code& ec)
-  {
-    logger_.log("Receiving data on socket");
-    return service_impl_.receive(impl, buffers, flags, ec);
-  }
-
-  /// Handler to wrap asynchronous receive completion.
-  template <typename Handler>
-  class receive_handler
-  {
-  public:
-    receive_handler(Handler h, logger& l)
-      : handler_(h),
-        logger_(l)
-    {
-    }
-
-    void operator()(const asio::error_code& e,
-        std::size_t bytes_transferred)
-    {
-      if (e)
-      {
-        std::string msg = "Asynchronous receive failed: ";
-        msg += e.message();
-        logger_.log(msg);
-      }
-      else
-      {
-        logger_.log("Asynchronous receive succeeded");
-      }
-
-      handler_(e, bytes_transferred);
-    }
-
-  private:
-    Handler handler_;
-    logger& logger_;
-  };
-
-  /// Start an asynchronous receive.
-  template <typename Mutable_Buffers, typename Handler>
-  void async_receive(implementation_type& impl, const Mutable_Buffers& buffers,
-      asio::socket_base::message_flags flags, Handler handler)
-  {
-    logger_.log("Starting asynchronous receive");
-    service_impl_.async_receive(impl, buffers, flags,
-        receive_handler<Handler>(handler, logger_));
-  }
-
-private:
-  /// The wrapped stream socket service.
-  service_impl_type& service_impl_;
-
-  /// The logger used for writing debug messages.
-  mutable logger logger_;
-};
-
-template <typename Protocol>
-asio::io_context::id stream_socket_service<Protocol>::id;
-
-} // namespace services
-
-#endif // SERVICES_STREAM_SOCKET_SERVICE_HPP
diff --git a/asio/src/examples/cpp03/socks4/socks4.hpp b/asio/src/examples/cpp03/socks4/socks4.hpp
index d3cb5d6..c555875 100644
--- a/asio/src/examples/cpp03/socks4/socks4.hpp
+++ b/asio/src/examples/cpp03/socks4/socks4.hpp
@@ -2,7 +2,7 @@
 // socks4.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/socks4/sync_client.cpp b/asio/src/examples/cpp03/socks4/sync_client.cpp
index 858263c..7b82564 100644
--- a/asio/src/examples/cpp03/socks4/sync_client.cpp
+++ b/asio/src/examples/cpp03/socks4/sync_client.cpp
@@ -2,7 +2,7 @@
 // sync_client.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/spawn/echo_server.cpp b/asio/src/examples/cpp03/spawn/echo_server.cpp
index 3905c15..415f6da 100644
--- a/asio/src/examples/cpp03/spawn/echo_server.cpp
+++ b/asio/src/examples/cpp03/spawn/echo_server.cpp
@@ -2,7 +2,7 @@
 // echo_server.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/spawn/parallel_grep.cpp b/asio/src/examples/cpp03/spawn/parallel_grep.cpp
index 3c87fec..d742f19 100644
--- a/asio/src/examples/cpp03/spawn/parallel_grep.cpp
+++ b/asio/src/examples/cpp03/spawn/parallel_grep.cpp
@@ -2,7 +2,7 @@
 // parallel_grep.cpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/ssl/README b/asio/src/examples/cpp03/ssl/README
index 7a61bf8..8d94105 100644
--- a/asio/src/examples/cpp03/ssl/README
+++ b/asio/src/examples/cpp03/ssl/README
@@ -2,7 +2,7 @@
 
 
 -------------------------------------------------------------------------------
-Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
 Distributed under the Boost Software License, Version 1.0. (See accompanying
 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/ssl/client.cpp b/asio/src/examples/cpp03/ssl/client.cpp
index 591c9a4..02a3ce8 100644
--- a/asio/src/examples/cpp03/ssl/client.cpp
+++ b/asio/src/examples/cpp03/ssl/client.cpp
@@ -2,7 +2,7 @@
 // client.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/ssl/server.cpp b/asio/src/examples/cpp03/ssl/server.cpp
index 5360f10..ad3d73a 100644
--- a/asio/src/examples/cpp03/ssl/server.cpp
+++ b/asio/src/examples/cpp03/ssl/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/timeouts/async_tcp_client.cpp b/asio/src/examples/cpp03/timeouts/async_tcp_client.cpp
index 74dd239..98b90e9 100644
--- a/asio/src/examples/cpp03/timeouts/async_tcp_client.cpp
+++ b/asio/src/examples/cpp03/timeouts/async_tcp_client.cpp
@@ -2,7 +2,7 @@
 // async_tcp_client.cpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/timeouts/blocking_tcp_client.cpp b/asio/src/examples/cpp03/timeouts/blocking_tcp_client.cpp
index afd967e..69d467a 100644
--- a/asio/src/examples/cpp03/timeouts/blocking_tcp_client.cpp
+++ b/asio/src/examples/cpp03/timeouts/blocking_tcp_client.cpp
@@ -2,7 +2,7 @@
 // blocking_tcp_client.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/timeouts/blocking_udp_client.cpp b/asio/src/examples/cpp03/timeouts/blocking_udp_client.cpp
index e3ecd8d..fd2da76 100644
--- a/asio/src/examples/cpp03/timeouts/blocking_udp_client.cpp
+++ b/asio/src/examples/cpp03/timeouts/blocking_udp_client.cpp
@@ -2,7 +2,7 @@
 // blocking_udp_client.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/timeouts/server.cpp b/asio/src/examples/cpp03/timeouts/server.cpp
index 8c1ee09..212cd90 100644
--- a/asio/src/examples/cpp03/timeouts/server.cpp
+++ b/asio/src/examples/cpp03/timeouts/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/timers/tick_count_timer.cpp b/asio/src/examples/cpp03/timers/tick_count_timer.cpp
index 16767e5..8b98cfd 100644
--- a/asio/src/examples/cpp03/timers/tick_count_timer.cpp
+++ b/asio/src/examples/cpp03/timers/tick_count_timer.cpp
@@ -2,7 +2,7 @@
 // tick_count_timer.cpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/timers/time_t_timer.cpp b/asio/src/examples/cpp03/timers/time_t_timer.cpp
index 345b485..8a434e9 100644
--- a/asio/src/examples/cpp03/timers/time_t_timer.cpp
+++ b/asio/src/examples/cpp03/timers/time_t_timer.cpp
@@ -2,7 +2,7 @@
 // time_t_timer.cpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/daytime1/client.cpp b/asio/src/examples/cpp03/tutorial/daytime1/client.cpp
index 838cf4c..9784d48 100644
--- a/asio/src/examples/cpp03/tutorial/daytime1/client.cpp
+++ b/asio/src/examples/cpp03/tutorial/daytime1/client.cpp
@@ -2,7 +2,7 @@
 // client.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/daytime2/server.cpp b/asio/src/examples/cpp03/tutorial/daytime2/server.cpp
index fb2fa96..f662ed2 100644
--- a/asio/src/examples/cpp03/tutorial/daytime2/server.cpp
+++ b/asio/src/examples/cpp03/tutorial/daytime2/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/daytime3/server.cpp b/asio/src/examples/cpp03/tutorial/daytime3/server.cpp
index 7763832..cb2c948 100644
--- a/asio/src/examples/cpp03/tutorial/daytime3/server.cpp
+++ b/asio/src/examples/cpp03/tutorial/daytime3/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/daytime4/client.cpp b/asio/src/examples/cpp03/tutorial/daytime4/client.cpp
index 7477723..da3b651 100644
--- a/asio/src/examples/cpp03/tutorial/daytime4/client.cpp
+++ b/asio/src/examples/cpp03/tutorial/daytime4/client.cpp
@@ -2,7 +2,7 @@
 // client.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/daytime5/server.cpp b/asio/src/examples/cpp03/tutorial/daytime5/server.cpp
index e4d95f2..fdf4525 100644
--- a/asio/src/examples/cpp03/tutorial/daytime5/server.cpp
+++ b/asio/src/examples/cpp03/tutorial/daytime5/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/daytime6/server.cpp b/asio/src/examples/cpp03/tutorial/daytime6/server.cpp
index 932968b..d67045f 100644
--- a/asio/src/examples/cpp03/tutorial/daytime6/server.cpp
+++ b/asio/src/examples/cpp03/tutorial/daytime6/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/daytime7/server.cpp b/asio/src/examples/cpp03/tutorial/daytime7/server.cpp
index 36c74d5..b9dc605 100644
--- a/asio/src/examples/cpp03/tutorial/daytime7/server.cpp
+++ b/asio/src/examples/cpp03/tutorial/daytime7/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/daytime_dox.txt b/asio/src/examples/cpp03/tutorial/daytime_dox.txt
index 3f5aba2..1bf591a 100644
--- a/asio/src/examples/cpp03/tutorial/daytime_dox.txt
+++ b/asio/src/examples/cpp03/tutorial/daytime_dox.txt
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/index_dox.txt b/asio/src/examples/cpp03/tutorial/index_dox.txt
index 43f9f45..7d3bd1a 100644
--- a/asio/src/examples/cpp03/tutorial/index_dox.txt
+++ b/asio/src/examples/cpp03/tutorial/index_dox.txt
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/timer1/timer.cpp b/asio/src/examples/cpp03/tutorial/timer1/timer.cpp
index 1f6156f..79ddf91 100644
--- a/asio/src/examples/cpp03/tutorial/timer1/timer.cpp
+++ b/asio/src/examples/cpp03/tutorial/timer1/timer.cpp
@@ -2,7 +2,7 @@
 // timer.cpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/timer2/timer.cpp b/asio/src/examples/cpp03/tutorial/timer2/timer.cpp
index 3f84a68..3275c22 100644
--- a/asio/src/examples/cpp03/tutorial/timer2/timer.cpp
+++ b/asio/src/examples/cpp03/tutorial/timer2/timer.cpp
@@ -2,7 +2,7 @@
 // timer.cpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/timer3/timer.cpp b/asio/src/examples/cpp03/tutorial/timer3/timer.cpp
index 07bff18..dfbf7d6 100644
--- a/asio/src/examples/cpp03/tutorial/timer3/timer.cpp
+++ b/asio/src/examples/cpp03/tutorial/timer3/timer.cpp
@@ -2,7 +2,7 @@
 // timer.cpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/timer4/timer.cpp b/asio/src/examples/cpp03/tutorial/timer4/timer.cpp
index beedbf1..cbea70d 100644
--- a/asio/src/examples/cpp03/tutorial/timer4/timer.cpp
+++ b/asio/src/examples/cpp03/tutorial/timer4/timer.cpp
@@ -2,7 +2,7 @@
 // timer.cpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/timer5/timer.cpp b/asio/src/examples/cpp03/tutorial/timer5/timer.cpp
index 4c763dc..a798e85 100644
--- a/asio/src/examples/cpp03/tutorial/timer5/timer.cpp
+++ b/asio/src/examples/cpp03/tutorial/timer5/timer.cpp
@@ -2,7 +2,7 @@
 // timer.cpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/tutorial/timer_dox.txt b/asio/src/examples/cpp03/tutorial/timer_dox.txt
index 56fabdb..7c5a0a0 100644
--- a/asio/src/examples/cpp03/tutorial/timer_dox.txt
+++ b/asio/src/examples/cpp03/tutorial/timer_dox.txt
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp03/windows/transmit_file.cpp b/asio/src/examples/cpp03/windows/transmit_file.cpp
index 24502a0..8ca9e17 100644
--- a/asio/src/examples/cpp03/windows/transmit_file.cpp
+++ b/asio/src/examples/cpp03/windows/transmit_file.cpp
@@ -2,7 +2,7 @@
 // transmit_file.cpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/Makefile.am b/asio/src/examples/cpp11/Makefile.am
index 28b61b3..182c711 100644
--- a/asio/src/examples/cpp11/Makefile.am
+++ b/asio/src/examples/cpp11/Makefile.am
@@ -71,9 +71,9 @@
 
 if HAVE_BOOST_COROUTINE
 spawn_echo_server_SOURCES = spawn/echo_server.cpp
-spawn_echo_server_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_system
+spawn_echo_server_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
 spawn_parallel_grep_SOURCES = spawn/parallel_grep.cpp
-spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_system
+spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
 endif
 
 EXTRA_DIST = \
diff --git a/asio/src/examples/cpp11/allocation/server.cpp b/asio/src/examples/cpp11/allocation/server.cpp
index b8eb662..cbcbe76 100644
--- a/asio/src/examples/cpp11/allocation/server.cpp
+++ b/asio/src/examples/cpp11/allocation/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/buffers/reference_counted.cpp b/asio/src/examples/cpp11/buffers/reference_counted.cpp
index df6c0ed..34fe909 100644
--- a/asio/src/examples/cpp11/buffers/reference_counted.cpp
+++ b/asio/src/examples/cpp11/buffers/reference_counted.cpp
@@ -2,7 +2,7 @@
 // reference_counted.cpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/chat/chat_client.cpp b/asio/src/examples/cpp11/chat/chat_client.cpp
index 045175c..e672a02 100644
--- a/asio/src/examples/cpp11/chat/chat_client.cpp
+++ b/asio/src/examples/cpp11/chat/chat_client.cpp
@@ -2,7 +2,7 @@
 // chat_client.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/chat/chat_message.hpp b/asio/src/examples/cpp11/chat/chat_message.hpp
index d1593cd..f6e949b 100644
--- a/asio/src/examples/cpp11/chat/chat_message.hpp
+++ b/asio/src/examples/cpp11/chat/chat_message.hpp
@@ -2,7 +2,7 @@
 // chat_message.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/chat/chat_server.cpp b/asio/src/examples/cpp11/chat/chat_server.cpp
index 8b5af40..6e5ba3b 100644
--- a/asio/src/examples/cpp11/chat/chat_server.cpp
+++ b/asio/src/examples/cpp11/chat/chat_server.cpp
@@ -2,7 +2,7 @@
 // chat_server.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp b/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp
index fd08f54..d76ebe9 100644
--- a/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp
+++ b/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
 // async_tcp_echo_server.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp b/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp
index 44e9bbc..8eb1b37 100644
--- a/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp
+++ b/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp
@@ -2,7 +2,7 @@
 // async_udp_echo_server.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp b/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp
index 57a9e9c..c7c648d 100644
--- a/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp
+++ b/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp
@@ -2,7 +2,7 @@
 // blocking_tcp_echo_client.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp b/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp
index ba63cdf..84a72d4 100644
--- a/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp
+++ b/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
 // blocking_tcp_echo_server.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp b/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp
index 0cb431c..1d15780 100644
--- a/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp
+++ b/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp
@@ -2,7 +2,7 @@
 // blocking_udp_echo_client.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp b/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp
index 35488d5..8bb5173 100644
--- a/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp
+++ b/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp
@@ -2,7 +2,7 @@
 // blocking_udp_echo_server.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/executors/bank_account_2.cpp b/asio/src/examples/cpp11/executors/bank_account_2.cpp
index 4b8dcd5..b646cb2 100644
--- a/asio/src/examples/cpp11/executors/bank_account_2.cpp
+++ b/asio/src/examples/cpp11/executors/bank_account_2.cpp
@@ -1,11 +1,11 @@
-#include <asio/package.hpp>
 #include <asio/post.hpp>
 #include <asio/thread_pool.hpp>
+#include <asio/use_future.hpp>
 #include <iostream>
 
-using asio::package;
 using asio::post;
 using asio::thread_pool;
+using asio::use_future;
 
 // Traditional active object pattern.
 // Member functions block until operation is finished.
@@ -19,7 +19,7 @@
   void deposit(int amount)
   {
     post(pool_,
-      package([=]
+      use_future([=]
         {
           balance_ += amount;
         })).get();
@@ -28,7 +28,7 @@
   void withdraw(int amount)
   {
     post(pool_,
-      package([=]
+      use_future([=]
         {
           if (balance_ >= amount)
             balance_ -= amount;
@@ -38,7 +38,7 @@
   int balance() const
   {
     return post(pool_,
-      package([=]
+      use_future([=]
         {
           return balance_;
         })).get();
diff --git a/asio/src/examples/cpp11/executors/fork_join.cpp b/asio/src/examples/cpp11/executors/fork_join.cpp
index f9dcdb3..6971681 100644
--- a/asio/src/examples/cpp11/executors/fork_join.cpp
+++ b/asio/src/examples/cpp11/executors/fork_join.cpp
@@ -172,56 +172,62 @@
   {
   }
 
-  fork_join_pool& context() noexcept
+  fork_join_pool& context() const noexcept
   {
     return context_;
   }
 
-  void on_work_started() noexcept
+  void on_work_started() const noexcept
   {
     std::lock_guard<std::mutex> lock(context_.mutex_);
     context_.do_work_started(work_count_);
   }
 
-  void on_work_finished() noexcept
+  void on_work_finished() const noexcept
   {
     std::lock_guard<std::mutex> lock(context_.mutex_);
     context_.do_work_finished(work_count_);
   }
 
   template <class Func, class Alloc>
-  void dispatch(Func&& f, const Alloc& a)
+  void dispatch(Func&& f, const Alloc& a) const
   {
-    auto p(std::allocate_shared<function<Func>>(a, std::move(f), work_count_));
+    auto p(std::allocate_shared<function<Func>>(
+          typename std::allocator_traits<Alloc>::template rebind_alloc<char>(a),
+          std::move(f), work_count_));
     context_.do_dispatch(p, work_count_);
   }
 
   template <class Func, class Alloc>
-  void post(Func f, const Alloc& a)
+  void post(Func f, const Alloc& a) const
   {
-    auto p(std::allocate_shared<function<Func>>(a, std::move(f), work_count_));
+    auto p(std::allocate_shared<function<Func>>(
+          typename std::allocator_traits<Alloc>::template rebind_alloc<char>(a),
+          std::move(f), work_count_));
     context_.do_post(p, work_count_);
   }
 
   template <class Func, class Alloc>
-  void defer(Func&& f, const Alloc& a)
+  void defer(Func&& f, const Alloc& a) const
   {
     post(std::forward<Func>(f), a);
   }
 
-  friend bool operator==(const fork_executor& a, const fork_executor& b)
+  friend bool operator==(const fork_executor& a,
+      const fork_executor& b) noexcept
   {
     return a.work_count_ == b.work_count_;
   }
 
-  friend bool operator!=(const fork_executor& a, const fork_executor& b)
+  friend bool operator!=(const fork_executor& a,
+      const fork_executor& b) noexcept
   {
     return a.work_count_ != b.work_count_;
   }
 
   // Block until all work associated with the executor is complete. While it is
   // waiting, the thread may be borrowed to execute functions from the queue.
-  void join()
+  void join() const
   {
     std::unique_lock<std::mutex> lock(context_.mutex_);
     while (*work_count_ > 0)
@@ -252,10 +258,6 @@
   std::shared_ptr<std::size_t> work_count_;
 };
 
-namespace asio {
-  template <> struct is_executor<fork_executor> : std::true_type {};
-}
-
 // Helper class to automatically join a fork_executor when exiting a scope.
 class join_guard
 {
diff --git a/asio/src/examples/cpp11/executors/pipeline.cpp b/asio/src/examples/cpp11/executors/pipeline.cpp
index 4159333..86bf860 100644
--- a/asio/src/examples/cpp11/executors/pipeline.cpp
+++ b/asio/src/examples/cpp11/executors/pipeline.cpp
@@ -1,9 +1,9 @@
 #include <asio/associated_executor.hpp>
 #include <asio/bind_executor.hpp>
 #include <asio/execution_context.hpp>
-#include <asio/package.hpp>
 #include <asio/post.hpp>
 #include <asio/system_executor.hpp>
+#include <asio/use_future.hpp>
 #include <condition_variable>
 #include <future>
 #include <memory>
@@ -15,9 +15,9 @@
 using asio::execution_context;
 using asio::executor_binder;
 using asio::get_associated_executor;
-using asio::package;
 using asio::post;
 using asio::system_executor;
+using asio::use_future;
 using asio::use_service;
 
 // An executor that launches a new thread for each function submitted to it.
@@ -29,7 +29,7 @@
   class thread_bag : public execution_context::service
   {
   public:
-    static execution_context::id id;
+    typedef thread_bag key_type;
 
     explicit thread_bag(execution_context& ctx)
       : execution_context::service(ctx)
@@ -54,57 +54,53 @@
   };
 
 public:
-  execution_context& context() noexcept
+  execution_context& context() const noexcept
   {
     return system_executor().context();
   }
 
-  void on_work_started() noexcept
+  void on_work_started() const noexcept
   {
     // This executor doesn't count work.
   }
 
-  void on_work_finished() noexcept
+  void on_work_finished() const noexcept
   {
     // This executor doesn't count work.
   }
 
   template <class Func, class Alloc>
-  void dispatch(Func&& f, const Alloc& a)
+  void dispatch(Func&& f, const Alloc& a) const
   {
     post(std::forward<Func>(f), a);
   }
 
   template <class Func, class Alloc>
-  void post(Func f, const Alloc&)
+  void post(Func f, const Alloc&) const
   {
     thread_bag& bag = use_service<thread_bag>(context());
     bag.add_thread(std::thread(std::move(f)));
   }
 
   template <class Func, class Alloc>
-  void defer(Func&& f, const Alloc& a)
+  void defer(Func&& f, const Alloc& a) const
   {
     post(std::forward<Func>(f), a);
   }
 
-  friend bool operator==(const thread_executor&, const thread_executor&)
+  friend bool operator==(const thread_executor&,
+      const thread_executor&) noexcept
   {
     return true;
   }
 
-  friend bool operator!=(const thread_executor&, const thread_executor&)
+  friend bool operator!=(const thread_executor&,
+      const thread_executor&) noexcept
   {
     return false;
   }
 };
 
-execution_context::id thread_executor::thread_bag::id;
-
-namespace asio {
-  template <> struct is_executor<thread_executor> : std::true_type {};
-}
-
 // Base class for all thread-safe queue implementations.
 class queue_impl_base
 {
@@ -194,7 +190,7 @@
 
   // Run the function, and as we're the last stage return a future so that the
   // caller can wait for the pipeline to finish.
-  return post(ex, package([in, f]() mutable { f(in); }));
+  return post(ex, use_future([in, f]() mutable { f(in); }));
 }
 
 // Launch an intermediate stage in a pipeline.
diff --git a/asio/src/examples/cpp11/executors/priority_scheduler.cpp b/asio/src/examples/cpp11/executors/priority_scheduler.cpp
index 34bb503..fb38fa2 100644
--- a/asio/src/examples/cpp11/executors/priority_scheduler.cpp
+++ b/asio/src/examples/cpp11/executors/priority_scheduler.cpp
@@ -21,50 +21,55 @@
     {
     }
 
-    priority_scheduler& context() noexcept
+    priority_scheduler& context() const noexcept
     {
       return context_;
     }
 
-    void on_work_started() noexcept
+    void on_work_started() const noexcept
     {
       // This executor doesn't count work. Instead, the scheduler simply runs
       // until explicitly stopped.
     }
 
-    void on_work_finished() noexcept
+    void on_work_finished() const noexcept
     {
       // This executor doesn't count work. Instead, the scheduler simply runs
       // until explicitly stopped.
     }
 
     template <class Func, class Alloc>
-    void dispatch(Func&& f, const Alloc& a)
+    void dispatch(Func&& f, const Alloc& a) const
     {
       post(std::forward<Func>(f), a);
     }
 
     template <class Func, class Alloc>
-    void post(Func f, const Alloc& a)
+    void post(Func f, const Alloc& a) const
     {
-      auto p(std::allocate_shared<item<Func>>(a, priority_, std::move(f)));
+      auto p(std::allocate_shared<item<Func>>(
+            typename std::allocator_traits<
+              Alloc>::template rebind_alloc<char>(a),
+            priority_, std::move(f)));
       std::lock_guard<std::mutex> lock(context_.mutex_);
       context_.queue_.push(p);
       context_.condition_.notify_one();
     }
 
     template <class Func, class Alloc>
-    void defer(Func&& f, const Alloc& a)
+    void defer(Func&& f, const Alloc& a) const
     {
       post(std::forward<Func>(f), a);
     }
 
-    friend bool operator==(const executor_type& a, const executor_type& b)
+    friend bool operator==(const executor_type& a,
+        const executor_type& b) noexcept
     {
       return &a.context_ == &b.context_;
     }
 
-    friend bool operator!=(const executor_type& a, const executor_type& b)
+    friend bool operator!=(const executor_type& a,
+        const executor_type& b) noexcept
     {
       return &a.context_ != &b.context_;
     }
@@ -145,10 +150,6 @@
   bool stopped_ = false;
 };
 
-namespace asio {
-  template <> struct is_executor<priority_scheduler::executor_type> : std::true_type {};
-}
-
 int main()
 {
   priority_scheduler sched;
diff --git a/asio/src/examples/cpp11/futures/daytime_client.cpp b/asio/src/examples/cpp11/futures/daytime_client.cpp
index 321d212..0004e12 100644
--- a/asio/src/examples/cpp11/futures/daytime_client.cpp
+++ b/asio/src/examples/cpp11/futures/daytime_client.cpp
@@ -2,7 +2,7 @@
 // daytime_client.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -77,7 +77,7 @@
     // We run the io_context off in its own thread so that it operates
     // completely asynchronously with respect to the rest of the program.
     asio::io_context io_context;
-    asio::io_context::work work(io_context);
+    auto work = asio::make_work_guard(io_context);
     std::thread thread([&io_context](){ io_context.run(); });
 
     get_daytime(io_context, argv[1]);
diff --git a/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp b/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp
index d9cad58..41b355c 100644
--- a/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp
+++ b/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp
@@ -2,7 +2,7 @@
 // custom_tracking.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/connection.cpp b/asio/src/examples/cpp11/http/server/connection.cpp
index 8cf9b11..f4d9cac 100644
--- a/asio/src/examples/cpp11/http/server/connection.cpp
+++ b/asio/src/examples/cpp11/http/server/connection.cpp
@@ -2,7 +2,7 @@
 // connection.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/connection.hpp b/asio/src/examples/cpp11/http/server/connection.hpp
index 178125b..96364db 100644
--- a/asio/src/examples/cpp11/http/server/connection.hpp
+++ b/asio/src/examples/cpp11/http/server/connection.hpp
@@ -2,7 +2,7 @@
 // connection.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/connection_manager.cpp b/asio/src/examples/cpp11/http/server/connection_manager.cpp
index 5699ed1..55bfb9a 100644
--- a/asio/src/examples/cpp11/http/server/connection_manager.cpp
+++ b/asio/src/examples/cpp11/http/server/connection_manager.cpp
@@ -2,7 +2,7 @@
 // connection_manager.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/connection_manager.hpp b/asio/src/examples/cpp11/http/server/connection_manager.hpp
index 400d14b..8dadf41 100644
--- a/asio/src/examples/cpp11/http/server/connection_manager.hpp
+++ b/asio/src/examples/cpp11/http/server/connection_manager.hpp
@@ -2,7 +2,7 @@
 // connection_manager.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/header.hpp b/asio/src/examples/cpp11/http/server/header.hpp
index 524097e..22e3c4a 100644
--- a/asio/src/examples/cpp11/http/server/header.hpp
+++ b/asio/src/examples/cpp11/http/server/header.hpp
@@ -2,7 +2,7 @@
 // header.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/main.cpp b/asio/src/examples/cpp11/http/server/main.cpp
index f807cf4..44fc930 100644
--- a/asio/src/examples/cpp11/http/server/main.cpp
+++ b/asio/src/examples/cpp11/http/server/main.cpp
@@ -2,7 +2,7 @@
 // main.cpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/mime_types.cpp b/asio/src/examples/cpp11/http/server/mime_types.cpp
index c352897..eb77919 100644
--- a/asio/src/examples/cpp11/http/server/mime_types.cpp
+++ b/asio/src/examples/cpp11/http/server/mime_types.cpp
@@ -2,7 +2,7 @@
 // mime_types.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/mime_types.hpp b/asio/src/examples/cpp11/http/server/mime_types.hpp
index e5881f2..2fc0332 100644
--- a/asio/src/examples/cpp11/http/server/mime_types.hpp
+++ b/asio/src/examples/cpp11/http/server/mime_types.hpp
@@ -2,7 +2,7 @@
 // mime_types.hpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/reply.cpp b/asio/src/examples/cpp11/http/server/reply.cpp
index ed6965c..2c99013 100644
--- a/asio/src/examples/cpp11/http/server/reply.cpp
+++ b/asio/src/examples/cpp11/http/server/reply.cpp
@@ -2,7 +2,7 @@
 // reply.cpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/reply.hpp b/asio/src/examples/cpp11/http/server/reply.hpp
index d8db838..5189ac4 100644
--- a/asio/src/examples/cpp11/http/server/reply.hpp
+++ b/asio/src/examples/cpp11/http/server/reply.hpp
@@ -2,7 +2,7 @@
 // reply.hpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/request.hpp b/asio/src/examples/cpp11/http/server/request.hpp
index 2a38f39..129a399 100644
--- a/asio/src/examples/cpp11/http/server/request.hpp
+++ b/asio/src/examples/cpp11/http/server/request.hpp
@@ -2,7 +2,7 @@
 // request.hpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/request_handler.cpp b/asio/src/examples/cpp11/http/server/request_handler.cpp
index 2fb5d26..c346ab9 100644
--- a/asio/src/examples/cpp11/http/server/request_handler.cpp
+++ b/asio/src/examples/cpp11/http/server/request_handler.cpp
@@ -2,7 +2,7 @@
 // request_handler.cpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/request_handler.hpp b/asio/src/examples/cpp11/http/server/request_handler.hpp
index 95d1a60..24cca33 100644
--- a/asio/src/examples/cpp11/http/server/request_handler.hpp
+++ b/asio/src/examples/cpp11/http/server/request_handler.hpp
@@ -2,7 +2,7 @@
 // request_handler.hpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/request_parser.cpp b/asio/src/examples/cpp11/http/server/request_parser.cpp
index 57d5096..6812a55 100644
--- a/asio/src/examples/cpp11/http/server/request_parser.cpp
+++ b/asio/src/examples/cpp11/http/server/request_parser.cpp
@@ -2,7 +2,7 @@
 // request_parser.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/request_parser.hpp b/asio/src/examples/cpp11/http/server/request_parser.hpp
index 1e84e80..643dd71 100644
--- a/asio/src/examples/cpp11/http/server/request_parser.hpp
+++ b/asio/src/examples/cpp11/http/server/request_parser.hpp
@@ -2,7 +2,7 @@
 // request_parser.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/http/server/server.cpp b/asio/src/examples/cpp11/http/server/server.cpp
index 705c6d6..fa76a4d 100644
--- a/asio/src/examples/cpp11/http/server/server.cpp
+++ b/asio/src/examples/cpp11/http/server/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,7 +17,7 @@
 
 server::server(const std::string& address, const std::string& port,
     const std::string& doc_root)
-  : io_context_(),
+  : io_context_(1),
     signals_(io_context_),
     acceptor_(io_context_),
     connection_manager_(),
diff --git a/asio/src/examples/cpp11/http/server/server.hpp b/asio/src/examples/cpp11/http/server/server.hpp
index 01bde8c..4f98f6c 100644
--- a/asio/src/examples/cpp11/http/server/server.hpp
+++ b/asio/src/examples/cpp11/http/server/server.hpp
@@ -2,7 +2,7 @@
 // server.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/iostreams/http_client.cpp b/asio/src/examples/cpp11/iostreams/http_client.cpp
index 050a43d..7972a67 100644
--- a/asio/src/examples/cpp11/iostreams/http_client.cpp
+++ b/asio/src/examples/cpp11/iostreams/http_client.cpp
@@ -2,7 +2,7 @@
 // http_client.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/spawn/echo_server.cpp b/asio/src/examples/cpp11/spawn/echo_server.cpp
index 772eb83..5397a4e 100644
--- a/asio/src/examples/cpp11/spawn/echo_server.cpp
+++ b/asio/src/examples/cpp11/spawn/echo_server.cpp
@@ -2,7 +2,7 @@
 // echo_server.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp11/spawn/parallel_grep.cpp b/asio/src/examples/cpp11/spawn/parallel_grep.cpp
index 12f4dd7..954d947 100644
--- a/asio/src/examples/cpp11/spawn/parallel_grep.cpp
+++ b/asio/src/examples/cpp11/spawn/parallel_grep.cpp
@@ -2,7 +2,7 @@
 // parallel_grep.cpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp b/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp
index 532ff20..c6004c0 100644
--- a/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp
+++ b/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
 // async_tcp_echo_server.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp b/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp
index 1861374..fee8aed 100644
--- a/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp
+++ b/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp
@@ -2,7 +2,7 @@
 // async_udp_echo_server.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp b/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp
index 57a9e9c..c7c648d 100644
--- a/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp
+++ b/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp
@@ -2,7 +2,7 @@
 // blocking_tcp_echo_client.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp b/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp
index aba13b0..d9a4f07 100644
--- a/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp
+++ b/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
 // blocking_tcp_echo_server.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp b/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp
index 01f6120..603a591 100644
--- a/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp
+++ b/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp
@@ -2,7 +2,7 @@
 // blocking_udp_echo_client.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp b/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp
index 1f4b948..646fd13 100644
--- a/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp
+++ b/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp
@@ -2,7 +2,7 @@
 // blocking_udp_echo_server.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/examples/cpp14/executors/actor.cpp b/asio/src/examples/cpp14/executors/actor.cpp
index d66d7b0..26d2fb4 100644
--- a/asio/src/examples/cpp14/executors/actor.cpp
+++ b/asio/src/examples/cpp14/executors/actor.cpp
@@ -208,7 +208,7 @@
 
 //------------------------------------------------------------------------------
 
-#include <asio/ts/thread_pool.hpp>
+#include <asio/thread_pool.hpp>
 #include <iostream>
 
 using asio::thread_pool;
diff --git a/asio/src/examples/cpp14/executors/async_1.cpp b/asio/src/examples/cpp14/executors/async_1.cpp
index 40046fd..d282b74 100644
--- a/asio/src/examples/cpp14/executors/async_1.cpp
+++ b/asio/src/examples/cpp14/executors/async_1.cpp
@@ -1,5 +1,5 @@
 #include <asio/ts/executor.hpp>
-#include <asio/ts/thread_pool.hpp>
+#include <asio/thread_pool.hpp>
 #include <iostream>
 #include <string>
 
diff --git a/asio/src/examples/cpp14/executors/async_2.cpp b/asio/src/examples/cpp14/executors/async_2.cpp
index 396faae..b39156d 100644
--- a/asio/src/examples/cpp14/executors/async_2.cpp
+++ b/asio/src/examples/cpp14/executors/async_2.cpp
@@ -1,5 +1,5 @@
 #include <asio/ts/executor.hpp>
-#include <asio/ts/thread_pool.hpp>
+#include <asio/thread_pool.hpp>
 #include <iostream>
 #include <string>
 
diff --git a/asio/src/examples/cpp14/executors/bank_account_1.cpp b/asio/src/examples/cpp14/executors/bank_account_1.cpp
index 4e52fae..f85a185 100644
--- a/asio/src/examples/cpp14/executors/bank_account_1.cpp
+++ b/asio/src/examples/cpp14/executors/bank_account_1.cpp
@@ -1,5 +1,5 @@
 #include <asio/ts/executor.hpp>
-#include <asio/ts/thread_pool.hpp>
+#include <asio/thread_pool.hpp>
 #include <iostream>
 
 using asio::post;
diff --git a/asio/src/examples/cpp14/executors/bank_account_2.cpp b/asio/src/examples/cpp14/executors/bank_account_2.cpp
index 28644dd..5233e77 100644
--- a/asio/src/examples/cpp14/executors/bank_account_2.cpp
+++ b/asio/src/examples/cpp14/executors/bank_account_2.cpp
@@ -1,10 +1,10 @@
 #include <asio/ts/executor.hpp>
-#include <asio/ts/thread_pool.hpp>
+#include <asio/thread_pool.hpp>
 #include <iostream>
 
-using asio::package;
 using asio::post;
 using asio::thread_pool;
+using asio::use_future;
 
 // Traditional active object pattern.
 // Member functions block until operation is finished.
@@ -18,7 +18,7 @@
   void deposit(int amount)
   {
     post(pool_,
-      package([=]
+      use_future([=]
         {
           balance_ += amount;
         })).get();
@@ -27,7 +27,7 @@
   void withdraw(int amount)
   {
     post(pool_,
-      package([=]
+      use_future([=]
         {
           if (balance_ >= amount)
             balance_ -= amount;
@@ -37,7 +37,7 @@
   int balance() const
   {
     return post(pool_,
-      package([=]
+      use_future([=]
         {
           return balance_;
         })).get();
diff --git a/asio/src/examples/cpp14/executors/fork_join.cpp b/asio/src/examples/cpp14/executors/fork_join.cpp
index 918376b..fe6746a 100644
--- a/asio/src/examples/cpp14/executors/fork_join.cpp
+++ b/asio/src/examples/cpp14/executors/fork_join.cpp
@@ -1,5 +1,5 @@
 #include <asio/ts/executor.hpp>
-#include <asio/ts/thread_pool.hpp>
+#include <asio/thread_pool.hpp>
 #include <condition_variable>
 #include <memory>
 #include <mutex>
@@ -171,56 +171,62 @@
   {
   }
 
-  fork_join_pool& context() noexcept
+  fork_join_pool& context() const noexcept
   {
     return context_;
   }
 
-  void on_work_started() noexcept
+  void on_work_started() const noexcept
   {
     std::lock_guard<std::mutex> lock(context_.mutex_);
     context_.do_work_started(work_count_);
   }
 
-  void on_work_finished() noexcept
+  void on_work_finished() const noexcept
   {
     std::lock_guard<std::mutex> lock(context_.mutex_);
     context_.do_work_finished(work_count_);
   }
 
   template <class Func, class Alloc>
-  void dispatch(Func&& f, const Alloc& a)
+  void dispatch(Func&& f, const Alloc& a) const
   {
-    auto p(std::allocate_shared<function<Func>>(a, std::move(f), work_count_));
+    auto p(std::allocate_shared<function<Func>>(
+          typename std::allocator_traits<Alloc>::template rebind_alloc<char>(a),
+          std::move(f), work_count_));
     context_.do_dispatch(p, work_count_);
   }
 
   template <class Func, class Alloc>
-  void post(Func f, const Alloc& a)
+  void post(Func f, const Alloc& a) const
   {
-    auto p(std::allocate_shared<function<Func>>(a, std::move(f), work_count_));
+    auto p(std::allocate_shared<function<Func>>(
+          typename std::allocator_traits<Alloc>::template rebind_alloc<char>(a),
+          std::move(f), work_count_));
     context_.do_post(p, work_count_);
   }
 
   template <class Func, class Alloc>
-  void defer(Func&& f, const Alloc& a)
+  void defer(Func&& f, const Alloc& a) const
   {
     post(std::forward<Func>(f), a);
   }
 
-  friend bool operator==(const fork_executor& a, const fork_executor& b)
+  friend bool operator==(const fork_executor& a,
+      const fork_executor& b) noexcept
   {
     return a.work_count_ == b.work_count_;
   }
 
-  friend bool operator!=(const fork_executor& a, const fork_executor& b)
+  friend bool operator!=(const fork_executor& a,
+      const fork_executor& b) noexcept
   {
     return a.work_count_ != b.work_count_;
   }
 
   // Block until all work associated with the executor is complete. While it is
   // waiting, the thread may be borrowed to execute functions from the queue.
-  void join()
+  void join() const
   {
     std::unique_lock<std::mutex> lock(context_.mutex_);
     while (*work_count_ > 0)
@@ -251,10 +257,6 @@
   std::shared_ptr<std::size_t> work_count_;
 };
 
-namespace asio {
-  template <> struct is_executor<fork_executor> : std::true_type {};
-}
-
 // Helper class to automatically join a fork_executor when exiting a scope.
 class join_guard
 {
diff --git a/asio/src/examples/cpp14/executors/pipeline.cpp b/asio/src/examples/cpp14/executors/pipeline.cpp
index 77a5c0a..c66e283 100644
--- a/asio/src/examples/cpp14/executors/pipeline.cpp
+++ b/asio/src/examples/cpp14/executors/pipeline.cpp
@@ -10,9 +10,9 @@
 using asio::execution_context;
 using asio::executor_binder;
 using asio::get_associated_executor;
-using asio::package;
 using asio::post;
 using asio::system_executor;
+using asio::use_future;
 using asio::use_service;
 
 // An executor that launches a new thread for each function submitted to it.
@@ -24,7 +24,7 @@
   class thread_bag : public execution_context::service
   {
   public:
-    static execution_context::id id;
+    typedef thread_bag key_type;
 
     explicit thread_bag(execution_context& ctx)
       : execution_context::service(ctx)
@@ -49,57 +49,53 @@
   };
 
 public:
-  execution_context& context() noexcept
+  execution_context& context() const noexcept
   {
     return system_executor().context();
   }
 
-  void on_work_started() noexcept
+  void on_work_started() const noexcept
   {
     // This executor doesn't count work.
   }
 
-  void on_work_finished() noexcept
+  void on_work_finished() const noexcept
   {
     // This executor doesn't count work.
   }
 
   template <class Func, class Alloc>
-  void dispatch(Func&& f, const Alloc& a)
+  void dispatch(Func&& f, const Alloc& a) const
   {
     post(std::forward<Func>(f), a);
   }
 
   template <class Func, class Alloc>
-  void post(Func f, const Alloc&)
+  void post(Func f, const Alloc&) const
   {
     thread_bag& bag = use_service<thread_bag>(context());
     bag.add_thread(std::thread(std::move(f)));
   }
 
   template <class Func, class Alloc>
-  void defer(Func&& f, const Alloc& a)
+  void defer(Func&& f, const Alloc& a) const
   {
     post(std::forward<Func>(f), a);
   }
 
-  friend bool operator==(const thread_executor&, const thread_executor&)
+  friend bool operator==(const thread_executor&,
+      const thread_executor&) noexcept
   {
     return true;
   }
 
-  friend bool operator!=(const thread_executor&, const thread_executor&)
+  friend bool operator!=(const thread_executor&,
+      const thread_executor&) noexcept
   {
     return false;
   }
 };
 
-execution_context::id thread_executor::thread_bag::id;
-
-namespace asio {
-  template <> struct is_executor<thread_executor> : std::true_type {};
-}
-
 // Base class for all thread-safe queue implementations.
 class queue_impl_base
 {
@@ -189,7 +185,7 @@
 
   // Run the function, and as we're the last stage return a future so that the
   // caller can wait for the pipeline to finish.
-  return post(ex, package([in, f = std::move(f)]() mutable { f(in); }));
+  return post(ex, use_future([in, f = std::move(f)]() mutable { f(in); }));
 }
 
 // Launch an intermediate stage in a pipeline.
@@ -246,7 +242,7 @@
 
 //------------------------------------------------------------------------------
 
-#include <asio/ts/thread_pool.hpp>
+#include <asio/thread_pool.hpp>
 #include <iostream>
 #include <string>
 
diff --git a/asio/src/examples/cpp14/executors/priority_scheduler.cpp b/asio/src/examples/cpp14/executors/priority_scheduler.cpp
index 3766508..3b28af1 100644
--- a/asio/src/examples/cpp14/executors/priority_scheduler.cpp
+++ b/asio/src/examples/cpp14/executors/priority_scheduler.cpp
@@ -20,50 +20,55 @@
     {
     }
 
-    priority_scheduler& context() noexcept
+    priority_scheduler& context() const noexcept
     {
       return context_;
     }
 
-    void on_work_started() noexcept
+    void on_work_started() const noexcept
     {
       // This executor doesn't count work. Instead, the scheduler simply runs
       // until explicitly stopped.
     }
 
-    void on_work_finished() noexcept
+    void on_work_finished() const noexcept
     {
       // This executor doesn't count work. Instead, the scheduler simply runs
       // until explicitly stopped.
     }
 
     template <class Func, class Alloc>
-    void dispatch(Func&& f, const Alloc& a)
+    void dispatch(Func&& f, const Alloc& a) const
     {
       post(std::forward<Func>(f), a);
     }
 
     template <class Func, class Alloc>
-    void post(Func f, const Alloc& a)
+    void post(Func f, const Alloc& a) const
     {
-      auto p(std::allocate_shared<item<Func>>(a, priority_, std::move(f)));
+      auto p(std::allocate_shared<item<Func>>(
+            typename std::allocator_traits<
+              Alloc>::template rebind_alloc<char>(a),
+            priority_, std::move(f)));
       std::lock_guard<std::mutex> lock(context_.mutex_);
       context_.queue_.push(p);
       context_.condition_.notify_one();
     }
 
     template <class Func, class Alloc>
-    void defer(Func&& f, const Alloc& a)
+    void defer(Func&& f, const Alloc& a) const
     {
       post(std::forward<Func>(f), a);
     }
 
-    friend bool operator==(const executor_type& a, const executor_type& b)
+    friend bool operator==(const executor_type& a,
+        const executor_type& b) noexcept
     {
       return &a.context_ == &b.context_;
     }
 
-    friend bool operator!=(const executor_type& a, const executor_type& b)
+    friend bool operator!=(const executor_type& a,
+        const executor_type& b) noexcept
     {
       return &a.context_ != &b.context_;
     }
@@ -144,10 +149,6 @@
   bool stopped_ = false;
 };
 
-namespace asio {
-  template <> struct is_executor<priority_scheduler::executor_type> : std::true_type {};
-}
-
 int main()
 {
   priority_scheduler sched;
diff --git a/asio/src/examples/cpp14/iostreams/http_client.cpp b/asio/src/examples/cpp14/iostreams/http_client.cpp
index f6d4d1c..36f14b4 100644
--- a/asio/src/examples/cpp14/iostreams/http_client.cpp
+++ b/asio/src/examples/cpp14/iostreams/http_client.cpp
@@ -2,7 +2,7 @@
 // http_client.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/Makefile.am b/asio/src/tests/Makefile.am
index 8e93cab..381377f 100644
--- a/asio/src/tests/Makefile.am
+++ b/asio/src/tests/Makefile.am
@@ -10,6 +10,9 @@
 endif
 
 check_PROGRAMS = \
+	unit/associated_allocator \
+	unit/associated_executor \
+	unit/async_result \
 	unit/basic_datagram_socket \
 	unit/basic_deadline_timer \
 	unit/basic_raw_socket \
@@ -20,6 +23,7 @@
 	unit/basic_stream_socket \
 	unit/basic_streambuf \
 	unit/basic_waitable_timer \
+	unit/bind_executor \
 	unit/buffered_read_stream \
 	unit/buffered_stream \
 	unit/buffered_write_stream \
@@ -31,7 +35,12 @@
 	unit/datagram_socket_service \
 	unit/deadline_timer_service \
 	unit/deadline_timer \
+	unit/defer \
+	unit/dispatch \
 	unit/error \
+	unit/execution_context \
+	unit/executor \
+	unit/executor_work_guard \
 	unit/generic/basic_endpoint \
 	unit/generic/datagram_protocol \
 	unit/generic/raw_protocol \
@@ -68,12 +77,15 @@
 	unit/local/connect_pair \
 	unit/local/datagram_protocol \
 	unit/local/stream_protocol \
+	unit/packaged_task \
 	unit/placeholders \
 	unit/posix/basic_descriptor \
 	unit/posix/basic_stream_descriptor \
+	unit/posix/descriptor \
 	unit/posix/descriptor_base \
 	unit/posix/stream_descriptor \
 	unit/posix/stream_descriptor_service \
+	unit/post \
 	unit/raw_socket_service \
 	unit/read \
 	unit/read_at \
@@ -93,6 +105,8 @@
 	unit/system_timer \
 	unit/thread \
 	unit/time_traits \
+	unit/use_future \
+	unit/uses_executor \
 	unit/wait_traits \
 	unit/waitable_timer_service \
 	unit/windows/basic_handle \
@@ -101,6 +115,7 @@
 	unit/windows/basic_stream_handle \
 	unit/windows/object_handle \
 	unit/windows/object_handle_service \
+	unit/windows/overlapped_handle \
 	unit/windows/overlapped_ptr \
 	unit/windows/random_access_handle \
 	unit/windows/random_access_handle_service \
@@ -129,6 +144,9 @@
 endif
 
 TESTS = \
+	unit/associated_allocator \
+	unit/associated_executor \
+	unit/async_result \
 	unit/basic_datagram_socket \
 	unit/basic_deadline_timer \
 	unit/basic_raw_socket \
@@ -139,6 +157,7 @@
 	unit/basic_stream_socket \
 	unit/basic_streambuf \
 	unit/basic_waitable_timer \
+	unit/bind_executor \
 	unit/buffered_read_stream \
 	unit/buffered_stream \
 	unit/buffered_write_stream \
@@ -149,7 +168,12 @@
 	unit/datagram_socket_service \
 	unit/deadline_timer_service \
 	unit/deadline_timer \
+	unit/defer \
+	unit/dispatch \
 	unit/error \
+	unit/execution_context \
+	unit/executor \
+	unit/executor_work_guard \
 	unit/high_resolution_timer \
 	unit/io_context \
 	unit/ip/address \
@@ -181,12 +205,15 @@
 	unit/local/connect_pair \
 	unit/local/datagram_protocol \
 	unit/local/stream_protocol \
+	unit/packaged_task \
 	unit/placeholders \
 	unit/posix/basic_descriptor \
 	unit/posix/basic_stream_descriptor \
+	unit/posix/descriptor\
 	unit/posix/descriptor_base \
 	unit/posix/stream_descriptor \
 	unit/posix/stream_descriptor_service \
+	unit/post \
 	unit/raw_socket_service \
 	unit/read \
 	unit/read_at \
@@ -206,6 +233,8 @@
 	unit/system_timer \
 	unit/thread \
 	unit/time_traits \
+	unit/use_future \
+	unit/uses_executor \
 	unit/wait_traits \
 	unit/waitable_timer_service \
 	unit/windows/basic_handle \
@@ -214,6 +243,7 @@
 	unit/windows/basic_stream_handle \
 	unit/windows/object_handle \
 	unit/windows/object_handle_service \
+	unit/windows/overlapped_handle \
 	unit/windows/overlapped_ptr \
 	unit/windows/random_access_handle \
 	unit/windows/random_access_handle_service \
@@ -249,6 +279,9 @@
 performance_server_SOURCES = performance/server.cpp
 endif
 
+unit_associated_allocator_SOURCES = unit/associated_allocator.cpp
+unit_associated_executor_SOURCES = unit/associated_executor.cpp
+unit_async_result_SOURCES = unit/async_result.cpp
 unit_basic_datagram_socket_SOURCES = unit/basic_datagram_socket.cpp
 unit_basic_deadline_timer_SOURCES = unit/basic_deadline_timer.cpp
 unit_basic_raw_socket_SOURCES = unit/basic_raw_socket.cpp
@@ -259,6 +292,7 @@
 unit_basic_stream_socket_SOURCES = unit/basic_stream_socket.cpp
 unit_basic_streambuf_SOURCES = unit/basic_streambuf.cpp
 unit_basic_waitable_timer_SOURCES = unit/basic_waitable_timer.cpp
+unit_bind_executor_SOURCES = unit/bind_executor.cpp
 unit_buffer_SOURCES = unit/buffer.cpp
 unit_buffers_iterator_SOURCES = unit/buffers_iterator.cpp
 unit_buffered_read_stream_SOURCES = unit/buffered_read_stream.cpp
@@ -270,7 +304,12 @@
 unit_datagram_socket_service_SOURCES = unit/datagram_socket_service.cpp
 unit_deadline_timer_service_SOURCES = unit/deadline_timer_service.cpp
 unit_deadline_timer_SOURCES = unit/deadline_timer.cpp
+unit_defer_SOURCES = unit/defer.cpp
+unit_dispatch_SOURCES = unit/dispatch.cpp
 unit_error_SOURCES = unit/error.cpp
+unit_execution_context_SOURCES = unit/execution_context.cpp
+unit_executor_SOURCES = unit/executor.cpp
+unit_executor_work_guard_SOURCES = unit/executor_work_guard.cpp
 unit_generic_basic_endpoint_SOURCES = unit/generic/basic_endpoint.cpp
 unit_generic_datagram_protocol_SOURCES = unit/generic/datagram_protocol.cpp
 unit_generic_raw_protocol_SOURCES = unit/generic/raw_protocol.cpp
@@ -307,12 +346,15 @@
 unit_local_connect_pair_SOURCES = unit/local/connect_pair.cpp
 unit_local_datagram_protocol_SOURCES = unit/local/datagram_protocol.cpp
 unit_local_stream_protocol_SOURCES = unit/local/stream_protocol.cpp
+unit_packaged_task_SOURCES = unit/packaged_task.cpp
 unit_placeholders_SOURCES = unit/placeholders.cpp
 unit_posix_basic_descriptor_SOURCES = unit/posix/basic_descriptor.cpp
 unit_posix_basic_stream_descriptor_SOURCES = unit/posix/basic_stream_descriptor.cpp
+unit_posix_descriptor_SOURCES = unit/posix/descriptor.cpp
 unit_posix_descriptor_base_SOURCES = unit/posix/descriptor_base.cpp
 unit_posix_stream_descriptor_SOURCES = unit/posix/stream_descriptor.cpp
 unit_posix_stream_descriptor_service_SOURCES = unit/posix/stream_descriptor_service.cpp
+unit_post_SOURCES = unit/post.cpp
 unit_raw_socket_service_SOURCES = unit/raw_socket_service.cpp
 unit_read_SOURCES = unit/read.cpp
 unit_read_at_SOURCES = unit/read_at.cpp
@@ -332,6 +374,8 @@
 unit_system_timer_SOURCES = unit/system_timer.cpp
 unit_thread_SOURCES = unit/thread.cpp
 unit_time_traits_SOURCES = unit/time_traits.cpp
+unit_use_future_SOURCES = unit/use_future.cpp
+unit_uses_executor_SOURCES = unit/uses_executor.cpp
 unit_wait_traits_SOURCES = unit/wait_traits.cpp
 unit_waitable_timer_service_SOURCES = unit/waitable_timer_service.cpp
 unit_windows_basic_handle_SOURCES = unit/windows/basic_handle.cpp
@@ -340,6 +384,7 @@
 unit_windows_basic_stream_handle_SOURCES = unit/windows/basic_stream_handle.cpp
 unit_windows_object_handle_SOURCES = unit/windows/object_handle.cpp
 unit_windows_object_handle_service_SOURCES = unit/windows/object_handle_service.cpp
+unit_windows_overlapped_handle_SOURCES = unit/windows/overlapped_handle.cpp
 unit_windows_overlapped_ptr_SOURCES = unit/windows/overlapped_ptr.cpp
 unit_windows_random_access_handle_SOURCES = unit/windows/random_access_handle.cpp
 unit_windows_random_access_handle_service_SOURCES = unit/windows/random_access_handle_service.cpp
@@ -359,7 +404,10 @@
 EXTRA_DIST = \
 	latency/allocator.hpp \
 	performance/handler_allocator.hpp \
+	unit/archetypes/async_ops.hpp \
 	unit/archetypes/async_result.hpp \
+	unit/archetypes/deprecated_async_result.hpp \
+	unit/archetypes/deprecated_async_ops.hpp \
 	unit/archetypes/gettable_socket_option.hpp \
 	unit/archetypes/io_control_command.hpp \
 	unit/archetypes/settable_socket_option.hpp
diff --git a/asio/src/tests/latency/allocator.hpp b/asio/src/tests/latency/allocator.hpp
index 6cbfa1d..56a7af3 100644
--- a/asio/src/tests/latency/allocator.hpp
+++ b/asio/src/tests/latency/allocator.hpp
@@ -2,7 +2,7 @@
 // allocator.hpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/latency/coroutine.hpp b/asio/src/tests/latency/coroutine.hpp
index afec509..74b515b 100644
--- a/asio/src/tests/latency/coroutine.hpp
+++ b/asio/src/tests/latency/coroutine.hpp
@@ -2,7 +2,7 @@
 // coroutine.hpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/latency/high_res_clock.hpp b/asio/src/tests/latency/high_res_clock.hpp
index 44f30a8..4756f52 100644
--- a/asio/src/tests/latency/high_res_clock.hpp
+++ b/asio/src/tests/latency/high_res_clock.hpp
@@ -2,7 +2,7 @@
 // high_res_clock.hpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/latency/tcp_client.cpp b/asio/src/tests/latency/tcp_client.cpp
index 0f63b3c..ee1b671 100644
--- a/asio/src/tests/latency/tcp_client.cpp
+++ b/asio/src/tests/latency/tcp_client.cpp
@@ -2,7 +2,7 @@
 // tcp_client.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/latency/tcp_server.cpp b/asio/src/tests/latency/tcp_server.cpp
index 77dc9ee..2bbdfdc 100644
--- a/asio/src/tests/latency/tcp_server.cpp
+++ b/asio/src/tests/latency/tcp_server.cpp
@@ -2,7 +2,7 @@
 // tcp_server.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/latency/udp_client.cpp b/asio/src/tests/latency/udp_client.cpp
index 5f3e588..cc27629 100644
--- a/asio/src/tests/latency/udp_client.cpp
+++ b/asio/src/tests/latency/udp_client.cpp
@@ -2,7 +2,7 @@
 // udp_client.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/latency/udp_server.cpp b/asio/src/tests/latency/udp_server.cpp
index 6aa2f8a..a767f4c 100644
--- a/asio/src/tests/latency/udp_server.cpp
+++ b/asio/src/tests/latency/udp_server.cpp
@@ -2,7 +2,7 @@
 // udp_server.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/latency/unyield.hpp b/asio/src/tests/latency/unyield.hpp
index 50ff8cf..ccbb043 100644
--- a/asio/src/tests/latency/unyield.hpp
+++ b/asio/src/tests/latency/unyield.hpp
@@ -2,7 +2,7 @@
 // unyield.hpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/latency/yield.hpp b/asio/src/tests/latency/yield.hpp
index 3d3795b..bf4c6a8 100644
--- a/asio/src/tests/latency/yield.hpp
+++ b/asio/src/tests/latency/yield.hpp
@@ -2,7 +2,7 @@
 // yield.hpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/performance/client.cpp b/asio/src/tests/performance/client.cpp
index 972379a..6851d32 100644
--- a/asio/src/tests/performance/client.cpp
+++ b/asio/src/tests/performance/client.cpp
@@ -2,7 +2,7 @@
 // client.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/performance/handler_allocator.hpp b/asio/src/tests/performance/handler_allocator.hpp
index 54abf2b..b860904 100644
--- a/asio/src/tests/performance/handler_allocator.hpp
+++ b/asio/src/tests/performance/handler_allocator.hpp
@@ -2,7 +2,7 @@
 // handler_allocator.cpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/performance/server.cpp b/asio/src/tests/performance/server.cpp
index 9d050ff..be8c381 100644
--- a/asio/src/tests/performance/server.cpp
+++ b/asio/src/tests/performance/server.cpp
@@ -2,7 +2,7 @@
 // server.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/.gitignore b/asio/src/tests/unit/.gitignore
index e0e342a..e11b5d5 100644
--- a/asio/src/tests/unit/.gitignore
+++ b/asio/src/tests/unit/.gitignore
@@ -7,6 +7,9 @@
 *.manifest
 *.pdb
 *.tds
+associated_allocator
+associated_executor
+async_result
 basic_datagram_socket
 basic_deadline_timer
 basic_raw_socket
@@ -17,6 +20,7 @@
 basic_stream_socket
 basic_streambuf
 basic_waitable_timer
+bind_executor
 buffer
 buffered_read_stream
 buffered_stream
@@ -28,13 +32,21 @@
 datagram_socket_service
 deadline_timer
 deadline_timer_service
+defer
+dispatch
 error
 error_handler
+execution_context
+executor
+executor_work_guard
 high_resolution_timer
+io_context
 io_service
 is_read_buffered
 is_write_buffered
+packaged_task
 placeholders
+post
 raw_socket_service
 read
 read_at
@@ -54,6 +66,8 @@
 system_timer
 thread
 time_traits
+use_future
+uses_executor
 wait_traits
 waitable_timer_service
 write
diff --git a/asio/src/tests/unit/archetypes/async_ops.hpp b/asio/src/tests/unit/archetypes/async_ops.hpp
new file mode 100644
index 0000000..331d8ac
--- /dev/null
+++ b/asio/src/tests/unit/archetypes/async_ops.hpp
@@ -0,0 +1,415 @@
+//
+// async_ops.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ARCHETYPES_ASYNC_OPS_HPP
+#define ARCHETYPES_ASYNC_OPS_HPP
+
+#include <asio/associated_allocator.hpp>
+#include <asio/associated_executor.hpp>
+#include <asio/async_result.hpp>
+#include <asio/error.hpp>
+
+#if defined(ASIO_HAS_BOOST_BIND)
+# include <boost/bind.hpp>
+#else // defined(ASIO_HAS_BOOST_BIND)
+# include <functional>
+#endif // defined(ASIO_HAS_BOOST_BIND)
+
+namespace archetypes {
+
+#if defined(ASIO_HAS_BOOST_BIND)
+namespace bindns = boost;
+#else // defined(ASIO_HAS_BOOST_BIND)
+namespace bindns = std;
+#endif // defined(ASIO_HAS_BOOST_BIND)
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken, void())
+async_op_0(ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::async_completion<CompletionToken,
+    void()>::completion_handler_type handler_type;
+
+  asio::async_completion<CompletionToken,
+    void()> completion(token);
+
+  typename asio::associated_allocator<handler_type>::type a
+    = asio::get_associated_allocator(completion.completion_handler);
+
+  typename asio::associated_executor<handler_type>::type ex
+    = asio::get_associated_executor(completion.completion_handler);
+
+  ex.post(ASIO_MOVE_CAST(handler_type)(completion.completion_handler), a);
+
+  return completion.result.get();
+}
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken, void(asio::error_code))
+async_op_ec_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::async_completion<CompletionToken,
+    void(asio::error_code)>::completion_handler_type handler_type;
+
+  asio::async_completion<CompletionToken,
+    void(asio::error_code)> completion(token);
+
+  typename asio::associated_allocator<handler_type>::type a
+    = asio::get_associated_allocator(completion.completion_handler);
+
+  typename asio::associated_executor<handler_type>::type ex
+    = asio::get_associated_executor(completion.completion_handler);
+
+  if (ok)
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          asio::error_code()), a);
+  }
+  else
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          asio::error_code(asio::error::operation_aborted)), a);
+  }
+
+  return completion.result.get();
+}
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken, void(std::exception_ptr))
+async_op_ex_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::async_completion<CompletionToken,
+    void(std::exception_ptr)>::completion_handler_type handler_type;
+
+  asio::async_completion<CompletionToken,
+    void(std::exception_ptr)> completion(token);
+
+  typename asio::associated_allocator<handler_type>::type a
+    = asio::get_associated_allocator(completion.completion_handler);
+
+  typename asio::associated_executor<handler_type>::type ex
+    = asio::get_associated_executor(completion.completion_handler);
+
+  if (ok)
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          std::exception_ptr()), a);
+  }
+  else
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          std::make_exception_ptr(std::runtime_error("blah"))), a);
+  }
+
+  return completion.result.get();
+}
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken, void(int))
+async_op_1(ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::async_completion<CompletionToken,
+    void(int)>::completion_handler_type handler_type;
+
+  asio::async_completion<CompletionToken,
+    void(int)> completion(token);
+
+  typename asio::associated_allocator<handler_type>::type a
+    = asio::get_associated_allocator(completion.completion_handler);
+
+  typename asio::associated_executor<handler_type>::type ex
+    = asio::get_associated_executor(completion.completion_handler);
+
+  ex.post(
+      bindns::bind(
+        ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+        42), a);
+
+  return completion.result.get();
+}
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken,
+    void(asio::error_code, int))
+async_op_ec_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::async_completion<CompletionToken,
+    void(asio::error_code, int)>::completion_handler_type
+      handler_type;
+
+  asio::async_completion<CompletionToken,
+    void(asio::error_code, int)> completion(token);
+
+  typename asio::associated_allocator<handler_type>::type a
+    = asio::get_associated_allocator(completion.completion_handler);
+
+  typename asio::associated_executor<handler_type>::type ex
+    = asio::get_associated_executor(completion.completion_handler);
+
+  if (ok)
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          asio::error_code(), 42), a);
+  }
+  else
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          asio::error_code(asio::error::operation_aborted),
+          0), a);
+  }
+
+  return completion.result.get();
+}
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken, void(std::exception_ptr, int))
+async_op_ex_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::async_completion<CompletionToken,
+    void(std::exception_ptr, int)>::completion_handler_type
+      handler_type;
+
+  asio::async_completion<CompletionToken,
+    void(std::exception_ptr, int)> completion(token);
+
+  typename asio::associated_allocator<handler_type>::type a
+    = asio::get_associated_allocator(completion.completion_handler);
+
+  typename asio::associated_executor<handler_type>::type ex
+    = asio::get_associated_executor(completion.completion_handler);
+
+  if (ok)
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          std::exception_ptr(), 42), a);
+  }
+  else
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          std::make_exception_ptr(std::runtime_error("blah")), 0), a);
+  }
+
+  return completion.result.get();
+}
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken, void(int, double))
+async_op_2(ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::async_completion<CompletionToken,
+    void(int, double)>::completion_handler_type handler_type;
+
+  asio::async_completion<CompletionToken,
+    void(int, double)> completion(token);
+
+  typename asio::associated_allocator<handler_type>::type a
+    = asio::get_associated_allocator(completion.completion_handler);
+
+  typename asio::associated_executor<handler_type>::type ex
+    = asio::get_associated_executor(completion.completion_handler);
+
+  ex.post(
+      bindns::bind(
+        ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+        42, 2.0), a);
+
+  return completion.result.get();
+}
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken,
+    void(asio::error_code, int, double))
+async_op_ec_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::async_completion<CompletionToken,
+    void(asio::error_code, int, double)>::completion_handler_type
+      handler_type;
+
+  asio::async_completion<CompletionToken,
+    void(asio::error_code, int, double)> completion(token);
+
+  typename asio::associated_allocator<handler_type>::type a
+    = asio::get_associated_allocator(completion.completion_handler);
+
+  typename asio::associated_executor<handler_type>::type ex
+    = asio::get_associated_executor(completion.completion_handler);
+
+  if (ok)
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          asio::error_code(), 42, 2.0), a);
+  }
+  else
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          asio::error_code(asio::error::operation_aborted),
+          0, 0.0), a);
+  }
+
+  return completion.result.get();
+}
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken,
+    void(std::exception_ptr, int, double))
+async_op_ex_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::async_completion<CompletionToken,
+    void(std::exception_ptr, int, double)>::completion_handler_type
+      handler_type;
+
+  asio::async_completion<CompletionToken,
+    void(std::exception_ptr, int, double)> completion(token);
+
+  typename asio::associated_allocator<handler_type>::type a
+    = asio::get_associated_allocator(completion.completion_handler);
+
+  typename asio::associated_executor<handler_type>::type ex
+    = asio::get_associated_executor(completion.completion_handler);
+
+  if (ok)
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          std::exception_ptr(), 42, 2.0), a);
+  }
+  else
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          std::make_exception_ptr(std::runtime_error("blah")), 0, 0.0), a);
+  }
+
+  return completion.result.get();
+}
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken, void(int, double, char))
+async_op_3(ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::async_completion<CompletionToken,
+    void(int, double, char)>::completion_handler_type handler_type;
+
+  asio::async_completion<CompletionToken,
+    void(int, double, char)> completion(token);
+
+  typename asio::associated_allocator<handler_type>::type a
+    = asio::get_associated_allocator(completion.completion_handler);
+
+  typename asio::associated_executor<handler_type>::type ex
+    = asio::get_associated_executor(completion.completion_handler);
+
+  ex.post(
+      bindns::bind(
+        ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+        42, 2.0, 'a'), a);
+
+  return completion.result.get();
+}
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken,
+    void(asio::error_code, int, double, char))
+async_op_ec_3(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::async_completion<CompletionToken,
+    void(asio::error_code, int, double, char)>::completion_handler_type
+      handler_type;
+
+  asio::async_completion<CompletionToken,
+    void(asio::error_code, int, double, char)> completion(token);
+
+  typename asio::associated_allocator<handler_type>::type a
+    = asio::get_associated_allocator(completion.completion_handler);
+
+  typename asio::associated_executor<handler_type>::type ex
+    = asio::get_associated_executor(completion.completion_handler);
+
+  if (ok)
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          asio::error_code(), 42, 2.0, 'a'), a);
+  }
+  else
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          asio::error_code(asio::error::operation_aborted),
+          0, 0.0, 'z'), a);
+  }
+
+  return completion.result.get();
+}
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken,
+    void(std::exception_ptr, int, double, char))
+async_op_ex_3(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::async_completion<CompletionToken,
+    void(std::exception_ptr, int, double, char)>::completion_handler_type
+      handler_type;
+
+  asio::async_completion<CompletionToken,
+    void(std::exception_ptr, int, double, char)> completion(token);
+
+  typename asio::associated_allocator<handler_type>::type a
+    = asio::get_associated_allocator(completion.completion_handler);
+
+  typename asio::associated_executor<handler_type>::type ex
+    = asio::get_associated_executor(completion.completion_handler);
+
+  if (ok)
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          std::exception_ptr(), 42, 2.0, 'a'), a);
+  }
+  else
+  {
+    ex.post(
+        bindns::bind(
+          ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+          std::make_exception_ptr(std::runtime_error("blah")),
+          0, 0.0, 'z'), a);
+  }
+
+  return completion.result.get();
+}
+
+} // namespace archetypes
+
+#endif // ARCHETYPES_ASYNC_OPS_HPP
diff --git a/asio/src/tests/unit/archetypes/async_result.hpp b/asio/src/tests/unit/archetypes/async_result.hpp
index 96cf76a..afd9e56 100644
--- a/asio/src/tests/unit/archetypes/async_result.hpp
+++ b/asio/src/tests/unit/archetypes/async_result.hpp
@@ -2,7 +2,7 @@
 // async_result.hpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -12,7 +12,6 @@
 #define ARCHETYPES_ASYNC_RESULT_HPP
 
 #include <asio/async_result.hpp>
-#include <asio/handler_type.hpp>
 
 namespace archetypes {
 
@@ -48,28 +47,30 @@
 namespace asio {
 
 template <typename Signature>
-struct handler_type<archetypes::lazy_handler, Signature>
-{
-  typedef archetypes::concrete_handler type;
-};
-
-template <>
-class async_result<archetypes::concrete_handler>
+class async_result<archetypes::lazy_handler, Signature>
 {
 public:
+  // The concrete completion handler type.
+  typedef archetypes::concrete_handler completion_handler_type;
+
   // The return type of the initiating function.
-  typedef int type;
+  typedef int return_type;
 
   // Construct an async_result from a given handler.
-  explicit async_result(archetypes::concrete_handler&)
+  explicit async_result(completion_handler_type&)
   {
   }
 
   // Obtain the value to be returned from the initiating function.
-  type get()
+  return_type get()
   {
     return 42;
   }
+
+private:
+  // Disallow copying and assignment.
+  async_result(const async_result&) ASIO_DELETED;
+  async_result& operator=(const async_result&) ASIO_DELETED;
 };
 
 } // namespace asio
diff --git a/asio/src/tests/unit/archetypes/deprecated_async_ops.hpp b/asio/src/tests/unit/archetypes/deprecated_async_ops.hpp
new file mode 100644
index 0000000..ee1cab9
--- /dev/null
+++ b/asio/src/tests/unit/archetypes/deprecated_async_ops.hpp
@@ -0,0 +1,345 @@
+//
+// deprecated_async_ops.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ARCHETYPES_DEPRECATED_ASYNC_OPS_HPP
+#define ARCHETYPES_DEPRECATED_ASYNC_OPS_HPP
+
+#include <asio/async_result.hpp>
+
+#if !defined(ASIO_NO_DEPRECATED)
+
+#include <asio/handler_type.hpp>
+#include <asio/error.hpp>
+#include <asio/io_context.hpp>
+
+#if defined(ASIO_HAS_BOOST_BIND)
+# include <boost/bind.hpp>
+#else // defined(ASIO_HAS_BOOST_BIND)
+# include <functional>
+#endif // defined(ASIO_HAS_BOOST_BIND)
+
+namespace archetypes {
+
+#if defined(ASIO_HAS_BOOST_BIND)
+namespace bindns = boost;
+#else // defined(ASIO_HAS_BOOST_BIND)
+namespace bindns = std;
+#endif // defined(ASIO_HAS_BOOST_BIND)
+
+template <typename CompletionToken>
+typename asio::async_result<
+  typename asio::handler_type<CompletionToken,
+    void()>::type>::type
+deprecated_async_op_0(asio::io_context& ctx,
+    ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::handler_type<CompletionToken,
+    void()>::type handler_type;
+
+  handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
+
+  asio::async_result<handler_type> result(handler);
+
+  ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler)));
+
+  return result.get();
+}
+
+template <typename CompletionToken>
+typename asio::async_result<
+  typename asio::handler_type<CompletionToken,
+    void(asio::error_code)>::type>::type
+deprecated_async_op_ec_0(asio::io_context& ctx,
+    bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::handler_type<CompletionToken,
+    void(asio::error_code)>::type handler_type;
+
+  handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
+
+  asio::async_result<handler_type> result(handler);
+
+  if (ok)
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          asio::error_code()));
+  }
+  else
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          asio::error_code(asio::error::operation_aborted)));
+  }
+
+  return result.get();
+}
+
+template <typename CompletionToken>
+typename asio::async_result<
+  typename asio::handler_type<CompletionToken,
+    void(std::exception_ptr)>::type>::type
+deprecated_async_op_ex_0(asio::io_context& ctx,
+    bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::handler_type<CompletionToken,
+    void(std::exception_ptr)>::type handler_type;
+
+  handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
+
+  asio::async_result<handler_type> result(handler);
+
+  if (ok)
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          std::exception_ptr()));
+  }
+  else
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          std::make_exception_ptr(std::runtime_error("blah"))));
+  }
+
+  return result.get();
+}
+
+template <typename CompletionToken>
+typename asio::async_result<
+  typename asio::handler_type<CompletionToken,
+    void(int)>::type>::type
+deprecated_async_op_1(asio::io_context& ctx,
+    ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::handler_type<CompletionToken,
+    void(int)>::type handler_type;
+
+  handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
+
+  asio::async_result<handler_type> result(handler);
+
+  ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler), 42));
+
+  return result.get();
+}
+
+template <typename CompletionToken>
+typename asio::async_result<
+  typename asio::handler_type<CompletionToken,
+    void(asio::error_code, int)>::type>::type
+deprecated_async_op_ec_1(asio::io_context& ctx,
+    bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::handler_type<CompletionToken,
+    void(asio::error_code, int)>::type handler_type;
+
+  handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
+
+  asio::async_result<handler_type> result(handler);
+
+  if (ok)
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          asio::error_code(), 42));
+  }
+  else
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          asio::error_code(asio::error::operation_aborted), 0));
+  }
+
+  return result.get();
+}
+
+template <typename CompletionToken>
+typename asio::async_result<
+  typename asio::handler_type<CompletionToken,
+    void(std::exception_ptr, int)>::type>::type
+deprecated_async_op_ex_1(asio::io_context& ctx,
+    bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::handler_type<CompletionToken,
+    void(std::exception_ptr, int)>::type handler_type;
+
+  handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
+
+  asio::async_result<handler_type> result(handler);
+
+  if (ok)
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          std::exception_ptr(), 42));
+  }
+  else
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          std::make_exception_ptr(std::runtime_error("blah")), 0));
+  }
+
+  return result.get();
+}
+
+template <typename CompletionToken>
+typename asio::async_result<
+  typename asio::handler_type<CompletionToken,
+    void(int, double)>::type>::type
+deprecated_async_op_2(asio::io_context& ctx,
+    ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::handler_type<CompletionToken,
+    void(int, double)>::type handler_type;
+
+  handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
+
+  asio::async_result<handler_type> result(handler);
+
+  ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+        42, 2.0));
+
+  return result.get();
+}
+
+template <typename CompletionToken>
+typename asio::async_result<
+  typename asio::handler_type<CompletionToken,
+    void(asio::error_code, int, double)>::type>::type
+deprecated_async_op_ec_2(asio::io_context& ctx,
+    bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::handler_type<CompletionToken,
+    void(asio::error_code, int, double)>::type handler_type;
+
+  handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
+
+  asio::async_result<handler_type> result(handler);
+
+  if (ok)
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          asio::error_code(), 42, 2.0));
+  }
+  else
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          asio::error_code(asio::error::operation_aborted),
+          0, 0.0));
+  }
+
+  return result.get();
+}
+
+template <typename CompletionToken>
+typename asio::async_result<
+  typename asio::handler_type<CompletionToken,
+    void(std::exception_ptr, int, double)>::type>::type
+deprecated_async_op_ex_2(asio::io_context& ctx,
+    bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::handler_type<CompletionToken,
+    void(std::exception_ptr, int, double)>::type handler_type;
+
+  handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
+
+  asio::async_result<handler_type> result(handler);
+
+  if (ok)
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          std::exception_ptr(), 42, 2.0));
+  }
+  else
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          std::make_exception_ptr(std::runtime_error("blah")), 0, 0.0));
+  }
+
+  return result.get();
+}
+
+template <typename CompletionToken>
+typename asio::async_result<
+  typename asio::handler_type<CompletionToken,
+    void(int, double, char)>::type>::type
+deprecated_async_op_3(asio::io_context& ctx,
+    ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::handler_type<CompletionToken,
+    void(int, double, char)>::type handler_type;
+
+  handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
+
+  asio::async_result<handler_type> result(handler);
+
+  ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+        42, 2.0, 'a'));
+
+  return result.get();
+}
+
+template <typename CompletionToken>
+typename asio::async_result<
+  typename asio::handler_type<CompletionToken,
+    void(asio::error_code, int, double, char)>::type>::type
+deprecated_async_op_ec_3(asio::io_context& ctx,
+    bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::handler_type<CompletionToken,
+    void(asio::error_code, int, double, char)>::type handler_type;
+
+  handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
+
+  asio::async_result<handler_type> result(handler);
+
+  if (ok)
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          asio::error_code(), 42, 2.0, 'a'));
+  }
+  else
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          asio::error_code(asio::error::operation_aborted),
+          0, 0.0, 'z'));
+  }
+
+  return result.get();
+}
+
+template <typename CompletionToken>
+typename asio::async_result<
+  typename asio::handler_type<CompletionToken,
+    void(std::exception_ptr, int, double, char)>::type>::type
+deprecated_async_op_ex_3(asio::io_context& ctx,
+    bool ok, ASIO_MOVE_ARG(CompletionToken) token)
+{
+  typedef typename asio::handler_type<CompletionToken,
+    void(std::exception_ptr, int, double, char)>::type handler_type;
+
+  handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
+
+  asio::async_result<handler_type> result(handler);
+
+  if (ok)
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          std::exception_ptr(), 42, 2.0, 'a'));
+  }
+  else
+  {
+    ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
+          std::make_exception_ptr(std::runtime_error("blah")),
+          0, 0.0, 'z'));
+  }
+
+  return result.get();
+}
+
+} // namespace archetypes
+
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+#endif // ARCHETYPES_DEPRECATED_ASYNC_OPS_HPP
diff --git a/asio/src/tests/unit/archetypes/deprecated_async_result.hpp b/asio/src/tests/unit/archetypes/deprecated_async_result.hpp
new file mode 100644
index 0000000..c395b37
--- /dev/null
+++ b/asio/src/tests/unit/archetypes/deprecated_async_result.hpp
@@ -0,0 +1,82 @@
+//
+// async_result.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef ARCHETYPES_DEPRECATED_ASYNC_RESULT_HPP
+#define ARCHETYPES_DEPRECATED_ASYNC_RESULT_HPP
+
+#include <asio/async_result.hpp>
+
+#if !defined(ASIO_NO_DEPRECATED)
+
+#include <asio/handler_type.hpp>
+
+namespace archetypes {
+
+struct deprecated_lazy_handler
+{
+};
+
+struct deprecated_concrete_handler
+{
+  deprecated_concrete_handler(deprecated_lazy_handler)
+  {
+  }
+
+  template <typename Arg1>
+  void operator()(Arg1)
+  {
+  }
+
+  template <typename Arg1, typename Arg2>
+  void operator()(Arg1, Arg2)
+  {
+  }
+
+#if defined(ASIO_HAS_MOVE)
+  deprecated_concrete_handler(deprecated_concrete_handler&&) {}
+private:
+  deprecated_concrete_handler(const deprecated_concrete_handler&);
+#endif // defined(ASIO_HAS_MOVE)
+};
+
+} // namespace archetypes
+
+namespace asio {
+
+template <typename Signature>
+struct handler_type<archetypes::deprecated_lazy_handler, Signature>
+{
+  typedef archetypes::deprecated_concrete_handler type;
+};
+
+template <>
+class async_result<archetypes::deprecated_concrete_handler>
+{
+public:
+  // The return type of the initiating function.
+  typedef double type;
+
+  // Construct an async_result from a given handler.
+  explicit async_result(archetypes::deprecated_concrete_handler&)
+  {
+  }
+
+  // Obtain the value to be returned from the initiating function.
+  type get()
+  {
+    return 42;
+  }
+};
+
+} // namespace asio
+
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+#endif // ARCHETYPES_DEPRECATED_ASYNC_RESULT_HPP
diff --git a/asio/src/tests/unit/archetypes/gettable_socket_option.hpp b/asio/src/tests/unit/archetypes/gettable_socket_option.hpp
index b413068..24544b0 100644
--- a/asio/src/tests/unit/archetypes/gettable_socket_option.hpp
+++ b/asio/src/tests/unit/archetypes/gettable_socket_option.hpp
@@ -2,7 +2,7 @@
 // gettable_socket_option.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/archetypes/io_control_command.hpp b/asio/src/tests/unit/archetypes/io_control_command.hpp
index 9538d74..011eb07 100644
--- a/asio/src/tests/unit/archetypes/io_control_command.hpp
+++ b/asio/src/tests/unit/archetypes/io_control_command.hpp
@@ -2,7 +2,7 @@
 // io_control_command.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/archetypes/settable_socket_option.hpp b/asio/src/tests/unit/archetypes/settable_socket_option.hpp
index 0c4a28c..99b4dac 100644
--- a/asio/src/tests/unit/archetypes/settable_socket_option.hpp
+++ b/asio/src/tests/unit/archetypes/settable_socket_option.hpp
@@ -2,7 +2,7 @@
 // settable_socket_option.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/associated_allocator.cpp b/asio/src/tests/unit/associated_allocator.cpp
new file mode 100644
index 0000000..f4ebbd6
--- /dev/null
+++ b/asio/src/tests/unit/associated_allocator.cpp
@@ -0,0 +1,25 @@
+//
+// associated_allocator.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/associated_allocator.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  associated_allocator,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/associated_executor.cpp b/asio/src/tests/unit/associated_executor.cpp
new file mode 100644
index 0000000..df9a377
--- /dev/null
+++ b/asio/src/tests/unit/associated_executor.cpp
@@ -0,0 +1,25 @@
+//
+// associated_executor.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/associated_executor.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  associated_executor,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/async_result.cpp b/asio/src/tests/unit/async_result.cpp
new file mode 100644
index 0000000..bdf3585
--- /dev/null
+++ b/asio/src/tests/unit/async_result.cpp
@@ -0,0 +1,25 @@
+//
+// async_result.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/async_result.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  async_result,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/basic_datagram_socket.cpp b/asio/src/tests/unit/basic_datagram_socket.cpp
index f0280ee..1e51f53 100644
--- a/asio/src/tests/unit/basic_datagram_socket.cpp
+++ b/asio/src/tests/unit/basic_datagram_socket.cpp
@@ -2,7 +2,7 @@
 // basic_datagram_socket.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/basic_deadline_timer.cpp b/asio/src/tests/unit/basic_deadline_timer.cpp
index 20990ad..ec7411b 100644
--- a/asio/src/tests/unit/basic_deadline_timer.cpp
+++ b/asio/src/tests/unit/basic_deadline_timer.cpp
@@ -2,7 +2,7 @@
 // basic_deadline_timer.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/basic_raw_socket.cpp b/asio/src/tests/unit/basic_raw_socket.cpp
index e9ab35e..ecd6726 100644
--- a/asio/src/tests/unit/basic_raw_socket.cpp
+++ b/asio/src/tests/unit/basic_raw_socket.cpp
@@ -2,7 +2,7 @@
 // basic_raw_socket.cpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/basic_seq_packet_socket.cpp b/asio/src/tests/unit/basic_seq_packet_socket.cpp
index 1a375d6..a1f6829 100644
--- a/asio/src/tests/unit/basic_seq_packet_socket.cpp
+++ b/asio/src/tests/unit/basic_seq_packet_socket.cpp
@@ -2,7 +2,7 @@
 // basic_seq_packet_socket.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/basic_serial_port.cpp b/asio/src/tests/unit/basic_serial_port.cpp
index ab6cf70..dc69f1d 100644
--- a/asio/src/tests/unit/basic_serial_port.cpp
+++ b/asio/src/tests/unit/basic_serial_port.cpp
@@ -2,7 +2,7 @@
 // basic_serial_port.cpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/src/tests/unit/basic_signal_set.cpp b/asio/src/tests/unit/basic_signal_set.cpp
index 90642d0..4bce1f0 100644
--- a/asio/src/tests/unit/basic_signal_set.cpp
+++ b/asio/src/tests/unit/basic_signal_set.cpp
@@ -2,7 +2,7 @@
 // basic_signal_set.cpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/basic_socket_acceptor.cpp b/asio/src/tests/unit/basic_socket_acceptor.cpp
index b14e92f..6c40e2c 100644
--- a/asio/src/tests/unit/basic_socket_acceptor.cpp
+++ b/asio/src/tests/unit/basic_socket_acceptor.cpp
@@ -2,7 +2,7 @@
 // basic_socket_acceptor.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/basic_stream_socket.cpp b/asio/src/tests/unit/basic_stream_socket.cpp
index ada8548..617d162 100644
--- a/asio/src/tests/unit/basic_stream_socket.cpp
+++ b/asio/src/tests/unit/basic_stream_socket.cpp
@@ -2,7 +2,7 @@
 // basic_stream_socket.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/basic_streambuf.cpp b/asio/src/tests/unit/basic_streambuf.cpp
index b3aa12b..97ef628 100644
--- a/asio/src/tests/unit/basic_streambuf.cpp
+++ b/asio/src/tests/unit/basic_streambuf.cpp
@@ -2,7 +2,7 @@
 // basic_streambuf.cpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/basic_waitable_timer.cpp b/asio/src/tests/unit/basic_waitable_timer.cpp
index 8ffcc03..175de08 100644
--- a/asio/src/tests/unit/basic_waitable_timer.cpp
+++ b/asio/src/tests/unit/basic_waitable_timer.cpp
@@ -2,7 +2,7 @@
 // basic_waitable_timer.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/bind_executor.cpp b/asio/src/tests/unit/bind_executor.cpp
new file mode 100644
index 0000000..3c2da5d
--- /dev/null
+++ b/asio/src/tests/unit/bind_executor.cpp
@@ -0,0 +1,25 @@
+//
+// bind_executor.cpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/bind_executor.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  bind_executor,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/buffer.cpp b/asio/src/tests/unit/buffer.cpp
index aca5e1f..3c53751 100644
--- a/asio/src/tests/unit/buffer.cpp
+++ b/asio/src/tests/unit/buffer.cpp
@@ -2,7 +2,7 @@
 // buffer.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -61,6 +61,13 @@
     const std::string const_string_data(1024, ' ');
     std::vector<mutable_buffer> mutable_buffer_sequence;
     std::vector<const_buffer> const_buffer_sequence;
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+# if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    std::experimental::string_view string_view_data(string_data);
+# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    std::string_view string_view_data(string_data);
+# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
 
     // mutable_buffer constructors.
 
@@ -78,9 +85,12 @@
 
     // mutable_buffer operators.
 
+    mb1 += 128;
     mb1 = mb2 + 128;
     mb1 = 128 + mb2;
 
+#if !defined(ASIO_NO_DEPRECATED)
+
     // mutable_buffers_1 constructors.
 
     mutable_buffers_1 mbc1(mb1);
@@ -93,6 +103,8 @@
     mutable_buffers_1::const_iterator iter2 = mbc1.end();
     (void)iter2;
 
+#endif // !defined(ASIO_NO_DEPRECATED)
+
     // const_buffer constructors.
 
     const_buffer cb1;
@@ -110,9 +122,12 @@
 
     // const_buffer operators.
 
+    cb1 += 128;
     cb1 = cb2 + 128;
     cb1 = 128 + cb2;
 
+#if !defined(ASIO_NO_DEPRECATED)
+
     // const_buffers_1 constructors.
 
     const_buffers_1 cbc1(cb1);
@@ -125,16 +140,20 @@
     const_buffers_1::const_iterator iter4 = cbc1.end();
     (void)iter4;
 
+#endif // !defined(ASIO_NO_DEPRECATED)
+
     // buffer_size function overloads.
 
     std::size_t size1 = buffer_size(mb1);
     (void)size1;
     std::size_t size2 = buffer_size(cb1);
     (void)size2;
+#if !defined(ASIO_NO_DEPRECATED)
     std::size_t size3 = buffer_size(mbc1);
     (void)size3;
     std::size_t size4 = buffer_size(cbc1);
     (void)size4;
+#endif // !defined(ASIO_NO_DEPRECATED)
     std::size_t size5 = buffer_size(mutable_buffer_sequence);
     (void)size5;
     std::size_t size6 = buffer_size(const_buffer_sequence);
@@ -185,19 +204,28 @@
     mb1 = buffer(string_data, 1024);
     cb1 = buffer(const_string_data);
     cb1 = buffer(const_string_data, 1024);
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+    cb1 = buffer(string_view_data);
+    cb1 = buffer(string_view_data, 1024);
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
 
     // buffer_copy function overloads.
 
     std::size_t size7 = buffer_copy(mb1, cb2);
     (void)size7;
+#if !defined(ASIO_NO_DEPRECATED)
     std::size_t size8 = buffer_copy(mb1, cbc2);
     (void)size8;
+#endif // !defined(ASIO_NO_DEPRECATED)
     std::size_t size9 = buffer_copy(mb1, mb2);
     (void)size9;
+#if !defined(ASIO_NO_DEPRECATED)
     std::size_t size10 = buffer_copy(mb1, mbc2);
     (void)size10;
+#endif // !defined(ASIO_NO_DEPRECATED)
     std::size_t size11 = buffer_copy(mb1, const_buffer_sequence);
     (void)size11;
+#if !defined(ASIO_NO_DEPRECATED)
     std::size_t size12 = buffer_copy(mbc1, cb2);
     (void)size12;
     std::size_t size13 = buffer_copy(mbc1, cbc2);
@@ -208,27 +236,37 @@
     (void)size15;
     std::size_t size16 = buffer_copy(mbc1, const_buffer_sequence);
     (void)size16;
+#endif // !defined(ASIO_NO_DEPRECATED)
     std::size_t size17 = buffer_copy(mutable_buffer_sequence, cb2);
     (void)size17;
+#if !defined(ASIO_NO_DEPRECATED)
     std::size_t size18 = buffer_copy(mutable_buffer_sequence, cbc2);
     (void)size18;
+#endif // !defined(ASIO_NO_DEPRECATED)
     std::size_t size19 = buffer_copy(mutable_buffer_sequence, mb2);
     (void)size19;
+#if !defined(ASIO_NO_DEPRECATED)
     std::size_t size20 = buffer_copy(mutable_buffer_sequence, mbc2);
     (void)size20;
+#endif // !defined(ASIO_NO_DEPRECATED)
     std::size_t size21 = buffer_copy(
         mutable_buffer_sequence, const_buffer_sequence);
     (void)size21;
     std::size_t size22 = buffer_copy(mb1, cb2, 128);
     (void)size22;
+#if !defined(ASIO_NO_DEPRECATED)
     std::size_t size23 = buffer_copy(mb1, cbc2, 128);
     (void)size23;
+#endif // !defined(ASIO_NO_DEPRECATED)
     std::size_t size24 = buffer_copy(mb1, mb2, 128);
     (void)size24;
+#if !defined(ASIO_NO_DEPRECATED)
     std::size_t size25 = buffer_copy(mb1, mbc2, 128);
     (void)size25;
+#endif // !defined(ASIO_NO_DEPRECATED)
     std::size_t size26 = buffer_copy(mb1, const_buffer_sequence, 128);
     (void)size26;
+#if !defined(ASIO_NO_DEPRECATED)
     std::size_t size27 = buffer_copy(mbc1, cb2, 128);
     (void)size27;
     std::size_t size28 = buffer_copy(mbc1, cbc2, 128);
@@ -239,14 +277,19 @@
     (void)size30;
     std::size_t size31 = buffer_copy(mbc1, const_buffer_sequence, 128);
     (void)size31;
+#endif // !defined(ASIO_NO_DEPRECATED)
     std::size_t size32 = buffer_copy(mutable_buffer_sequence, cb2, 128);
     (void)size32;
+#if !defined(ASIO_NO_DEPRECATED)
     std::size_t size33 = buffer_copy(mutable_buffer_sequence, cbc2, 128);
     (void)size33;
+#endif // !defined(ASIO_NO_DEPRECATED)
     std::size_t size34 = buffer_copy(mutable_buffer_sequence, mb2, 128);
     (void)size34;
+#if !defined(ASIO_NO_DEPRECATED)
     std::size_t size35 = buffer_copy(mutable_buffer_sequence, mbc2, 128);
     (void)size35;
+#endif // !defined(ASIO_NO_DEPRECATED)
     std::size_t size36 = buffer_copy(
         mutable_buffer_sequence, const_buffer_sequence, 128);
     (void)size36;
@@ -265,6 +308,40 @@
     dynamic_vector_buffer<char, std::allocator<char> >
       db4 = dynamic_buffer(vector_data, 1024);
     (void)db4;
+
+    // dynamic_buffer member functions.
+
+    std::size_t size37 = db1.size();
+    (void)size37;
+    std::size_t size38 = db3.size();
+    (void)size38;
+
+    std::size_t size39 = db1.max_size();
+    (void)size39;
+    std::size_t size40 = db3.max_size();
+    (void)size40;
+
+    dynamic_string_buffer<char, std::string::traits_type,
+      std::string::allocator_type>::const_buffers_type
+        cb5 = db1.data();
+    (void)cb5;
+    dynamic_vector_buffer<char, std::allocator<char> >::const_buffers_type
+      cb6 = db3.data();
+    (void)cb6;
+
+    dynamic_string_buffer<char, std::string::traits_type,
+      std::string::allocator_type>::mutable_buffers_type mb5
+        = db1.prepare(1024);
+    (void)mb5;
+    dynamic_vector_buffer<char, std::allocator<char> >::mutable_buffers_type
+      mb6 = db3.prepare(1024);
+    (void)mb6;
+
+    db1.commit(1024);
+    db3.commit(1024);
+
+    db1.consume(1024);
+    db3.consume(1024);
   }
   catch (std::exception&)
   {
@@ -275,8 +352,216 @@
 
 //------------------------------------------------------------------------------
 
+namespace buffer_copy_runtime {
+
+using namespace asio;
+using namespace std;
+
+void test()
+{
+  char dest_data[256];
+  char source_data[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mutable_buffer mb1 = asio::buffer(dest_data);
+  mutable_buffer mb2 = asio::buffer(source_data);
+  std::size_t n = buffer_copy(mb1, mb2);
+  ASIO_CHECK(n == sizeof(source_data));
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mb1 = asio::buffer(dest_data);
+  const_buffer cb1 = asio::buffer(source_data);
+  n = buffer_copy(mb1, cb1);
+  ASIO_CHECK(n == sizeof(source_data));
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+#if !defined(ASIO_NO_DEPRECATED)
+  memset(dest_data, 0, sizeof(dest_data));
+  mb1 = asio::buffer(dest_data);
+  mutable_buffers_1 mbc1 = asio::buffer(source_data);
+  n = buffer_copy(mb1, mbc1);
+  ASIO_CHECK(n == sizeof(source_data));
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mb1 = asio::buffer(dest_data);
+  const_buffers_1 cbc1 = const_buffers_1(asio::buffer(source_data));
+  n = buffer_copy(mb1, cbc1);
+  ASIO_CHECK(n == sizeof(source_data));
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mbc1 = asio::buffer(dest_data);
+  mb1 = asio::buffer(source_data);
+  n = buffer_copy(mbc1, mb1);
+  ASIO_CHECK(n == sizeof(source_data));
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mbc1 = asio::buffer(dest_data);
+  cb1 = asio::buffer(source_data);
+  n = buffer_copy(mbc1, cb1);
+  ASIO_CHECK(n == sizeof(source_data));
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mbc1 = asio::buffer(dest_data);
+  mutable_buffers_1 mbc2 = asio::buffer(source_data);
+  n = buffer_copy(mbc1, mbc2);
+  ASIO_CHECK(n == sizeof(source_data));
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mbc1 = asio::buffer(dest_data);
+  cbc1 = const_buffers_1(asio::buffer(source_data));
+  n = buffer_copy(mbc1, cbc1);
+  ASIO_CHECK(n == sizeof(source_data));
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mb1 = asio::buffer(dest_data);
+  std::vector<mutable_buffer> mv1;
+  mv1.push_back(asio::buffer(source_data, 5));
+  mv1.push_back(asio::buffer(source_data) + 5);
+  n = buffer_copy(mb1, mv1);
+  ASIO_CHECK(n == sizeof(source_data));
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mb1 = asio::buffer(dest_data);
+  std::vector<const_buffer> cv1;
+  cv1.push_back(asio::buffer(source_data, 6));
+  cv1.push_back(asio::buffer(source_data) + 6);
+  n = buffer_copy(mb1, cv1);
+  ASIO_CHECK(n == sizeof(source_data));
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mv1.clear();
+  mv1.push_back(asio::buffer(dest_data, 7));
+  mv1.push_back(asio::buffer(dest_data) + 7);
+  cb1 = asio::buffer(source_data);
+  n = buffer_copy(mv1, cb1);
+  ASIO_CHECK(n == sizeof(source_data));
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mv1.clear();
+  mv1.push_back(asio::buffer(dest_data, 7));
+  mv1.push_back(asio::buffer(dest_data) + 7);
+  cv1.clear();
+  cv1.push_back(asio::buffer(source_data, 8));
+  cv1.push_back(asio::buffer(source_data) + 8);
+  n = buffer_copy(mv1, cv1);
+  ASIO_CHECK(n == sizeof(source_data));
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mb1 = asio::buffer(dest_data);
+  mb2 = asio::buffer(source_data);
+  n = buffer_copy(mb1, mb2, 10);
+  ASIO_CHECK(n == 10);
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mb1 = asio::buffer(dest_data);
+  cb1 = asio::buffer(source_data);
+  n = buffer_copy(mb1, cb1, 10);
+  ASIO_CHECK(n == 10);
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+#if !defined(ASIO_NO_DEPRECATED)
+  memset(dest_data, 0, sizeof(dest_data));
+  mb1 = asio::buffer(dest_data);
+  mbc1 = asio::buffer(source_data);
+  n = buffer_copy(mb1, mbc1, 10);
+  ASIO_CHECK(n == 10);
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mb1 = asio::buffer(dest_data);
+  cbc1 = const_buffers_1(asio::buffer(source_data));
+  n = buffer_copy(mb1, cbc1, 10);
+  ASIO_CHECK(n == 10);
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mbc1 = asio::buffer(dest_data);
+  mb1 = asio::buffer(source_data);
+  n = buffer_copy(mbc1, mb1, 10);
+  ASIO_CHECK(n == 10);
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mbc1 = asio::buffer(dest_data);
+  cb1 = asio::buffer(source_data);
+  n = buffer_copy(mbc1, cb1, 10);
+  ASIO_CHECK(n == 10);
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mbc1 = asio::buffer(dest_data);
+  mbc2 = asio::buffer(source_data);
+  n = buffer_copy(mbc1, mbc2, 10);
+  ASIO_CHECK(n == 10);
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mbc1 = asio::buffer(dest_data);
+  cbc1 = const_buffers_1(asio::buffer(source_data));
+  n = buffer_copy(mbc1, cbc1, 10);
+  ASIO_CHECK(n == 10);
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mb1 = asio::buffer(dest_data);
+  mv1.clear();
+  mv1.push_back(asio::buffer(source_data, 5));
+  mv1.push_back(asio::buffer(source_data) + 5);
+  n = buffer_copy(mb1, mv1, 10);
+  ASIO_CHECK(n == 10);
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mb1 = asio::buffer(dest_data);
+  cv1.clear();
+  cv1.push_back(asio::buffer(source_data, 6));
+  cv1.push_back(asio::buffer(source_data) + 6);
+  n = buffer_copy(mb1, cv1, 10);
+  ASIO_CHECK(n == 10);
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mv1.clear();
+  mv1.push_back(asio::buffer(dest_data, 7));
+  mv1.push_back(asio::buffer(dest_data) + 7);
+  cb1 = asio::buffer(source_data);
+  n = buffer_copy(mv1, cb1, 10);
+  ASIO_CHECK(n == 10);
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+
+  memset(dest_data, 0, sizeof(dest_data));
+  mv1.clear();
+  mv1.push_back(asio::buffer(dest_data, 7));
+  mv1.push_back(asio::buffer(dest_data) + 7);
+  cv1.clear();
+  cv1.push_back(asio::buffer(source_data, 8));
+  cv1.push_back(asio::buffer(source_data) + 8);
+  n = buffer_copy(mv1, cv1, 10);
+  ASIO_CHECK(n == 10);
+  ASIO_CHECK(memcmp(dest_data, source_data, n) == 0);
+}
+
+} // namespace buffer_copy_runtime
+
+//------------------------------------------------------------------------------
+
 ASIO_TEST_SUITE
 (
   buffer,
   ASIO_COMPILE_TEST_CASE(buffer_compile::test)
+  ASIO_TEST_CASE(buffer_copy_runtime::test)
 )
diff --git a/asio/src/tests/unit/buffered_read_stream.cpp b/asio/src/tests/unit/buffered_read_stream.cpp
index ddca0f8..77b8a3f 100644
--- a/asio/src/tests/unit/buffered_read_stream.cpp
+++ b/asio/src/tests/unit/buffered_read_stream.cpp
@@ -2,7 +2,7 @@
 // buffered_read_stream.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/buffered_stream.cpp b/asio/src/tests/unit/buffered_stream.cpp
index 196bec9..3fbd957 100644
--- a/asio/src/tests/unit/buffered_stream.cpp
+++ b/asio/src/tests/unit/buffered_stream.cpp
@@ -2,7 +2,7 @@
 // buffered_stream.cpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/buffered_write_stream.cpp b/asio/src/tests/unit/buffered_write_stream.cpp
index cf7625b..a513277 100644
--- a/asio/src/tests/unit/buffered_write_stream.cpp
+++ b/asio/src/tests/unit/buffered_write_stream.cpp
@@ -2,7 +2,7 @@
 // buffered_write_stream.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/buffers_iterator.cpp b/asio/src/tests/unit/buffers_iterator.cpp
index a23de0d..32e661f 100644
--- a/asio/src/tests/unit/buffers_iterator.cpp
+++ b/asio/src/tests/unit/buffers_iterator.cpp
@@ -2,7 +2,7 @@
 // buffers_iterator.cpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -50,11 +50,11 @@
   {
     char data1[16], data2[16];
     const char cdata1[16] = "", cdata2[16] = "";
-    mutable_buffers_1 mb1 = buffer(data1);
+    mutable_buffer mb1 = buffer(data1);
     array<mutable_buffer, 2> mb2 = {{ buffer(data1), buffer(data2) }};
     std::vector<mutable_buffer> mb3;
     mb3.push_back(buffer(data1));
-    const_buffers_1 cb1 = buffer(cdata1);
+    const_buffer cb1 = buffer(cdata1);
     array<const_buffer, 2> cb2 = {{ buffer(cdata1), buffer(cdata2) }};
     vector<const_buffer> cb3;
     cb3.push_back(buffer(cdata1));
@@ -62,23 +62,23 @@
 
     // buffers_iterator constructors.
 
-    buffers_iterator<mutable_buffers_1, char> bi1;
-    buffers_iterator<mutable_buffers_1, const char> bi2;
+    buffers_iterator<mutable_buffer, char> bi1;
+    buffers_iterator<mutable_buffer, const char> bi2;
     buffers_iterator<array<mutable_buffer, 2>, char> bi3;
     buffers_iterator<array<mutable_buffer, 2>, const char> bi4;
     buffers_iterator<vector<mutable_buffer>, char> bi5;
     buffers_iterator<vector<mutable_buffer>, const char> bi6;
-    buffers_iterator<const_buffers_1, char> bi7;
-    buffers_iterator<const_buffers_1, const char> bi8;
+    buffers_iterator<const_buffer, char> bi7;
+    buffers_iterator<const_buffer, const char> bi8;
     buffers_iterator<array<const_buffer, 2>, char> bi9;
     buffers_iterator<array<const_buffer, 2>, const char> bi10;
     buffers_iterator<vector<const_buffer>, char> bi11;
     buffers_iterator<vector<const_buffer>, const char> bi12;
 
-    buffers_iterator<mutable_buffers_1, char> bi13(
-        buffers_iterator<mutable_buffers_1, char>::begin(mb1));
-    buffers_iterator<mutable_buffers_1, const char> bi14(
-        buffers_iterator<mutable_buffers_1, const char>::begin(mb1));
+    buffers_iterator<mutable_buffer, char> bi13(
+        buffers_iterator<mutable_buffer, char>::begin(mb1));
+    buffers_iterator<mutable_buffer, const char> bi14(
+        buffers_iterator<mutable_buffer, const char>::begin(mb1));
     buffers_iterator<array<mutable_buffer, 2>, char> bi15(
         buffers_iterator<array<mutable_buffer, 2>, char>::begin(mb2));
     buffers_iterator<array<mutable_buffer, 2>, const char> bi16(
@@ -87,10 +87,10 @@
         buffers_iterator<vector<mutable_buffer>, char>::begin(mb3));
     buffers_iterator<vector<mutable_buffer>, const char> bi18(
         buffers_iterator<vector<mutable_buffer>, const char>::begin(mb3));
-    buffers_iterator<const_buffers_1, char> bi19(
-        buffers_iterator<const_buffers_1, char>::begin(cb1));
-    buffers_iterator<const_buffers_1, const char> bi20(
-        buffers_iterator<const_buffers_1, const char>::begin(cb1));
+    buffers_iterator<const_buffer, char> bi19(
+        buffers_iterator<const_buffer, char>::begin(cb1));
+    buffers_iterator<const_buffer, const char> bi20(
+        buffers_iterator<const_buffer, const char>::begin(cb1));
     buffers_iterator<array<const_buffer, 2>, char> bi21(
         buffers_iterator<array<const_buffer, 2>, char>::begin(cb2));
     buffers_iterator<array<const_buffer, 2>, const char> bi22(
@@ -102,27 +102,27 @@
 
     // buffers_iterator member functions.
 
-    bi1 = buffers_iterator<mutable_buffers_1, char>::begin(mb1);
-    bi2 = buffers_iterator<mutable_buffers_1, const char>::begin(mb1);
+    bi1 = buffers_iterator<mutable_buffer, char>::begin(mb1);
+    bi2 = buffers_iterator<mutable_buffer, const char>::begin(mb1);
     bi3 = buffers_iterator<array<mutable_buffer, 2>, char>::begin(mb2);
     bi4 = buffers_iterator<array<mutable_buffer, 2>, const char>::begin(mb2);
     bi5 = buffers_iterator<vector<mutable_buffer>, char>::begin(mb3);
     bi6 = buffers_iterator<vector<mutable_buffer>, const char>::begin(mb3);
-    bi7 = buffers_iterator<const_buffers_1, char>::begin(cb1);
-    bi8 = buffers_iterator<const_buffers_1, const char>::begin(cb1);
+    bi7 = buffers_iterator<const_buffer, char>::begin(cb1);
+    bi8 = buffers_iterator<const_buffer, const char>::begin(cb1);
     bi9 = buffers_iterator<array<const_buffer, 2>, char>::begin(cb2);
     bi10 = buffers_iterator<array<const_buffer, 2>, const char>::begin(cb2);
     bi11 = buffers_iterator<vector<const_buffer>, char>::begin(cb3);
     bi12 = buffers_iterator<vector<const_buffer>, const char>::begin(cb3);
 
-    bi1 = buffers_iterator<mutable_buffers_1, char>::end(mb1);
-    bi2 = buffers_iterator<mutable_buffers_1, const char>::end(mb1);
+    bi1 = buffers_iterator<mutable_buffer, char>::end(mb1);
+    bi2 = buffers_iterator<mutable_buffer, const char>::end(mb1);
     bi3 = buffers_iterator<array<mutable_buffer, 2>, char>::end(mb2);
     bi4 = buffers_iterator<array<mutable_buffer, 2>, const char>::end(mb2);
     bi5 = buffers_iterator<vector<mutable_buffer>, char>::end(mb3);
     bi6 = buffers_iterator<vector<mutable_buffer>, const char>::end(mb3);
-    bi7 = buffers_iterator<const_buffers_1, char>::end(cb1);
-    bi8 = buffers_iterator<const_buffers_1, const char>::end(cb1);
+    bi7 = buffers_iterator<const_buffer, char>::end(cb1);
+    bi8 = buffers_iterator<const_buffer, const char>::end(cb1);
     bi9 = buffers_iterator<array<const_buffer, 2>, char>::end(cb2);
     bi10 = buffers_iterator<array<const_buffer, 2>, const char>::end(cb2);
     bi11 = buffers_iterator<vector<const_buffer>, char>::end(cb3);
diff --git a/asio/src/tests/unit/completion_condition.cpp b/asio/src/tests/unit/completion_condition.cpp
index 1d2ca87..a1e5645 100644
--- a/asio/src/tests/unit/completion_condition.cpp
+++ b/asio/src/tests/unit/completion_condition.cpp
@@ -2,7 +2,7 @@
 // completion_condition.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/connect.cpp b/asio/src/tests/unit/connect.cpp
index 55db679..76f203a 100644
--- a/asio/src/tests/unit/connect.cpp
+++ b/asio/src/tests/unit/connect.cpp
@@ -2,7 +2,7 @@
 // connect.cpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/coroutine.cpp b/asio/src/tests/unit/coroutine.cpp
index cae43c7..350111d 100644
--- a/asio/src/tests/unit/coroutine.cpp
+++ b/asio/src/tests/unit/coroutine.cpp
@@ -2,7 +2,7 @@
 // coroutine.cpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/datagram_socket_service.cpp b/asio/src/tests/unit/datagram_socket_service.cpp
index 2dd849c..5b5837b 100644
--- a/asio/src/tests/unit/datagram_socket_service.cpp
+++ b/asio/src/tests/unit/datagram_socket_service.cpp
@@ -2,7 +2,7 @@
 // datagram_socket_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/deadline_timer.cpp b/asio/src/tests/unit/deadline_timer.cpp
index 2a87b81..d6950b8 100644
--- a/asio/src/tests/unit/deadline_timer.cpp
+++ b/asio/src/tests/unit/deadline_timer.cpp
@@ -2,7 +2,7 @@
 // deadline_timer.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -22,6 +22,7 @@
 
 #include <boost/bind.hpp>
 #include "archetypes/async_result.hpp"
+#include "asio/executor_work_guard.hpp"
 #include "asio/io_context.hpp"
 #include "asio/placeholders.hpp"
 #include "asio/thread.hpp"
@@ -306,7 +307,8 @@
 void deadline_timer_thread_test()
 {
   asio::io_context ioc;
-  asio::io_context::work w(ioc);
+  asio::executor_work_guard<asio::io_context::executor_type> work
+    = asio::make_work_guard(ioc);
   asio::deadline_timer t1(ioc);
   asio::deadline_timer t2(ioc);
   int count = 0;
@@ -340,6 +342,39 @@
   ioc.run();
 }
 
+#if defined(ASIO_HAS_MOVE)
+asio::deadline_timer make_timer(asio::io_context& ioc, int* count)
+{
+  asio::deadline_timer t(ioc);
+  t.expires_from_now(boost::posix_time::seconds(1));
+  t.async_wait(boost::bind(increment, count));
+  return t;
+}
+#endif // defined(ASIO_HAS_MOVE)
+
+void deadline_timer_move_test()
+{
+#if defined(ASIO_HAS_MOVE)
+  asio::io_context io_context1;
+  asio::io_context io_context2;
+  int count = 0;
+
+  asio::deadline_timer t1 = make_timer(io_context1, &count);
+  asio::deadline_timer t2 = make_timer(io_context2, &count);
+  asio::deadline_timer t3 = std::move(t1);
+
+  t2 = std::move(t1);
+
+  io_context2.run();
+
+  ASIO_CHECK(count == 1);
+
+  io_context1.run();
+
+  ASIO_CHECK(count == 2);
+#endif // defined(ASIO_HAS_MOVE)
+}
+
 }  // namespace
 
 ASIO_TEST_SUITE
@@ -350,6 +385,7 @@
   ASIO_TEST_CASE(deadline_timer_custom_allocation_test)
   ASIO_TEST_CASE(deadline_timer_thread_test)
   ASIO_TEST_CASE(deadline_timer_async_result_test)
+  ASIO_TEST_CASE(deadline_timer_move_test)
 )
 #else // defined(ASIO_HAS_BOOST_DATE_TIME)
 ASIO_TEST_SUITE
diff --git a/asio/src/tests/unit/deadline_timer_service.cpp b/asio/src/tests/unit/deadline_timer_service.cpp
index 3482f64..93e5fd8 100644
--- a/asio/src/tests/unit/deadline_timer_service.cpp
+++ b/asio/src/tests/unit/deadline_timer_service.cpp
@@ -2,7 +2,7 @@
 // deadline_timer_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/defer.cpp b/asio/src/tests/unit/defer.cpp
new file mode 100644
index 0000000..cb10884
--- /dev/null
+++ b/asio/src/tests/unit/defer.cpp
@@ -0,0 +1,25 @@
+//
+// defer.cpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/defer.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  defer,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/dispatch.cpp b/asio/src/tests/unit/dispatch.cpp
new file mode 100644
index 0000000..8b0f485
--- /dev/null
+++ b/asio/src/tests/unit/dispatch.cpp
@@ -0,0 +1,25 @@
+//
+// dispatch.cpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/dispatch.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  dispatch,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/error.cpp b/asio/src/tests/unit/error.cpp
index 322d1c5..ab164c8 100644
--- a/asio/src/tests/unit/error.cpp
+++ b/asio/src/tests/unit/error.cpp
@@ -2,7 +2,7 @@
 // error.cpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/execution_context.cpp b/asio/src/tests/unit/execution_context.cpp
new file mode 100644
index 0000000..03763f7
--- /dev/null
+++ b/asio/src/tests/unit/execution_context.cpp
@@ -0,0 +1,25 @@
+//
+// execution_context.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/execution_context.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  execution_context,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/executor.cpp b/asio/src/tests/unit/executor.cpp
new file mode 100644
index 0000000..f5cd786
--- /dev/null
+++ b/asio/src/tests/unit/executor.cpp
@@ -0,0 +1,25 @@
+//
+// executor.cpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/executor.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  executor,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/executor_work_guard.cpp b/asio/src/tests/unit/executor_work_guard.cpp
new file mode 100644
index 0000000..6cef24e
--- /dev/null
+++ b/asio/src/tests/unit/executor_work_guard.cpp
@@ -0,0 +1,25 @@
+//
+// executor_work_guard.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/executor_work_guard.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  executor_work_guard,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/generic/basic_endpoint.cpp b/asio/src/tests/unit/generic/basic_endpoint.cpp
index 29d34c2..303c5df 100644
--- a/asio/src/tests/unit/generic/basic_endpoint.cpp
+++ b/asio/src/tests/unit/generic/basic_endpoint.cpp
@@ -2,7 +2,7 @@
 // generic/basic_endpoint.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/generic/datagram_protocol.cpp b/asio/src/tests/unit/generic/datagram_protocol.cpp
index d04de29..e091e17 100644
--- a/asio/src/tests/unit/generic/datagram_protocol.cpp
+++ b/asio/src/tests/unit/generic/datagram_protocol.cpp
@@ -2,7 +2,7 @@
 // generic/datagram_protocol.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/generic/raw_protocol.cpp b/asio/src/tests/unit/generic/raw_protocol.cpp
index f1dfb83..d19a702 100644
--- a/asio/src/tests/unit/generic/raw_protocol.cpp
+++ b/asio/src/tests/unit/generic/raw_protocol.cpp
@@ -2,7 +2,7 @@
 // generic/raw_protocol.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/generic/seq_packet_protocol.cpp b/asio/src/tests/unit/generic/seq_packet_protocol.cpp
index 1ccee98..33e0e72 100644
--- a/asio/src/tests/unit/generic/seq_packet_protocol.cpp
+++ b/asio/src/tests/unit/generic/seq_packet_protocol.cpp
@@ -2,7 +2,7 @@
 // generic/seq_packet_protocol.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/generic/stream_protocol.cpp b/asio/src/tests/unit/generic/stream_protocol.cpp
index 769e785..dca8f31 100644
--- a/asio/src/tests/unit/generic/stream_protocol.cpp
+++ b/asio/src/tests/unit/generic/stream_protocol.cpp
@@ -2,7 +2,7 @@
 // generic/stream_protocol.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/high_resolution_timer.cpp b/asio/src/tests/unit/high_resolution_timer.cpp
index d23a850..cc7c7db 100644
--- a/asio/src/tests/unit/high_resolution_timer.cpp
+++ b/asio/src/tests/unit/high_resolution_timer.cpp
@@ -2,7 +2,7 @@
 // high_resolution_timer.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/io_context.cpp b/asio/src/tests/unit/io_context.cpp
index a7a70f1..e43a19d 100644
--- a/asio/src/tests/unit/io_context.cpp
+++ b/asio/src/tests/unit/io_context.cpp
@@ -2,7 +2,7 @@
 // io_context.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,9 @@
 #include "asio/io_context.hpp"
 
 #include <sstream>
+#include "asio/bind_executor.hpp"
+#include "asio/dispatch.hpp"
+#include "asio/post.hpp"
 #include "asio/thread.hpp"
 #include "unit_test.hpp"
 
@@ -62,7 +65,7 @@
     --(*count);
 
     int before_value = *count;
-    ioc->post(bindns::bind(decrement_to_zero, ioc, count));
+    asio::post(*ioc, bindns::bind(decrement_to_zero, ioc, count));
 
     // Handler execution cannot nest, so count value should remain unchanged.
     ASIO_CHECK(*count == before_value);
@@ -75,7 +78,8 @@
   {
     --(*count);
 
-    ioc->dispatch(bindns::bind(nested_decrement_to_zero, ioc, count));
+    asio::dispatch(*ioc,
+        bindns::bind(nested_decrement_to_zero, ioc, count));
 
     // Handler execution is nested, so count value should now be zero.
     ASIO_CHECK(*count == 0);
@@ -88,7 +92,7 @@
   t.wait();
 
   if (++(*count) < 3)
-    ioc->post(bindns::bind(sleep_increment, ioc, count));
+    asio::post(*ioc, bindns::bind(sleep_increment, ioc, count));
 }
 
 void start_sleep_increments(io_context* ioc, int* count)
@@ -98,7 +102,7 @@
   t.wait();
 
   // Start the first of three increments.
-  ioc->post(bindns::bind(sleep_increment, ioc, count));
+  asio::post(*ioc, bindns::bind(sleep_increment, ioc, count));
 }
 
 void throw_exception()
@@ -116,7 +120,7 @@
   io_context ioc;
   int count = 0;
 
-  ioc.post(bindns::bind(increment, &count));
+  asio::post(ioc, bindns::bind(increment, &count));
 
   // No handlers can be called until run() is called.
   ASIO_CHECK(!ioc.stopped());
@@ -130,11 +134,11 @@
 
   count = 0;
   ioc.restart();
-  ioc.post(bindns::bind(increment, &count));
-  ioc.post(bindns::bind(increment, &count));
-  ioc.post(bindns::bind(increment, &count));
-  ioc.post(bindns::bind(increment, &count));
-  ioc.post(bindns::bind(increment, &count));
+  asio::post(ioc, bindns::bind(increment, &count));
+  asio::post(ioc, bindns::bind(increment, &count));
+  asio::post(ioc, bindns::bind(increment, &count));
+  asio::post(ioc, bindns::bind(increment, &count));
+  asio::post(ioc, bindns::bind(increment, &count));
 
   // No handlers can be called until run() is called.
   ASIO_CHECK(!ioc.stopped());
@@ -148,8 +152,8 @@
 
   count = 0;
   ioc.restart();
-  io_context::work* w = new io_context::work(ioc);
-  ioc.post(bindns::bind(&io_context::stop, &ioc));
+  executor_work_guard<io_context::executor_type> w = make_work_guard(ioc);
+  asio::post(ioc, bindns::bind(&io_context::stop, &ioc));
   ASIO_CHECK(!ioc.stopped());
   ioc.run();
 
@@ -158,8 +162,8 @@
   ASIO_CHECK(count == 0);
 
   ioc.restart();
-  ioc.post(bindns::bind(increment, &count));
-  delete w;
+  asio::post(ioc, bindns::bind(increment, &count));
+  w.reset();
 
   // No handlers can be called until run() is called.
   ASIO_CHECK(!ioc.stopped());
@@ -173,7 +177,7 @@
 
   count = 10;
   ioc.restart();
-  ioc.post(bindns::bind(decrement_to_zero, &ioc, &count));
+  asio::post(ioc, bindns::bind(decrement_to_zero, &ioc, &count));
 
   // No handlers can be called until run() is called.
   ASIO_CHECK(!ioc.stopped());
@@ -187,7 +191,7 @@
 
   count = 10;
   ioc.restart();
-  ioc.post(bindns::bind(nested_decrement_to_zero, &ioc, &count));
+  asio::post(ioc, bindns::bind(nested_decrement_to_zero, &ioc, &count));
 
   // No handlers can be called until run() is called.
   ASIO_CHECK(!ioc.stopped());
@@ -201,7 +205,8 @@
 
   count = 10;
   ioc.restart();
-  ioc.dispatch(bindns::bind(nested_decrement_to_zero, &ioc, &count));
+  asio::dispatch(ioc,
+      bindns::bind(nested_decrement_to_zero, &ioc, &count));
 
   // No handlers can be called until run() is called, even though nested
   // delivery was specifically allowed in the previous call.
@@ -218,8 +223,8 @@
   int count2 = 0;
   ioc.restart();
   ASIO_CHECK(!ioc.stopped());
-  ioc.post(bindns::bind(start_sleep_increments, &ioc, &count));
-  ioc.post(bindns::bind(start_sleep_increments, &ioc, &count2));
+  asio::post(ioc, bindns::bind(start_sleep_increments, &ioc, &count));
+  asio::post(ioc, bindns::bind(start_sleep_increments, &ioc, &count2));
   thread thread1(bindns::bind(io_context_run, &ioc));
   thread thread2(bindns::bind(io_context_run, &ioc));
   thread1.join();
@@ -232,7 +237,8 @@
 
   count = 10;
   io_context ioc2;
-  ioc.dispatch(ioc2.wrap(bindns::bind(decrement_to_zero, &ioc2, &count)));
+  asio::dispatch(ioc, asio::bind_executor(ioc2,
+        bindns::bind(decrement_to_zero, &ioc2, &count)));
   ioc.restart();
   ASIO_CHECK(!ioc.stopped());
   ioc.run();
@@ -250,11 +256,11 @@
   count = 0;
   int exception_count = 0;
   ioc.restart();
-  ioc.post(&throw_exception);
-  ioc.post(bindns::bind(increment, &count));
-  ioc.post(bindns::bind(increment, &count));
-  ioc.post(&throw_exception);
-  ioc.post(bindns::bind(increment, &count));
+  asio::post(ioc, &throw_exception);
+  asio::post(ioc, bindns::bind(increment, &count));
+  asio::post(ioc, bindns::bind(increment, &count));
+  asio::post(ioc, &throw_exception);
+  asio::post(ioc, bindns::bind(increment, &count));
 
   // No handlers can be called until run() is called.
   ASIO_CHECK(!ioc.stopped());
diff --git a/asio/src/tests/unit/ip/address.cpp b/asio/src/tests/unit/ip/address.cpp
index 6db9aef..1418347 100644
--- a/asio/src/tests/unit/ip/address.cpp
+++ b/asio/src/tests/unit/ip/address.cpp
@@ -2,7 +2,7 @@
 // address.cpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -69,14 +69,18 @@
     (void)addr_v6_value;
 
     std::string string_value = addr1.to_string();
+#if !defined(ASIO_NO_DEPRECATED)
     string_value = addr1.to_string(ec);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     // address static functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     addr1 = ip::address::from_string("127.0.0.1");
     addr1 = ip::address::from_string("127.0.0.1", ec);
     addr1 = ip::address::from_string(string_value);
     addr1 = ip::address::from_string(string_value, ec);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     // address comparisons.
 
@@ -104,6 +108,15 @@
     addr1 = ip::make_address("127.0.0.1", ec);
     addr1 = ip::make_address(string_value);
     addr1 = ip::make_address(string_value, ec);
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+# if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    std::experimental::string_view string_view_value("127.0.0.1");
+# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    std::string_view string_view_value("127.0.0.1");
+# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    addr1 = ip::make_address(string_view_value);
+    addr1 = ip::make_address(string_view_value, ec);
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
 
     // address I/O.
 
diff --git a/asio/src/tests/unit/ip/address_v4.cpp b/asio/src/tests/unit/ip/address_v4.cpp
index a68d773..8d140eb 100644
--- a/asio/src/tests/unit/ip/address_v4.cpp
+++ b/asio/src/tests/unit/ip/address_v4.cpp
@@ -2,7 +2,7 @@
 // address_v4.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -53,6 +53,7 @@
     b = addr1.is_unspecified();
     (void)b;
 
+#if !defined(ASIO_NO_DEPRECATED)
     b = addr1.is_class_a();
     (void)b;
 
@@ -61,6 +62,7 @@
 
     b = addr1.is_class_c();
     (void)b;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     b = addr1.is_multicast();
     (void)b;
@@ -68,18 +70,27 @@
     ip::address_v4::bytes_type bytes_value = addr1.to_bytes();
     (void)bytes_value;
 
+    ip::address_v4::uint_type uint_value = addr1.to_uint();
+    (void)uint_value;
+
+#if !defined(ASIO_NO_DEPRECATED)
     unsigned long ulong_value = addr1.to_ulong();
     (void)ulong_value;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     std::string string_value = addr1.to_string();
+#if !defined(ASIO_NO_DEPRECATED)
     string_value = addr1.to_string(ec);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     // address_v4 static functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     addr1 = ip::address_v4::from_string("127.0.0.1");
     addr1 = ip::address_v4::from_string("127.0.0.1", ec);
     addr1 = ip::address_v4::from_string(string_value);
     addr1 = ip::address_v4::from_string(string_value, ec);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     addr1 = ip::address_v4::any();
 
@@ -87,9 +98,11 @@
 
     addr1 = ip::address_v4::broadcast();
 
+#if !defined(ASIO_NO_DEPRECATED)
     addr1 = ip::address_v4::broadcast(addr2, addr3);
 
     addr1 = ip::address_v4::netmask(addr2);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     // address_v4 comparisons.
 
@@ -119,6 +132,15 @@
     addr1 = ip::make_address_v4("127.0.0.1", ec);
     addr1 = ip::make_address_v4(string_value);
     addr1 = ip::make_address_v4(string_value, ec);
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+# if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    std::experimental::string_view string_view_value("127.0.0.1");
+# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    std::string_view string_view_value("127.0.0.1");
+# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    addr1 = ip::make_address_v4(string_view_value);
+    addr1 = ip::make_address_v4(string_view_value, ec);
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
 
     // address_v4 I/O.
 
@@ -155,7 +177,10 @@
   ASIO_CHECK(a1.to_bytes()[1] == 0);
   ASIO_CHECK(a1.to_bytes()[2] == 0);
   ASIO_CHECK(a1.to_bytes()[3] == 0);
+  ASIO_CHECK(a1.to_uint() == 0);
+#if !defined(ASIO_NO_DEPRECATED)
   ASIO_CHECK(a1.to_ulong() == 0);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
   address_v4::bytes_type b1 = {{ 1, 2, 3, 4 }};
   address_v4 a2(b1);
@@ -163,17 +188,26 @@
   ASIO_CHECK(a2.to_bytes()[1] == 2);
   ASIO_CHECK(a2.to_bytes()[2] == 3);
   ASIO_CHECK(a2.to_bytes()[3] == 4);
+  ASIO_CHECK(((a2.to_uint() >> 24) & 0xFF) == b1[0]);
+  ASIO_CHECK(((a2.to_uint() >> 16) & 0xFF) == b1[1]);
+  ASIO_CHECK(((a2.to_uint() >> 8) & 0xFF) == b1[2]);
+  ASIO_CHECK((a2.to_uint() & 0xFF) == b1[3]);
+#if !defined(ASIO_NO_DEPRECATED)
   ASIO_CHECK(((a2.to_ulong() >> 24) & 0xFF) == b1[0]);
   ASIO_CHECK(((a2.to_ulong() >> 16) & 0xFF) == b1[1]);
   ASIO_CHECK(((a2.to_ulong() >> 8) & 0xFF) == b1[2]);
   ASIO_CHECK((a2.to_ulong() & 0xFF) == b1[3]);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
   address_v4 a3(0x01020304);
   ASIO_CHECK(a3.to_bytes()[0] == 1);
   ASIO_CHECK(a3.to_bytes()[1] == 2);
   ASIO_CHECK(a3.to_bytes()[2] == 3);
   ASIO_CHECK(a3.to_bytes()[3] == 4);
+  ASIO_CHECK(a3.to_uint() == 0x01020304);
+#if !defined(ASIO_NO_DEPRECATED)
   ASIO_CHECK(a3.to_ulong() == 0x01020304);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
   ASIO_CHECK(address_v4(0x7F000001).is_loopback());
   ASIO_CHECK(address_v4(0x7F000002).is_loopback());
@@ -184,6 +218,7 @@
   ASIO_CHECK(!address_v4(0x7F000001).is_unspecified());
   ASIO_CHECK(!address_v4(0x01020304).is_unspecified());
 
+#if !defined(ASIO_NO_DEPRECATED)
   ASIO_CHECK(address_v4(0x01000000).is_class_a());
   ASIO_CHECK(address_v4(0x7F000000).is_class_a());
   ASIO_CHECK(!address_v4(0x80000000).is_class_a());
@@ -216,6 +251,7 @@
   ASIO_CHECK(!address_v4(0xEFFFFFFF).is_class_c());
   ASIO_CHECK(!address_v4(0xF0000000).is_class_c());
   ASIO_CHECK(!address_v4(0xFFFFFFFF).is_class_c());
+#endif // !defined(ASIO_NO_DEPRECATED)
 
   ASIO_CHECK(!address_v4(0x01000000).is_multicast());
   ASIO_CHECK(!address_v4(0x7F000000).is_multicast());
@@ -233,22 +269,32 @@
   ASIO_CHECK(a4.to_bytes()[1] == 0);
   ASIO_CHECK(a4.to_bytes()[2] == 0);
   ASIO_CHECK(a4.to_bytes()[3] == 0);
+  ASIO_CHECK(a4.to_uint() == 0);
+#if !defined(ASIO_NO_DEPRECATED)
   ASIO_CHECK(a4.to_ulong() == 0);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
   address_v4 a5 = address_v4::loopback();
   ASIO_CHECK(a5.to_bytes()[0] == 0x7F);
   ASIO_CHECK(a5.to_bytes()[1] == 0);
   ASIO_CHECK(a5.to_bytes()[2] == 0);
   ASIO_CHECK(a5.to_bytes()[3] == 0x01);
+  ASIO_CHECK(a5.to_uint() == 0x7F000001);
+#if !defined(ASIO_NO_DEPRECATED)
   ASIO_CHECK(a5.to_ulong() == 0x7F000001);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
   address_v4 a6 = address_v4::broadcast();
   ASIO_CHECK(a6.to_bytes()[0] == 0xFF);
   ASIO_CHECK(a6.to_bytes()[1] == 0xFF);
   ASIO_CHECK(a6.to_bytes()[2] == 0xFF);
   ASIO_CHECK(a6.to_bytes()[3] == 0xFF);
+  ASIO_CHECK(a6.to_uint() == 0xFFFFFFFF);
+#if !defined(ASIO_NO_DEPRECATED)
   ASIO_CHECK(a6.to_ulong() == 0xFFFFFFFF);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
+#if !defined(ASIO_NO_DEPRECATED)
   address_v4 class_a_net(0xFF000000);
   address_v4 class_b_net(0xFFFF0000);
   address_v4 class_c_net(0xFFFFFF00);
@@ -263,6 +309,7 @@
   ASIO_CHECK(address_v4::netmask(address_v4(0xEFFFFFFF)) == other_net);
   ASIO_CHECK(address_v4::netmask(address_v4(0xF0000000)) == other_net);
   ASIO_CHECK(address_v4::netmask(address_v4(0xFFFFFFFF)) == other_net);
+#endif // !defined(ASIO_NO_DEPRECATED)
 }
 
 } // namespace ip_address_v4_runtime
diff --git a/asio/src/tests/unit/ip/address_v4_iterator.cpp b/asio/src/tests/unit/ip/address_v4_iterator.cpp
index 2e3f086..93ec745 100644
--- a/asio/src/tests/unit/ip/address_v4_iterator.cpp
+++ b/asio/src/tests/unit/ip/address_v4_iterator.cpp
@@ -2,7 +2,7 @@
 // address_v4_iterator.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/address_v4_range.cpp b/asio/src/tests/unit/ip/address_v4_range.cpp
index 2eb4f19..509a97d 100644
--- a/asio/src/tests/unit/ip/address_v4_range.cpp
+++ b/asio/src/tests/unit/ip/address_v4_range.cpp
@@ -2,7 +2,7 @@
 // address_v4_range.cpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/address_v6.cpp b/asio/src/tests/unit/ip/address_v6.cpp
index b44a884..03f0aec 100644
--- a/asio/src/tests/unit/ip/address_v6.cpp
+++ b/asio/src/tests/unit/ip/address_v6.cpp
@@ -2,7 +2,7 @@
 // address_v6.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -66,8 +66,10 @@
     b = addr1.is_v4_mapped();
     (void)b;
 
+#if !defined(ASIO_NO_DEPRECATED)
     b = addr1.is_v4_compatible();
     (void)b;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     b = addr1.is_multicast_node_local();
     (void)b;
@@ -88,24 +90,32 @@
     (void)bytes_value;
 
     std::string string_value = addr1.to_string();
+#if !defined(ASIO_NO_DEPRECATED)
     string_value = addr1.to_string(ec);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
+#if !defined(ASIO_NO_DEPRECATED)
     ip::address_v4 addr3 = addr1.to_v4();
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     // address_v6 static functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     addr1 = ip::address_v6::from_string("0::0");
     addr1 = ip::address_v6::from_string("0::0", ec);
     addr1 = ip::address_v6::from_string(string_value);
     addr1 = ip::address_v6::from_string(string_value, ec);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     addr1 = ip::address_v6::any();
 
     addr1 = ip::address_v6::loopback();
 
+#if !defined(ASIO_NO_DEPRECATED)
     addr1 = ip::address_v6::v4_mapped(addr3);
 
     addr1 = ip::address_v6::v4_compatible(addr3);
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     // address_v6 comparisons.
 
@@ -134,8 +144,20 @@
     addr1 = ip::make_address_v6("0::0", ec);
     addr1 = ip::make_address_v6(string_value);
     addr1 = ip::make_address_v6(string_value, ec);
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+# if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    std::experimental::string_view string_view_value("0::0");
+# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    std::string_view string_view_value("0::0");
+# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    addr1 = ip::make_address_v6(string_view_value);
+    addr1 = ip::make_address_v6(string_view_value, ec);
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
 
     // address_v6 IPv4-mapped conversion.
+#if defined(ASIO_NO_DEPRECATED)
+    ip::address_v4 addr3;
+#endif // defined(ASIO_NO_DEPRECATED)
     addr1 = ip::make_address_v6(ip::v4_mapped, addr3);
     addr3 = ip::make_address_v4(ip::v4_mapped, addr1);
 
@@ -286,6 +308,7 @@
   ASIO_CHECK(!mcast_org_local_address.is_v4_mapped());
   ASIO_CHECK(!mcast_site_local_address.is_v4_mapped());
 
+#if !defined(ASIO_NO_DEPRECATED)
   ASIO_CHECK(!unspecified_address.is_v4_compatible());
   ASIO_CHECK(!loopback_address.is_v4_compatible());
   ASIO_CHECK(!link_local_address.is_v4_compatible());
@@ -297,6 +320,7 @@
   ASIO_CHECK(!mcast_node_local_address.is_v4_compatible());
   ASIO_CHECK(!mcast_org_local_address.is_v4_compatible());
   ASIO_CHECK(!mcast_site_local_address.is_v4_compatible());
+#endif // !defined(ASIO_NO_DEPRECATED)
 
   ASIO_CHECK(!unspecified_address.is_multicast());
   ASIO_CHECK(!loopback_address.is_multicast());
diff --git a/asio/src/tests/unit/ip/address_v6_iterator.cpp b/asio/src/tests/unit/ip/address_v6_iterator.cpp
index cefddea..2047a86 100644
--- a/asio/src/tests/unit/ip/address_v6_iterator.cpp
+++ b/asio/src/tests/unit/ip/address_v6_iterator.cpp
@@ -2,7 +2,7 @@
 // address_v6_iterator.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/address_v6_range.cpp b/asio/src/tests/unit/ip/address_v6_range.cpp
index 58e8500..3d99534 100644
--- a/asio/src/tests/unit/ip/address_v6_range.cpp
+++ b/asio/src/tests/unit/ip/address_v6_range.cpp
@@ -2,7 +2,7 @@
 // address_v6_range.cpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/basic_endpoint.cpp b/asio/src/tests/unit/ip/basic_endpoint.cpp
index eca7c31..8a6795c 100644
--- a/asio/src/tests/unit/ip/basic_endpoint.cpp
+++ b/asio/src/tests/unit/ip/basic_endpoint.cpp
@@ -2,7 +2,7 @@
 // basic_endpoint.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/basic_resolver.cpp b/asio/src/tests/unit/ip/basic_resolver.cpp
index e561ac9..25e80f1 100644
--- a/asio/src/tests/unit/ip/basic_resolver.cpp
+++ b/asio/src/tests/unit/ip/basic_resolver.cpp
@@ -2,7 +2,7 @@
 // basic_resolver.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/basic_resolver_entry.cpp b/asio/src/tests/unit/ip/basic_resolver_entry.cpp
index cef6bf8..7eb9a72 100644
--- a/asio/src/tests/unit/ip/basic_resolver_entry.cpp
+++ b/asio/src/tests/unit/ip/basic_resolver_entry.cpp
@@ -2,7 +2,7 @@
 // basic_resolver_entry.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/basic_resolver_iterator.cpp b/asio/src/tests/unit/ip/basic_resolver_iterator.cpp
index cd796e2..e779ee6 100644
--- a/asio/src/tests/unit/ip/basic_resolver_iterator.cpp
+++ b/asio/src/tests/unit/ip/basic_resolver_iterator.cpp
@@ -2,7 +2,7 @@
 // basic_resolver_iterator.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/basic_resolver_query.cpp b/asio/src/tests/unit/ip/basic_resolver_query.cpp
index 1f24850..8fc4e5a 100644
--- a/asio/src/tests/unit/ip/basic_resolver_query.cpp
+++ b/asio/src/tests/unit/ip/basic_resolver_query.cpp
@@ -2,7 +2,7 @@
 // basic_resolver_query.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/host_name.cpp b/asio/src/tests/unit/ip/host_name.cpp
index 85da7d1..27e437f 100644
--- a/asio/src/tests/unit/ip/host_name.cpp
+++ b/asio/src/tests/unit/ip/host_name.cpp
@@ -2,7 +2,7 @@
 // host_name.cpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/icmp.cpp b/asio/src/tests/unit/ip/icmp.cpp
index 7ecbc55..f563082 100644
--- a/asio/src/tests/unit/ip/icmp.cpp
+++ b/asio/src/tests/unit/ip/icmp.cpp
@@ -2,7 +2,7 @@
 // icmp.cpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -20,8 +20,9 @@
 #include "asio/io_context.hpp"
 #include "asio/placeholders.hpp"
 #include "../unit_test.hpp"
-#include "../archetypes/gettable_socket_option.hpp"
 #include "../archetypes/async_result.hpp"
+#include "../archetypes/deprecated_async_result.hpp"
+#include "../archetypes/gettable_socket_option.hpp"
 #include "../archetypes/io_control_command.hpp"
 #include "../archetypes/settable_socket_option.hpp"
 
@@ -86,6 +87,9 @@
     archetypes::gettable_socket_option<double> gettable_socket_option3;
     archetypes::io_control_command io_control_command;
     archetypes::lazy_handler lazy;
+#if !defined(ASIO_NO_DEPRECATED)
+    archetypes::deprecated_lazy_handler dlazy;
+#endif // !defined(ASIO_NO_DEPRECATED)
     asio::error_code ec;
 
     // basic_datagram_socket constructors.
@@ -114,8 +118,13 @@
 
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = socket1.get_io_context();
     (void)ioc_ref;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+    ip::icmp::socket::executor_type ex = socket1.get_executor();
+    (void)ex;
 
     // basic_socket functions.
 
@@ -182,6 +191,14 @@
     (void)i1;
     int i2 = socket1.async_connect(ip::icmp::endpoint(ip::icmp::v6(), 0), lazy);
     (void)i2;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d1 = socket1.async_connect(
+        ip::icmp::endpoint(ip::icmp::v4(), 0), dlazy);
+    (void)d1;
+    double d2 = socket1.async_connect(
+        ip::icmp::endpoint(ip::icmp::v6(), 0), dlazy);
+    (void)d2;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     socket1.set_option(settable_socket_option1);
     socket1.set_option(settable_socket_option1, ec);
@@ -249,6 +266,21 @@
     (void)i7;
     int i8 = socket1.async_send(null_buffers(), in_flags, lazy);
     (void)i8;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d3 = socket1.async_send(buffer(mutable_char_buffer), dlazy);
+    (void)d3;
+    double d4 = socket1.async_send(buffer(const_char_buffer), dlazy);
+    (void)d4;
+    double d5 = socket1.async_send(null_buffers(), dlazy);
+    (void)d5;
+    double d6 = socket1.async_send(
+        buffer(mutable_char_buffer), in_flags, dlazy);
+    (void)d6;
+    double d7 = socket1.async_send(buffer(const_char_buffer), in_flags, dlazy);
+    (void)d7;
+    double d8 = socket1.async_send(null_buffers(), in_flags, dlazy);
+    (void)d8;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     socket1.send_to(buffer(mutable_char_buffer),
         ip::icmp::endpoint(ip::icmp::v4(), 0));
@@ -347,6 +379,44 @@
     int i20 = socket1.async_send_to(null_buffers(),
         ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, lazy);
     (void)i20;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d9 = socket1.async_send_to(buffer(mutable_char_buffer),
+        ip::icmp::endpoint(ip::icmp::v4(), 0), dlazy);
+    (void)d9;
+    double d10 = socket1.async_send_to(buffer(mutable_char_buffer),
+        ip::icmp::endpoint(ip::icmp::v6(), 0), dlazy);
+    (void)d10;
+    double d11 = socket1.async_send_to(buffer(const_char_buffer),
+        ip::icmp::endpoint(ip::icmp::v4(), 0), dlazy);
+    (void)d11;
+    double d12 = socket1.async_send_to(buffer(const_char_buffer),
+        ip::icmp::endpoint(ip::icmp::v6(), 0), dlazy);
+    (void)d12;
+    double d13 = socket1.async_send_to(null_buffers(),
+        ip::icmp::endpoint(ip::icmp::v4(), 0), dlazy);
+    (void)d13;
+    double d14 = socket1.async_send_to(null_buffers(),
+        ip::icmp::endpoint(ip::icmp::v6(), 0), dlazy);
+    (void)d14;
+    double d15 = socket1.async_send_to(buffer(mutable_char_buffer),
+        ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, dlazy);
+    (void)d15;
+    double d16 = socket1.async_send_to(buffer(mutable_char_buffer),
+        ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, dlazy);
+    (void)d16;
+    double d17 = socket1.async_send_to(buffer(const_char_buffer),
+        ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, dlazy);
+    (void)d17;
+    double d18 = socket1.async_send_to(buffer(const_char_buffer),
+        ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, dlazy);
+    (void)d18;
+    double d19 = socket1.async_send_to(null_buffers(),
+        ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, dlazy);
+    (void)d19;
+    double d20 = socket1.async_send_to(null_buffers(),
+        ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, dlazy);
+    (void)d20;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     socket1.receive(buffer(mutable_char_buffer));
     socket1.receive(null_buffers());
@@ -369,6 +439,17 @@
     (void)i23;
     int i24 = socket1.async_receive(null_buffers(), in_flags, lazy);
     (void)i24;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d21 = socket1.async_receive(buffer(mutable_char_buffer), dlazy);
+    (void)d21;
+    double d22 = socket1.async_receive(null_buffers(), dlazy);
+    (void)d22;
+    double d23 = socket1.async_receive(buffer(mutable_char_buffer),
+        in_flags, dlazy);
+    (void)d23;
+    double d24 = socket1.async_receive(null_buffers(), in_flags, dlazy);
+    (void)d24;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     ip::icmp::endpoint endpoint;
     socket1.receive_from(buffer(mutable_char_buffer), endpoint);
@@ -398,6 +479,20 @@
     int i28 = socket1.async_receive_from(null_buffers(),
         endpoint, in_flags, lazy);
     (void)i28;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d25 = socket1.async_receive_from(buffer(mutable_char_buffer),
+        endpoint, dlazy);
+    (void)d25;
+    double d26 = socket1.async_receive_from(null_buffers(),
+        endpoint, dlazy);
+    (void)d26;
+    double d27 = socket1.async_receive_from(buffer(mutable_char_buffer),
+        endpoint, in_flags, dlazy);
+    (void)d27;
+    double d28 = socket1.async_receive_from(null_buffers(),
+        endpoint, in_flags, dlazy);
+    (void)d28;
+#endif // !defined(ASIO_NO_DEPRECATED)
   }
   catch (std::exception&)
   {
@@ -436,28 +531,51 @@
   {
     io_context ioc;
     archetypes::lazy_handler lazy;
+#if !defined(ASIO_NO_DEPRECATED)
+    archetypes::deprecated_lazy_handler dlazy;
+#endif // !defined(ASIO_NO_DEPRECATED)
     asio::error_code ec;
+#if !defined(ASIO_NO_DEPRECATED)
     ip::icmp::resolver::query q(ip::icmp::v4(), "localhost", "0");
+#endif // !defined(ASIO_NO_DEPRECATED)
     ip::icmp::endpoint e(ip::address_v4::loopback(), 0);
 
     // basic_resolver constructors.
 
     ip::icmp::resolver resolver(ioc);
 
+#if defined(ASIO_HAS_MOVE)
+    ip::icmp::resolver resolver2(std::move(resolver));
+#endif // defined(ASIO_HAS_MOVE)
+
+    // basic_resolver operators.
+
+#if defined(ASIO_HAS_MOVE)
+    resolver = ip::icmp::resolver(ioc);
+    resolver = std::move(resolver2);
+#endif // defined(ASIO_HAS_MOVE)
+
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = resolver.get_io_context();
     (void)ioc_ref;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+    ip::icmp::resolver::executor_type ex = resolver.get_executor();
+    (void)ex;
 
     // basic_resolver functions.
 
     resolver.cancel();
 
+#if !defined(ASIO_NO_DEPRECATED)
     ip::icmp::resolver::results_type results1 = resolver.resolve(q);
     (void)results1;
 
     ip::icmp::resolver::results_type results2 = resolver.resolve(q, ec);
     (void)results2;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     ip::icmp::resolver::results_type results3 = resolver.resolve("", "");
     (void)results3;
@@ -495,30 +613,59 @@
     ip::icmp::resolver::results_type results12 = resolver.resolve(e, ec);
     (void)results12;
 
+#if !defined(ASIO_NO_DEPRECATED)
     resolver.async_resolve(q, resolve_handler());
     int i1 = resolver.async_resolve(q, lazy);
     (void)i1;
+    double d1 = resolver.async_resolve(q, dlazy);
+    (void)d1;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-    resolver.async_resolve(q, resolve_handler());
+    resolver.async_resolve("", "", resolve_handler());
     int i2 = resolver.async_resolve("", "", lazy);
     (void)i2;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d2 = resolver.async_resolve("", "", dlazy);
+    (void)d2;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-    resolver.async_resolve(q, resolve_handler());
-    int i3 = resolver.async_resolve("", "", ip::icmp::resolver::flags(), lazy);
+    resolver.async_resolve("", "",
+        ip::icmp::resolver::flags(), resolve_handler());
+    int i3 = resolver.async_resolve("", "",
+        ip::icmp::resolver::flags(), lazy);
     (void)i3;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d3 = resolver.async_resolve("", "",
+        ip::icmp::resolver::flags(), dlazy);
+    (void)d3;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-    resolver.async_resolve(q, resolve_handler());
+    resolver.async_resolve(ip::icmp::v4(), "", "", resolve_handler());
     int i4 = resolver.async_resolve(ip::icmp::v4(), "", "", lazy);
     (void)i4;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d4 = resolver.async_resolve(ip::icmp::v4(), "", "", dlazy);
+    (void)d4;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-    resolver.async_resolve(q, resolve_handler());
+    resolver.async_resolve(ip::icmp::v4(),
+        "", "", ip::icmp::resolver::flags(), resolve_handler());
     int i5 = resolver.async_resolve(ip::icmp::v4(),
         "", "", ip::icmp::resolver::flags(), lazy);
     (void)i5;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d5 = resolver.async_resolve(ip::icmp::v4(),
+        "", "", ip::icmp::resolver::flags(), dlazy);
+    (void)d5;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     resolver.async_resolve(e, resolve_handler());
     int i6 = resolver.async_resolve(e, lazy);
     (void)i6;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d6 = resolver.async_resolve(e, dlazy);
+    (void)d6;
+#endif // !defined(ASIO_NO_DEPRECATED)
   }
   catch (std::exception&)
   {
diff --git a/asio/src/tests/unit/ip/multicast.cpp b/asio/src/tests/unit/ip/multicast.cpp
index 593ceaf..355ffac 100644
--- a/asio/src/tests/unit/ip/multicast.cpp
+++ b/asio/src/tests/unit/ip/multicast.cpp
@@ -2,7 +2,7 @@
 // multicast.cpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/network_v4.cpp b/asio/src/tests/unit/ip/network_v4.cpp
index b8d1886..02a3bc7 100644
--- a/asio/src/tests/unit/ip/network_v4.cpp
+++ b/asio/src/tests/unit/ip/network_v4.cpp
@@ -2,7 +2,7 @@
 // network_v4.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -18,6 +18,7 @@
 #include "asio/ip/network_v4.hpp"
 
 #include "../unit_test.hpp"
+#include <sstream>
 
 //------------------------------------------------------------------------------
 
@@ -86,6 +87,33 @@
     bool b4 = (net1 != net2);
     (void)b4;
 
+    // network_v4 creation functions.
+
+    net1 = ip::make_network_v4(ip::address_v4(), 24);
+    net1 = ip::make_network_v4(ip::address_v4(), ip::address_v4());
+    net1 = ip::make_network_v4("10.0.0.0/8");
+    net1 = ip::make_network_v4("10.0.0.0/8", ec);
+    net1 = ip::make_network_v4(s1);
+    net1 = ip::make_network_v4(s1, ec);
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+# if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    std::experimental::string_view string_view_value("10.0.0.0/8");
+# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    std::string_view string_view_value("10.0.0.0/8");
+# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    net1 = ip::make_network_v4(string_view_value);
+    net1 = ip::make_network_v4(string_view_value, ec);
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+
+    // network_v4 I/O.
+
+    std::ostringstream os;
+    os << net1;
+
+#if !defined(BOOST_NO_STD_WSTREAMBUF)
+    std::wostringstream wos;
+    wos << net1;
+#endif // !defined(BOOST_NO_STD_WSTREAMBUF)
   }
   catch (std::exception&)
   {
diff --git a/asio/src/tests/unit/ip/network_v6.cpp b/asio/src/tests/unit/ip/network_v6.cpp
index d62e4d3..e4ac277 100644
--- a/asio/src/tests/unit/ip/network_v6.cpp
+++ b/asio/src/tests/unit/ip/network_v6.cpp
@@ -2,7 +2,7 @@
 // network_v6.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -18,6 +18,7 @@
 #include "asio/ip/network_v6.hpp"
 
 #include "../unit_test.hpp"
+#include <sstream>
 
 //------------------------------------------------------------------------------
 
@@ -79,6 +80,32 @@
     bool b4 = (net1 != net2);
     (void)b4;
 
+    // network_v6 creation functions.
+
+    net1 = ip::make_network_v6(ip::address_v6(), 24);
+    net1 = ip::make_network_v6("10.0.0.0/8");
+    net1 = ip::make_network_v6("10.0.0.0/8", ec);
+    net1 = ip::make_network_v6(s1);
+    net1 = ip::make_network_v6(s1, ec);
+#if defined(ASIO_HAS_STD_STRING_VIEW)
+# if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    std::experimental::string_view string_view_value("0::0/8");
+# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    std::string_view string_view_value("0::0/8");
+# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+    net1 = ip::make_network_v6(string_view_value);
+    net1 = ip::make_network_v6(string_view_value, ec);
+#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+
+    // network_v6 I/O.
+
+    std::ostringstream os;
+    os << net1;
+
+#if !defined(BOOST_NO_STD_WSTREAMBUF)
+    std::wostringstream wos;
+    wos << net1;
+#endif // !defined(BOOST_NO_STD_WSTREAMBUF)
   }
   catch (std::exception&)
   {
@@ -117,26 +144,26 @@
   ASIO_CHECK(msg == std::string("prefix length too large"));
 
   // construct address range from address and prefix length
-  ASIO_CHECK(network_v6(address_v6::from_string("2001:370::10:7344"), 128).network() == address_v6::from_string("2001:370::10:7344"));
-  ASIO_CHECK(network_v6(address_v6::from_string("2001:370::10:7344"), 64).network() == address_v6::from_string("2001:370::"));
-  ASIO_CHECK(network_v6(address_v6::from_string("2001:370::10:7344"), 27).network() == address_v6::from_string("2001:360::"));
+  ASIO_CHECK(network_v6(make_address_v6("2001:370::10:7344"), 128).network() == make_address_v6("2001:370::10:7344"));
+  ASIO_CHECK(network_v6(make_address_v6("2001:370::10:7344"), 64).network() == make_address_v6("2001:370::"));
+  ASIO_CHECK(network_v6(make_address_v6("2001:370::10:7344"), 27).network() == make_address_v6("2001:360::"));
 
   // construct address range from string in CIDR notation
-  ASIO_CHECK(make_network_v6("2001:370::10:7344/128").network() == address_v6::from_string("2001:370::10:7344"));
-  ASIO_CHECK(make_network_v6("2001:370::10:7344/64").network() == address_v6::from_string("2001:370::"));
-  ASIO_CHECK(make_network_v6("2001:370::10:7344/27").network() == address_v6::from_string("2001:360::"));
+  ASIO_CHECK(make_network_v6("2001:370::10:7344/128").network() == make_address_v6("2001:370::10:7344"));
+  ASIO_CHECK(make_network_v6("2001:370::10:7344/64").network() == make_address_v6("2001:370::"));
+  ASIO_CHECK(make_network_v6("2001:370::10:7344/27").network() == make_address_v6("2001:360::"));
 
   // prefix length
   ASIO_CHECK(make_network_v6("2001:370::10:7344/128").prefix_length() == 128);
-  ASIO_CHECK(network_v6(address_v6::from_string("2001:370::10:7344"), 27).prefix_length() == 27);
+  ASIO_CHECK(network_v6(make_address_v6("2001:370::10:7344"), 27).prefix_length() == 27);
 
   // to string
   std::string a("2001:370::10:7344/64");
   ASIO_CHECK(make_network_v6(a.c_str()).to_string() == a);
-  ASIO_CHECK(network_v6(address_v6::from_string("2001:370::10:7344"), 27).to_string() == std::string("2001:370::10:7344/27"));
+  ASIO_CHECK(network_v6(make_address_v6("2001:370::10:7344"), 27).to_string() == std::string("2001:370::10:7344/27"));
 
   // return host part
-  ASIO_CHECK(make_network_v6("2001:370::10:7344/64").address() == address_v6::from_string("2001:370::10:7344"));
+  ASIO_CHECK(make_network_v6("2001:370::10:7344/64").address() == make_address_v6("2001:370::10:7344"));
   ASIO_CHECK(make_network_v6("2001:370::10:7344/27").address().to_string() == "2001:370::10:7344");
 
   // return network in CIDR notation
@@ -163,27 +190,27 @@
   network_v6 net15(make_network_v6("2001:0db8::/119"));
 
   // network
-  ASIO_CHECK(net12.network() == address_v6::from_string("2001:370::"));
-  ASIO_CHECK(net13.network() == address_v6::from_string("2001:0db8::"));
-  ASIO_CHECK(net14.network() == address_v6::from_string("2001:0db8::"));
-  ASIO_CHECK(net15.network() == address_v6::from_string("2001:0db8::"));
+  ASIO_CHECK(net12.network() == make_address_v6("2001:370::"));
+  ASIO_CHECK(net13.network() == make_address_v6("2001:0db8::"));
+  ASIO_CHECK(net14.network() == make_address_v6("2001:0db8::"));
+  ASIO_CHECK(net15.network() == make_address_v6("2001:0db8::"));
 
   // iterator
   //ASIO_CHECK(std::distance(net12.hosts().begin(),net12.hosts().end()) == 18446744073709552000);
   ASIO_CHECK(std::distance(net13.hosts().begin(),net13.hosts().end()) == 2);
   ASIO_CHECK(std::distance(net14.hosts().begin(),net14.hosts().end()) == 8);
   ASIO_CHECK(std::distance(net15.hosts().begin(),net15.hosts().end()) == 512);
-  ASIO_CHECK(*net12.hosts().begin() == address_v6::from_string("2001:0370::"));
-  ASIO_CHECK(net12.hosts().end() != net12.hosts().find(address_v6::from_string("2001:0370::ffff:ffff:ffff:ffff")));
-  ASIO_CHECK(*net13.hosts().begin() == address_v6::from_string("2001:0db8::"));
-  ASIO_CHECK(net13.hosts().end() != net13.hosts().find(address_v6::from_string("2001:0db8::1")));
-  ASIO_CHECK(net13.hosts().end() == net13.hosts().find(address_v6::from_string("2001:0db8::2")));
-  ASIO_CHECK(*net14.hosts().begin() == address_v6::from_string("2001:0db8::"));
-  ASIO_CHECK(net14.hosts().end() != net14.hosts().find(address_v6::from_string("2001:0db8::7")));
-  ASIO_CHECK(net14.hosts().end() == net14.hosts().find(address_v6::from_string("2001:0db8::8")));
-  ASIO_CHECK(*net15.hosts().begin() == address_v6::from_string("2001:0db8::"));
-  ASIO_CHECK(net15.hosts().end() != net15.hosts().find(address_v6::from_string("2001:0db8::01ff")));
-  ASIO_CHECK(net15.hosts().end() == net15.hosts().find(address_v6::from_string("2001:0db8::0200")));
+  ASIO_CHECK(*net12.hosts().begin() == make_address_v6("2001:0370::"));
+  ASIO_CHECK(net12.hosts().end() != net12.hosts().find(make_address_v6("2001:0370::ffff:ffff:ffff:ffff")));
+  ASIO_CHECK(*net13.hosts().begin() == make_address_v6("2001:0db8::"));
+  ASIO_CHECK(net13.hosts().end() != net13.hosts().find(make_address_v6("2001:0db8::1")));
+  ASIO_CHECK(net13.hosts().end() == net13.hosts().find(make_address_v6("2001:0db8::2")));
+  ASIO_CHECK(*net14.hosts().begin() == make_address_v6("2001:0db8::"));
+  ASIO_CHECK(net14.hosts().end() != net14.hosts().find(make_address_v6("2001:0db8::7")));
+  ASIO_CHECK(net14.hosts().end() == net14.hosts().find(make_address_v6("2001:0db8::8")));
+  ASIO_CHECK(*net15.hosts().begin() == make_address_v6("2001:0db8::"));
+  ASIO_CHECK(net15.hosts().end() != net15.hosts().find(make_address_v6("2001:0db8::01ff")));
+  ASIO_CHECK(net15.hosts().end() == net15.hosts().find(make_address_v6("2001:0db8::0200")));
 }
 
 } // namespace ip_network_v6_runtime
diff --git a/asio/src/tests/unit/ip/resolver_query_base.cpp b/asio/src/tests/unit/ip/resolver_query_base.cpp
index 66ee511..1125678 100644
--- a/asio/src/tests/unit/ip/resolver_query_base.cpp
+++ b/asio/src/tests/unit/ip/resolver_query_base.cpp
@@ -2,7 +2,7 @@
 // resolver_query_base.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/resolver_service.cpp b/asio/src/tests/unit/ip/resolver_service.cpp
index d4a95ea..f3fa096 100644
--- a/asio/src/tests/unit/ip/resolver_service.cpp
+++ b/asio/src/tests/unit/ip/resolver_service.cpp
@@ -2,7 +2,7 @@
 // resolver_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/tcp.cpp b/asio/src/tests/unit/ip/tcp.cpp
index 165da4a..2f6e1ac 100644
--- a/asio/src/tests/unit/ip/tcp.cpp
+++ b/asio/src/tests/unit/ip/tcp.cpp
@@ -2,7 +2,7 @@
 // tcp.cpp
 // ~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -24,8 +24,9 @@
 #include "asio/read.hpp"
 #include "asio/write.hpp"
 #include "../unit_test.hpp"
-#include "../archetypes/gettable_socket_option.hpp"
 #include "../archetypes/async_result.hpp"
+#include "../archetypes/deprecated_async_result.hpp"
+#include "../archetypes/gettable_socket_option.hpp"
 #include "../archetypes/io_control_command.hpp"
 #include "../archetypes/settable_socket_option.hpp"
 
@@ -234,6 +235,9 @@
     archetypes::gettable_socket_option<double> gettable_socket_option3;
     archetypes::io_control_command io_control_command;
     archetypes::lazy_handler lazy;
+#if !defined(ASIO_NO_DEPRECATED)
+    archetypes::deprecated_lazy_handler dlazy;
+#endif // !defined(ASIO_NO_DEPRECATED)
     asio::error_code ec;
 
     // basic_stream_socket constructors.
@@ -262,8 +266,10 @@
 
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = socket1.get_io_context();
     (void)ioc_ref;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     ip::tcp::socket::executor_type ex = socket1.get_executor();
     (void)ex;
@@ -333,6 +339,14 @@
     (void)i1;
     int i2 = socket1.async_connect(ip::tcp::endpoint(ip::tcp::v6(), 0), lazy);
     (void)i2;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d1 = socket1.async_connect(
+        ip::tcp::endpoint(ip::tcp::v4(), 0), dlazy);
+    (void)d1;
+    double d2 = socket1.async_connect(
+        ip::tcp::endpoint(ip::tcp::v6(), 0), dlazy);
+    (void)d2;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     socket1.set_option(settable_socket_option1);
     socket1.set_option(settable_socket_option1, ec);
@@ -376,6 +390,10 @@
     socket1.async_wait(socket_base::wait_read, wait_handler());
     int i3 = socket1.async_wait(socket_base::wait_write, lazy);
     (void)i3;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d3 = socket1.async_wait(socket_base::wait_write, dlazy);
+    (void)d3;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     // basic_stream_socket functions.
 
@@ -425,6 +443,29 @@
     (void)i12;
     int i13 = socket1.async_send(null_buffers(), in_flags, lazy);
     (void)i13;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d4 = socket1.async_send(buffer(mutable_char_buffer), dlazy);
+    (void)d4;
+    double d5 = socket1.async_send(buffer(const_char_buffer), dlazy);
+    (void)d5;
+    double d6 = socket1.async_send(mutable_buffers, dlazy);
+    (void)d6;
+    double d7 = socket1.async_send(const_buffers, dlazy);
+    (void)d7;
+    double d8 = socket1.async_send(null_buffers(), dlazy);
+    (void)d8;
+    double d9 = socket1.async_send(
+        buffer(mutable_char_buffer), in_flags, dlazy);
+    (void)d9;
+    double d10 = socket1.async_send(buffer(const_char_buffer), in_flags, dlazy);
+    (void)d10;
+    double d11 = socket1.async_send(mutable_buffers, in_flags, dlazy);
+    (void)d11;
+    double d12 = socket1.async_send(const_buffers, in_flags, dlazy);
+    (void)d12;
+    double d13 = socket1.async_send(null_buffers(), in_flags, dlazy);
+    (void)d13;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     socket1.receive(buffer(mutable_char_buffer));
     socket1.receive(mutable_buffers);
@@ -456,6 +497,21 @@
     (void)i18;
     int i19 = socket1.async_receive(null_buffers(), in_flags, lazy);
     (void)i19;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d14 = socket1.async_receive(buffer(mutable_char_buffer), dlazy);
+    (void)d14;
+    double d15 = socket1.async_receive(mutable_buffers, dlazy);
+    (void)d15;
+    double d16 = socket1.async_receive(null_buffers(), dlazy);
+    (void)d16;
+    double d17 = socket1.async_receive(buffer(mutable_char_buffer), in_flags,
+        dlazy);
+    (void)d17;
+    double d18 = socket1.async_receive(mutable_buffers, in_flags, dlazy);
+    (void)d18;
+    double d19 = socket1.async_receive(null_buffers(), in_flags, dlazy);
+    (void)d19;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     socket1.write_some(buffer(mutable_char_buffer));
     socket1.write_some(buffer(const_char_buffer));
@@ -483,6 +539,18 @@
     (void)i23;
     int i24 = socket1.async_write_some(null_buffers(), lazy);
     (void)i24;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d20 = socket1.async_write_some(buffer(mutable_char_buffer), dlazy);
+    (void)d20;
+    double d21 = socket1.async_write_some(buffer(const_char_buffer), dlazy);
+    (void)d21;
+    double d22 = socket1.async_write_some(mutable_buffers, dlazy);
+    (void)d22;
+    double d23 = socket1.async_write_some(const_buffers, dlazy);
+    (void)d23;
+    double d24 = socket1.async_write_some(null_buffers(), dlazy);
+    (void)d24;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     socket1.read_some(buffer(mutable_char_buffer));
     socket1.read_some(mutable_buffers);
@@ -500,6 +568,14 @@
     (void)i26;
     int i27 = socket1.async_read_some(null_buffers(), lazy);
     (void)i27;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d25 = socket1.async_read_some(buffer(mutable_char_buffer), dlazy);
+    (void)d25;
+    double d26 = socket1.async_read_some(mutable_buffers, dlazy);
+    (void)d26;
+    double d27 = socket1.async_read_some(null_buffers(), dlazy);
+    (void)d27;
+#endif // !defined(ASIO_NO_DEPRECATED)
   }
   catch (std::exception&)
   {
@@ -597,7 +673,7 @@
 
   bool read_noop_completed = false;
   client_side_socket.async_read_some(
-      asio::mutable_buffers_1(0, 0),
+      asio::mutable_buffer(0, 0),
       bindns::bind(handle_read_noop,
         _1, _2, &read_noop_completed));
 
@@ -608,7 +684,7 @@
 
   bool write_noop_completed = false;
   client_side_socket.async_write_some(
-      asio::const_buffers_1(0, 0),
+      asio::const_buffer(0, 0),
       bindns::bind(handle_write_noop,
         _1, _2, &write_noop_completed));
 
@@ -707,7 +783,8 @@
 struct move_accept_handler
 {
   move_accept_handler() {}
-  void operator()(const asio::error_code&, asio::ip::tcp::socket) {}
+  void operator()(
+      const asio::error_code&, asio::ip::tcp::socket) {}
   move_accept_handler(move_accept_handler&&) {}
 private:
   move_accept_handler(const move_accept_handler&) {}
@@ -732,6 +809,9 @@
     archetypes::gettable_socket_option<double> gettable_socket_option3;
     archetypes::io_control_command io_control_command;
     archetypes::lazy_handler lazy;
+#if !defined(ASIO_NO_DEPRECATED)
+    archetypes::deprecated_lazy_handler dlazy;
+#endif // !defined(ASIO_NO_DEPRECATED)
     asio::error_code ec;
 
     // basic_socket_acceptor constructors.
@@ -760,8 +840,13 @@
 
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = acceptor1.get_io_context();
     (void)ioc_ref;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+    ip::tcp::acceptor::executor_type ex = acceptor1.get_executor();
+    (void)ex;
 
     // basic_socket_acceptor functions.
 
@@ -833,6 +918,10 @@
     acceptor1.async_wait(socket_base::wait_read, wait_handler());
     int i1 = acceptor1.async_wait(socket_base::wait_write, lazy);
     (void)i1;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d1 = acceptor1.async_wait(socket_base::wait_write, dlazy);
+    (void)d1;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     acceptor1.accept(peer_socket);
     acceptor1.accept(peer_socket, ec);
@@ -853,6 +942,12 @@
     (void)i2;
     int i3 = acceptor1.async_accept(peer_socket, peer_endpoint, lazy);
     (void)i3;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d2 = acceptor1.async_accept(peer_socket, dlazy);
+    (void)d2;
+    double d3 = acceptor1.async_accept(peer_socket, peer_endpoint, dlazy);
+    (void)d3;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
 #if defined(ASIO_HAS_MOVE)
     acceptor1.async_accept(move_accept_handler());
@@ -977,28 +1072,51 @@
   {
     io_context ioc;
     archetypes::lazy_handler lazy;
+#if !defined(ASIO_NO_DEPRECATED)
+    archetypes::deprecated_lazy_handler dlazy;
+#endif // !defined(ASIO_NO_DEPRECATED)
     asio::error_code ec;
+#if !defined(ASIO_NO_DEPRECATED)
     ip::tcp::resolver::query q(ip::tcp::v4(), "localhost", "0");
+#endif // !defined(ASIO_NO_DEPRECATED)
     ip::tcp::endpoint e(ip::address_v4::loopback(), 0);
 
     // basic_resolver constructors.
 
     ip::tcp::resolver resolver(ioc);
 
+#if defined(ASIO_HAS_MOVE)
+    ip::tcp::resolver resolver2(std::move(resolver));
+#endif // defined(ASIO_HAS_MOVE)
+
+    // basic_resolver operators.
+
+#if defined(ASIO_HAS_MOVE)
+    resolver = ip::tcp::resolver(ioc);
+    resolver = std::move(resolver2);
+#endif // defined(ASIO_HAS_MOVE)
+
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = resolver.get_io_context();
     (void)ioc_ref;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+    ip::tcp::resolver::executor_type ex = resolver.get_executor();
+    (void)ex;
 
     // basic_resolver functions.
 
     resolver.cancel();
 
+#if !defined(ASIO_NO_DEPRECATED)
     ip::tcp::resolver::results_type results1 = resolver.resolve(q);
     (void)results1;
 
     ip::tcp::resolver::results_type results2 = resolver.resolve(q, ec);
     (void)results2;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     ip::tcp::resolver::results_type results3 = resolver.resolve("", "");
     (void)results3;
@@ -1036,30 +1154,59 @@
     ip::tcp::resolver::results_type results12 = resolver.resolve(e, ec);
     (void)results12;
 
+#if !defined(ASIO_NO_DEPRECATED)
     resolver.async_resolve(q, resolve_handler());
     int i1 = resolver.async_resolve(q, lazy);
     (void)i1;
+    double d1 = resolver.async_resolve(q, dlazy);
+    (void)d1;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-    resolver.async_resolve(q, resolve_handler());
+    resolver.async_resolve("", "", resolve_handler());
     int i2 = resolver.async_resolve("", "", lazy);
     (void)i2;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d2 = resolver.async_resolve("", "", dlazy);
+    (void)d2;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-    resolver.async_resolve(q, resolve_handler());
-    int i3 = resolver.async_resolve("", "", ip::tcp::resolver::flags(), lazy);
+    resolver.async_resolve("", "",
+        ip::tcp::resolver::flags(), resolve_handler());
+    int i3 = resolver.async_resolve("", "",
+        ip::tcp::resolver::flags(), lazy);
     (void)i3;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d3 = resolver.async_resolve("", "",
+        ip::tcp::resolver::flags(), dlazy);
+    (void)d3;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-    resolver.async_resolve(q, resolve_handler());
+    resolver.async_resolve(ip::tcp::v4(), "", "", resolve_handler());
     int i4 = resolver.async_resolve(ip::tcp::v4(), "", "", lazy);
     (void)i4;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d4 = resolver.async_resolve(ip::tcp::v4(), "", "", dlazy);
+    (void)d4;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-    resolver.async_resolve(q, resolve_handler());
+    resolver.async_resolve(ip::tcp::v4(),
+        "", "", ip::tcp::resolver::flags(), resolve_handler());
     int i5 = resolver.async_resolve(ip::tcp::v4(),
         "", "", ip::tcp::resolver::flags(), lazy);
     (void)i5;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d5 = resolver.async_resolve(ip::tcp::v4(),
+        "", "", ip::tcp::resolver::flags(), dlazy);
+    (void)d5;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     resolver.async_resolve(e, resolve_handler());
     int i6 = resolver.async_resolve(e, lazy);
     (void)i6;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d6 = resolver.async_resolve(e, dlazy);
+    (void)d6;
+#endif // !defined(ASIO_NO_DEPRECATED)
   }
   catch (std::exception&)
   {
@@ -1123,7 +1270,90 @@
   }
 }
 
-} // namespace ip_tcp_resolver_compile
+} // namespace ip_tcp_resolver_entry_compile
+
+//------------------------------------------------------------------------------
+
+// ip_tcp_iostream_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all public types and member functions on the
+// class ip::tcp::iostream compile and link correctly. Runtime failures are
+// ignored.
+
+namespace ip_tcp_iostream_compile {
+
+void test()
+{
+#if !defined(ASIO_NO_IOSTREAM)
+  using namespace asio;
+  namespace ip = asio::ip;
+
+  asio::io_context ioc;
+  asio::ip::tcp::socket sock(ioc);
+
+  // basic_socket_iostream typedefs.
+
+  (void)static_cast<ip::tcp::iostream::protocol_type*>(0);
+  (void)static_cast<ip::tcp::iostream::endpoint_type*>(0);
+  (void)static_cast<ip::tcp::iostream::clock_type*>(0);
+  (void)static_cast<ip::tcp::iostream::time_point*>(0);
+  (void)static_cast<ip::tcp::iostream::duration*>(0);
+  (void)static_cast<ip::tcp::iostream::traits_type*>(0);
+
+  // basic_socket_iostream constructors.
+
+  ip::tcp::iostream ios1;
+
+#if defined(ASIO_HAS_MOVE)
+  ip::tcp::iostream ios2(std::move(sock));
+#endif // defined(ASIO_HAS_MOVE)
+
+  ip::tcp::iostream ios3("hostname", "service");
+
+  // basic_socket_iostream operators.
+
+#if defined(ASIO_HAS_MOVE)
+  ios1 = ip::tcp::iostream();
+
+  ios2 = std::move(ios1);
+#endif // defined(ASIO_HAS_MOVE)
+
+  // basic_socket_iostream members.
+
+  ios1.connect("hostname", "service");
+
+  ios1.close();
+
+  (void)static_cast<std::streambuf*>(ios1.rdbuf());
+
+#if defined(ASIO_ENABLE_OLD_SERVICES)
+  basic_socket<ip::tcp, stream_socket_service<ip::tcp> >& sref = ios1.socket();
+#else // defined(ASIO_ENABLE_OLD_SERVICES)
+  basic_socket<ip::tcp>& sref = ios1.socket();
+#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+  (void)sref;
+
+  error_code ec = ios1.error();
+  (void)ec;
+
+  ip::tcp::iostream::time_point tp = ios1.expiry();
+  (void)tp;
+
+  ios1.expires_at(tp);
+
+  ip::tcp::iostream::duration d;
+  ios1.expires_after(d);
+
+  // iostream operators.
+
+  int i = 0;
+  ios1 >> i;
+  ios1 << i;
+#endif // !defined(ASIO_NO_IOSTREAM)
+}
+
+} // namespace ip_tcp_iostream_compile
+
 //------------------------------------------------------------------------------
 
 ASIO_TEST_SUITE
@@ -1137,4 +1367,6 @@
   ASIO_TEST_CASE(ip_tcp_acceptor_runtime::test)
   ASIO_TEST_CASE(ip_tcp_resolver_compile::test)
   ASIO_TEST_CASE(ip_tcp_resolver_entry_compile::test)
+  ASIO_TEST_CASE(ip_tcp_resolver_entry_compile::test)
+  ASIO_COMPILE_TEST_CASE(ip_tcp_iostream_compile::test)
 )
diff --git a/asio/src/tests/unit/ip/udp.cpp b/asio/src/tests/unit/ip/udp.cpp
index 628f114..4184699 100644
--- a/asio/src/tests/unit/ip/udp.cpp
+++ b/asio/src/tests/unit/ip/udp.cpp
@@ -2,7 +2,7 @@
 // udp.cpp
 // ~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -19,8 +19,9 @@
 #include <cstring>
 #include "asio/io_context.hpp"
 #include "../unit_test.hpp"
-#include "../archetypes/gettable_socket_option.hpp"
 #include "../archetypes/async_result.hpp"
+#include "../archetypes/deprecated_async_result.hpp"
+#include "../archetypes/gettable_socket_option.hpp"
 #include "../archetypes/io_control_command.hpp"
 #include "../archetypes/settable_socket_option.hpp"
 
@@ -102,6 +103,9 @@
     archetypes::gettable_socket_option<double> gettable_socket_option3;
     archetypes::io_control_command io_control_command;
     archetypes::lazy_handler lazy;
+#if !defined(ASIO_NO_DEPRECATED)
+    archetypes::deprecated_lazy_handler dlazy;
+#endif // !defined(ASIO_NO_DEPRECATED)
     asio::error_code ec;
 
     // basic_datagram_socket constructors.
@@ -130,8 +134,10 @@
 
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = socket1.get_io_context();
     (void)ioc_ref;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     ip::udp::socket::executor_type ex = socket1.get_executor();
     (void)ex;
@@ -201,6 +207,14 @@
     (void)i1;
     int i2 = socket1.async_connect(ip::udp::endpoint(ip::udp::v6(), 0), lazy);
     (void)i2;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d1 = socket1.async_connect(
+        ip::udp::endpoint(ip::udp::v4(), 0), dlazy);
+    (void)d1;
+    double d2 = socket1.async_connect(
+        ip::udp::endpoint(ip::udp::v6(), 0), dlazy);
+    (void)d2;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     socket1.set_option(settable_socket_option1);
     socket1.set_option(settable_socket_option1, ec);
@@ -244,6 +258,10 @@
     socket1.async_wait(socket_base::wait_read, wait_handler());
     int i3 = socket1.async_wait(socket_base::wait_write, lazy);
     (void)i3;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d3 = socket1.async_wait(socket_base::wait_write, dlazy);
+    (void)d3;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     // basic_datagram_socket functions.
 
@@ -275,6 +293,21 @@
     (void)i8;
     int i9 = socket1.async_send(null_buffers(), in_flags, lazy);
     (void)i9;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d4 = socket1.async_send(buffer(mutable_char_buffer), dlazy);
+    (void)d4;
+    double d5 = socket1.async_send(buffer(const_char_buffer), dlazy);
+    (void)d5;
+    double d6 = socket1.async_send(null_buffers(), dlazy);
+    (void)d6;
+    double d7 = socket1.async_send(
+        buffer(mutable_char_buffer), in_flags, dlazy);
+    (void)d7;
+    double d8 = socket1.async_send(buffer(const_char_buffer), in_flags, dlazy);
+    (void)d8;
+    double d9 = socket1.async_send(null_buffers(), in_flags, dlazy);
+    (void)d9;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     socket1.send_to(buffer(mutable_char_buffer),
         ip::udp::endpoint(ip::udp::v4(), 0));
@@ -373,6 +406,44 @@
     int i21 = socket1.async_send_to(null_buffers(),
         ip::udp::endpoint(ip::udp::v6(), 0), in_flags, lazy);
     (void)i21;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d10 = socket1.async_send_to(buffer(mutable_char_buffer),
+        ip::udp::endpoint(ip::udp::v4(), 0), dlazy);
+    (void)d10;
+    double d11 = socket1.async_send_to(buffer(mutable_char_buffer),
+        ip::udp::endpoint(ip::udp::v6(), 0), dlazy);
+    (void)d11;
+    double d12 = socket1.async_send_to(buffer(const_char_buffer),
+        ip::udp::endpoint(ip::udp::v4(), 0), dlazy);
+    (void)d12;
+    double d13 = socket1.async_send_to(buffer(const_char_buffer),
+        ip::udp::endpoint(ip::udp::v6(), 0), dlazy);
+    (void)d13;
+    double d14 = socket1.async_send_to(null_buffers(),
+        ip::udp::endpoint(ip::udp::v4(), 0), dlazy);
+    (void)d14;
+    double d15 = socket1.async_send_to(null_buffers(),
+        ip::udp::endpoint(ip::udp::v6(), 0), dlazy);
+    (void)d15;
+    double d16 = socket1.async_send_to(buffer(mutable_char_buffer),
+        ip::udp::endpoint(ip::udp::v4(), 0), in_flags, dlazy);
+    (void)d16;
+    double d17 = socket1.async_send_to(buffer(mutable_char_buffer),
+        ip::udp::endpoint(ip::udp::v6(), 0), in_flags, dlazy);
+    (void)d17;
+    double d18 = socket1.async_send_to(buffer(const_char_buffer),
+        ip::udp::endpoint(ip::udp::v4(), 0), in_flags, dlazy);
+    (void)d18;
+    double d19 = socket1.async_send_to(buffer(const_char_buffer),
+        ip::udp::endpoint(ip::udp::v6(), 0), in_flags, dlazy);
+    (void)d19;
+    double d20 = socket1.async_send_to(null_buffers(),
+        ip::udp::endpoint(ip::udp::v4(), 0), in_flags, dlazy);
+    (void)d20;
+    double d21 = socket1.async_send_to(null_buffers(),
+        ip::udp::endpoint(ip::udp::v6(), 0), in_flags, dlazy);
+    (void)d21;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     socket1.receive(buffer(mutable_char_buffer));
     socket1.receive(null_buffers());
@@ -395,6 +466,17 @@
     (void)i24;
     int i25 = socket1.async_receive(null_buffers(), in_flags, lazy);
     (void)i25;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d22 = socket1.async_receive(buffer(mutable_char_buffer), dlazy);
+    (void)d22;
+    double d23 = socket1.async_receive(null_buffers(), dlazy);
+    (void)d23;
+    double d24 = socket1.async_receive(buffer(mutable_char_buffer),
+        in_flags, dlazy);
+    (void)d24;
+    double d25 = socket1.async_receive(null_buffers(), in_flags, dlazy);
+    (void)d25;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     ip::udp::endpoint endpoint;
     socket1.receive_from(buffer(mutable_char_buffer), endpoint);
@@ -424,6 +506,20 @@
     int i29 = socket1.async_receive_from(null_buffers(),
         endpoint, in_flags, lazy);
     (void)i29;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d26 = socket1.async_receive_from(buffer(mutable_char_buffer),
+        endpoint, dlazy);
+    (void)d26;
+    double d27 = socket1.async_receive_from(null_buffers(),
+        endpoint, dlazy);
+    (void)d27;
+    double d28 = socket1.async_receive_from(buffer(mutable_char_buffer),
+        endpoint, in_flags, dlazy);
+    (void)d28;
+    double d29 = socket1.async_receive_from(null_buffers(),
+        endpoint, in_flags, dlazy);
+    (void)d29;
+#endif // !defined(ASIO_NO_DEPRECATED)
   }
   catch (std::exception&)
   {
@@ -533,28 +629,51 @@
   {
     io_context ioc;
     archetypes::lazy_handler lazy;
+#if !defined(ASIO_NO_DEPRECATED)
+    archetypes::deprecated_lazy_handler dlazy;
+#endif // !defined(ASIO_NO_DEPRECATED)
     asio::error_code ec;
+#if !defined(ASIO_NO_DEPRECATED)
     ip::udp::resolver::query q(ip::udp::v4(), "localhost", "0");
+#endif // !defined(ASIO_NO_DEPRECATED)
     ip::udp::endpoint e(ip::address_v4::loopback(), 0);
 
     // basic_resolver constructors.
 
     ip::udp::resolver resolver(ioc);
 
+#if defined(ASIO_HAS_MOVE)
+    ip::udp::resolver resolver2(std::move(resolver));
+#endif // defined(ASIO_HAS_MOVE)
+
+    // basic_resolver operators.
+
+#if defined(ASIO_HAS_MOVE)
+    resolver = ip::udp::resolver(ioc);
+    resolver = std::move(resolver2);
+#endif // defined(ASIO_HAS_MOVE)
+
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = resolver.get_io_context();
     (void)ioc_ref;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+    ip::udp::resolver::executor_type ex = resolver.get_executor();
+    (void)ex;
 
     // basic_resolver functions.
 
     resolver.cancel();
 
+#if !defined(ASIO_NO_DEPRECATED)
     ip::udp::resolver::results_type results1 = resolver.resolve(q);
     (void)results1;
 
     ip::udp::resolver::results_type results2 = resolver.resolve(q, ec);
     (void)results2;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     ip::udp::resolver::results_type results3 = resolver.resolve("", "");
     (void)results3;
@@ -592,30 +711,59 @@
     ip::udp::resolver::results_type results12 = resolver.resolve(e, ec);
     (void)results12;
 
+#if !defined(ASIO_NO_DEPRECATED)
     resolver.async_resolve(q, resolve_handler());
     int i1 = resolver.async_resolve(q, lazy);
     (void)i1;
+    double d1 = resolver.async_resolve(q, dlazy);
+    (void)d1;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-    resolver.async_resolve(q, resolve_handler());
+    resolver.async_resolve("", "", resolve_handler());
     int i2 = resolver.async_resolve("", "", lazy);
     (void)i2;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d2 = resolver.async_resolve("", "", dlazy);
+    (void)d2;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-    resolver.async_resolve(q, resolve_handler());
-    int i3 = resolver.async_resolve("", "", ip::udp::resolver::flags(), lazy);
+    resolver.async_resolve("", "",
+        ip::udp::resolver::flags(), resolve_handler());
+    int i3 = resolver.async_resolve("", "",
+        ip::udp::resolver::flags(), lazy);
     (void)i3;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d3 = resolver.async_resolve("", "",
+        ip::udp::resolver::flags(), dlazy);
+    (void)d3;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-    resolver.async_resolve(q, resolve_handler());
+    resolver.async_resolve(ip::udp::v4(), "", "", resolve_handler());
     int i4 = resolver.async_resolve(ip::udp::v4(), "", "", lazy);
     (void)i4;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d4 = resolver.async_resolve(ip::udp::v4(), "", "", dlazy);
+    (void)d4;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
-    resolver.async_resolve(q, resolve_handler());
+    resolver.async_resolve(ip::udp::v4(),
+        "", "", ip::udp::resolver::flags(), resolve_handler());
     int i5 = resolver.async_resolve(ip::udp::v4(),
         "", "", ip::udp::resolver::flags(), lazy);
     (void)i5;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d5 = resolver.async_resolve(ip::udp::v4(),
+        "", "", ip::udp::resolver::flags(), dlazy);
+    (void)d5;
+#endif // !defined(ASIO_NO_DEPRECATED)
 
     resolver.async_resolve(e, resolve_handler());
     int i6 = resolver.async_resolve(e, lazy);
     (void)i6;
+#if !defined(ASIO_NO_DEPRECATED)
+    double d6 = resolver.async_resolve(e, dlazy);
+    (void)d6;
+#endif // !defined(ASIO_NO_DEPRECATED)
   }
   catch (std::exception&)
   {
diff --git a/asio/src/tests/unit/ip/unicast.cpp b/asio/src/tests/unit/ip/unicast.cpp
index eb1c04d..9fbda47 100644
--- a/asio/src/tests/unit/ip/unicast.cpp
+++ b/asio/src/tests/unit/ip/unicast.cpp
@@ -2,7 +2,7 @@
 // unicast.cpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ip/v6_only.cpp b/asio/src/tests/unit/ip/v6_only.cpp
index c49fde5..cd393ec 100644
--- a/asio/src/tests/unit/ip/v6_only.cpp
+++ b/asio/src/tests/unit/ip/v6_only.cpp
@@ -2,7 +2,7 @@
 // v6_only.cpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/is_read_buffered.cpp b/asio/src/tests/unit/is_read_buffered.cpp
index 1305e36..74b1b11 100644
--- a/asio/src/tests/unit/is_read_buffered.cpp
+++ b/asio/src/tests/unit/is_read_buffered.cpp
@@ -2,7 +2,7 @@
 // is_read_buffered.cpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -65,7 +65,8 @@
   void async_write(const Const_Buffers&, Handler handler)
   {
     asio::error_code error;
-    io_context_.post(asio::detail::bind_handler(handler, error, 0));
+    asio::post(io_context_,
+        asio::detail::bind_handler(handler, error, 0));
   }
 
   template <typename Mutable_Buffers>
@@ -85,7 +86,8 @@
   void async_read(const Mutable_Buffers&, Handler handler)
   {
     asio::error_code error;
-    io_context_.post(asio::detail::bind_handler(handler, error, 0));
+    asio::post(io_context_,
+        asio::detail::bind_handler(handler, error, 0));
   }
 
 private:
diff --git a/asio/src/tests/unit/is_write_buffered.cpp b/asio/src/tests/unit/is_write_buffered.cpp
index c94b78a..9dc855c 100644
--- a/asio/src/tests/unit/is_write_buffered.cpp
+++ b/asio/src/tests/unit/is_write_buffered.cpp
@@ -2,7 +2,7 @@
 // is_write_buffered.cpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -65,7 +65,8 @@
   void async_write(const Const_Buffers&, Handler handler)
   {
     asio::error_code error;
-    io_context_.post(asio::detail::bind_handler(handler, error, 0));
+    asio::post(io_context_,
+        asio::detail::bind_handler(handler, error, 0));
   }
 
   template <typename Mutable_Buffers>
@@ -85,7 +86,8 @@
   void async_read(const Mutable_Buffers&, Handler handler)
   {
     asio::error_code error;
-    io_context_.post(asio::detail::bind_handler(handler, error, 0));
+    asio::post(io_context_,
+        asio::detail::bind_handler(handler, error, 0));
   }
 
 private:
diff --git a/asio/src/tests/unit/local/basic_endpoint.cpp b/asio/src/tests/unit/local/basic_endpoint.cpp
index a5e1a27..5153f76 100644
--- a/asio/src/tests/unit/local/basic_endpoint.cpp
+++ b/asio/src/tests/unit/local/basic_endpoint.cpp
@@ -2,7 +2,7 @@
 // basic_endpoint.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/local/connect_pair.cpp b/asio/src/tests/unit/local/connect_pair.cpp
index 1f50978..53a68f5 100644
--- a/asio/src/tests/unit/local/connect_pair.cpp
+++ b/asio/src/tests/unit/local/connect_pair.cpp
@@ -2,7 +2,7 @@
 // connect_pair.cpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -42,7 +42,6 @@
   {
     asio::io_context io_context;
     asio::error_code ec1;
-    asio::error_code ec2;
 
     dp::socket s1(io_context);
     dp::socket s2(io_context);
@@ -50,7 +49,7 @@
 
     dp::socket s3(io_context);
     dp::socket s4(io_context);
-    ec1 = local::connect_pair(s3, s4, ec2);
+    local::connect_pair(s3, s4, ec1);
 
     sp::socket s5(io_context);
     sp::socket s6(io_context);
@@ -58,7 +57,7 @@
 
     sp::socket s7(io_context);
     sp::socket s8(io_context);
-    ec1 = local::connect_pair(s7, s8, ec2);
+    local::connect_pair(s7, s8, ec1);
   }
   catch (std::exception&)
   {
diff --git a/asio/src/tests/unit/local/datagram_protocol.cpp b/asio/src/tests/unit/local/datagram_protocol.cpp
index 46b7426..c55018b 100644
--- a/asio/src/tests/unit/local/datagram_protocol.cpp
+++ b/asio/src/tests/unit/local/datagram_protocol.cpp
@@ -2,7 +2,7 @@
 // datagram_protocol.cpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -69,8 +69,13 @@
 
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = socket1.get_io_context();
     (void)ioc_ref;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+    dp::socket::executor_type ex = socket1.get_executor();
+    (void)ex;
 
     // basic_socket functions.
 
diff --git a/asio/src/tests/unit/local/stream_protocol.cpp b/asio/src/tests/unit/local/stream_protocol.cpp
index b4538cb..980fcd1 100644
--- a/asio/src/tests/unit/local/stream_protocol.cpp
+++ b/asio/src/tests/unit/local/stream_protocol.cpp
@@ -2,7 +2,7 @@
 // stream_protocol.cpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -77,8 +77,13 @@
 
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = socket1.get_io_context();
     (void)ioc_ref;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+    sp::socket::executor_type ex = socket1.get_executor();
+    (void)ex;
 
     // basic_socket functions.
 
diff --git a/asio/src/tests/unit/packaged_task.cpp b/asio/src/tests/unit/packaged_task.cpp
new file mode 100644
index 0000000..542b75f
--- /dev/null
+++ b/asio/src/tests/unit/packaged_task.cpp
@@ -0,0 +1,25 @@
+//
+// packaged_task.cpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/packaged_task.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  packaged_task,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/placeholders.cpp b/asio/src/tests/unit/placeholders.cpp
index c90efce..47d6410 100644
--- a/asio/src/tests/unit/placeholders.cpp
+++ b/asio/src/tests/unit/placeholders.cpp
@@ -2,7 +2,7 @@
 // placeholders.cpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/posix/.gitignore b/asio/src/tests/unit/posix/.gitignore
index af4bde6..2de575a 100644
--- a/asio/src/tests/unit/posix/.gitignore
+++ b/asio/src/tests/unit/posix/.gitignore
@@ -9,6 +9,7 @@
 *.tds
 basic_descriptor
 basic_stream_descriptor
+descriptor
 descriptor_base
 stream_descriptor
 stream_descriptor_service
diff --git a/asio/src/tests/unit/posix/basic_descriptor.cpp b/asio/src/tests/unit/posix/basic_descriptor.cpp
index 73692b0..8eb7540 100644
--- a/asio/src/tests/unit/posix/basic_descriptor.cpp
+++ b/asio/src/tests/unit/posix/basic_descriptor.cpp
@@ -2,7 +2,7 @@
 // basic_descriptor.cpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/posix/basic_stream_descriptor.cpp b/asio/src/tests/unit/posix/basic_stream_descriptor.cpp
index 0e217dd..747a763 100644
--- a/asio/src/tests/unit/posix/basic_stream_descriptor.cpp
+++ b/asio/src/tests/unit/posix/basic_stream_descriptor.cpp
@@ -2,7 +2,7 @@
 // basic_stream_descriptor.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/posix/descriptor.cpp b/asio/src/tests/unit/posix/descriptor.cpp
new file mode 100644
index 0000000..17b53d5
--- /dev/null
+++ b/asio/src/tests/unit/posix/descriptor.cpp
@@ -0,0 +1,25 @@
+//
+// descriptor.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/posix/descriptor.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  posix_descriptor,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/posix/descriptor_base.cpp b/asio/src/tests/unit/posix/descriptor_base.cpp
index e005299..5616300 100644
--- a/asio/src/tests/unit/posix/descriptor_base.cpp
+++ b/asio/src/tests/unit/posix/descriptor_base.cpp
@@ -2,7 +2,7 @@
 // descriptor_base.cpp
 // ~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/posix/stream_descriptor.cpp b/asio/src/tests/unit/posix/stream_descriptor.cpp
index 26e184b..bebd414 100644
--- a/asio/src/tests/unit/posix/stream_descriptor.cpp
+++ b/asio/src/tests/unit/posix/stream_descriptor.cpp
@@ -2,7 +2,7 @@
 // stream_descriptor.cpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -76,8 +76,13 @@
 
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = descriptor1.get_io_context();
     (void)ioc_ref;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+    posix::stream_descriptor::executor_type ex = descriptor1.get_executor();
+    (void)ex;
 
     // basic_descriptor functions.
 
diff --git a/asio/src/tests/unit/posix/stream_descriptor_service.cpp b/asio/src/tests/unit/posix/stream_descriptor_service.cpp
index 9b3b84c..265c80f 100644
--- a/asio/src/tests/unit/posix/stream_descriptor_service.cpp
+++ b/asio/src/tests/unit/posix/stream_descriptor_service.cpp
@@ -2,7 +2,7 @@
 // stream_descriptor_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/post.cpp b/asio/src/tests/unit/post.cpp
new file mode 100644
index 0000000..69bbfc0
--- /dev/null
+++ b/asio/src/tests/unit/post.cpp
@@ -0,0 +1,25 @@
+//
+// post.cpp
+// ~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/post.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  post,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/raw_socket_service.cpp b/asio/src/tests/unit/raw_socket_service.cpp
index e0005fe..e5276e9 100644
--- a/asio/src/tests/unit/raw_socket_service.cpp
+++ b/asio/src/tests/unit/raw_socket_service.cpp
@@ -2,7 +2,7 @@
 // raw_socket_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/read.cpp b/asio/src/tests/unit/read.cpp
index 0a3670c..9bddf61 100644
--- a/asio/src/tests/unit/read.cpp
+++ b/asio/src/tests/unit/read.cpp
@@ -2,7 +2,7 @@
 // read.cpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -75,22 +75,20 @@
     next_read_length_ = length;
   }
 
-  template <typename Const_Buffers>
-  bool check_buffers(const Const_Buffers& buffers, size_t length)
+  template <typename Iterator>
+  bool check_buffers(Iterator begin, Iterator end, size_t length)
   {
     if (length != position_)
       return false;
 
-    typename Const_Buffers::const_iterator iter = buffers.begin();
-    typename Const_Buffers::const_iterator end = buffers.end();
+    Iterator iter = begin;
     size_t checked_length = 0;
     for (; iter != end && checked_length < length; ++iter)
     {
       size_t buffer_length = asio::buffer_size(*iter);
       if (buffer_length > length - checked_length)
         buffer_length = length - checked_length;
-      if (memcmp(data_ + checked_length,
-            asio::buffer_cast<const void*>(*iter), buffer_length) != 0)
+      if (memcmp(data_ + checked_length, iter->data(), buffer_length) != 0)
         return false;
       checked_length += buffer_length;
     }
@@ -98,6 +96,13 @@
     return true;
   }
 
+  template <typename Const_Buffers>
+  bool check_buffers(const Const_Buffers& buffers, size_t length)
+  {
+    return check_buffers(asio::buffer_sequence_begin(buffers),
+        asio::buffer_sequence_end(buffers), length);
+  }
+
   template <typename Mutable_Buffers>
   size_t read_some(const Mutable_Buffers& buffers)
   {
@@ -148,12 +153,12 @@
   ASIO_CHECK(bytes_transferred == 0);
 }
 
-void test_2_arg_mutable_buffers_1_read()
+void test_2_arg_mutable_buffer_read()
 {
   asio::io_context ioc;
   test_stream s(ioc);
   char read_buf[sizeof(read_data)];
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(read_buf, sizeof(read_buf));
 
   s.reset(read_data, sizeof(read_data));
@@ -249,12 +254,12 @@
   ASIO_CHECK(!error);
 }
 
-void test_3_arg_nothrow_mutable_buffers_1_read()
+void test_3_arg_nothrow_mutable_buffer_read()
 {
   asio::io_context ioc;
   test_stream s(ioc);
   char read_buf[sizeof(read_data)];
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(read_buf, sizeof(read_buf));
 
   s.reset(read_data, sizeof(read_data));
@@ -362,12 +367,12 @@
   return !!ec ? 0 : 3;
 }
 
-void test_3_arg_mutable_buffers_1_read()
+void test_3_arg_mutable_buffer_read()
 {
   asio::io_context ioc;
   test_stream s(ioc);
   char read_buf[sizeof(read_data)];
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(read_buf, sizeof(read_buf));
 
   s.reset(read_data, sizeof(read_data));
@@ -1018,12 +1023,12 @@
   ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
 }
 
-void test_4_arg_mutable_buffers_1_read()
+void test_4_arg_mutable_buffer_read()
 {
   asio::io_context ioc;
   test_stream s(ioc);
   char read_buf[sizeof(read_data)];
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(read_buf, sizeof(read_buf));
 
   s.reset(read_data, sizeof(read_data));
@@ -1847,7 +1852,7 @@
   ASIO_CHECK(bytes_transferred == expected_bytes_transferred);
 }
 
-void test_3_arg_mutable_buffers_1_async_read()
+void test_3_arg_mutable_buffer_async_read()
 {
 #if defined(ASIO_HAS_BOOST_BIND)
   namespace bindns = boost;
@@ -1860,7 +1865,7 @@
   asio::io_context ioc;
   test_stream s(ioc);
   char read_buf[sizeof(read_data)];
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(read_buf, sizeof(read_buf));
 
   s.reset(read_data, sizeof(read_data));
@@ -2156,7 +2161,7 @@
   ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
 }
 
-void test_4_arg_mutable_buffers_1_async_read()
+void test_4_arg_mutable_buffer_async_read()
 {
 #if defined(ASIO_HAS_BOOST_BIND)
   namespace bindns = boost;
@@ -2169,7 +2174,7 @@
   asio::io_context ioc;
   test_stream s(ioc);
   char read_buf[sizeof(read_data)];
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(read_buf, sizeof(read_buf));
 
   s.reset(read_data, sizeof(read_data));
@@ -3900,25 +3905,25 @@
 (
   read,
   ASIO_TEST_CASE(test_2_arg_zero_buffers_read)
-  ASIO_TEST_CASE(test_2_arg_mutable_buffers_1_read)
+  ASIO_TEST_CASE(test_2_arg_mutable_buffer_read)
   ASIO_TEST_CASE(test_2_arg_vector_buffers_read)
   ASIO_TEST_CASE(test_2_arg_streambuf_read)
   ASIO_TEST_CASE(test_3_arg_nothrow_zero_buffers_read)
-  ASIO_TEST_CASE(test_3_arg_nothrow_mutable_buffers_1_read)
+  ASIO_TEST_CASE(test_3_arg_nothrow_mutable_buffer_read)
   ASIO_TEST_CASE(test_3_arg_nothrow_vector_buffers_read)
   ASIO_TEST_CASE(test_3_arg_nothrow_streambuf_read)
-  ASIO_TEST_CASE(test_3_arg_mutable_buffers_1_read)
+  ASIO_TEST_CASE(test_3_arg_mutable_buffer_read)
   ASIO_TEST_CASE(test_3_arg_vector_buffers_read)
   ASIO_TEST_CASE(test_3_arg_streambuf_read)
-  ASIO_TEST_CASE(test_4_arg_mutable_buffers_1_read)
+  ASIO_TEST_CASE(test_4_arg_mutable_buffer_read)
   ASIO_TEST_CASE(test_4_arg_vector_buffers_read)
   ASIO_TEST_CASE(test_4_arg_streambuf_read)
-  ASIO_TEST_CASE(test_3_arg_mutable_buffers_1_async_read)
+  ASIO_TEST_CASE(test_3_arg_mutable_buffer_async_read)
   ASIO_TEST_CASE(test_3_arg_boost_array_buffers_async_read)
   ASIO_TEST_CASE(test_3_arg_std_array_buffers_async_read)
   ASIO_TEST_CASE(test_3_arg_vector_buffers_async_read)
   ASIO_TEST_CASE(test_3_arg_streambuf_async_read)
-  ASIO_TEST_CASE(test_4_arg_mutable_buffers_1_async_read)
+  ASIO_TEST_CASE(test_4_arg_mutable_buffer_async_read)
   ASIO_TEST_CASE(test_4_arg_vector_buffers_async_read)
   ASIO_TEST_CASE(test_4_arg_boost_array_buffers_async_read)
   ASIO_TEST_CASE(test_4_arg_std_array_buffers_async_read)
diff --git a/asio/src/tests/unit/read_at.cpp b/asio/src/tests/unit/read_at.cpp
index 69ec472..e02464a 100644
--- a/asio/src/tests/unit/read_at.cpp
+++ b/asio/src/tests/unit/read_at.cpp
@@ -2,7 +2,7 @@
 // read_at.cpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -77,15 +77,14 @@
     next_read_length_ = length;
   }
 
-  template <typename Const_Buffers>
+  template <typename Iterator>
   bool check_buffers(asio::uint64_t offset,
-      const Const_Buffers& buffers, size_t length)
+      Iterator begin, Iterator end, size_t length)
   {
     if (offset + length > max_length)
       return false;
 
-    typename Const_Buffers::const_iterator iter = buffers.begin();
-    typename Const_Buffers::const_iterator end = buffers.end();
+    Iterator iter = begin;
     size_t checked_length = 0;
     for (; iter != end && checked_length < length; ++iter)
     {
@@ -93,7 +92,7 @@
       if (buffer_length > length - checked_length)
         buffer_length = length - checked_length;
       if (memcmp(data_ + offset + checked_length,
-            asio::buffer_cast<const void*>(*iter), buffer_length) != 0)
+            iter->data(), buffer_length) != 0)
         return false;
       checked_length += buffer_length;
     }
@@ -101,6 +100,14 @@
     return true;
   }
 
+  template <typename Const_Buffers>
+  bool check_buffers(asio::uint64_t offset,
+      const Const_Buffers& buffers, size_t length)
+  {
+    return check_buffers(offset, asio::buffer_sequence_begin(buffers),
+        asio::buffer_sequence_end(buffers), length);
+  }
+
   template <typename Mutable_Buffers>
   size_t read_some_at(asio::uint64_t offset,
       const Mutable_Buffers& buffers)
@@ -140,12 +147,12 @@
 static const char read_data[]
   = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 
-void test_3_arg_mutable_buffers_1_read_at()
+void test_3_arg_mutable_buffer_read_at()
 {
   asio::io_context ioc;
   test_random_access_device s(ioc);
   char read_buf[sizeof(read_data)];
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(read_buf, sizeof(read_buf));
 
   s.reset(read_data, sizeof(read_data));
@@ -292,12 +299,12 @@
   ASIO_CHECK(s.check_buffers(1234, sb.data(), sizeof(read_data)));
 }
 
-void test_4_arg_nothrow_mutable_buffers_1_read_at()
+void test_4_arg_nothrow_mutable_buffer_read_at()
 {
   asio::io_context ioc;
   test_random_access_device s(ioc);
   char read_buf[sizeof(read_data)];
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(read_buf, sizeof(read_buf));
 
   s.reset(read_data, sizeof(read_data));
@@ -477,12 +484,12 @@
   return !!ec ? 0 : 3;
 }
 
-void test_4_arg_mutable_buffers_1_read_at()
+void test_4_arg_mutable_buffer_read_at()
 {
   asio::io_context ioc;
   test_random_access_device s(ioc);
   char read_buf[sizeof(read_data)];
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(read_buf, sizeof(read_buf));
 
   s.reset(read_data, sizeof(read_data));
@@ -1781,12 +1788,12 @@
   ASIO_CHECK(s.check_buffers(1234, sb.data(), sizeof(read_data)));
 }
 
-void test_5_arg_mutable_buffers_1_read_at()
+void test_5_arg_mutable_buffer_read_at()
 {
   asio::io_context ioc;
   test_random_access_device s(ioc);
   char read_buf[sizeof(read_data)];
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(read_buf, sizeof(read_buf));
 
   s.reset(read_data, sizeof(read_data));
@@ -3420,7 +3427,7 @@
   ASIO_CHECK(bytes_transferred == expected_bytes_transferred);
 }
 
-void test_4_arg_mutable_buffers_1_async_read_at()
+void test_4_arg_mutable_buffer_async_read_at()
 {
 #if defined(ASIO_HAS_BOOST_BIND)
   namespace bindns = boost;
@@ -3433,7 +3440,7 @@
   asio::io_context ioc;
   test_random_access_device s(ioc);
   char read_buf[sizeof(read_data)];
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(read_buf, sizeof(read_buf));
 
   s.reset(read_data, sizeof(read_data));
@@ -3911,7 +3918,7 @@
   ASIO_CHECK(s.check_buffers(1234, sb.data(), sizeof(read_data)));
 }
 
-void test_5_arg_mutable_buffers_1_async_read_at()
+void test_5_arg_mutable_buffer_async_read_at()
 {
 #if defined(ASIO_HAS_BOOST_BIND)
   namespace bindns = boost;
@@ -3924,7 +3931,7 @@
   asio::io_context ioc;
   test_random_access_device s(ioc);
   char read_buf[sizeof(read_data)];
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(read_buf, sizeof(read_buf));
 
   s.reset(read_data, sizeof(read_data));
@@ -7465,24 +7472,24 @@
 ASIO_TEST_SUITE
 (
   read_at,
-  ASIO_TEST_CASE(test_3_arg_mutable_buffers_1_read_at)
+  ASIO_TEST_CASE(test_3_arg_mutable_buffer_read_at)
   ASIO_TEST_CASE(test_3_arg_vector_buffers_read_at)
   ASIO_TEST_CASE(test_3_arg_streambuf_read_at)
-  ASIO_TEST_CASE(test_4_arg_nothrow_mutable_buffers_1_read_at)
+  ASIO_TEST_CASE(test_4_arg_nothrow_mutable_buffer_read_at)
   ASIO_TEST_CASE(test_4_arg_nothrow_vector_buffers_read_at)
   ASIO_TEST_CASE(test_4_arg_nothrow_streambuf_read_at)
-  ASIO_TEST_CASE(test_4_arg_mutable_buffers_1_read_at)
+  ASIO_TEST_CASE(test_4_arg_mutable_buffer_read_at)
   ASIO_TEST_CASE(test_4_arg_vector_buffers_read_at)
   ASIO_TEST_CASE(test_4_arg_streambuf_read_at)
-  ASIO_TEST_CASE(test_5_arg_mutable_buffers_1_read_at)
+  ASIO_TEST_CASE(test_5_arg_mutable_buffer_read_at)
   ASIO_TEST_CASE(test_5_arg_vector_buffers_read_at)
   ASIO_TEST_CASE(test_5_arg_streambuf_read_at)
-  ASIO_TEST_CASE(test_4_arg_mutable_buffers_1_async_read_at)
+  ASIO_TEST_CASE(test_4_arg_mutable_buffer_async_read_at)
   ASIO_TEST_CASE(test_4_arg_boost_array_buffers_async_read_at)
   ASIO_TEST_CASE(test_4_arg_std_array_buffers_async_read_at)
   ASIO_TEST_CASE(test_4_arg_vector_buffers_async_read_at)
   ASIO_TEST_CASE(test_4_arg_streambuf_async_read_at)
-  ASIO_TEST_CASE(test_5_arg_mutable_buffers_1_async_read_at)
+  ASIO_TEST_CASE(test_5_arg_mutable_buffer_async_read_at)
   ASIO_TEST_CASE(test_5_arg_boost_array_buffers_async_read_at)
   ASIO_TEST_CASE(test_5_arg_std_array_buffers_async_read_at)
   ASIO_TEST_CASE(test_5_arg_vector_buffers_async_read_at)
diff --git a/asio/src/tests/unit/read_until.cpp b/asio/src/tests/unit/read_until.cpp
index cf70651..83edfd9 100644
--- a/asio/src/tests/unit/read_until.cpp
+++ b/asio/src/tests/unit/read_until.cpp
@@ -2,7 +2,7 @@
 // read_until.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/seq_packet_socket_service.cpp b/asio/src/tests/unit/seq_packet_socket_service.cpp
index 9f2d4cd..d650213 100644
--- a/asio/src/tests/unit/seq_packet_socket_service.cpp
+++ b/asio/src/tests/unit/seq_packet_socket_service.cpp
@@ -2,7 +2,7 @@
 // seq_packet_socket_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/serial_port.cpp b/asio/src/tests/unit/serial_port.cpp
index 521c510..c8ccd58 100644
--- a/asio/src/tests/unit/serial_port.cpp
+++ b/asio/src/tests/unit/serial_port.cpp
@@ -2,7 +2,7 @@
 // serial_port.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/src/tests/unit/serial_port_base.cpp b/asio/src/tests/unit/serial_port_base.cpp
index f3e8c9f..c9fb25e 100644
--- a/asio/src/tests/unit/serial_port_base.cpp
+++ b/asio/src/tests/unit/serial_port_base.cpp
@@ -2,7 +2,7 @@
 // serial_port_base.cpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/src/tests/unit/serial_port_service.cpp b/asio/src/tests/unit/serial_port_service.cpp
index f7939e8..8e96b2d 100644
--- a/asio/src/tests/unit/serial_port_service.cpp
+++ b/asio/src/tests/unit/serial_port_service.cpp
@@ -2,7 +2,7 @@
 // serial_port_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/asio/src/tests/unit/signal_set.cpp b/asio/src/tests/unit/signal_set.cpp
index 952cef7..faa42bb 100644
--- a/asio/src/tests/unit/signal_set.cpp
+++ b/asio/src/tests/unit/signal_set.cpp
@@ -2,7 +2,7 @@
 // signal_set.cpp
 // ~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/signal_set_service.cpp b/asio/src/tests/unit/signal_set_service.cpp
index d7068d2..1972c77 100644
--- a/asio/src/tests/unit/signal_set_service.cpp
+++ b/asio/src/tests/unit/signal_set_service.cpp
@@ -2,7 +2,7 @@
 // signal_set_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/socket_acceptor_service.cpp b/asio/src/tests/unit/socket_acceptor_service.cpp
index b2335c0..c43a2d8 100644
--- a/asio/src/tests/unit/socket_acceptor_service.cpp
+++ b/asio/src/tests/unit/socket_acceptor_service.cpp
@@ -2,7 +2,7 @@
 // socket_acceptor_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/socket_base.cpp b/asio/src/tests/unit/socket_base.cpp
index 5c97c5b..f4e36a8 100644
--- a/asio/src/tests/unit/socket_base.cpp
+++ b/asio/src/tests/unit/socket_base.cpp
@@ -2,7 +2,7 @@
 // socket_base.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ssl/context.cpp b/asio/src/tests/unit/ssl/context.cpp
index fb0749f..2a4a4f2 100644
--- a/asio/src/tests/unit/ssl/context.cpp
+++ b/asio/src/tests/unit/ssl/context.cpp
@@ -2,7 +2,7 @@
 // context.cpp
 // ~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ssl/context_base.cpp b/asio/src/tests/unit/ssl/context_base.cpp
index 83ea150..426d471 100644
--- a/asio/src/tests/unit/ssl/context_base.cpp
+++ b/asio/src/tests/unit/ssl/context_base.cpp
@@ -2,7 +2,7 @@
 // context_base.cpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ssl/rfc2818_verification.cpp b/asio/src/tests/unit/ssl/rfc2818_verification.cpp
index da74b37..32da399 100644
--- a/asio/src/tests/unit/ssl/rfc2818_verification.cpp
+++ b/asio/src/tests/unit/ssl/rfc2818_verification.cpp
@@ -2,7 +2,7 @@
 // rfc2818_verification.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ssl/stream.cpp b/asio/src/tests/unit/ssl/stream.cpp
index 5d2bd8f..ee9520d 100644
--- a/asio/src/tests/unit/ssl/stream.cpp
+++ b/asio/src/tests/unit/ssl/stream.cpp
@@ -2,7 +2,7 @@
 // stream.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/ssl/stream_base.cpp b/asio/src/tests/unit/ssl/stream_base.cpp
index bc0f111..cc875b3 100644
--- a/asio/src/tests/unit/ssl/stream_base.cpp
+++ b/asio/src/tests/unit/ssl/stream_base.cpp
@@ -2,7 +2,7 @@
 // stream_base.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/steady_timer.cpp b/asio/src/tests/unit/steady_timer.cpp
index c2e7fd9..933900a 100644
--- a/asio/src/tests/unit/steady_timer.cpp
+++ b/asio/src/tests/unit/steady_timer.cpp
@@ -2,7 +2,7 @@
 // steady_timer.cpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/strand.cpp b/asio/src/tests/unit/strand.cpp
index b6605ec..6cc41e2 100644
--- a/asio/src/tests/unit/strand.cpp
+++ b/asio/src/tests/unit/strand.cpp
@@ -2,7 +2,7 @@
 // strand.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,6 +18,7 @@
 
 #include <sstream>
 #include "asio/io_context.hpp"
+#include "asio/dispatch.hpp"
 #include "asio/post.hpp"
 #include "asio/thread.hpp"
 #include "unit_test.hpp"
@@ -63,7 +64,7 @@
 
   int original_count = *count;
 
-  s->dispatch(bindns::bind(increment, count));
+  dispatch(*s, bindns::bind(increment, count));
 
   // No other functions are currently executing through the locking dispatcher,
   // so the previous call to dispatch should have successfully nested.
@@ -76,7 +77,7 @@
 
   int original_count = *count;
 
-  s->dispatch(bindns::bind(increment, count));
+  dispatch(*s, bindns::bind(increment, count));
 
   // The current function already holds the strand's lock, so the
   // previous call to dispatch should have successfully nested.
@@ -98,9 +99,9 @@
   t.wait();
 
   // Start three increments.
-  s->post(bindns::bind(sleep_increment, ioc, count));
-  s->post(bindns::bind(sleep_increment, ioc, count));
-  s->post(bindns::bind(sleep_increment, ioc, count));
+  post(*s, bindns::bind(sleep_increment, ioc, count));
+  post(*s, bindns::bind(sleep_increment, ioc, count));
+  post(*s, bindns::bind(sleep_increment, ioc, count));
 }
 
 void throw_exception()
diff --git a/asio/src/tests/unit/stream_socket_service.cpp b/asio/src/tests/unit/stream_socket_service.cpp
index 651f16e..e76095e 100644
--- a/asio/src/tests/unit/stream_socket_service.cpp
+++ b/asio/src/tests/unit/stream_socket_service.cpp
@@ -2,7 +2,7 @@
 // stream_socket_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/streambuf.cpp b/asio/src/tests/unit/streambuf.cpp
index 8904295..1a12335 100644
--- a/asio/src/tests/unit/streambuf.cpp
+++ b/asio/src/tests/unit/streambuf.cpp
@@ -2,7 +2,7 @@
 // streambuf.cpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/system_timer.cpp b/asio/src/tests/unit/system_timer.cpp
index 287cc45..6372a24 100644
--- a/asio/src/tests/unit/system_timer.cpp
+++ b/asio/src/tests/unit/system_timer.cpp
@@ -2,7 +2,7 @@
 // system_timer.cpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -25,6 +25,7 @@
 
 #if defined(ASIO_HAS_STD_CHRONO)
 
+#include "asio/executor_work_guard.hpp"
 #include "asio/io_context.hpp"
 #include "asio/thread.hpp"
 
@@ -327,7 +328,8 @@
 void system_timer_thread_test()
 {
   asio::io_context ioc;
-  asio::io_context::work w(ioc);
+  asio::executor_work_guard<asio::io_context::executor_type> work
+    = asio::make_work_guard(ioc);
   asio::system_timer t1(ioc);
   asio::system_timer t2(ioc);
   int count = 0;
diff --git a/asio/src/tests/unit/thread.cpp b/asio/src/tests/unit/thread.cpp
index ecec4ef..74ea95f 100644
--- a/asio/src/tests/unit/thread.cpp
+++ b/asio/src/tests/unit/thread.cpp
@@ -2,7 +2,7 @@
 // thread.cpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/time_traits.cpp b/asio/src/tests/unit/time_traits.cpp
index 15b8a1a..fc6b1bc 100644
--- a/asio/src/tests/unit/time_traits.cpp
+++ b/asio/src/tests/unit/time_traits.cpp
@@ -2,7 +2,7 @@
 // time_traits.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/unit_test.hpp b/asio/src/tests/unit/unit_test.hpp
index d93490c..caf6518 100644
--- a/asio/src/tests/unit/unit_test.hpp
+++ b/asio/src/tests/unit/unit_test.hpp
@@ -2,7 +2,7 @@
 // unit_test.hpp
 // ~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/use_future.cpp b/asio/src/tests/unit/use_future.cpp
new file mode 100644
index 0000000..430a7bc
--- /dev/null
+++ b/asio/src/tests/unit/use_future.cpp
@@ -0,0 +1,1350 @@
+//
+// use_future.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/use_future.hpp"
+
+#include <string>
+#include "unit_test.hpp"
+
+#if defined(ASIO_HAS_STD_FUTURE)
+
+#include "archetypes/async_ops.hpp"
+#include "archetypes/deprecated_async_ops.hpp"
+
+namespace {
+
+void use_future_0_test()
+{
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<void> f;
+
+  f = async_op_0(use_future);
+  try
+  {
+    f.get();
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_0(true, use_future);
+  try
+  {
+    f.get();
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_0(false, use_future);
+  try
+  {
+    f.get();
+    ASIO_CHECK(false);
+  }
+  catch (asio::system_error& e)
+  {
+    ASIO_CHECK(e.code() == asio::error::operation_aborted);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_0(true, use_future);
+  try
+  {
+    f.get();
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_0(false, use_future);
+  try
+  {
+    f.get();
+    ASIO_CHECK(false);
+  }
+  catch (std::exception& e)
+  {
+    ASIO_CHECK(e.what() == std::string("blah"));
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+}
+
+void use_future_1_test()
+{
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<int> f;
+
+  f = async_op_1(use_future);
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_1(true, use_future);
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_1(false, use_future);
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(false);
+    (void)i;
+  }
+  catch (asio::system_error& e)
+  {
+    ASIO_CHECK(e.code() == asio::error::operation_aborted);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_1(true, use_future);
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_1(false, use_future);
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(false);
+    (void)i;
+  }
+  catch (std::exception& e)
+  {
+    ASIO_CHECK(e.what() == std::string("blah"));
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+}
+
+void use_future_2_test()
+{
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<std::tuple<int, double>> f;
+
+  f = async_op_2(use_future);
+  try
+  {
+    int i;
+    double d;
+    std::tie(i, d) = f.get();
+    ASIO_CHECK(i == 42);
+    ASIO_CHECK(d == 2.0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_2(true, use_future);
+  try
+  {
+    int i;
+    double d;
+    std::tie(i, d) = f.get();
+    ASIO_CHECK(i == 42);
+    ASIO_CHECK(d == 2.0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_2(false, use_future);
+  try
+  {
+    std::tuple<int, double> t = f.get();
+    ASIO_CHECK(false);
+    (void)t;
+  }
+  catch (asio::system_error& e)
+  {
+    ASIO_CHECK(e.code() == asio::error::operation_aborted);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_2(true, use_future);
+  try
+  {
+    int i;
+    double d;
+    std::tie(i, d) = f.get();
+    ASIO_CHECK(i == 42);
+    ASIO_CHECK(d == 2.0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_2(false, use_future);
+  try
+  {
+    std::tuple<int, double> t = f.get();
+    ASIO_CHECK(false);
+    (void)t;
+  }
+  catch (std::exception& e)
+  {
+    ASIO_CHECK(e.what() == std::string("blah"));
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+}
+
+void use_future_3_test()
+{
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<std::tuple<int, double, char>> f;
+
+  f = async_op_3(use_future);
+  try
+  {
+    int i;
+    double d;
+    char c;
+    std::tie(i, d, c) = f.get();
+    ASIO_CHECK(i == 42);
+    ASIO_CHECK(d == 2.0);
+    ASIO_CHECK(c == 'a');
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_3(true, use_future);
+  try
+  {
+    int i;
+    double d;
+    char c;
+    std::tie(i, d, c) = f.get();
+    ASIO_CHECK(i == 42);
+    ASIO_CHECK(d == 2.0);
+    ASIO_CHECK(c == 'a');
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_3(false, use_future);
+  try
+  {
+    std::tuple<int, double, char> t = f.get();
+    ASIO_CHECK(false);
+    (void)t;
+  }
+  catch (asio::system_error& e)
+  {
+    ASIO_CHECK(e.code() == asio::error::operation_aborted);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_3(true, use_future);
+  try
+  {
+    int i;
+    double d;
+    char c;
+    std::tie(i, d, c) = f.get();
+    ASIO_CHECK(i == 42);
+    ASIO_CHECK(d == 2.0);
+    ASIO_CHECK(c == 'a');
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_3(false, use_future);
+  try
+  {
+    std::tuple<int, double, char> t = f.get();
+    ASIO_CHECK(false);
+    (void)t;
+  }
+  catch (std::exception& e)
+  {
+    ASIO_CHECK(e.what() == std::string("blah"));
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+}
+
+int package_0()
+{
+  return 42;
+}
+
+int package_ec_0(asio::error_code ec)
+{
+  return ec ? 0 : 42;
+}
+
+int package_ex_0(std::exception_ptr ex)
+{
+  return ex ? 0 : 42;
+}
+
+void use_future_package_0_test()
+{
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<int> f;
+
+  f = async_op_0(use_future(package_0));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_0(true, use_future(&package_ec_0));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_0(false, use_future(package_ec_0));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_0(true, use_future(package_ex_0));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_0(false, use_future(package_ex_0));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+}
+
+int package_1(int i)
+{
+  return i;
+}
+
+int package_ec_1(asio::error_code ec, int i)
+{
+  return ec ? 0 : i;
+}
+
+int package_ex_1(std::exception_ptr ex, int i)
+{
+  return ex ? 0 : i;
+}
+
+void use_future_package_1_test()
+{
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<int> f;
+
+  f = async_op_1(use_future(package_1));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_1(true, use_future(package_ec_1));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_1(false, use_future(package_ec_1));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_1(true, use_future(package_ex_1));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_1(false, use_future(package_ex_1));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+}
+
+int package_2(int i, double)
+{
+  return i;
+}
+
+int package_ec_2(asio::error_code ec, int i, double)
+{
+  return ec ? 0 : i;
+}
+
+int package_ex_2(std::exception_ptr ex, int i, double)
+{
+  return ex ? 0 : i;
+}
+
+void use_future_package_2_test()
+{
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<int> f;
+
+  f = async_op_2(use_future(package_2));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_2(true, use_future(package_ec_2));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_2(false, use_future(package_ec_2));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_2(true, use_future(package_ex_2));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_2(false, use_future(package_ex_2));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+}
+
+int package_3(int i, double, char)
+{
+  return i;
+}
+
+int package_ec_3(asio::error_code ec, int i, double, char)
+{
+  return ec ? 0 : i;
+}
+
+int package_ex_3(std::exception_ptr ex, int i, double, char)
+{
+  return ex ? 0 : i;
+}
+
+void use_future_package_3_test()
+{
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<int> f;
+
+  f = async_op_3(use_future(package_3));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_3(true, use_future(package_ec_3));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ec_3(false, use_future(package_ec_3));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_3(true, use_future(package_ex_3));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_3(false, use_future(package_ex_3));
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+}
+
+void deprecated_use_future_0_test()
+{
+#if !defined(ASIO_NO_DEPRECATED)
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<void> f;
+  asio::io_context ctx;
+
+  f = deprecated_async_op_0(ctx, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    f.get();
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_0(ctx, true, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    f.get();
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_0(ctx, false, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    f.get();
+    ASIO_CHECK(false);
+  }
+  catch (asio::system_error& e)
+  {
+    ASIO_CHECK(e.code() == asio::error::operation_aborted);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_0(true, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    f.get();
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = async_op_ex_0(false, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    f.get();
+    ASIO_CHECK(false);
+  }
+  catch (std::exception& e)
+  {
+    ASIO_CHECK(e.what() == std::string("blah"));
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+}
+
+void deprecated_use_future_1_test()
+{
+#if !defined(ASIO_NO_DEPRECATED)
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<int> f;
+  asio::io_context ctx;
+
+  f = deprecated_async_op_1(ctx, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_1(ctx, true, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_1(ctx, false, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(false);
+    (void)i;
+  }
+  catch (asio::system_error& e)
+  {
+    ASIO_CHECK(e.code() == asio::error::operation_aborted);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_1(ctx, true, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_1(ctx, false, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(false);
+    (void)i;
+  }
+  catch (std::exception& e)
+  {
+    ASIO_CHECK(e.what() == std::string("blah"));
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+}
+
+void deprecated_use_future_2_test()
+{
+#if !defined(ASIO_NO_DEPRECATED)
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<std::tuple<int, double>> f;
+  asio::io_context ctx;
+
+  f = deprecated_async_op_2(ctx, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i;
+    double d;
+    std::tie(i, d) = f.get();
+    ASIO_CHECK(i == 42);
+    ASIO_CHECK(d == 2.0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_2(ctx, true, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i;
+    double d;
+    std::tie(i, d) = f.get();
+    ASIO_CHECK(i == 42);
+    ASIO_CHECK(d == 2.0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_2(ctx, false, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    std::tuple<int, double> t = f.get();
+    ASIO_CHECK(false);
+    (void)t;
+  }
+  catch (asio::system_error& e)
+  {
+    ASIO_CHECK(e.code() == asio::error::operation_aborted);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_2(ctx, true, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i;
+    double d;
+    std::tie(i, d) = f.get();
+    ASIO_CHECK(i == 42);
+    ASIO_CHECK(d == 2.0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_2(ctx, false, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    std::tuple<int, double> t = f.get();
+    ASIO_CHECK(false);
+    (void)t;
+  }
+  catch (std::exception& e)
+  {
+    ASIO_CHECK(e.what() == std::string("blah"));
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+}
+
+void deprecated_use_future_3_test()
+{
+#if !defined(ASIO_NO_DEPRECATED)
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<std::tuple<int, double, char>> f;
+  asio::io_context ctx;
+
+  f = deprecated_async_op_3(ctx, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i;
+    double d;
+    char c;
+    std::tie(i, d, c) = f.get();
+    ASIO_CHECK(i == 42);
+    ASIO_CHECK(d == 2.0);
+    ASIO_CHECK(c == 'a');
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_3(ctx, true, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i;
+    double d;
+    char c;
+    std::tie(i, d, c) = f.get();
+    ASIO_CHECK(i == 42);
+    ASIO_CHECK(d == 2.0);
+    ASIO_CHECK(c == 'a');
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_3(ctx, false, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    std::tuple<int, double, char> t = f.get();
+    ASIO_CHECK(false);
+    (void)t;
+  }
+  catch (asio::system_error& e)
+  {
+    ASIO_CHECK(e.code() == asio::error::operation_aborted);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_3(ctx, true, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i;
+    double d;
+    char c;
+    std::tie(i, d, c) = f.get();
+    ASIO_CHECK(i == 42);
+    ASIO_CHECK(d == 2.0);
+    ASIO_CHECK(c == 'a');
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_3(ctx, false, use_future);
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    std::tuple<int, double, char> t = f.get();
+    ASIO_CHECK(false);
+    (void)t;
+  }
+  catch (std::exception& e)
+  {
+    ASIO_CHECK(e.what() == std::string("blah"));
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+}
+
+void deprecated_use_future_package_0_test()
+{
+#if !defined(ASIO_NO_DEPRECATED)
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<int> f;
+  asio::io_context ctx;
+
+  f = deprecated_async_op_0(ctx, use_future(package_0));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_0(ctx, true, use_future(&package_ec_0));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_0(ctx, false, use_future(package_ec_0));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_0(ctx, true, use_future(package_ex_0));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_0(ctx, false, use_future(package_ex_0));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+}
+
+void deprecated_use_future_package_1_test()
+{
+#if !defined(ASIO_NO_DEPRECATED)
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<int> f;
+  asio::io_context ctx;
+
+  f = deprecated_async_op_1(ctx, use_future(package_1));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_1(ctx, true, use_future(package_ec_1));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_1(ctx, false, use_future(package_ec_1));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_1(ctx, true, use_future(package_ex_1));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_1(ctx, false, use_future(package_ex_1));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+}
+
+void deprecated_use_future_package_2_test()
+{
+#if !defined(ASIO_NO_DEPRECATED)
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<int> f;
+  asio::io_context ctx;
+
+  f = deprecated_async_op_2(ctx, use_future(package_2));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_2(ctx, true, use_future(package_ec_2));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_2(ctx, false, use_future(package_ec_2));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_2(ctx, true, use_future(package_ex_2));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_2(ctx, false, use_future(package_ex_2));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+}
+
+void deprecated_use_future_package_3_test()
+{
+#if !defined(ASIO_NO_DEPRECATED)
+  using asio::use_future;
+  using namespace archetypes;
+
+  std::future<int> f;
+  asio::io_context ctx;
+
+  f = deprecated_async_op_3(ctx, use_future(package_3));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_3(ctx, true, use_future(package_ec_3));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ec_3(ctx, false, use_future(package_ec_3));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_3(ctx, true, use_future(package_ex_3));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 42);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+
+  f = deprecated_async_op_ex_3(ctx, false, use_future(package_ex_3));
+  ctx.restart();
+  ctx.run();
+  try
+  {
+    int i = f.get();
+    ASIO_CHECK(i == 0);
+  }
+  catch (...)
+  {
+    ASIO_CHECK(false);
+  }
+#endif // !defined(ASIO_NO_DEPRECATED)
+}
+
+} // namespace
+
+ASIO_TEST_SUITE
+(
+  use_future,
+  ASIO_TEST_CASE(use_future_0_test)
+  ASIO_TEST_CASE(use_future_1_test)
+  ASIO_TEST_CASE(use_future_2_test)
+  ASIO_TEST_CASE(use_future_3_test)
+  ASIO_TEST_CASE(use_future_package_0_test)
+  ASIO_TEST_CASE(use_future_package_1_test)
+  ASIO_TEST_CASE(use_future_package_2_test)
+  ASIO_TEST_CASE(use_future_package_3_test)
+  ASIO_TEST_CASE(deprecated_use_future_0_test)
+  ASIO_TEST_CASE(deprecated_use_future_1_test)
+  ASIO_TEST_CASE(deprecated_use_future_2_test)
+  ASIO_TEST_CASE(deprecated_use_future_3_test)
+  ASIO_TEST_CASE(deprecated_use_future_package_0_test)
+  ASIO_TEST_CASE(deprecated_use_future_package_1_test)
+  ASIO_TEST_CASE(deprecated_use_future_package_2_test)
+  ASIO_TEST_CASE(deprecated_use_future_package_3_test)
+)
+
+#else // defined(ASIO_HAS_STD_FUTURE)
+
+ASIO_TEST_SUITE
+(
+  use_future,
+  ASIO_TEST_CASE(null_test)
+)
+
+#endif // defined(ASIO_HAS_STD_FUTURE)
diff --git a/asio/src/tests/unit/uses_executor.cpp b/asio/src/tests/unit/uses_executor.cpp
new file mode 100644
index 0000000..03b0f69
--- /dev/null
+++ b/asio/src/tests/unit/uses_executor.cpp
@@ -0,0 +1,25 @@
+//
+// uses_executor.cpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/uses_executor.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  uses_executor,
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/wait_traits.cpp b/asio/src/tests/unit/wait_traits.cpp
index 6b7ef32..e09bd26 100644
--- a/asio/src/tests/unit/wait_traits.cpp
+++ b/asio/src/tests/unit/wait_traits.cpp
@@ -2,7 +2,7 @@
 // wait_traits.cpp
 // ~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/waitable_timer_service.cpp b/asio/src/tests/unit/waitable_timer_service.cpp
index 83d98c6..65f0d52 100644
--- a/asio/src/tests/unit/waitable_timer_service.cpp
+++ b/asio/src/tests/unit/waitable_timer_service.cpp
@@ -2,7 +2,7 @@
 // waitable_timer_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/windows/.gitignore b/asio/src/tests/unit/windows/.gitignore
index 50d329a..d225c81 100644
--- a/asio/src/tests/unit/windows/.gitignore
+++ b/asio/src/tests/unit/windows/.gitignore
@@ -13,6 +13,7 @@
 basic_stream_handle
 object_handle
 object_handle_service
+overlapped_handle
 overlapped_ptr
 random_access_handle
 random_access_handle_service
diff --git a/asio/src/tests/unit/windows/basic_handle.cpp b/asio/src/tests/unit/windows/basic_handle.cpp
index 50aa601..c0460e9 100644
--- a/asio/src/tests/unit/windows/basic_handle.cpp
+++ b/asio/src/tests/unit/windows/basic_handle.cpp
@@ -2,7 +2,7 @@
 // basic_handle.cpp
 // ~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/windows/basic_object_handle.cpp b/asio/src/tests/unit/windows/basic_object_handle.cpp
index ca5dcac..f5af4a2 100644
--- a/asio/src/tests/unit/windows/basic_object_handle.cpp
+++ b/asio/src/tests/unit/windows/basic_object_handle.cpp
@@ -2,7 +2,7 @@
 // basic_object_handle.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/windows/basic_random_access_handle.cpp b/asio/src/tests/unit/windows/basic_random_access_handle.cpp
index 78eed6b..610a14b 100644
--- a/asio/src/tests/unit/windows/basic_random_access_handle.cpp
+++ b/asio/src/tests/unit/windows/basic_random_access_handle.cpp
@@ -2,7 +2,7 @@
 // basic_random_access_handle.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/windows/basic_stream_handle.cpp b/asio/src/tests/unit/windows/basic_stream_handle.cpp
index 4424c41..d58c25e 100644
--- a/asio/src/tests/unit/windows/basic_stream_handle.cpp
+++ b/asio/src/tests/unit/windows/basic_stream_handle.cpp
@@ -2,7 +2,7 @@
 // basic_stream_handle.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/windows/object_handle.cpp b/asio/src/tests/unit/windows/object_handle.cpp
index bca3055..254cd16 100644
--- a/asio/src/tests/unit/windows/object_handle.cpp
+++ b/asio/src/tests/unit/windows/object_handle.cpp
@@ -2,7 +2,7 @@
 // object_handle.cpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -65,8 +65,13 @@
 
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = handle1.get_io_context();
     (void)ioc_ref;
+#endif !defined(ASIO_NO_DEPRECATED)
+
+    io_context::executor_type ex = handle1.get_executor();
+    (void)ex;
 
     // basic_handle functions.
 
diff --git a/asio/src/tests/unit/windows/object_handle_service.cpp b/asio/src/tests/unit/windows/object_handle_service.cpp
index 41e6495..580f483 100644
--- a/asio/src/tests/unit/windows/object_handle_service.cpp
+++ b/asio/src/tests/unit/windows/object_handle_service.cpp
@@ -2,7 +2,7 @@
 // object_handle_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/windows/overlapped_handle.cpp b/asio/src/tests/unit/windows/overlapped_handle.cpp
new file mode 100644
index 0000000..fbc8fb4
--- /dev/null
+++ b/asio/src/tests/unit/windows/overlapped_handle.cpp
@@ -0,0 +1,26 @@
+//
+// overlapped_handle.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/windows/overlapped_handle.hpp"
+
+#include "asio.hpp"
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+  "windows/overlapped_handle",
+  ASIO_TEST_CASE(null_test)
+)
diff --git a/asio/src/tests/unit/windows/overlapped_ptr.cpp b/asio/src/tests/unit/windows/overlapped_ptr.cpp
index 9815650..dd8992e 100644
--- a/asio/src/tests/unit/windows/overlapped_ptr.cpp
+++ b/asio/src/tests/unit/windows/overlapped_ptr.cpp
@@ -2,7 +2,7 @@
 // overlapped_ptr.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/windows/random_access_handle.cpp b/asio/src/tests/unit/windows/random_access_handle.cpp
index ec9df95..c36d49f 100644
--- a/asio/src/tests/unit/windows/random_access_handle.cpp
+++ b/asio/src/tests/unit/windows/random_access_handle.cpp
@@ -2,7 +2,7 @@
 // random_access_handle.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -72,8 +72,13 @@
 
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = handle1.get_io_context();
     (void)ioc_ref;
+#endif !defined(ASIO_NO_DEPRECATED)
+
+    io_context::executor_type ex = handle1.get_executor();
+    (void)ex;
 
     // basic_handle functions.
 
diff --git a/asio/src/tests/unit/windows/random_access_handle_service.cpp b/asio/src/tests/unit/windows/random_access_handle_service.cpp
index c59d6f8..0d52139 100644
--- a/asio/src/tests/unit/windows/random_access_handle_service.cpp
+++ b/asio/src/tests/unit/windows/random_access_handle_service.cpp
@@ -2,7 +2,7 @@
 // random_access_handle_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/windows/stream_handle.cpp b/asio/src/tests/unit/windows/stream_handle.cpp
index b39c475..459c88e 100644
--- a/asio/src/tests/unit/windows/stream_handle.cpp
+++ b/asio/src/tests/unit/windows/stream_handle.cpp
@@ -2,7 +2,7 @@
 // stream_handle.cpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -71,8 +71,13 @@
 
     // basic_io_object functions.
 
+#if !defined(ASIO_NO_DEPRECATED)
     io_context& ioc_ref = handle1.get_io_context();
     (void)ioc_ref;
+#endif !defined(ASIO_NO_DEPRECATED)
+
+    io_context::executor_type ex = handle1.get_executor();
+    (void)ex;
 
     // basic_handle functions.
 
diff --git a/asio/src/tests/unit/windows/stream_handle_service.cpp b/asio/src/tests/unit/windows/stream_handle_service.cpp
index b6fca90..c0b8627 100644
--- a/asio/src/tests/unit/windows/stream_handle_service.cpp
+++ b/asio/src/tests/unit/windows/stream_handle_service.cpp
@@ -2,7 +2,7 @@
 // stream_handle_service.cpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/asio/src/tests/unit/write.cpp b/asio/src/tests/unit/write.cpp
index f797073..3c854ed 100644
--- a/asio/src/tests/unit/write.cpp
+++ b/asio/src/tests/unit/write.cpp
@@ -2,7 +2,7 @@
 // write.cpp
 // ~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -76,22 +76,20 @@
     next_write_length_ = length;
   }
 
-  template <typename Const_Buffers>
-  bool check_buffers(const Const_Buffers& buffers, size_t length)
+  template <typename Iterator>
+  bool check_buffers(Iterator begin, Iterator end, size_t length)
   {
     if (length != position_)
       return false;
 
-    typename Const_Buffers::const_iterator iter = buffers.begin();
-    typename Const_Buffers::const_iterator end = buffers.end();
+    Iterator iter = begin;
     size_t checked_length = 0;
     for (; iter != end && checked_length < length; ++iter)
     {
       size_t buffer_length = asio::buffer_size(*iter);
       if (buffer_length > length - checked_length)
         buffer_length = length - checked_length;
-      if (memcmp(data_ + checked_length,
-            asio::buffer_cast<const void*>(*iter), buffer_length) != 0)
+      if (memcmp(data_ + checked_length, iter->data(), buffer_length) != 0)
         return false;
       checked_length += buffer_length;
     }
@@ -100,6 +98,13 @@
   }
 
   template <typename Const_Buffers>
+  bool check_buffers(const Const_Buffers& buffers, size_t length)
+  {
+    return check_buffers(asio::buffer_sequence_begin(buffers),
+        asio::buffer_sequence_end(buffers), length);
+  }
+
+  template <typename Const_Buffers>
   size_t write_some(const Const_Buffers& buffers)
   {
     size_t n = asio::buffer_copy(
@@ -150,11 +155,11 @@
   ASIO_CHECK(bytes_transferred == 0);
 }
 
-void test_2_arg_const_buffers_1_write()
+void test_2_arg_const_buffer_write()
 {
   asio::io_context ioc;
   test_stream s(ioc);
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -175,11 +180,11 @@
   ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
 }
 
-void test_2_arg_mutable_buffers_1_write()
+void test_2_arg_mutable_buffer_write()
 {
   asio::io_context ioc;
   test_stream s(ioc);
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(mutable_write_data, sizeof(mutable_write_data));
 
   s.reset();
@@ -238,11 +243,11 @@
   ASIO_CHECK(!error);
 }
 
-void test_3_arg_nothrow_const_buffers_1_write()
+void test_3_arg_nothrow_const_buffer_write()
 {
   asio::io_context ioc;
   test_stream s(ioc);
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -267,11 +272,11 @@
   ASIO_CHECK(!error);
 }
 
-void test_3_arg_nothrow_mutable_buffers_1_write()
+void test_3_arg_nothrow_mutable_buffer_write()
 {
   asio::io_context ioc;
   test_stream s(ioc);
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(mutable_write_data, sizeof(mutable_write_data));
 
   s.reset();
@@ -338,11 +343,11 @@
   return !!ec ? 0 : 3;
 }
 
-void test_3_arg_const_buffers_1_write()
+void test_3_arg_const_buffer_write()
 {
   asio::io_context ioc;
   test_stream s(ioc);
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -520,11 +525,11 @@
   ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
 }
 
-void test_3_arg_mutable_buffers_1_write()
+void test_3_arg_mutable_buffer_write()
 {
   asio::io_context ioc;
   test_stream s(ioc);
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(mutable_write_data, sizeof(mutable_write_data));
 
   s.reset();
@@ -885,11 +890,11 @@
   ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
 }
 
-void test_4_arg_const_buffers_1_write()
+void test_4_arg_const_buffer_write()
 {
   asio::io_context ioc;
   test_stream s(ioc);
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -1122,11 +1127,11 @@
   ASIO_CHECK(!error);
 }
 
-void test_4_arg_mutable_buffers_1_write()
+void test_4_arg_mutable_buffer_write()
 {
   asio::io_context ioc;
   test_stream s(ioc);
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(mutable_write_data, sizeof(mutable_write_data));
 
   s.reset();
@@ -1605,7 +1610,7 @@
   ASIO_CHECK(bytes_transferred == expected_bytes_transferred);
 }
 
-void test_3_arg_const_buffers_1_async_write()
+void test_3_arg_const_buffer_async_write()
 {
 #if defined(ASIO_HAS_BOOST_BIND)
   namespace bindns = boost;
@@ -1617,7 +1622,7 @@
 
   asio::io_context ioc;
   test_stream s(ioc);
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -1660,7 +1665,7 @@
   ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
 }
 
-void test_3_arg_mutable_buffers_1_async_write()
+void test_3_arg_mutable_buffer_async_write()
 {
 #if defined(ASIO_HAS_BOOST_BIND)
   namespace bindns = boost;
@@ -1672,7 +1677,7 @@
 
   asio::io_context ioc;
   test_stream s(ioc);
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(mutable_write_data, sizeof(mutable_write_data));
 
   s.reset();
@@ -1900,7 +1905,7 @@
   asio::io_context ioc;
   test_stream s(ioc);
   asio::streambuf sb;
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -1951,7 +1956,7 @@
   ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
 }
 
-void test_4_arg_const_buffers_1_async_write()
+void test_4_arg_const_buffer_async_write()
 {
 #if defined(ASIO_HAS_BOOST_BIND)
   namespace bindns = boost;
@@ -1963,7 +1968,7 @@
 
   asio::io_context ioc;
   test_stream s(ioc);
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -2263,7 +2268,7 @@
   ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
 }
 
-void test_4_arg_mutable_buffers_1_async_write()
+void test_4_arg_mutable_buffer_async_write()
 {
 #if defined(ASIO_HAS_BOOST_BIND)
   namespace bindns = boost;
@@ -2275,7 +2280,7 @@
 
   asio::io_context ioc;
   test_stream s(ioc);
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(mutable_write_data, sizeof(mutable_write_data));
 
   s.reset();
@@ -3531,7 +3536,7 @@
   asio::io_context ioc;
   test_stream s(ioc);
   asio::streambuf sb;
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -3893,27 +3898,27 @@
 (
   write,
   ASIO_TEST_CASE(test_2_arg_zero_buffers_write)
-  ASIO_TEST_CASE(test_2_arg_const_buffers_1_write)
-  ASIO_TEST_CASE(test_2_arg_mutable_buffers_1_write)
+  ASIO_TEST_CASE(test_2_arg_const_buffer_write)
+  ASIO_TEST_CASE(test_2_arg_mutable_buffer_write)
   ASIO_TEST_CASE(test_2_arg_vector_buffers_write)
   ASIO_TEST_CASE(test_3_arg_nothrow_zero_buffers_write)
-  ASIO_TEST_CASE(test_3_arg_nothrow_const_buffers_1_write)
-  ASIO_TEST_CASE(test_3_arg_nothrow_mutable_buffers_1_write)
+  ASIO_TEST_CASE(test_3_arg_nothrow_const_buffer_write)
+  ASIO_TEST_CASE(test_3_arg_nothrow_mutable_buffer_write)
   ASIO_TEST_CASE(test_3_arg_nothrow_vector_buffers_write)
-  ASIO_TEST_CASE(test_3_arg_const_buffers_1_write)
-  ASIO_TEST_CASE(test_3_arg_mutable_buffers_1_write)
+  ASIO_TEST_CASE(test_3_arg_const_buffer_write)
+  ASIO_TEST_CASE(test_3_arg_mutable_buffer_write)
   ASIO_TEST_CASE(test_3_arg_vector_buffers_write)
-  ASIO_TEST_CASE(test_4_arg_const_buffers_1_write)
-  ASIO_TEST_CASE(test_4_arg_mutable_buffers_1_write)
+  ASIO_TEST_CASE(test_4_arg_const_buffer_write)
+  ASIO_TEST_CASE(test_4_arg_mutable_buffer_write)
   ASIO_TEST_CASE(test_4_arg_vector_buffers_write)
-  ASIO_TEST_CASE(test_3_arg_const_buffers_1_async_write)
-  ASIO_TEST_CASE(test_3_arg_mutable_buffers_1_async_write)
+  ASIO_TEST_CASE(test_3_arg_const_buffer_async_write)
+  ASIO_TEST_CASE(test_3_arg_mutable_buffer_async_write)
   ASIO_TEST_CASE(test_3_arg_boost_array_buffers_async_write)
   ASIO_TEST_CASE(test_3_arg_std_array_buffers_async_write)
   ASIO_TEST_CASE(test_3_arg_vector_buffers_async_write)
   ASIO_TEST_CASE(test_3_arg_streambuf_async_write)
-  ASIO_TEST_CASE(test_4_arg_const_buffers_1_async_write)
-  ASIO_TEST_CASE(test_4_arg_mutable_buffers_1_async_write)
+  ASIO_TEST_CASE(test_4_arg_const_buffer_async_write)
+  ASIO_TEST_CASE(test_4_arg_mutable_buffer_async_write)
   ASIO_TEST_CASE(test_4_arg_boost_array_buffers_async_write)
   ASIO_TEST_CASE(test_4_arg_std_array_buffers_async_write)
   ASIO_TEST_CASE(test_4_arg_vector_buffers_async_write)
diff --git a/asio/src/tests/unit/write_at.cpp b/asio/src/tests/unit/write_at.cpp
index d6a7b28..4ffbc77 100644
--- a/asio/src/tests/unit/write_at.cpp
+++ b/asio/src/tests/unit/write_at.cpp
@@ -2,7 +2,7 @@
 // write_at.cpp
 // ~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -70,15 +70,14 @@
     next_write_length_ = length;
   }
 
-  template <typename Const_Buffers>
+  template <typename Iterator>
   bool check_buffers(asio::uint64_t offset,
-      const Const_Buffers& buffers, size_t length)
+      Iterator begin, Iterator end, size_t length)
   {
     if (offset + length > max_length)
       return false;
 
-    typename Const_Buffers::const_iterator iter = buffers.begin();
-    typename Const_Buffers::const_iterator end = buffers.end();
+    Iterator iter = begin;
     size_t checked_length = 0;
     for (; iter != end && checked_length < length; ++iter)
     {
@@ -86,7 +85,7 @@
       if (buffer_length > length - checked_length)
         buffer_length = length - checked_length;
       if (memcmp(data_ + offset + checked_length,
-            asio::buffer_cast<const void*>(*iter), buffer_length) != 0)
+            iter->data(), buffer_length) != 0)
         return false;
       checked_length += buffer_length;
     }
@@ -95,6 +94,14 @@
   }
 
   template <typename Const_Buffers>
+  bool check_buffers(asio::uint64_t offset,
+      const Const_Buffers& buffers, size_t length)
+  {
+    return check_buffers(offset, asio::buffer_sequence_begin(buffers),
+        asio::buffer_sequence_end(buffers), length);
+  }
+
+  template <typename Const_Buffers>
   size_t write_some_at(asio::uint64_t offset,
       const Const_Buffers& buffers)
   {
@@ -135,11 +142,11 @@
 static char mutable_write_data[]
   = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 
-void test_3_arg_const_buffers_1_write_at()
+void test_3_arg_const_buffer_write_at()
 {
   asio::io_context ioc;
   test_random_access_device s(ioc);
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -177,11 +184,11 @@
   ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
 }
 
-void test_3_arg_mutable_buffers_1_write_at()
+void test_3_arg_mutable_buffer_write_at()
 {
   asio::io_context ioc;
   test_random_access_device s(ioc);
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(mutable_write_data, sizeof(mutable_write_data));
 
   s.reset();
@@ -262,11 +269,11 @@
   ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
 }
 
-void test_4_arg_nothrow_const_buffers_1_write_at()
+void test_4_arg_nothrow_const_buffer_write_at()
 {
   asio::io_context ioc;
   test_random_access_device s(ioc);
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -311,11 +318,11 @@
   ASIO_CHECK(!error);
 }
 
-void test_4_arg_nothrow_mutable_buffers_1_write_at()
+void test_4_arg_nothrow_mutable_buffer_write_at()
 {
   asio::io_context ioc;
   test_random_access_device s(ioc);
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(mutable_write_data, sizeof(mutable_write_data));
 
   s.reset();
@@ -422,11 +429,11 @@
   return !!ec ? 0 : 3;
 }
 
-void test_4_arg_const_buffers_1_write_at()
+void test_4_arg_const_buffer_write_at()
 {
   asio::io_context ioc;
   test_random_access_device s(ioc);
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -784,11 +791,11 @@
   ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
 }
 
-void test_4_arg_mutable_buffers_1_write_at()
+void test_4_arg_mutable_buffer_write_at()
 {
   asio::io_context ioc;
   test_random_access_device s(ioc);
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(mutable_write_data, sizeof(mutable_write_data));
 
   s.reset();
@@ -1509,11 +1516,11 @@
   ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
 }
 
-void test_5_arg_const_buffers_1_write_at()
+void test_5_arg_const_buffer_write_at()
 {
   asio::io_context ioc;
   test_random_access_device s(ioc);
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -1980,11 +1987,11 @@
   ASIO_CHECK(!error);
 }
 
-void test_5_arg_mutable_buffers_1_write_at()
+void test_5_arg_mutable_buffer_write_at()
 {
   asio::io_context ioc;
   test_random_access_device s(ioc);
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(mutable_write_data, sizeof(mutable_write_data));
 
   s.reset();
@@ -2931,7 +2938,7 @@
   ASIO_CHECK(bytes_transferred == expected_bytes_transferred);
 }
 
-void test_4_arg_const_buffers_1_async_write_at()
+void test_4_arg_const_buffer_async_write_at()
 {
 #if defined(ASIO_HAS_BOOST_BIND)
   namespace bindns = boost;
@@ -2943,7 +2950,7 @@
 
   asio::io_context ioc;
   test_random_access_device s(ioc);
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -3030,7 +3037,7 @@
   ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
 }
 
-void test_4_arg_mutable_buffers_1_async_write_at()
+void test_4_arg_mutable_buffer_async_write_at()
 {
 #if defined(ASIO_HAS_BOOST_BIND)
   namespace bindns = boost;
@@ -3042,7 +3049,7 @@
 
   asio::io_context ioc;
   test_random_access_device s(ioc);
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(mutable_write_data, sizeof(mutable_write_data));
 
   s.reset();
@@ -3446,7 +3453,7 @@
   asio::io_context ioc;
   test_random_access_device s(ioc);
   asio::streambuf sb;
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -3549,7 +3556,7 @@
   ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
 }
 
-void test_5_arg_const_buffers_1_async_write_at()
+void test_5_arg_const_buffer_async_write_at()
 {
 #if defined(ASIO_HAS_BOOST_BIND)
   namespace bindns = boost;
@@ -3561,7 +3568,7 @@
 
   asio::io_context ioc;
   test_random_access_device s(ioc);
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -4191,7 +4198,7 @@
   ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
 }
 
-void test_5_arg_mutable_buffers_1_async_write_at()
+void test_5_arg_mutable_buffer_async_write_at()
 {
 #if defined(ASIO_HAS_BOOST_BIND)
   namespace bindns = boost;
@@ -4203,7 +4210,7 @@
 
   asio::io_context ioc;
   test_random_access_device s(ioc);
-  asio::mutable_buffers_1 buffers
+  asio::mutable_buffer buffers
     = asio::buffer(mutable_write_data, sizeof(mutable_write_data));
 
   s.reset();
@@ -6779,7 +6786,7 @@
   asio::io_context ioc;
   test_random_access_device s(ioc);
   asio::streambuf sb;
-  asio::const_buffers_1 buffers
+  asio::const_buffer buffers
     = asio::buffer(write_data, sizeof(write_data));
 
   s.reset();
@@ -7524,26 +7531,26 @@
 ASIO_TEST_SUITE
 (
   write_at,
-  ASIO_TEST_CASE(test_3_arg_const_buffers_1_write_at)
-  ASIO_TEST_CASE(test_3_arg_mutable_buffers_1_write_at)
+  ASIO_TEST_CASE(test_3_arg_const_buffer_write_at)
+  ASIO_TEST_CASE(test_3_arg_mutable_buffer_write_at)
   ASIO_TEST_CASE(test_3_arg_vector_buffers_write_at)
-  ASIO_TEST_CASE(test_4_arg_nothrow_const_buffers_1_write_at)
-  ASIO_TEST_CASE(test_4_arg_nothrow_mutable_buffers_1_write_at)
+  ASIO_TEST_CASE(test_4_arg_nothrow_const_buffer_write_at)
+  ASIO_TEST_CASE(test_4_arg_nothrow_mutable_buffer_write_at)
   ASIO_TEST_CASE(test_4_arg_nothrow_vector_buffers_write_at)
-  ASIO_TEST_CASE(test_4_arg_const_buffers_1_write_at)
-  ASIO_TEST_CASE(test_4_arg_mutable_buffers_1_write_at)
+  ASIO_TEST_CASE(test_4_arg_const_buffer_write_at)
+  ASIO_TEST_CASE(test_4_arg_mutable_buffer_write_at)
   ASIO_TEST_CASE(test_4_arg_vector_buffers_write_at)
-  ASIO_TEST_CASE(test_5_arg_const_buffers_1_write_at)
-  ASIO_TEST_CASE(test_5_arg_mutable_buffers_1_write_at)
+  ASIO_TEST_CASE(test_5_arg_const_buffer_write_at)
+  ASIO_TEST_CASE(test_5_arg_mutable_buffer_write_at)
   ASIO_TEST_CASE(test_5_arg_vector_buffers_write_at)
-  ASIO_TEST_CASE(test_4_arg_const_buffers_1_async_write_at)
-  ASIO_TEST_CASE(test_4_arg_mutable_buffers_1_async_write_at)
+  ASIO_TEST_CASE(test_4_arg_const_buffer_async_write_at)
+  ASIO_TEST_CASE(test_4_arg_mutable_buffer_async_write_at)
   ASIO_TEST_CASE(test_4_arg_boost_array_buffers_async_write_at)
   ASIO_TEST_CASE(test_4_arg_std_array_buffers_async_write_at)
   ASIO_TEST_CASE(test_4_arg_vector_buffers_async_write_at)
   ASIO_TEST_CASE(test_4_arg_streambuf_async_write_at)
-  ASIO_TEST_CASE(test_5_arg_const_buffers_1_async_write_at)
-  ASIO_TEST_CASE(test_5_arg_mutable_buffers_1_async_write_at)
+  ASIO_TEST_CASE(test_5_arg_const_buffer_async_write_at)
+  ASIO_TEST_CASE(test_5_arg_mutable_buffer_async_write_at)
   ASIO_TEST_CASE(test_5_arg_boost_array_buffers_async_write_at)
   ASIO_TEST_CASE(test_5_arg_std_array_buffers_async_write_at)
   ASIO_TEST_CASE(test_5_arg_vector_buffers_async_write_at)
diff --git a/asio/tsify.pl b/asio/tsify.pl
new file mode 100755
index 0000000..3dc1038
--- /dev/null
+++ b/asio/tsify.pl
@@ -0,0 +1,551 @@
+#!/usr/bin/perl -w
+
+use strict;
+use File::Path;
+# use Switch;
+
+our $output_dir = "tsified";
+
+sub print_line
+{
+  my ($output, $line, $from, $lineno) = @_;
+
+  # Warn if the resulting line is >80 characters wide.
+  if (length($line) > 80)
+  {
+    if ($from =~ /\.[chi]pp$/)
+    {
+      print("Warning: $from:$lineno: output >80 characters wide.\n");
+    }
+  }
+
+  # Write the output.
+  print($output $line . "\n");
+}
+
+sub source_contains_asio_thread_usage
+{
+  my ($from) = @_;
+
+  # Open the input file.
+  open(my $input, "<$from") or die("Can't open $from for reading");
+
+  # Check file for use of asio::thread.
+  while (my $line = <$input>)
+  {
+    chomp($line);
+    if ($line =~ /asio::thread/)
+    {
+      close($input);
+      return 1;
+    }
+    elsif ($line =~ /^ *thread /)
+    {
+      close($input);
+      return 1;
+    }
+  }
+
+  close($input);
+  return 0;
+}
+
+sub source_contains_asio_include
+{
+  my ($from) = @_;
+
+  # Open the input file.
+  open(my $input, "<$from") or die("Can't open $from for reading");
+
+  # Check file for inclusion of asio.hpp.
+  while (my $line = <$input>)
+  {
+    chomp($line);
+    if ($line =~ /# *include [<"]asio\.hpp[>"]/)
+    {
+      close($input);
+      return 1;
+    }
+  }
+
+  close($input);
+  return 0;
+}
+
+sub copy_source_file
+{
+  my ($from, $to) = @_;
+
+  # Ensure the output directory exists.
+  my $dir = $to;
+  $dir =~ s/[^\/]*$//;
+  mkpath($dir);
+
+  # First determine whether the file makes any use of asio::thread.
+  my $uses_asio_thread = source_contains_asio_thread_usage($from);
+
+  my $includes_asio = source_contains_asio_include($from);
+
+  my $is_asio_hpp = 0;
+  $is_asio_hpp = 1 if ($from =~ /asio\.hpp/);
+
+  my $needs_doc_link = 0;
+  $needs_doc_link = 1 if ($is_asio_hpp);
+
+  my $is_config_hpp = 0;
+  $is_config_hpp = 1 if ($from =~ /asio\/detail\/config\.hpp/);
+
+  my $is_error_hpp = 0;
+  $is_error_hpp = 1 if ($from =~ /asio\/error\.hpp/);
+
+  my $is_impl_src_hpp = 0;
+  $is_impl_src_hpp = 1 if ($from =~ /asio\/impl\/src\.hpp/);
+
+  my $is_test = 0;
+  $is_test = 1 if ($from =~ /tests\/unit/);
+
+  # Open the files.
+  open(my $input, "<$from") or die("Can't open $from for reading");
+  open(my $output, ">$to") or die("Can't open $to for writing");
+
+  # State for stripping out deprecated, extension, and old services code.
+  my $deprecated_state = 0;
+  my $extension_state = 0;
+  my $old_services_state = 0;
+
+  # Copy the content.
+  my $lineno = 1;
+  while (my $line = <$input>)
+  {
+    chomp($line);
+
+    # Strip out deprecated code.
+    if ($deprecated_state == 0)
+    {
+      if ($line =~ /#\s*if\s*defined\(ASIO_NO_DEPRECATED\)/)
+      {
+        $deprecated_state = 1;
+        next;
+      }
+      elsif ($line =~ /#\s*if\s*!defined\(ASIO_NO_DEPRECATED\)/)
+      {
+        $deprecated_state = -1;
+        next;
+      }
+    }
+    elsif ($deprecated_state == 1)
+    {
+      if ($line =~ /#\s*else\s*\/\/\s*!*defined\(ASIO_NO_DEPRECATED\)/)
+      {
+        $deprecated_state = -1;
+        next;
+      }
+      elsif ($line =~ /#\s*endif\s*\/\/\s*!*defined\(ASIO_NO_DEPRECATED\)/)
+      {
+        $deprecated_state = 0;
+        next;
+      }
+      else
+      {
+        $line =~ s/^# /#/;
+      }
+    }
+    elsif ($deprecated_state == -1)
+    {
+      if ($line =~ /#\s*else\s*\/\/\s*!*defined\(ASIO_NO_DEPRECATED\)/)
+      {
+        $deprecated_state = 1;
+      }
+      elsif ($line =~ /#\s*endif\s*\/\/\s*!*defined\(ASIO_NO_DEPRECATED\)/)
+      {
+        $deprecated_state = -2;
+      }
+      next;
+    }
+    elsif ($deprecated_state == -2)
+    {
+      $deprecated_state = 0;
+      next if ($line eq "");
+    }
+
+    # Strip out code for extensions.
+    if ($extension_state == 0)
+    {
+      if ($line =~ /#\s*if\s*!defined\(ASIO_NO_EXTENSIONS\)\s*$/)
+      {
+        $extension_state = -1;
+        next;
+      }
+    }
+    elsif ($extension_state == -1)
+    {
+      $extension_state = -2 if ($line =~ /#\s*endif\s*\/\/\s*!defined\(ASIO_NO_EXTENSIONS\)\s*$/);
+      next;
+    }
+    elsif ($extension_state == -2)
+    {
+      $extension_state = 0;
+      next if ($line eq "");
+    }
+
+    # Strip out code for old services.
+    if ($old_services_state == 0)
+    {
+      if ($line =~ /#\s*if\s*defined\(ASIO_ENABLE_OLD_SERVICES\)/)
+      {
+        $old_services_state = -1;
+        next;
+      }
+      elsif ($line =~ /#\s*if\s*!defined\(ASIO_ENABLE_OLD_SERVICES\)/)
+      {
+        $old_services_state = 1;
+        next;
+      }
+    }
+    elsif ($old_services_state == 1)
+    {
+      if ($line =~ /#\s*else\s*\/\/\s*!*defined\(ASIO_ENABLE_OLD_SERVICES\)/)
+      {
+        $old_services_state = -1;
+        next;
+      }
+      elsif ($line =~ /#\s*endif\s*\/\/\s*!*defined\(ASIO_ENABLE_OLD_SERVICES\)/)
+      {
+        $old_services_state = 0;
+        next;
+      }
+      else
+      {
+        $line =~ s/^# /#/;
+      }
+    }
+    elsif ($old_services_state == -1)
+    {
+      if ($line =~ /#\s*else\s*\/\/\s*!*defined\(ASIO_ENABLE_OLD_SERVICES\)/)
+      {
+        $old_services_state = 1;
+      }
+      elsif ($line =~ /#\s*endif\s*\/\/\s*!*defined\(ASIO_ENABLE_OLD_SERVICES\)/)
+      {
+        $old_services_state = -2;
+      }
+      next;
+    }
+    elsif ($old_services_state == -2)
+    {
+      $old_services_state = 0;
+      next if ($line eq "");
+    }
+
+    # Unconditional replacements.
+    $line =~ s/[\\@]ref boost_bind/std::bind()/g;
+    if ($from =~ /.*\.txt$/)
+    {
+      $line =~ s/[\\@]ref async_read/std::experimental::net::async_read()/g;
+      $line =~ s/[\\@]ref async_write/std::experimental::net::async_write()/g;
+    }
+    if ($line =~ /asio_detail_posix_thread_function/)
+    {
+      $line =~ s/asio_detail_posix_thread_function/networking_ts_detail_posix_thread_function/g;
+    }
+    if ($line =~ /asio_signal_handler/)
+    {
+      $line =~ s/asio_signal_handler/networking_ts_signal_handler/g;
+    }
+    if ($line =~ /ASIO_/ && !($line =~ /NET_TS_/))
+    {
+      $line =~ s/ASIO_/NET_TS_/g;
+    }
+    if ($line =~ /asio_handler_/)
+    {
+      $line =~ s/asio_handler_/networking_ts_handler_/g;
+    }
+    if ($line =~ /asio_true_handler_/)
+    {
+      $line =~ s/asio_true_handler_/networking_ts_true_handler_/g;
+    }
+
+    # Lines skipped in asio/impl/src.hpp.
+    if ($is_impl_src_hpp)
+    {
+      next if
+        (
+             $line =~ /serial_port/
+          or $line =~ /\/local\//
+          or $line =~ /\/generic\//
+          or $line =~ /signal_set/
+        );
+    }
+
+    # Conditional replacements.
+    if ($line =~ /^(.* *)namespace asio {/)
+    {
+      print_line($output, $1 . "namespace std {", $from, $lineno);
+      print_line($output, $1 . "namespace experimental {", $from, $lineno);
+      print_line($output, $1 . "namespace net {", $from, $lineno);
+      print_line($output, $1 . "inline namespace v1 {", $from, $lineno);
+    }
+    elsif ($line =~ /^(.* *)} \/\/ namespace asio$/)
+    {
+      print_line($output, $1 . "} // inline namespace v1", $from, $lineno);
+      print_line($output, $1 . "} // namespace net", $from, $lineno);
+      print_line($output, $1 . "} // namespace experimental", $from, $lineno);
+      print_line($output, $1 . "} // namespace std", $from, $lineno);
+    }
+    elsif ($line =~ /^(# *include )[<"](asio\.hpp)[>"]$/)
+    {
+      print_line($output, $1 . "<net>", $from, $lineno);
+      if ($uses_asio_thread)
+      {
+        print_line($output, $1 . "<thread>", $from, $lineno) if (!$is_test);
+        $uses_asio_thread = 0;
+      }
+    }
+    elsif ($line =~ /^(# *include )[<"]boost\/.*[>"].*$/)
+    {
+      if (!$includes_asio && $uses_asio_thread)
+      {
+        print_line($output, $1 . "<thread>", $from, $lineno) if (!$is_test);
+        $uses_asio_thread = 0;
+      }
+      print_line($output, $line, $from, $lineno);
+    }
+    elsif ($line =~ /^(# *include )[<"]asio\/thread\.hpp[>"]/)
+    {
+      if ($is_test)
+      {
+        print_line($output, $1 . "<experimental/__net_ts/detail/thread.hpp>", $from, $lineno);
+      }
+      else
+      {
+        # Line is removed.
+      }
+    }
+    elsif ($line =~ /(# *include )[<"]asio\/error_code\.hpp[>"]/)
+    {
+      if ($is_asio_hpp)
+      {
+        # Line is removed.
+      }
+      else
+      {
+        print_line($output, $1 . "<cerrno>", $from, $lineno) if ($is_error_hpp);
+        print_line($output, $1 . "<system_error>", $from, $lineno);
+      }
+    }
+    elsif ($line =~ /# *include [<"]asio\/impl\/error_code\.[hi]pp[>"]/)
+    {
+      # Line is removed.
+    }
+    elsif ($line =~ /(# *include )[<"]asio\/system_error\.hpp[>"]/)
+    {
+      if ($is_asio_hpp)
+      {
+        # Line is removed.
+      }
+      else
+      {
+        print_line($output, $1 . "<system_error>", $from, $lineno);
+      }
+    }
+    elsif ($line =~ /(^.*# *include )[<"]asio\/([^>"]*)[>"](.*)$/)
+    {
+      print_line($output, $1 . "<experimental/__net_ts/" . $2 . ">" . $3, $from, $lineno);
+    }
+    elsif ($line =~ /#.*defined\(.*ASIO_HAS_STD_SYSTEM_ERROR\)$/)
+    {
+      # Line is removed.
+    }
+    elsif ($line =~ /asio::thread/)
+    {
+      if ($is_test)
+      {
+        $line =~ s/asio::thread/std::experimental::net::v1::detail::thread/g;
+      }
+      else
+      {
+        $line =~ s/asio::thread/std::thread/g;
+      }
+      print_line($output, $line, $from, $lineno);
+    }
+    elsif ($line =~ /^( *)thread( .*)$/)
+    {
+      if ($is_test)
+      {
+        print_line($output, $1 . "std::experimental::net::v1::detail::thread" . $2, $from, $lineno);
+      }
+      else
+      {
+        print_line($output, $1 . "std::thread" . $2, $from, $lineno);
+      }
+    }
+    elsif ($line =~ /asio::/ && !($line =~ /boost::asio::/))
+    {
+      $line =~ s/asio::error_code/std::error_code/g;
+      $line =~ s/asio::error_category/std::error_category/g;
+      $line =~ s/asio::system_category/std::system_category/g;
+      $line =~ s/asio::system_error/std::system_error/g;
+      $line =~ s/asio::/std::experimental::net::/g;
+      print_line($output, $line, $from, $lineno);
+    }
+    elsif ($line =~ /using namespace asio/)
+    {
+      $line =~ s/using namespace asio/using namespace std::experimental::net/g;
+      print_line($output, $line, $from, $lineno);
+    }
+    elsif ($line =~ /[\\@]ref boost_bind/)
+    {
+      $line =~ s/[\\@]ref boost_bind/std::bind()/g;
+      print_line($output, $line, $from, $lineno);
+    }
+    elsif ($line =~ /define.*DETAIL_CONFIG_HPP/)
+    {
+      print_line($output, $line, $from, $lineno);
+      print_line($output, "", $from, $lineno);
+      print_line($output, "#define NET_TS_STANDALONE 1", $from, $lineno);
+    }
+    else
+    {
+      print_line($output, $line, $from, $lineno);
+    }
+    ++$lineno;
+  }
+
+  # Ok, we're done.
+  close($input);
+  close($output);
+}
+
+sub find_include_files
+{
+  my @root_includes = (
+      "asio/ts/buffer.hpp",
+      "asio/ts/executor.hpp",
+      "asio/ts/internet.hpp",
+      "asio/ts/io_context.hpp",
+      "asio/ts/net.hpp",
+      "asio/ts/netfwd.hpp",
+      "asio/ts/socket.hpp",
+      "asio/ts/timer.hpp");
+
+  my @excluded_includes = (
+      "asio/basic_deadline_timer.hpp",
+      "asio/basic_streambuf.hpp",
+      "asio/basic_streambuf_fwd.hpp",
+      "asio/datagram_socket_service.hpp",
+      "asio/deadline_timer.hpp",
+      "asio/deadline_timer_service.hpp",
+      "asio/io_context_strand.hpp",
+      "asio/detail/strand_service.hpp",
+      "asio/detail/impl/strand_service.hpp",
+      "asio/detail/impl/strand_service.ipp",
+      "asio/socket_acceptor_service.hpp",
+      "asio/seq_packet_socket_service.hpp",
+      "asio/stream_socket_service.hpp",
+      "asio/time_traits.hpp",
+      "asio/waitable_timer_service.hpp");
+
+  my @include_files = ();
+  my %known_includes = ();
+
+  foreach my $include (@root_includes)
+  {
+    $known_includes{$include} = 1;
+    push(@include_files, "include/" . $include);
+  }
+
+  foreach my $include (@excluded_includes)
+  {
+    $known_includes{$include} = 1;
+  }
+
+  my @unprocessed_includes = sort keys %known_includes;
+  while (scalar(@unprocessed_includes) > 0)
+  {
+    my $include = pop(@unprocessed_includes);
+
+    open(my $input, "<include/$include") or die("Can't open include/$include for reading");
+    while (my $line = <$input>)
+    {
+      chomp($line);
+      if ($line =~ /^\s*#\s*include\s*"(asio\/[^"]*)"/)
+      {
+        if (not defined($known_includes{$1}))
+        {
+          $known_includes{$1} = 1;
+          push(@include_files, "include/" . $1);
+          push(@unprocessed_includes, $1);
+        }
+      }
+    }
+    close($input);
+  }
+
+  return @include_files;
+}
+
+sub copy_include_files
+{
+  my @files = find_include_files();
+  push(@files, "include/asio/impl/src.hpp");
+
+  foreach my $file (@files)
+  {
+    if ($file ne "include/asio/thread.hpp"
+        and $file ne "include/asio/error_code.hpp"
+        and $file ne "include/asio/system_error.hpp"
+        and $file ne "include/asio/impl/error_code.hpp"
+        and $file ne "include/asio/impl/error_code.ipp")
+    {
+      my $from = $file;
+      my $to = $file;
+      $to =~ s/^include\/asio\//$output_dir\/include\/experimental\/__net_ts\//;
+      copy_source_file($from, $to);
+    }
+  }
+}
+
+sub create_top_level_includes
+{
+  my @includes = (
+      "buffer",
+      "executor",
+      "internet",
+      "io_context",
+      "net",
+      "netfwd",
+      "socket",
+      "timer");
+
+  our $output_dir;
+  mkpath("$output_dir/include/experimental");
+  foreach my $include (@includes)
+  {
+    open(my $output, ">$output_dir/include/experimental/$include")
+      or die("Can't open $output_dir/include/experimental/$include for writing");
+
+    my $guard = "NET_TS_" . uc($include) . "_INCLUDED";
+
+    print($output "//\n");
+    print($output "// experimental/$include\n");
+    print($output "// " . '~' x length("experimental/" . $include) . "\n");
+    print($output "//\n");
+    print($output "// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)\n");
+    print($output "//\n");
+    print($output "// Distributed under the Boost Software License, Version 1.0. (See accompanying\n");
+    print($output "// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n");
+    print($output "//\n");
+    print($output "\n");
+    print($output "#ifndef $guard\n");
+    print($output "#define $guard\n");
+    print($output "\n");
+    print($output "#include <experimental/__net_ts/ts/$include.hpp>\n");
+    print($output "\n");
+    print($output "#endif // $guard\n");
+
+    close($output);
+  }
+}
+
+copy_include_files();
+create_top_level_includes();