mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-22 13:13:57 +00:00
fixing CI errors
This commit is contained in:
@@ -15,11 +15,18 @@ namespace utils
|
||||
|
||||
public:
|
||||
optional_function() = default;
|
||||
|
||||
optional_function(std::function<Ret(Args...)> f)
|
||||
: func(std::move(f))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename F, typename = std::enable_if_t<std::is_invocable_r_v<Ret, F, Args...>>>
|
||||
optional_function(F&& f)
|
||||
: func(std::forward<F>(f))
|
||||
{
|
||||
}
|
||||
|
||||
optional_function& operator=(std::function<Ret(Args...)> f)
|
||||
{
|
||||
func = std::move(f);
|
||||
@@ -40,6 +47,7 @@ namespace utils
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
explicit operator bool() const noexcept
|
||||
{
|
||||
return static_cast<bool>(func);
|
||||
|
||||
Reference in New Issue
Block a user