mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-10 01:33:53 +00:00
Prevent an implicit capture of 'this' via '[=]' (#381)
This commit is contained in:
parent
26deffe0c6
commit
7b3cea5317
@ -3390,7 +3390,11 @@ inline bool Server::listen_internal() {
|
||||
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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user