Index: reactor_op_queue.hpp =================================================================== --- reactor_op_queue.hpp (revision 58914) +++ reactor_op_queue.hpp (working copy) @@ -371,11 +371,12 @@ class op : public op_base { + typedef op this_type; public: // Constructor. op(Descriptor descriptor, Operation operation) - : op_base(&op::do_perform, &op::do_complete, - &op::do_destroy, descriptor), + : op_base(&this_type::do_perform, &this_type::do_complete, + &this_type::do_destroy, descriptor), operation_(operation) { } @@ -384,7 +385,7 @@ static bool do_perform(op_base* base, boost::system::error_code& result, std::size_t& bytes_transferred) { - return static_cast*>(base)->operation_.perform( + return static_cast(base)->operation_.perform( result, bytes_transferred); } @@ -393,7 +394,6 @@ const boost::system::error_code& result, std::size_t bytes_transferred) { // Take ownership of the operation object. - typedef op this_type; this_type* this_op(static_cast(base)); typedef handler_alloc_traits alloc_traits; handler_ptr ptr(this_op->operation_, this_op); @@ -414,7 +414,6 @@ static void do_destroy(op_base* base) { // Take ownership of the operation object. - typedef op this_type; this_type* this_op(static_cast(base)); typedef handler_alloc_traits alloc_traits; handler_ptr ptr(this_op->operation_, this_op);