Ticket #3845: reactor_op_queue.patch
File reactor_op_queue.patch, 1.7 KB (added by , 13 years ago) |
---|
-
reactor_op_queue.hpp
371 371 class op 372 372 : public op_base 373 373 { 374 typedef op<Operation> this_type; 374 375 public: 375 376 // Constructor. 376 377 op(Descriptor descriptor, Operation operation) 377 : op_base(& op<Operation>::do_perform, &op<Operation>::do_complete,378 & op<Operation>::do_destroy, descriptor),378 : op_base(&this_type::do_perform, &this_type::do_complete, 379 &this_type::do_destroy, descriptor), 379 380 operation_(operation) 380 381 { 381 382 } … … 384 385 static bool do_perform(op_base* base, 385 386 boost::system::error_code& result, std::size_t& bytes_transferred) 386 387 { 387 return static_cast< op<Operation>*>(base)->operation_.perform(388 return static_cast<this_type*>(base)->operation_.perform( 388 389 result, bytes_transferred); 389 390 } 390 391 … … 393 394 const boost::system::error_code& result, std::size_t bytes_transferred) 394 395 { 395 396 // Take ownership of the operation object. 396 typedef op<Operation> this_type;397 397 this_type* this_op(static_cast<this_type*>(base)); 398 398 typedef handler_alloc_traits<Operation, this_type> alloc_traits; 399 399 handler_ptr<alloc_traits> ptr(this_op->operation_, this_op); … … 414 414 static void do_destroy(op_base* base) 415 415 { 416 416 // Take ownership of the operation object. 417 typedef op<Operation> this_type;418 417 this_type* this_op(static_cast<this_type*>(base)); 419 418 typedef handler_alloc_traits<Operation, this_type> alloc_traits; 420 419 handler_ptr<alloc_traits> ptr(this_op->operation_, this_op);