]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/asio/execution/connect.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / asio / execution / connect.hpp
index 47cbe3c03794c6e666d5cef22ba6a295bbaed740..9ee5655a769740a2b94929148b15f46d52b9a722 100644 (file)
@@ -2,7 +2,7 @@
 // execution/connect.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -132,7 +132,7 @@ using connect_result_t = typename connect_result<S, R>::type;
 
 #else // defined(GENERATING_DOCUMENTATION)
 
-namespace asio_execution_connect_fn {
+namespace boost_asio_execution_connect_fn {
 
 using boost::asio::conditional;
 using boost::asio::declval;
@@ -159,7 +159,8 @@ enum overload_type
   ill_formed
 };
 
-template <typename S, typename R, typename = void>
+template <typename S, typename R, typename = void,
+   typename = void, typename = void, typename = void>
 struct call_traits
 {
   BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
@@ -170,13 +171,13 @@ struct call_traits
 template <typename S, typename R>
 struct call_traits<S, void(R),
   typename enable_if<
-    (
-      connect_member<S, R>::is_valid
-      &&
-      is_operation_state<typename connect_member<S, R>::result_type>::value
-      &&
-      is_sender<typename remove_cvref<S>::type>::value
-    )
+    connect_member<S, R>::is_valid
+  >::type,
+  typename enable_if<
+    is_operation_state<typename connect_member<S, R>::result_type>::value
+  >::type,
+  typename enable_if<
+    is_sender<typename remove_cvref<S>::type>::value
   >::type> :
   connect_member<S, R>
 {
@@ -186,15 +187,16 @@ struct call_traits<S, void(R),
 template <typename S, typename R>
 struct call_traits<S, void(R),
   typename enable_if<
-    (
-      !connect_member<S, R>::is_valid
-      &&
-      connect_free<S, R>::is_valid
-      &&
-      is_operation_state<typename connect_free<S, R>::result_type>::value
-      &&
-      is_sender<typename remove_cvref<S>::type>::value
-    )
+    !connect_member<S, R>::is_valid
+  >::type,
+  typename enable_if<
+    connect_free<S, R>::is_valid
+  >::type,
+  typename enable_if<
+    is_operation_state<typename connect_free<S, R>::result_type>::value
+  >::type,
+  typename enable_if<
+    is_sender<typename remove_cvref<S>::type>::value
   >::type> :
   connect_free<S, R>
 {
@@ -204,24 +206,25 @@ struct call_traits<S, void(R),
 template <typename S, typename R>
 struct call_traits<S, void(R),
   typename enable_if<
-    (
-      !connect_member<S, R>::is_valid
-      &&
-      !connect_free<S, R>::is_valid
-      &&
-      is_receiver<R>::value
-      &&
-      conditional<
-        !is_as_receiver<
-          typename remove_cvref<R>::type
-        >::value,
-        is_executor_of<
-          typename remove_cvref<S>::type,
-          as_invocable<typename remove_cvref<R>::type, S>
-        >,
-        false_type
-      >::type::value
-    )
+    !connect_member<S, R>::is_valid
+  >::type,
+  typename enable_if<
+    !connect_free<S, R>::is_valid
+  >::type,
+  typename enable_if<
+    is_receiver<R>::value
+  >::type,
+  typename enable_if<
+    conditional<
+      !is_as_receiver<
+        typename remove_cvref<R>::type
+      >::value,
+      is_executor_of<
+        typename remove_cvref<S>::type,
+        as_invocable<typename remove_cvref<R>::type, S>
+      >,
+      false_type
+    >::type::value
   >::type>
 {
   BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter);
@@ -424,22 +427,22 @@ struct static_instance
 template <typename T>
 const T static_instance<T>::instance = {};
 
-} // namespace asio_execution_connect_fn
+} // namespace boost_asio_execution_connect_fn
 namespace boost {
 namespace asio {
 namespace execution {
 namespace {
 
-static BOOST_ASIO_CONSTEXPR const asio_execution_connect_fn::impl&
-  connect = asio_execution_connect_fn::static_instance<>::instance;
+static BOOST_ASIO_CONSTEXPR const boost_asio_execution_connect_fn::impl&
+  connect = boost_asio_execution_connect_fn::static_instance<>::instance;
 
 } // namespace
 
 template <typename S, typename R>
 struct can_connect :
   integral_constant<bool,
-    asio_execution_connect_fn::call_traits<S, void(R)>::overload !=
-      asio_execution_connect_fn::ill_formed>
+    boost_asio_execution_connect_fn::call_traits<S, void(R)>::overload !=
+      boost_asio_execution_connect_fn::ill_formed>
 {
 };
 
@@ -453,7 +456,7 @@ constexpr bool can_connect_v = can_connect<S, R>::value;
 template <typename S, typename R>
 struct is_nothrow_connect :
   integral_constant<bool,
-    asio_execution_connect_fn::call_traits<S, void(R)>::is_noexcept>
+    boost_asio_execution_connect_fn::call_traits<S, void(R)>::is_noexcept>
 {
 };
 
@@ -468,7 +471,7 @@ constexpr bool is_nothrow_connect_v
 template <typename S, typename R>
 struct connect_result
 {
-  typedef typename asio_execution_connect_fn::call_traits<
+  typedef typename boost_asio_execution_connect_fn::call_traits<
       S, void(R)>::result_type type;
 };