|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70751 - in trunk: boost/asio boost/asio/detail boost/asio/detail/impl boost/asio/ssl libs/asio/doc libs/asio/doc/overview libs/asio/doc/requirements
From: chris_at_[hidden]
Date: 2011-03-30 08:58:17
Author: chris_kohlhoff
Date: 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
New Revision: 70751
URL: http://svn.boost.org/trac/boost/changeset/70751
Log:
* Use variadic templates when supported.
* On Windows, ensure the count of outstanding work is decremented for
abandoned operations (i.e. operations that are being cleaned up within
the io_service destructor).
* Fix basic_socket_streambuf compile error when using MSVC 10's std::array.
* Preserve the value of errno across the signal handler.
* Fix unused return value warning.
* Fix various minor documentation errors.
Text files modified:
trunk/boost/asio/basic_socket_iostream.hpp | 47 +++++++++++++++++++++++++++--------
trunk/boost/asio/basic_socket_streambuf.hpp | 52 +++++++++++++++++++++++++++------------
trunk/boost/asio/completion_condition.hpp | 2
trunk/boost/asio/detail/config.hpp | 11 ++++++++
trunk/boost/asio/detail/impl/dev_poll_reactor.ipp | 2 +
trunk/boost/asio/detail/impl/epoll_reactor.ipp | 2 +
trunk/boost/asio/detail/impl/kqueue_reactor.ipp | 2 +
trunk/boost/asio/detail/impl/select_reactor.ipp | 2 +
trunk/boost/asio/detail/impl/signal_set_service.ipp | 7 ++++
trunk/boost/asio/detail/impl/task_io_service.ipp | 7 +++++
trunk/boost/asio/detail/impl/win_iocp_io_service.ipp | 11 ++++++++
trunk/boost/asio/detail/task_io_service.hpp | 4 +++
trunk/boost/asio/detail/win_iocp_io_service.hpp | 4 +++
trunk/boost/asio/ssl/verify_mode.hpp | 1
trunk/boost/asio/version.hpp | 2
trunk/libs/asio/doc/overview/allocation.qbk | 5 ---
trunk/libs/asio/doc/reference.qbk | 6 +++-
trunk/libs/asio/doc/requirements/Handler.qbk | 6 ++--
trunk/libs/asio/doc/requirements/asynchronous_operations.qbk | 6 ++--
19 files changed, 136 insertions(+), 43 deletions(-)
Modified: trunk/boost/asio/basic_socket_iostream.hpp
==============================================================================
--- trunk/boost/asio/basic_socket_iostream.hpp (original)
+++ trunk/boost/asio/basic_socket_iostream.hpp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -19,17 +19,20 @@
#if !defined(BOOST_NO_IOSTREAM)
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/utility/base_from_member.hpp>
#include <boost/asio/basic_socket_streambuf.hpp>
#include <boost/asio/stream_socket_service.hpp>
-#if !defined(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY)
-#define BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY 5
-#endif // !defined(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY)
+#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+# include <boost/preprocessor/arithmetic/inc.hpp>
+# include <boost/preprocessor/repetition/enum_binary_params.hpp>
+# include <boost/preprocessor/repetition/enum_params.hpp>
+# include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+# if !defined(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY)
+# define BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY 5
+# endif // !defined(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY)
// A macro that should expand to:
// template <typename T1, ..., typename Tn>
@@ -43,7 +46,7 @@
// }
// This macro should only persist within this file.
-#define BOOST_ASIO_PRIVATE_CTR_DEF(z, n, data) \
+# define BOOST_ASIO_PRIVATE_CTR_DEF(z, n, data) \
template <BOOST_PP_ENUM_PARAMS(n, typename T)> \
explicit basic_socket_iostream(BOOST_PP_ENUM_BINARY_PARAMS(n, T, x)) \
: std::basic_iostream<char>(&this->boost::base_from_member< \
@@ -65,7 +68,7 @@
// }
// This macro should only persist within this file.
-#define BOOST_ASIO_PRIVATE_CONNECT_DEF(z, n, data) \
+# define BOOST_ASIO_PRIVATE_CONNECT_DEF(z, n, data) \
template <BOOST_PP_ENUM_PARAMS(n, typename T)> \
void connect(BOOST_PP_ENUM_BINARY_PARAMS(n, T, x)) \
{ \
@@ -74,6 +77,8 @@
} \
/**/
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
#include <boost/asio/detail/push_options.hpp>
namespace boost {
@@ -119,6 +124,17 @@
*/
template <typename T1, ..., typename TN>
explicit basic_socket_iostream(T1 t1, ..., TN tn);
+#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ template <typename... T>
+ explicit basic_socket_iostream(T... x)
+ : std::basic_iostream<char>(&this->boost::base_from_member<
+ basic_socket_streambuf<Protocol, StreamSocketService,
+ Time, TimeTraits, TimerService> >::member)
+ {
+ tie(this);
+ if (rdbuf()->connect(x...) == 0)
+ this->setstate(std::ios_base::failbit);
+ }
#else
BOOST_PP_REPEAT_FROM_TO(
1, BOOST_PP_INC(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY),
@@ -134,6 +150,13 @@
*/
template <typename T1, ..., typename TN>
void connect(T1 t1, ..., TN tn);
+#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ template <typename... T>
+ void connect(T... x)
+ {
+ if (rdbuf()->connect(x...) == 0)
+ this->setstate(std::ios_base::failbit);
+ }
#else
BOOST_PP_REPEAT_FROM_TO(
1, BOOST_PP_INC(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY),
@@ -227,8 +250,10 @@
#include <boost/asio/detail/pop_options.hpp>
-#undef BOOST_ASIO_PRIVATE_CTR_DEF
-#undef BOOST_ASIO_PRIVATE_CONNECT_DEF
+#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+# undef BOOST_ASIO_PRIVATE_CTR_DEF
+# undef BOOST_ASIO_PRIVATE_CONNECT_DEF
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
#endif // defined(BOOST_NO_IOSTREAM)
Modified: trunk/boost/asio/basic_socket_streambuf.hpp
==============================================================================
--- trunk/boost/asio/basic_socket_streambuf.hpp (original)
+++ trunk/boost/asio/basic_socket_streambuf.hpp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -20,10 +20,6 @@
#if !defined(BOOST_NO_IOSTREAM)
#include <streambuf>
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/utility/base_from_member.hpp>
#include <boost/asio/basic_socket.hpp>
#include <boost/asio/deadline_timer_service.hpp>
@@ -37,9 +33,16 @@
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <boost/asio/detail/pop_options.hpp>
-#if !defined(BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY)
-#define BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY 5
-#endif // !defined(BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY)
+#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+# include <boost/preprocessor/arithmetic/inc.hpp>
+# include <boost/preprocessor/repetition/enum_binary_params.hpp>
+# include <boost/preprocessor/repetition/enum_params.hpp>
+# include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+# if !defined(BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY)
+# define BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY 5
+# endif // !defined(BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY)
// A macro that should expand to:
// template <typename T1, ..., typename Tn>
@@ -57,7 +60,7 @@
// }
// This macro should only persist within this file.
-#define BOOST_ASIO_PRIVATE_CONNECT_DEF( z, n, data ) \
+# define BOOST_ASIO_PRIVATE_CONNECT_DEF( z, n, data ) \
template <BOOST_PP_ENUM_PARAMS(n, typename T)> \
basic_socket_streambuf<Protocol, StreamSocketService, \
Time, TimeTraits, TimerService>* connect( \
@@ -73,6 +76,8 @@
} \
/**/
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
#include <boost/asio/detail/push_options.hpp>
namespace boost {
@@ -165,6 +170,19 @@
template <typename T1, ..., typename TN>
basic_socket_streambuf<Protocol, StreamSocketService>* connect(
T1 t1, ..., TN tn);
+#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ template <typename... T>
+ basic_socket_streambuf<Protocol, StreamSocketService,
+ Time, TimeTraits, TimerService>* connect(T... x)
+ {
+ init_buffers();
+ this->basic_socket<Protocol, StreamSocketService>::close(ec_);
+ typedef typename Protocol::resolver resolver_type;
+ typedef typename resolver_type::query resolver_query;
+ resolver_query query(x...);
+ resolve_and_connect(query);
+ return !ec_ ? this : 0;
+ }
#else
BOOST_PP_REPEAT_FROM_TO(
1, BOOST_PP_INC(BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY),
@@ -280,8 +298,8 @@
if (ec_)
return traits_type::eof();
- setg(get_buffer_.begin(), get_buffer_.begin() + putback_max,
- get_buffer_.begin() + putback_max + bytes_transferred_);
+ setg(&get_buffer_[0], &get_buffer_[0] + putback_max,
+ &get_buffer_[0] + putback_max + bytes_transferred_);
return traits_type::to_int_type(*gptr());
}
else
@@ -349,7 +367,7 @@
buffer = buffer + bytes_transferred_;
}
- setp(put_buffer_.begin(), put_buffer_.end());
+ setp(&put_buffer_[0], &put_buffer_[0] + put_buffer_.size());
// If the new character is eof then our work here is done.
if (traits_type::eq_int_type(c, traits_type::eof()))
@@ -392,13 +410,13 @@
private:
void init_buffers()
{
- setg(get_buffer_.begin(),
- get_buffer_.begin() + putback_max,
- get_buffer_.begin() + putback_max);
+ setg(&get_buffer_[0],
+ &get_buffer_[0] + putback_max,
+ &get_buffer_[0] + putback_max);
if (unbuffered_)
setp(0, 0);
else
- setp(put_buffer_.begin(), put_buffer_.end());
+ setp(&put_buffer_[0], &put_buffer_[0] + put_buffer_.size());
}
template <typename ResolverQuery>
@@ -521,7 +539,9 @@
#include <boost/asio/detail/pop_options.hpp>
-#undef BOOST_ASIO_PRIVATE_CONNECT_DEF
+#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+# undef BOOST_ASIO_PRIVATE_CONNECT_DEF
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
#endif // !defined(BOOST_NO_IOSTREAM)
Modified: trunk/boost/asio/completion_condition.hpp
==============================================================================
--- trunk/boost/asio/completion_condition.hpp (original)
+++ trunk/boost/asio/completion_condition.hpp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -202,7 +202,7 @@
* @endcode
*/
#if defined(GENERATING_DOCUMENTATION)
-unspecified transfer_exactly(std::size_t minimum);
+unspecified transfer_exactly(std::size_t size);
#else
inline detail::transfer_exactly_t transfer_exactly(std::size_t size)
{
Modified: trunk/boost/asio/detail/config.hpp
==============================================================================
--- trunk/boost/asio/detail/config.hpp (original)
+++ trunk/boost/asio/detail/config.hpp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -69,6 +69,17 @@
# define BOOST_ASIO_MOVE_CAST(type) static_cast<const type&>
#endif // !defined_BOOST_ASIO_MOVE_CAST
+// Support variadic templates on compilers known to allow it.
+#if !defined(BOOST_ASIO_DISABLE_VARIADIC_TEMPLATES)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_VARIADIC_TEMPLATES
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+#endif // !defined(BOOST_ASIO_DISABLE_VARIADIC_TEMPLATES)
+
// Standard library support for system errors.
#if !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR)
# if defined(__GNUC__)
Modified: trunk/boost/asio/detail/impl/dev_poll_reactor.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/dev_poll_reactor.ipp (original)
+++ trunk/boost/asio/detail/impl/dev_poll_reactor.ipp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -64,6 +64,8 @@
op_queue_[i].get_all_operations(ops);
timer_queues_.get_all_timers(ops);
+
+ io_service_.abandon_operations(ops);
}
// Helper class to re-register all descriptors with /dev/poll.
Modified: trunk/boost/asio/detail/impl/epoll_reactor.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/epoll_reactor.ipp (original)
+++ trunk/boost/asio/detail/impl/epoll_reactor.ipp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -85,6 +85,8 @@
}
timer_queues_.get_all_timers(ops);
+
+ io_service_.abandon_operations(ops);
}
void epoll_reactor::fork_service(boost::asio::io_service::fork_event fork_ev)
Modified: trunk/boost/asio/detail/impl/kqueue_reactor.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/kqueue_reactor.ipp (original)
+++ trunk/boost/asio/detail/impl/kqueue_reactor.ipp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -75,6 +75,8 @@
}
timer_queues_.get_all_timers(ops);
+
+ io_service_.abandon_operations(ops);
}
void kqueue_reactor::fork_service(boost::asio::io_service::fork_event fork_ev)
Modified: trunk/boost/asio/detail/impl/select_reactor.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/select_reactor.ipp (original)
+++ trunk/boost/asio/detail/impl/select_reactor.ipp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -82,6 +82,8 @@
op_queue_[i].get_all_operations(ops);
timer_queues_.get_all_timers(ops);
+
+ io_service_.abandon_operations(ops);
}
void select_reactor::fork_service(boost::asio::io_service::fork_event fork_ev)
Modified: trunk/boost/asio/detail/impl/signal_set_service.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/signal_set_service.ipp (original)
+++ trunk/boost/asio/detail/impl/signal_set_service.ipp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -62,9 +62,12 @@
#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
signal_set_service::deliver_signal(signal_number);
#else // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+ int saved_errno = errno;
signal_state* state = get_signal_state();
- (void)::write(state->write_descriptor_,
+ int result = ::write(state->write_descriptor_,
&signal_number, sizeof(signal_number));
+ (void)result;
+ errno = saved_errno;
#endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
#if !defined(BOOST_ASIO_HAS_SIGACTION)
@@ -144,6 +147,8 @@
reg = reg->next_in_table_;
}
}
+
+ io_service_.abandon_operations(ops);
}
void signal_set_service::fork_service(
Modified: trunk/boost/asio/detail/impl/task_io_service.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/task_io_service.ipp (original)
+++ trunk/boost/asio/detail/impl/task_io_service.ipp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -231,6 +231,13 @@
}
}
+void task_io_service::abandon_operations(
+ op_queue<task_io_service::operation>& ops)
+{
+ op_queue<task_io_service::operation> ops2;
+ ops2.push(ops);
+}
+
std::size_t task_io_service::do_one(mutex::scoped_lock& lock,
task_io_service::idle_thread_info* this_idle_thread)
{
Modified: trunk/boost/asio/detail/impl/win_iocp_io_service.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/win_iocp_io_service.ipp (original)
+++ trunk/boost/asio/detail/impl/win_iocp_io_service.ipp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -263,6 +263,17 @@
}
}
+void win_iocp_io_service::abandon_operations(
+ op_queue<win_iocp_operation>& ops)
+{
+ while (win_iocp_operation* op = ops.front())
+ {
+ ops.pop();
+ ::InterlockedDecrement(&outstanding_work_);
+ op->destroy();
+ }
+}
+
void win_iocp_io_service::on_pending(win_iocp_operation* op)
{
if (::InterlockedCompareExchange(&op->ready_, 1, 0) == 1)
Modified: trunk/boost/asio/detail/task_io_service.hpp
==============================================================================
--- trunk/boost/asio/detail/task_io_service.hpp (original)
+++ trunk/boost/asio/detail/task_io_service.hpp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -106,6 +106,10 @@
// that work_started() was previously called for each operation.
BOOST_ASIO_DECL void post_deferred_completions(op_queue<operation>& ops);
+ // Process unfinished operations as part of a shutdown_service operation.
+ // Assumes that work_started() was previously called for the operations.
+ BOOST_ASIO_DECL void abandon_operations(op_queue<operation>& ops);
+
private:
// Structure containing information about an idle thread.
struct idle_thread_info;
Modified: trunk/boost/asio/detail/win_iocp_io_service.hpp
==============================================================================
--- trunk/boost/asio/detail/win_iocp_io_service.hpp (original)
+++ trunk/boost/asio/detail/win_iocp_io_service.hpp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -127,6 +127,10 @@
BOOST_ASIO_DECL void post_deferred_completions(
op_queue<win_iocp_operation>& ops);
+ // Process unfinished operations as part of a shutdown_service operation.
+ // Assumes that work_started() was previously called for the operations.
+ BOOST_ASIO_DECL void abandon_operations(op_queue<operation>& ops);
+
// Called after starting an overlapped I/O operation that did not complete
// immediately. The caller must have already called work_started() prior to
// starting the operation.
Modified: trunk/boost/asio/ssl/verify_mode.hpp
==============================================================================
--- trunk/boost/asio/ssl/verify_mode.hpp (original)
+++ trunk/boost/asio/ssl/verify_mode.hpp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -27,6 +27,7 @@
/// Bitmask type for peer verification.
/**
* Possible values are:
+ *
* @li @ref verify_none
* @li @ref verify_peer
* @li @ref verify_fail_if_no_peer_cert
Modified: trunk/boost/asio/version.hpp
==============================================================================
--- trunk/boost/asio/version.hpp (original)
+++ trunk/boost/asio/version.hpp 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -18,6 +18,6 @@
// BOOST_ASIO_VERSION % 100 is the sub-minor version
// BOOST_ASIO_VERSION / 100 % 1000 is the minor version
// BOOST_ASIO_VERSION / 100000 is the major version
-#define BOOST_ASIO_VERSION 100502 // 1.5.2
+#define BOOST_ASIO_VERSION 100503 // 1.5.3
#endif // BOOST_ASIO_VERSION_HPP
Modified: trunk/libs/asio/doc/overview/allocation.qbk
==============================================================================
--- trunk/libs/asio/doc/overview/allocation.qbk (original)
+++ trunk/libs/asio/doc/overview/allocation.qbk 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -48,11 +48,6 @@
memory visibility should allocation functions need to be called from different
threads.
-Custom memory allocation support is currently implemented for all asynchronous
-operations with the following exceptions:
-
-* Asynchronous SSL operations.
-
[heading See Also]
[link boost_asio.reference.asio_handler_allocate asio_handler_allocate],
Modified: trunk/libs/asio/doc/reference.qbk
==============================================================================
--- trunk/libs/asio/doc/reference.qbk (original)
+++ trunk/libs/asio/doc/reference.qbk 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -84728,7 +84728,9 @@
-Possible values are:
+Possible values are:
+
+
* [link boost_asio.reference.ssl__verify_none `ssl::verify_none`]
* [link boost_asio.reference.ssl__verify_peer `ssl::verify_peer`]
@@ -86293,7 +86295,7 @@
unspecified transfer_exactly(
- std::size_t minimum);
+ std::size_t size);
This function is used to create an object, of unspecified type, that meets CompletionCondition requirements.
Modified: trunk/libs/asio/doc/requirements/Handler.qbk
==============================================================================
--- trunk/libs/asio/doc/requirements/Handler.qbk (original)
+++ trunk/libs/asio/doc/requirements/Handler.qbk 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -19,7 +19,7 @@
[[expression] [return type] [assertion/note\npre/post-conditions]]
[
[``
- using namespace boost::asio;
+ using boost::asio::asio_handler_allocate;
asio_handler_allocate(s, &h);
``]
[`void*`]
@@ -34,7 +34,7 @@
]
[
[``
- using namespace boost::asio;
+ using boost::asio::asio_handler_deallocate;
asio_handler_deallocate(p, s, &h);
``]
[]
@@ -48,7 +48,7 @@
]
[
[``
- using namespace boost::asio;
+ using boost::asio::asio_handler_invoke;
asio_handler_invoke(f, &h);
``]
[]
Modified: trunk/libs/asio/doc/requirements/asynchronous_operations.qbk
==============================================================================
--- trunk/libs/asio/doc/requirements/asynchronous_operations.qbk (original)
+++ trunk/libs/asio/doc/requirements/asynchronous_operations.qbk 2011-03-30 08:58:14 EDT (Wed, 30 Mar 2011)
@@ -137,7 +137,7 @@
void* asio_handler_allocate(size_t size,
bound_read_handler<ReadHandler>* this_handler)
{
- using namespace boost::asio;
+ using boost::asio::asio_handler_allocate;
return asio_handler_allocate(size, &this_handler->handler_);
}
@@ -145,7 +145,7 @@
void asio_handler_deallocate(void* pointer, std::size_t size,
bound_read_handler<ReadHandler>* this_handler)
{
- using namespace boost::asio;
+ using boost::asio::asio_handler_deallocate;
asio_handler_deallocate(pointer, size, &this_handler->handler_);
}
@@ -153,7 +153,7 @@
void asio_handler_invoke(const F& f,
bound_read_handler<ReadHandler>* this_handler)
{
- using namespace boost::asio;
+ using boost::asio::asio_handler_invoke;
asio_handler_invoke(f, &this_handler->handler_);
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk