Compilation fixes

This commit is contained in:
Paul-Louis Ageneau
2020-06-04 14:08:21 +02:00
parent c823249a72
commit 6c8fe8ca51
5 changed files with 11 additions and 5 deletions

View File

@ -75,14 +75,14 @@ template <typename F, typename T, typename... Args> auto weak_bind(F &&f, T *t,
if (auto shared_this = weak_this.lock())
return bound(args...);
else
return (result_type) false;
return static_cast<result_type>(false);
};
}
template <typename... P> class synchronized_callback {
public:
synchronized_callback() = default;
synchronized_callback(std::function<void(P...)> func) { *this = std::move(func); };
synchronized_callback(std::function<void(P...)> func) { *this = std::move(func); }
~synchronized_callback() { *this = nullptr; }
synchronized_callback &operator=(std::function<void(P...)> func) {