src/cxx_supportlib/vendor-modified/boost/asio/awaitable.hpp in passenger-6.0.14 vs src/cxx_supportlib/vendor-modified/boost/asio/awaitable.hpp in passenger-6.0.15

- old
+ new

@@ -1,10 +1,10 @@ // // awaitable.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2021 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) // @@ -23,10 +23,11 @@ # include <coroutine> #else // defined(BOOST_ASIO_HAS_STD_COROUTINE) # include <experimental/coroutine> #endif // defined(BOOST_ASIO_HAS_STD_COROUTINE) +#include <utility> #include <boost/asio/any_io_executor.hpp> #include <boost/asio/detail/push_options.hpp> namespace boost { @@ -72,9 +73,17 @@ /// Destructor ~awaitable() { if (frame_) frame_->destroy(); + } + + /// Move assignment. + awaitable& operator=(awaitable&& other) noexcept + { + if (this != &other) + frame_ = std::exchange(other.frame_, nullptr); + return *this; } /// Checks if the awaitable refers to a future result. bool valid() const noexcept {