Defaulted copying

This commit is contained in:
Herb Sutter 2021-02-24 16:12:13 -08:00
parent 39e956b9b1
commit e9c575300e

View File

@ -53,7 +53,11 @@ class final_action
{
public:
explicit final_action(F f) : f_(std::move(f)) { }
~final_action() noexcept { f_(); }
~final_action() { f_(); }
final_action(const final_action&) = default;
final_action& operator=(const final_action&) = default;
private:
F f_;
};