From da0bcfbb63374c9e28932982c18043f001c86b8a Mon Sep 17 00:00:00 2001 From: sha512sum Date: Tue, 11 Jun 2024 08:21:08 +0000 Subject: [PATCH] Fixes --- include/cserver/engine/basic/task_processor.hpp | 2 +- include/cserver/engine/coroutine.hpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/cserver/engine/basic/task_processor.hpp b/include/cserver/engine/basic/task_processor.hpp index 406fb53..c19864d 100644 --- a/include/cserver/engine/basic/task_processor.hpp +++ b/include/cserver/engine/basic/task_processor.hpp @@ -15,7 +15,7 @@ struct TaskProcessor { pool{} { }; - inline constexpr ~TaskProcessor() { + inline ~TaskProcessor() { for(auto& thread : this->pool) { if(thread && thread->joinable()) { thread->join(); diff --git a/include/cserver/engine/coroutine.hpp b/include/cserver/engine/coroutine.hpp index e3949c4..47054e1 100644 --- a/include/cserver/engine/coroutine.hpp +++ b/include/cserver/engine/coroutine.hpp @@ -61,14 +61,14 @@ struct awaitable_frame_base { public: using Executor = any_io_executor; #if !defined(BOOST_ASIO_DISABLE_AWAITABLE_FRAME_RECYCLING) - auto constexpr operator new(std::size_t size) -> void* { + inline auto operator new(std::size_t size) -> void* { return boost::asio::detail::thread_info_base::allocate( boost::asio::detail::thread_info_base::awaitable_frame_tag(), boost::asio::detail::thread_context::top_of_thread_call_stack(), size); }; - inline constexpr auto operator delete(void* pointer, std::size_t size) -> void { + inline auto operator delete(void* pointer, std::size_t size) -> void { boost::asio::detail::thread_info_base::deallocate( boost::asio::detail::thread_info_base::awaitable_frame_tag(), boost::asio::detail::thread_context::top_of_thread_call_stack(), @@ -99,7 +99,7 @@ public: return Result{this}; }; - inline constexpr auto set_except(std::exception_ptr e) noexcept -> void { + inline auto set_except(std::exception_ptr e) noexcept -> void { pending_exception_ = e; }; @@ -170,7 +170,7 @@ public: inline constexpr auto await_suspend(coroutine_handle) noexcept -> void {}; - inline constexpr auto await_resume() const noexcept { + inline auto await_resume() const noexcept { return this_->attached_thread_->get_executor(); }; };