summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/asio/read_at.hpp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip
swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0. Updated our update.sh script to stop on error. Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to missing include of <iostream> with newer Boost. Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/asio/read_at.hpp')
-rw-r--r--3rdParty/Boost/src/boost/asio/read_at.hpp49
1 files changed, 29 insertions, 20 deletions
diff --git a/3rdParty/Boost/src/boost/asio/read_at.hpp b/3rdParty/Boost/src/boost/asio/read_at.hpp
index 7eb30e0..02acbee 100644
--- a/3rdParty/Boost/src/boost/asio/read_at.hpp
+++ b/3rdParty/Boost/src/boost/asio/read_at.hpp
@@ -1,30 +1,31 @@
//
// read_at.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the 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 BOOST_ASIO_READ_AT_HPP
#define BOOST_ASIO_READ_AT_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
#include <cstddef>
-#include <boost/cstdint.hpp>
+#include <boost/asio/async_result.hpp>
#include <boost/asio/basic_streambuf_fwd.hpp>
+#include <boost/asio/detail/cstdint.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/detail/push_options.hpp>
namespace boost {
namespace asio {
/**
* @defgroup read_at boost::asio::read_at
@@ -70,19 +71,19 @@ namespace asio {
* std::vector.
*
* @note This overload is equivalent to calling:
* @code boost::asio::read_at(
* d, 42, buffers,
* boost::asio::transfer_all()); @endcode
*/
template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, const MutableBufferSequence& buffers);
+ uint64_t offset, const MutableBufferSequence& buffers);
/// Attempt to read a certain amount of data at the specified offset before
/// returning.
/**
* This function is used to read a certain number of bytes of data from a
* random access device at the specified offset. The call will block until one
* of the following conditions is true:
*
* @li The supplied buffers are full. That is, the bytes transferred is equal to
@@ -115,19 +116,19 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
* std::vector.
*
* @note This overload is equivalent to calling:
* @code boost::asio::read_at(
* d, 42, buffers,
* boost::asio::transfer_all(), ec); @endcode
*/
template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, const MutableBufferSequence& buffers,
+ uint64_t offset, const MutableBufferSequence& buffers,
boost::system::error_code& ec);
/// Attempt to read a certain amount of data at the specified offset before
/// returning.
/**
* This function is used to read a certain number of bytes of data from a
* random access device at the specified offset. The call will block until one
* of the following conditions is true:
*
@@ -171,19 +172,19 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
* @code boost::asio::read_at(d, 42, boost::asio::buffer(data, size),
* boost::asio::transfer_at_least(32)); @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 SyncRandomAccessReadDevice, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, const MutableBufferSequence& buffers,
+ uint64_t offset, const MutableBufferSequence& buffers,
CompletionCondition completion_condition);
/// Attempt to read a certain amount of data at the specified offset before
/// returning.
/**
* This function is used to read a certain number of bytes of data from a
* random access device at the specified offset. The call will block until one
* of the following conditions is true:
*
@@ -220,22 +221,22 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
*
* @param ec Set to indicate what error occurred, if any.
*
* @returns The number of bytes read. If an error occurs, returns the total
* number of bytes successfully transferred prior to the error.
*/
template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, const MutableBufferSequence& buffers,
+ uint64_t offset, const MutableBufferSequence& buffers,
CompletionCondition completion_condition, boost::system::error_code& ec);
-#if !defined(BOOST_NO_IOSTREAM)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
/// Attempt to read a certain amount of data at the specified offset before
/// returning.
/**
* This function is used to read a certain number of bytes of data from a
* random access device at the specified offset. The call will block until one
* of the following conditions is true:
*
* @li An error occurred.
@@ -255,19 +256,19 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
* @throws boost::system::system_error Thrown on failure.
*
* @note This overload is equivalent to calling:
* @code boost::asio::read_at(
* d, 42, b,
* boost::asio::transfer_all()); @endcode
*/
template <typename SyncRandomAccessReadDevice, typename Allocator>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, basic_streambuf<Allocator>& b);
+ uint64_t offset, basic_streambuf<Allocator>& b);
/// Attempt to read a certain amount of data at the specified offset before
/// returning.
/**
* This function is used to read a certain number of bytes of data from a
* random access device at the specified offset. The call will block until one
* of the following conditions is true:
*
* @li An error occurred.
@@ -287,19 +288,19 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
* @returns The number of bytes transferred.
*
* @note This overload is equivalent to calling:
* @code boost::asio::read_at(
* d, 42, b,
* boost::asio::transfer_all(), ec); @endcode
*/
template <typename SyncRandomAccessReadDevice, typename Allocator>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, basic_streambuf<Allocator>& b,
+ uint64_t offset, basic_streambuf<Allocator>& b,
boost::system::error_code& ec);
/// Attempt to read a certain amount of data at the specified offset before
/// returning.
/**
* This function is used to read a certain number of bytes of data from a
* random access device at the specified offset. The call will block until one
* of the following conditions is true:
*
@@ -330,19 +331,19 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
* call to the device's read_some_at function.
*
* @returns The number of bytes transferred.
*
* @throws boost::system::system_error Thrown on failure.
*/
template <typename SyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, basic_streambuf<Allocator>& b,
+ uint64_t offset, basic_streambuf<Allocator>& b,
CompletionCondition completion_condition);
/// Attempt to read a certain amount of data at the specified offset before
/// returning.
/**
* This function is used to read a certain number of bytes of data from a
* random access device at the specified offset. The call will block until one
* of the following conditions is true:
*
@@ -374,22 +375,22 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
*
* @param ec Set to indicate what error occurred, if any.
*
* @returns The number of bytes read. If an error occurs, returns the total
* number of bytes successfully transferred prior to the error.
*/
template <typename SyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, basic_streambuf<Allocator>& b,
+ uint64_t offset, basic_streambuf<Allocator>& b,
CompletionCondition completion_condition, boost::system::error_code& ec);
-#endif // !defined(BOOST_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
/*@}*/
/**
* @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.
*/
/*@{*/
@@ -449,19 +450,21 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
*
* @note This overload is equivalent to calling:
* @code boost::asio::async_read_at(
* d, 42, buffers,
* boost::asio::transfer_all(),
* handler); @endcode
*/
template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
typename ReadHandler>
-void async_read_at(AsyncRandomAccessReadDevice& d, boost::uint64_t offset,
+BOOST_ASIO_INITFN_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);
/// Start an asynchronous operation to read a certain amount of data at the
/// specified offset.
/**
* This function is used to asynchronously read a certain number of bytes of
* data from a random access device at the specified offset. The function call
* always returns immediately. The asynchronous operation will continue until
@@ -520,24 +523,26 @@ void async_read_at(AsyncRandomAccessReadDevice& d, boost::uint64_t offset,
* boost::asio::buffer(data, size),
* boost::asio::transfer_at_least(32),
* 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 AsyncRandomAccessReadDevice, typename MutableBufferSequence,
typename CompletionCondition, typename ReadHandler>
-void async_read_at(AsyncRandomAccessReadDevice& d,
- boost::uint64_t offset, const MutableBufferSequence& buffers,
+BOOST_ASIO_INITFN_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);
-#if !defined(BOOST_NO_IOSTREAM)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
/// Start an asynchronous operation to read a certain amount of data at the
/// specified offset.
/**
* This function is used to asynchronously read a certain number of bytes of
* data from a random access device at the specified offset. The function call
* always returns immediately. The asynchronous operation will continue until
* one of the following conditions is true:
*
@@ -574,19 +579,21 @@ void async_read_at(AsyncRandomAccessReadDevice& d,
*
* @note This overload is equivalent to calling:
* @code boost::asio::async_read_at(
* d, 42, b,
* boost::asio::transfer_all(),
* handler); @endcode
*/
template <typename AsyncRandomAccessReadDevice, typename Allocator,
typename ReadHandler>
-void async_read_at(AsyncRandomAccessReadDevice& d, boost::uint64_t offset,
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
basic_streambuf<Allocator>& b, BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
/// Start an asynchronous operation to read a certain amount of data at the
/// specified offset.
/**
* This function is used to asynchronously read a certain number of bytes of
* data from a random access device at the specified offset. The function call
* always returns immediately. The asynchronous operation will continue until
* one of the following conditions is true:
@@ -632,24 +639,26 @@ void async_read_at(AsyncRandomAccessReadDevice& d, boost::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_service::post().
*/
template <typename AsyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition, typename ReadHandler>
-void async_read_at(AsyncRandomAccessReadDevice& d,
- boost::uint64_t offset, basic_streambuf<Allocator>& b,
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, basic_streambuf<Allocator>& b,
CompletionCondition completion_condition,
BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-#endif // !defined(BOOST_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
/*@}*/
} // namespace asio
} // namespace boost
#include <boost/asio/detail/pop_options.hpp>
#include <boost/asio/impl/read_at.hpp>