Skip to content

std::move on boost::asio::ip::tcp::socket

https://gitlab.com/manning-fpcpp-book/code-examples/-/blob/master/chapter-12/bookmark-service/service.cpp#L19

In this line, std::move is applied on m_socket.

After the construction of the first session object where m_socket is moved, m_socket is still used to construct the following session objects.

Is m_socket still effective after the move operation?

Edited by Lin Hsu