From 230fa8eb7abc769ee42626f699a090d8141c5c2f 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 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/support-lib/cpp/Future.hpp b/support-lib/cpp/Future.hpp index fe732ad8..f04adaa3 100644 --- a/support-lib/cpp/Future.hpp +++ b/support-lib/cpp/Future.hpp @@ -383,16 +383,17 @@ class Future { this->_promise.setValue(std::forward(value)); } }; - template <> - struct PromiseType: PromiseTypeBase { - void return_void() { - this->_promise.setValue(); - } - }; using promise_type = PromiseType; -#endif }; +template<> template<> struct Future::PromiseType:PromiseTypeBase { + void return_void() { + this->_promise.setValue(); + } +} + +#endif + template Future detail::PromiseBase::getFuture() { return Future(_sharedStateReadOnly);