X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fboost%2Fboost%2Fasio%2Fread_at.hpp;h=ed0296c5dd9dbfdb6cb180de7f85f9fa0c56a56c;hb=92f5a8d42d07f9929ae4fa7e01342fe8d96808a8;hp=2927ddd1ffa66a5c81b8f03b75cde683272d534f;hpb=a0324939f9d0e1905d5df8f57442f09dc70af83d;p=ceph.git diff --git a/ceph/src/boost/boost/asio/read_at.hpp b/ceph/src/boost/boost/asio/read_at.hpp index 2927ddd1f..ed0296c5d 100644 --- a/ceph/src/boost/boost/asio/read_at.hpp +++ b/ceph/src/boost/boost/asio/read_at.hpp @@ -2,7 +2,7 @@ // read_at.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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,8 +33,8 @@ namespace asio { /** * @defgroup read_at boost::asio::read_at * - * @brief Attempt to read a certain amount of data at the specified offset - * before returning. + * @brief The @c read_at function is a composed operation that reads a certain + * amount of data at the specified offset before returning. */ /*@{*/ @@ -395,8 +395,8 @@ std::size_t read_at(SyncRandomAccessReadDevice& d, /** * @defgroup async_read_at boost::asio::async_read_at * - * @brief Start an asynchronous operation to read a certain amount of data at - * the specified offset. + * @brief The @c async_read_at function is a composed asynchronous operation + * that reads a certain amount of data at the specified offset. */ /*@{*/ @@ -440,9 +440,9 @@ std::size_t read_at(SyncRandomAccessReadDevice& d, * std::size_t bytes_transferred * ); @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 - * boost::asio::io_context::post(). + * not, the handler will not be invoked from within this function. On + * immediate completion, invocation of the handler will be performed in a + * manner equivalent to using boost::asio::post(). * * @par Example * To read into a single data buffer use the @ref buffer function as follows: @@ -460,12 +460,17 @@ std::size_t read_at(SyncRandomAccessReadDevice& d, * handler); @endcode */ template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, + BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code, + std::size_t)) ReadHandler + BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE( + typename AsyncRandomAccessReadDevice::executor_type)> +BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, void (boost::system::error_code, std::size_t)) async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset, const MutableBufferSequence& buffers, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler); + BOOST_ASIO_MOVE_ARG(ReadHandler) handler + BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( + typename AsyncRandomAccessReadDevice::executor_type)); /// Start an asynchronous operation to read a certain amount of data at the /// specified offset. @@ -518,9 +523,9 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset, * std::size_t bytes_transferred * ); @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 - * boost::asio::io_context::post(). + * not, the handler will not be invoked from within this function. On + * immediate completion, invocation of the handler will be performed in a + * manner equivalent to using boost::asio::post(). * * @par Example * To read into a single data buffer use the @ref buffer function as follows: @@ -532,14 +537,20 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset, * buffers in one go, and how to use it with arrays, boost::array or * std::vector. */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, +template +BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, void (boost::system::error_code, std::size_t)) async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset, const MutableBufferSequence& buffers, CompletionCondition completion_condition, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler); + BOOST_ASIO_MOVE_ARG(ReadHandler) handler + BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( + typename AsyncRandomAccessReadDevice::executor_type)); #if !defined(BOOST_ASIO_NO_EXTENSIONS) #if !defined(BOOST_ASIO_NO_IOSTREAM) @@ -579,9 +590,9 @@ async_read_at(AsyncRandomAccessReadDevice& d, * std::size_t bytes_transferred * ); @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 - * boost::asio::io_context::post(). + * not, the handler will not be invoked from within this function. On + * immediate completion, invocation of the handler will be performed in a + * manner equivalent to using boost::asio::post(). * * @note This overload is equivalent to calling: * @code boost::asio::async_read_at( @@ -590,11 +601,17 @@ async_read_at(AsyncRandomAccessReadDevice& d, * handler); @endcode */ template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, + BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code, + std::size_t)) ReadHandler + BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE( + typename AsyncRandomAccessReadDevice::executor_type)> +BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, void (boost::system::error_code, std::size_t)) -async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset, - basic_streambuf& b, BOOST_ASIO_MOVE_ARG(ReadHandler) handler); +async_read_at(AsyncRandomAccessReadDevice& d, + uint64_t offset, basic_streambuf& b, + BOOST_ASIO_MOVE_ARG(ReadHandler) handler + BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( + typename AsyncRandomAccessReadDevice::executor_type)); /// Start an asynchronous operation to read a certain amount of data at the /// specified offset. @@ -645,18 +662,24 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset, * std::size_t bytes_transferred * ); @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 - * boost::asio::io_context::post(). + * not, the handler will not be invoked from within this function. On + * immediate completion, invocation of the handler will be performed in a + * manner equivalent to using boost::asio::post(). */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, +template +BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, void (boost::system::error_code, std::size_t)) async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset, basic_streambuf& b, CompletionCondition completion_condition, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler); + BOOST_ASIO_MOVE_ARG(ReadHandler) handler + BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( + typename AsyncRandomAccessReadDevice::executor_type)); #endif // !defined(BOOST_ASIO_NO_IOSTREAM) #endif // !defined(BOOST_ASIO_NO_EXTENSIONS)