From bd84442f1c01a5b1cdeb32bb61c500b46a09a1ba Mon Sep 17 00:00:00 2001 From: arekmula Date: Fri, 23 Feb 2024 17:47:06 +0100 Subject: [PATCH] Fix GCC explicit specialization in non namespace scope error --- support-lib/cpp/Future.hpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/support-lib/cpp/Future.hpp b/support-lib/cpp/Future.hpp index fe732ad8..fc2adffb 100644 --- a/support-lib/cpp/Future.hpp +++ b/support-lib/cpp/Future.hpp @@ -383,16 +383,18 @@ class Future { this->_promise.setValue(std::forward(value)); } }; - template <> - struct PromiseType: PromiseTypeBase { - void return_void() { - this->_promise.setValue(); - } - }; using promise_type = PromiseType; #endif }; +#if defined(DJINNI_FUTURE_HAS_COROUTINE_SUPPORT) +template<> template<> struct Future::PromiseType:PromiseTypeBase { + void return_void() { + this->_promise.setValue(); + } +}; +#endif + template Future detail::PromiseBase::getFuture() { return Future(_sharedStateReadOnly);