From 0e7d2f9f939a5e6d54b8d5dad538dd322eb5e835 Mon Sep 17 00:00:00 2001 From: yhirose Date: Tue, 14 Feb 2023 11:40:07 -0500 Subject: [PATCH] Resolve #1482 --- httplib.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/httplib.h b/httplib.h index 709ca2b..8ca9350 100644 --- a/httplib.h +++ b/httplib.h @@ -5598,11 +5598,7 @@ inline bool Server::listen_internal() { #endif } -#if __cplusplus > 201703L - task_queue->enqueue([=, this]() { process_and_close_socket(sock); }); -#else - task_queue->enqueue([=]() { process_and_close_socket(sock); }); -#endif + task_queue->enqueue([this, sock]() { process_and_close_socket(sock); }); } task_queue->shutdown();