]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/asio/ssl/detail/stream_core.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / asio / ssl / detail / stream_core.hpp
index b32c682fc50d969f9cdede694ab6f28a2e3cb922..88bad7848b6ce8afab11a9659e4d50cb6e596693 100644 (file)
@@ -52,6 +52,40 @@ struct stream_core
     pending_write_.expires_at(neg_infin());
   }
 
+#if defined(BOOST_ASIO_HAS_MOVE)
+  stream_core(stream_core&& other)
+    : engine_(BOOST_ASIO_MOVE_CAST(engine)(other.engine_)),
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+      pending_read_(
+         BOOST_ASIO_MOVE_CAST(boost::asio::deadline_timer)(
+           other.pending_read_)),
+      pending_write_(
+         BOOST_ASIO_MOVE_CAST(boost::asio::deadline_timer)(
+           other.pending_write_)),
+#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+      pending_read_(
+         BOOST_ASIO_MOVE_CAST(boost::asio::steady_timer)(
+           other.pending_read_)),
+      pending_write_(
+         BOOST_ASIO_MOVE_CAST(boost::asio::steady_timer)(
+           other.pending_write_)),
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+      output_buffer_space_(
+          BOOST_ASIO_MOVE_CAST(std::vector<unsigned char>)(
+            other.output_buffer_space_)),
+      output_buffer_(other.output_buffer_),
+      input_buffer_space_(
+          BOOST_ASIO_MOVE_CAST(std::vector<unsigned char>)(
+            other.input_buffer_space_)),
+      input_buffer_(other.input_buffer_),
+      input_(other.input_)
+  {
+    other.output_buffer_ = boost::asio::mutable_buffer(0, 0);
+    other.input_buffer_ = boost::asio::mutable_buffer(0, 0);
+    other.input_ = boost::asio::const_buffer(0, 0);
+  }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
   ~stream_core()
   {
   }
@@ -115,13 +149,13 @@ struct stream_core
   std::vector<unsigned char> output_buffer_space_;
 
   // A buffer that may be used to prepare output intended for the transport.
-  const boost::asio::mutable_buffer output_buffer_;
+  boost::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 boost::asio::mutable_buffer input_buffer_;
+  boost::asio::mutable_buffer input_buffer_;
 
   // The buffer pointing to the engine's unconsumed input.
   boost::asio::const_buffer input_;