Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58627 - in trunk: boost/asio/detail boost/asio/impl libs/asio/example/porthopper
From: chris_at_[hidden]
Date: 2010-01-02 03:24:14


Author: chris_kohlhoff
Date: 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
New Revision: 58627
URL: http://svn.boost.org/trac/boost/changeset/58627

Log:
Use boost::addressof to get the address of handler objects, rather than
applying operator& directly. Refs #2977.

Text files modified:
   trunk/boost/asio/detail/bind_handler.hpp | 30 +++++++++++++++---------------
   trunk/boost/asio/detail/handler_alloc_helpers.hpp | 15 ++++++++-------
   trunk/boost/asio/detail/handler_base_from_member.hpp | 6 +++---
   trunk/boost/asio/detail/handler_invoke_helpers.hpp | 5 +++--
   trunk/boost/asio/detail/handler_queue.hpp | 2 +-
   trunk/boost/asio/detail/indirect_handler_queue.hpp | 2 +-
   trunk/boost/asio/detail/strand_service.hpp | 4 ++--
   trunk/boost/asio/detail/task_io_service.hpp | 2 +-
   trunk/boost/asio/detail/task_io_service_2lock.hpp | 2 +-
   trunk/boost/asio/detail/win_iocp_handle_service.hpp | 4 ++--
   trunk/boost/asio/detail/win_iocp_io_service.hpp | 4 ++--
   trunk/boost/asio/detail/win_iocp_overlapped_ptr.hpp | 2 +-
   trunk/boost/asio/detail/win_iocp_socket_service.hpp | 10 +++++-----
   trunk/boost/asio/detail/wrapped_handler.hpp | 10 +++++-----
   trunk/boost/asio/impl/read.ipp | 12 ++++++------
   trunk/boost/asio/impl/read_at.ipp | 12 ++++++------
   trunk/boost/asio/impl/read_until.ipp | 24 ++++++++++++------------
   trunk/boost/asio/impl/write.ipp | 12 ++++++------
   trunk/boost/asio/impl/write_at.ipp | 12 ++++++------
   trunk/libs/asio/example/porthopper/client.cpp | 12 ++++++------
   20 files changed, 92 insertions(+), 90 deletions(-)

Modified: trunk/boost/asio/detail/bind_handler.hpp
==============================================================================
--- trunk/boost/asio/detail/bind_handler.hpp (original)
+++ trunk/boost/asio/detail/bind_handler.hpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -54,7 +54,7 @@
     binder1<Handler, Arg1>* this_handler)
 {
   return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
 }
 
 template <typename Handler, typename Arg1>
@@ -62,7 +62,7 @@
     binder1<Handler, Arg1>* this_handler)
 {
   boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
 }
 
 template <typename Function, typename Handler, typename Arg1>
@@ -70,7 +70,7 @@
     binder1<Handler, Arg1>* this_handler)
 {
   boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
 }
 
 template <typename Handler, typename Arg1>
@@ -112,7 +112,7 @@
     binder2<Handler, Arg1, Arg2>* this_handler)
 {
   return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
 }
 
 template <typename Handler, typename Arg1, typename Arg2>
@@ -120,7 +120,7 @@
     binder2<Handler, Arg1, Arg2>* this_handler)
 {
   boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
 }
 
 template <typename Function, typename Handler, typename Arg1, typename Arg2>
@@ -128,7 +128,7 @@
     binder2<Handler, Arg1, Arg2>* this_handler)
 {
   boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
 }
 
 template <typename Handler, typename Arg1, typename Arg2>
@@ -173,7 +173,7 @@
     binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
 {
   return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
 }
 
 template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
@@ -181,7 +181,7 @@
     binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
 {
   boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
 }
 
 template <typename Function, typename Handler, typename Arg1, typename Arg2,
@@ -190,7 +190,7 @@
     binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
 {
   boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
 }
 
 template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
@@ -239,7 +239,7 @@
     binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
 {
   return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
 }
 
 template <typename Handler, typename Arg1, typename Arg2, typename Arg3,
@@ -248,7 +248,7 @@
     binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
 {
   boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
 }
 
 template <typename Function, typename Handler, typename Arg1, typename Arg2,
@@ -257,7 +257,7 @@
     binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
 {
   boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
 }
 
 template <typename Handler, typename Arg1, typename Arg2, typename Arg3,
@@ -311,7 +311,7 @@
     binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
 {
   return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
 }
 
 template <typename Handler, typename Arg1, typename Arg2, typename Arg3,
@@ -320,7 +320,7 @@
     binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
 {
   boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
 }
 
 template <typename Function, typename Handler, typename Arg1, typename Arg2,
@@ -329,7 +329,7 @@
     binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
 {
   boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
 }
 
 template <typename Handler, typename Arg1, typename Arg2, typename Arg3,

Modified: trunk/boost/asio/detail/handler_alloc_helpers.hpp
==============================================================================
--- trunk/boost/asio/detail/handler_alloc_helpers.hpp (original)
+++ trunk/boost/asio/detail/handler_alloc_helpers.hpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -19,6 +19,7 @@
 
 #include <boost/asio/detail/push_options.hpp>
 #include <boost/detail/workaround.hpp>
+#include <boost/utility/addressof.hpp>
 #include <boost/asio/detail/pop_options.hpp>
 
 #include <boost/asio/handler_alloc_hook.hpp>
@@ -30,24 +31,24 @@
 namespace boost_asio_handler_alloc_helpers {
 
 template <typename Handler>
-inline void* allocate(std::size_t s, Handler* h)
+inline void* allocate(std::size_t s, Handler& h)
 {
 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
   return ::operator new(s);
 #else
   using namespace boost::asio;
- return asio_handler_allocate(s, h);
+ return asio_handler_allocate(s, boost::addressof(h));
 #endif
 }
 
 template <typename Handler>
-inline void deallocate(void* p, std::size_t s, Handler* h)
+inline void deallocate(void* p, std::size_t s, Handler& h)
 {
 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
   ::operator delete(p);
 #else
   using namespace boost::asio;
- asio_handler_deallocate(p, s, h);
+ asio_handler_deallocate(p, s, boost::addressof(h));
 #endif
 }
 
@@ -85,7 +86,7 @@
   raw_handler_ptr(handler_type& handler)
     : handler_(handler),
       pointer_(static_cast<pointer_type>(
- boost_asio_handler_alloc_helpers::allocate(value_size, &handler_)))
+ boost_asio_handler_alloc_helpers::allocate(value_size, handler_)))
   {
   }
 
@@ -95,7 +96,7 @@
   {
     if (pointer_)
       boost_asio_handler_alloc_helpers::deallocate(
- pointer_, value_size, &handler_);
+ pointer_, value_size, handler_);
   }
 
 private:
@@ -239,7 +240,7 @@
     {
       pointer_->value_type::~value_type();
       boost_asio_handler_alloc_helpers::deallocate(
- pointer_, value_size, &handler_);
+ pointer_, value_size, handler_);
       pointer_ = 0;
     }
   }

Modified: trunk/boost/asio/detail/handler_base_from_member.hpp
==============================================================================
--- trunk/boost/asio/detail/handler_base_from_member.hpp (original)
+++ trunk/boost/asio/detail/handler_base_from_member.hpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -50,7 +50,7 @@
     handler_base_from_member<Handler>* this_handler)
 {
   return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
 }
 
 template <typename Handler>
@@ -58,7 +58,7 @@
     handler_base_from_member<Handler>* this_handler)
 {
   boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
 }
 
 template <typename Function, typename Handler>
@@ -66,7 +66,7 @@
     handler_base_from_member<Handler>* this_handler)
 {
   boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
 }
 
 } // namespace detail

Modified: trunk/boost/asio/detail/handler_invoke_helpers.hpp
==============================================================================
--- trunk/boost/asio/detail/handler_invoke_helpers.hpp (original)
+++ trunk/boost/asio/detail/handler_invoke_helpers.hpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -19,6 +19,7 @@
 
 #include <boost/asio/detail/push_options.hpp>
 #include <boost/detail/workaround.hpp>
+#include <boost/utility/addressof.hpp>
 #include <boost/asio/detail/pop_options.hpp>
 
 #include <boost/asio/handler_invoke_hook.hpp>
@@ -29,14 +30,14 @@
 namespace boost_asio_handler_invoke_helpers {
 
 template <typename Function, typename Context>
-inline void invoke(const Function& function, Context* context)
+inline void invoke(const Function& function, Context& context)
 {
 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
   Function tmp(function);
   tmp();
 #else
   using namespace boost::asio;
- asio_handler_invoke(function, context);
+ asio_handler_invoke(function, boost::addressof(context));
 #endif
 }
 

Modified: trunk/boost/asio/detail/handler_queue.hpp
==============================================================================
--- trunk/boost/asio/detail/handler_queue.hpp (original)
+++ trunk/boost/asio/detail/handler_queue.hpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -189,7 +189,7 @@
       ptr.reset();
 
       // Make the upcall.
- boost_asio_handler_invoke_helpers::invoke(handler, &handler);
+ boost_asio_handler_invoke_helpers::invoke(handler, handler);
     }
 
     static void do_destroy(handler* base)

Modified: trunk/boost/asio/detail/indirect_handler_queue.hpp
==============================================================================
--- trunk/boost/asio/detail/indirect_handler_queue.hpp (original)
+++ trunk/boost/asio/detail/indirect_handler_queue.hpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -236,7 +236,7 @@
       ptr.reset();
 
       // Make the upcall.
- boost_asio_handler_invoke_helpers::invoke(handler, &handler);
+ boost_asio_handler_invoke_helpers::invoke(handler, handler);
     }
 
     static void do_destroy(handler* base)

Modified: trunk/boost/asio/detail/strand_service.hpp
==============================================================================
--- trunk/boost/asio/detail/strand_service.hpp (original)
+++ trunk/boost/asio/detail/strand_service.hpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -331,7 +331,7 @@
       call_stack<strand_impl>::context ctx(impl.get());
 
       // Make the upcall.
- boost_asio_handler_invoke_helpers::invoke(handler, &handler);
+ boost_asio_handler_invoke_helpers::invoke(handler, handler);
     }
 
     static void do_destroy(handler_base* base)
@@ -418,7 +418,7 @@
   {
     if (call_stack<strand_impl>::contains(impl.get()))
     {
- boost_asio_handler_invoke_helpers::invoke(handler, &handler);
+ boost_asio_handler_invoke_helpers::invoke(handler, handler);
     }
     else
     {

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 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -177,7 +177,7 @@
   void dispatch(Handler handler)
   {
     if (call_stack<task_io_service>::contains(this))
- boost_asio_handler_invoke_helpers::invoke(handler, &handler);
+ boost_asio_handler_invoke_helpers::invoke(handler, handler);
     else
       post(handler);
   }

Modified: trunk/boost/asio/detail/task_io_service_2lock.hpp
==============================================================================
--- trunk/boost/asio/detail/task_io_service_2lock.hpp (original)
+++ trunk/boost/asio/detail/task_io_service_2lock.hpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -207,7 +207,7 @@
   void dispatch(Handler handler)
   {
     if (call_stack<task_io_service>::contains(this))
- boost_asio_handler_invoke_helpers::invoke(handler, &handler);
+ boost_asio_handler_invoke_helpers::invoke(handler, handler);
     else
       post(handler);
   }

Modified: trunk/boost/asio/detail/win_iocp_handle_service.hpp
==============================================================================
--- trunk/boost/asio/detail/win_iocp_handle_service.hpp (original)
+++ trunk/boost/asio/detail/win_iocp_handle_service.hpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -415,7 +415,7 @@
       boost::system::error_code ec(last_error,
           boost::asio::error::get_system_category());
       boost_asio_handler_invoke_helpers::invoke(
- bind_handler(handler, ec, bytes_transferred), &handler);
+ bind_handler(handler, ec, bytes_transferred), handler);
     }
 
     static void destroy_impl(operation* op)
@@ -667,7 +667,7 @@
 
       // Call the handler.
       boost_asio_handler_invoke_helpers::invoke(
- bind_handler(handler, ec, bytes_transferred), &handler);
+ bind_handler(handler, ec, bytes_transferred), handler);
     }
 
     static void destroy_impl(operation* op)

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 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -319,7 +319,7 @@
   void dispatch(Handler handler)
   {
     if (call_stack<win_iocp_io_service>::contains(this))
- boost_asio_handler_invoke_helpers::invoke(handler, &handler);
+ boost_asio_handler_invoke_helpers::invoke(handler, handler);
     else
       post(handler);
   }
@@ -684,7 +684,7 @@
       ptr.reset();
 
       // Make the upcall.
- boost_asio_handler_invoke_helpers::invoke(handler, &handler);
+ boost_asio_handler_invoke_helpers::invoke(handler, handler);
     }
 
     static void destroy_impl(operation* op)

Modified: trunk/boost/asio/detail/win_iocp_overlapped_ptr.hpp
==============================================================================
--- trunk/boost/asio/detail/win_iocp_overlapped_ptr.hpp (original)
+++ trunk/boost/asio/detail/win_iocp_overlapped_ptr.hpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -173,7 +173,7 @@
 
       // Make the upcall.
       boost_asio_handler_invoke_helpers::invoke(
- bind_handler(handler, ec, bytes_transferred), &handler);
+ bind_handler(handler, ec, bytes_transferred), handler);
     }
 
     static void destroy_impl(win_iocp_io_service::operation* op)

Modified: trunk/boost/asio/detail/win_iocp_socket_service.hpp
==============================================================================
--- trunk/boost/asio/detail/win_iocp_socket_service.hpp (original)
+++ trunk/boost/asio/detail/win_iocp_socket_service.hpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -789,7 +789,7 @@
 
       // Call the handler.
       boost_asio_handler_invoke_helpers::invoke(
- detail::bind_handler(handler, ec, bytes_transferred), &handler);
+ detail::bind_handler(handler, ec, bytes_transferred), handler);
     }
 
     static void destroy_impl(operation* op)
@@ -1064,7 +1064,7 @@
 
       // Call the handler.
       boost_asio_handler_invoke_helpers::invoke(
- detail::bind_handler(handler, ec, bytes_transferred), &handler);
+ detail::bind_handler(handler, ec, bytes_transferred), handler);
     }
 
     static void destroy_impl(operation* op)
@@ -1333,7 +1333,7 @@
 
       // Call the handler.
       boost_asio_handler_invoke_helpers::invoke(
- detail::bind_handler(handler, ec, bytes_transferred), &handler);
+ detail::bind_handler(handler, ec, bytes_transferred), handler);
     }
 
     static void destroy_impl(operation* op)
@@ -1660,7 +1660,7 @@
 
       // Call the handler.
       boost_asio_handler_invoke_helpers::invoke(
- detail::bind_handler(handler, ec, bytes_transferred), &handler);
+ detail::bind_handler(handler, ec, bytes_transferred), handler);
     }
 
     static void destroy_impl(operation* op)
@@ -2021,7 +2021,7 @@
       boost::system::error_code ec(last_error,
           boost::asio::error::get_system_category());
       boost_asio_handler_invoke_helpers::invoke(
- detail::bind_handler(handler, ec), &handler);
+ detail::bind_handler(handler, ec), handler);
     }
 
     static void destroy_impl(operation* op)

Modified: trunk/boost/asio/detail/wrapped_handler.hpp
==============================================================================
--- trunk/boost/asio/detail/wrapped_handler.hpp (original)
+++ trunk/boost/asio/detail/wrapped_handler.hpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -158,7 +158,7 @@
     wrapped_handler<Dispatcher, Handler>* this_handler)
 {
   return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
 }
 
 template <typename Dispatcher, typename Handler>
@@ -166,7 +166,7 @@
     wrapped_handler<Dispatcher, Handler>* this_handler)
 {
   boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
 }
 
 template <typename Function, typename Dispatcher, typename Handler>
@@ -183,7 +183,7 @@
     rewrapped_handler<Handler, Context>* this_handler)
 {
   return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->context_);
+ size, this_handler->context_);
 }
 
 template <typename Handler, typename Context>
@@ -191,7 +191,7 @@
     rewrapped_handler<Handler, Context>* this_handler)
 {
   boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->context_);
+ pointer, size, this_handler->context_);
 }
 
 template <typename Function, typename Handler, typename Context>
@@ -199,7 +199,7 @@
     rewrapped_handler<Handler, Context>* this_handler)
 {
   boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->context_);
+ function, this_handler->context_);
 }
 
 } // namespace detail

Modified: trunk/boost/asio/impl/read.ipp
==============================================================================
--- trunk/boost/asio/impl/read.ipp (original)
+++ trunk/boost/asio/impl/read.ipp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -174,7 +174,7 @@
         CompletionCondition, ReadHandler>* this_handler)
   {
     return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
   }
 
   template <typename AsyncReadStream, typename MutableBufferSequence,
@@ -184,7 +184,7 @@
         CompletionCondition, ReadHandler>* this_handler)
   {
     boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncReadStream,
@@ -195,7 +195,7 @@
         CompletionCondition, ReadHandler>* this_handler)
   {
     boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
   }
 } // namespace detail
 
@@ -285,7 +285,7 @@
         CompletionCondition, ReadHandler>* this_handler)
   {
     return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
   }
 
   template <typename AsyncReadStream, typename Allocator,
@@ -295,7 +295,7 @@
         CompletionCondition, ReadHandler>* this_handler)
   {
     boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncReadStream,
@@ -305,7 +305,7 @@
         CompletionCondition, ReadHandler>* this_handler)
   {
     boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
   }
 } // namespace detail
 

Modified: trunk/boost/asio/impl/read_at.ipp
==============================================================================
--- trunk/boost/asio/impl/read_at.ipp (original)
+++ trunk/boost/asio/impl/read_at.ipp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -184,7 +184,7 @@
         CompletionCondition, ReadHandler>* this_handler)
   {
     return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
   }
 
   template <typename AsyncRandomAccessReadDevice,
@@ -195,7 +195,7 @@
         CompletionCondition, ReadHandler>* this_handler)
   {
     boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncRandomAccessReadDevice,
@@ -206,7 +206,7 @@
         CompletionCondition, ReadHandler>* this_handler)
   {
     boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
   }
 } // namespace detail
 
@@ -301,7 +301,7 @@
         CompletionCondition, ReadHandler>* this_handler)
   {
     return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
   }
 
   template <typename AsyncRandomAccessReadDevice, typename Allocator,
@@ -311,7 +311,7 @@
         CompletionCondition, ReadHandler>* this_handler)
   {
     boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncRandomAccessReadDevice,
@@ -321,7 +321,7 @@
         CompletionCondition, ReadHandler>* this_handler)
   {
     boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
   }
 } // namespace detail
 

Modified: trunk/boost/asio/impl/read_until.ipp
==============================================================================
--- trunk/boost/asio/impl/read_until.ipp (original)
+++ trunk/boost/asio/impl/read_until.ipp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -404,7 +404,7 @@
         Allocator, ReadHandler>* this_handler)
   {
     return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
   }
 
   template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
@@ -413,7 +413,7 @@
         Allocator, ReadHandler>* this_handler)
   {
     boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncReadStream, typename Allocator,
@@ -423,7 +423,7 @@
         Allocator, ReadHandler>* this_handler)
   {
     boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
   }
 } // namespace detail
 
@@ -560,7 +560,7 @@
         Allocator, ReadHandler>* this_handler)
   {
     return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
   }
 
   template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
@@ -569,7 +569,7 @@
         Allocator, ReadHandler>* this_handler)
   {
     boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncReadStream,
@@ -579,7 +579,7 @@
         Allocator, ReadHandler>* this_handler)
   {
     boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
   }
 } // namespace detail
 
@@ -733,7 +733,7 @@
         Allocator, ReadHandler>* this_handler)
   {
     return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
   }
 
   template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
@@ -742,7 +742,7 @@
         Allocator, ReadHandler>* this_handler)
   {
     boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncReadStream, typename Allocator,
@@ -752,7 +752,7 @@
         Allocator, ReadHandler>* this_handler)
   {
     boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
   }
 } // namespace detail
 
@@ -903,7 +903,7 @@
         Allocator, MatchCondition, ReadHandler>* this_handler)
   {
     return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
   }
 
   template <typename AsyncReadStream, typename Allocator,
@@ -913,7 +913,7 @@
         Allocator, MatchCondition, ReadHandler>* this_handler)
   {
     boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncReadStream, typename Allocator,
@@ -923,7 +923,7 @@
         Allocator, MatchCondition, ReadHandler>* this_handler)
   {
     boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
   }
 } // namespace detail
 

Modified: trunk/boost/asio/impl/write.ipp
==============================================================================
--- trunk/boost/asio/impl/write.ipp (original)
+++ trunk/boost/asio/impl/write.ipp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -155,7 +155,7 @@
         CompletionCondition, WriteHandler>* this_handler)
   {
     return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
   }
 
   template <typename AsyncWriteStream, typename ConstBufferSequence,
@@ -165,7 +165,7 @@
         CompletionCondition, WriteHandler>* this_handler)
   {
     boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncWriteStream,
@@ -176,7 +176,7 @@
         CompletionCondition, WriteHandler>* this_handler)
   {
     boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
   }
 } // namespace detail
 
@@ -246,7 +246,7 @@
         Allocator, WriteHandler>* this_handler)
   {
     return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
   }
 
   template <typename AsyncWriteStream, typename Allocator,
@@ -256,7 +256,7 @@
         Allocator, WriteHandler>* this_handler)
   {
     boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncWriteStream, typename Allocator,
@@ -266,7 +266,7 @@
         Allocator, WriteHandler>* this_handler)
   {
     boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
   }
 } // namespace detail
 

Modified: trunk/boost/asio/impl/write_at.ipp
==============================================================================
--- trunk/boost/asio/impl/write_at.ipp (original)
+++ trunk/boost/asio/impl/write_at.ipp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -167,7 +167,7 @@
         CompletionCondition, WriteHandler>* this_handler)
   {
     return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
   }
 
   template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
@@ -177,7 +177,7 @@
         CompletionCondition, WriteHandler>* this_handler)
   {
     boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncRandomAccessWriteDevice,
@@ -188,7 +188,7 @@
         CompletionCondition, WriteHandler>* this_handler)
   {
     boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
   }
 } // namespace detail
 
@@ -261,7 +261,7 @@
         Allocator, WriteHandler>* this_handler)
   {
     return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
+ size, this_handler->handler_);
   }
 
   template <typename AsyncRandomAccessWriteDevice, typename Allocator,
@@ -271,7 +271,7 @@
         Allocator, WriteHandler>* this_handler)
   {
     boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
+ pointer, size, this_handler->handler_);
   }
 
   template <typename Function, typename AsyncRandomAccessWriteDevice,
@@ -281,7 +281,7 @@
         Allocator, WriteHandler>* this_handler)
   {
     boost_asio_handler_invoke_helpers::invoke(
- function, &this_handler->handler_);
+ function, this_handler->handler_);
   }
 } // namespace detail
 

Modified: trunk/libs/asio/example/porthopper/client.cpp
==============================================================================
--- trunk/libs/asio/example/porthopper/client.cpp (original)
+++ trunk/libs/asio/example/porthopper/client.cpp 2010-01-02 03:24:12 EST (Sat, 02 Jan 2010)
@@ -92,9 +92,9 @@
           data_endpoint.port(), new_data_endpoint.port());
       boost::system::error_code control_result;
       boost::asio::async_write(control_socket, change.to_buffers(),
- lambda::unlambda((
+ (
             lambda::var(control_result) = lambda::_1
- )));
+ ));
 
       // Try to receive a frame from the server on the new data socket. If we
       // successfully receive a frame on this new data socket we can consider
@@ -104,7 +104,7 @@
       frame f1;
       boost::system::error_code new_data_socket_result;
       new_data_socket->async_receive(f1.to_buffers(),
- lambda::unlambda((
+ (
             // Note: lambda::_1 is the first argument to the callback handler,
             // which in this case is the error code for the operation.
             lambda::var(new_data_socket_result) = lambda::_1,
@@ -115,7 +115,7 @@
               // outstanding receive operation on the old data socket.
               lambda::var(data_socket) = shared_ptr<udp::socket>()
             ]
- )));
+ ));
 
       // This loop will continue until we have successfully completed the
       // renegotiation (i.e. received a frame on the new data socket), or some
@@ -134,7 +134,7 @@
         if (data_socket) // Might have been closed by new_data_socket's handler.
         {
           data_socket->async_receive(f2.to_buffers(), 0,
- lambda::unlambda((
+ (
                 lambda::if_(!lambda::_1)
                 [
                   // We have successfully received a frame on the old data
@@ -142,7 +142,7 @@
                   lambda::bind(&boost::asio::io_service::stop, &io_service),
                   lambda::var(done) = false
                 ]
- )));
+ ));
         }
 
         // Run the operations in parallel. This will block until all operations


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