From e9c575300e2a55f0fb8233e207b7805905cf89b1 Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Wed, 24 Feb 2021 16:12:13 -0800 Subject: [PATCH] Defaulted copying --- include/gsl/util | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/gsl/util b/include/gsl/util index 3e6466c..f853777 100644 --- a/include/gsl/util +++ b/include/gsl/util @@ -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_; };