Made helper classes final

This commit is contained in:
Paul-Louis Ageneau
2021-02-28 17:18:02 +01:00
parent 3227d58e74
commit 3e9a769ca1

View File

@ -41,7 +41,7 @@ template <typename F, typename T, typename... Args> auto weak_bind(F &&f, T *t,
}
// scope_guard helper
class scope_guard {
class scope_guard final {
public:
scope_guard(std::function<void()> func) : function(std::move(func)) {}
scope_guard(scope_guard &&other) = delete;
@ -58,7 +58,7 @@ private:
};
// callback with built-in synchronization
template <typename... Args> class synchronized_callback {
template <typename... Args> class synchronized_callback final {
public:
synchronized_callback() = default;
synchronized_callback(synchronized_callback &&cb) { *this = std::move(cb); }