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:
parent
7dcdf2df22
commit
2af1b5edd5
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user