std::bind is superfluous in some examples

This commit is contained in:
Mohammad Nejati
2024-05-31 16:45:52 +03:30
committed by Mohammad Nejati
parent cf72589ae9
commit 6dd3cf7ab1
5 changed files with 23 additions and 25 deletions
@@ -108,9 +108,9 @@ int main(int argc, char* argv[])
acceptor.accept(socket);
// Launch the session, transferring ownership of the socket
std::thread(
&do_session,
std::move(socket)).detach();
std::thread{
do_session,
std::move(socket)}.detach();
}
}
catch (const std::exception& e)