From 4d3ca3c1c0970eb9964b833d3006ca68ee818d36 Mon Sep 17 00:00:00 2001 From: eidheim Date: Fri, 28 Feb 2020 11:35:57 +0100 Subject: [PATCH] Fixes #291 : added missing inline keyword to make_work_guard --- asio_compatibility.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asio_compatibility.hpp b/asio_compatibility.hpp index 1e6648d..a9abd7c 100644 --- a/asio_compatibility.hpp +++ b/asio_compatibility.hpp @@ -50,7 +50,7 @@ namespace SimpleWeb { void async_resolve(asio::ip::tcp::resolver &resolver, const std::pair &host_port, handler_type &&handler) { resolver.async_resolve(host_port.first, host_port.second, std::forward(handler)); } - asio::executor_work_guard make_work_guard(io_context &context) { + inline asio::executor_work_guard make_work_guard(io_context &context) { return asio::make_work_guard(context); } #else @@ -76,7 +76,7 @@ namespace SimpleWeb { void async_resolve(asio::ip::tcp::resolver &resolver, const std::pair &host_port, handler_type &&handler) { resolver.async_resolve(asio::ip::tcp::resolver::query(host_port.first, host_port.second), std::forward(handler)); } - io_context::work make_work_guard(io_context &context) { + inline io_context::work make_work_guard(io_context &context) { return io_context::work(context); } #endif