Made Future::set() only callable on futures with void result to prevent futures that are ready but have no result.
This commit is contained in:
@@ -113,7 +113,7 @@ public: // modification
|
||||
isSet_ = true;
|
||||
sigSet.emit();
|
||||
}
|
||||
constexpr void set() MIJIN_NOEXCEPT
|
||||
constexpr void set() MIJIN_NOEXCEPT requires (std::is_same_v<TValue, void>)
|
||||
{
|
||||
MIJIN_ASSERT(!isSet_, "Trying to set a future twice!");
|
||||
isSet_ = true;
|
||||
|
||||
Reference in New Issue
Block a user