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);