lundi 26 septembre 2016

About create boost.asio async_xxxx handler object

I am reading Boost.Asio source code, but there is the code I am confused. Has anyone help to explain for better understand, or some materials I can refer for understanding? Thanks.

http://ift.tt/2dnwx3w

especially for:

typedef reactive_null_buffers_op<Handler> op;
typename op::ptr p = { boost::asio::detail::addressof(handler),
  boost_asio_handler_alloc_helpers::allocate(
    sizeof(op), handler), 0 };
p.p = new (p.v) op(handler);

Thanks.

Aucun commentaire:

Enregistrer un commentaire