1
0
mirror of synced 2025-06-10 20:21:41 +03:00

Prevent an implicit capture of 'this' via '[=]' (#381)

This commit is contained in:
Oleg Vorobiov
2020-03-12 23:31:22 +07:00
committed by GitHub
parent 26deffe0c6
commit 7b3cea5317

View File

@ -3390,7 +3390,11 @@ inline bool Server::listen_internal() {
break; break;
} }
task_queue->enqueue([=]() { process_and_close_socket(sock); }); #if __cplusplus > 201703L
task_queue->enqueue([=, this]() { process_and_close_socket(sock); });
#else
task_queue->enqueue([=]() { process_and_close_socket(sock); });
#endif
} }
task_queue->shutdown(); task_queue->shutdown();