Skip to content

Commit

Permalink
Fix GCC explicit specialization in non namespace scope error
Browse files Browse the repository at this point in the history
  • Loading branch information
arekmula committed Feb 28, 2024
1 parent f077e04 commit bd84442
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions support-lib/cpp/Future.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,16 +383,18 @@ class Future {
this->_promise.setValue(std::forward<V>(value));
}
};
template <>
struct PromiseType<void>: PromiseTypeBase {
void return_void() {
this->_promise.setValue();
}
};
using promise_type = PromiseType<T>;
#endif
};

#if defined(DJINNI_FUTURE_HAS_COROUTINE_SUPPORT)
template<> template<> struct Future<void>::PromiseType<void>:PromiseTypeBase {
void return_void() {
this->_promise.setValue();
}
};
#endif

template <typename T>
Future<T> detail::PromiseBase<T>::getFuture() {
return Future<T>(_sharedStateReadOnly);
Expand Down

0 comments on commit bd84442

Please sign in to comment.