From: Wolfgang Bangerth Date: Sun, 7 May 2023 17:15:09 +0000 (-0600) Subject: Mark special functions as =deleted. X-Git-Tag: v9.5.0-rc1~253^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0194a36b382005b260f044226a84542a27e9e6d;p=dealii.git Mark special functions as =deleted. --- diff --git a/include/deal.II/base/scope_exit.h b/include/deal.II/base/scope_exit.h index 202fb28529..b7fb2d014b 100644 --- a/include/deal.II/base/scope_exit.h +++ b/include/deal.II/base/scope_exit.h @@ -140,11 +140,24 @@ public: */ ScopeExit(const std::function &exit_function); + /** + * Copy constructor. These kinds of objects cannot be copied, so the + * constructor is deleted. + */ + ScopeExit(const ScopeExit &) = delete; + /** * Destructor. Execute the stored action. */ ~ScopeExit(); + /** + * Copy operator. These kinds of objects cannot be copied, so the + * operator is deleted. + */ + ScopeExit & + operator=(const ScopeExit &) = delete; + private: /** * A copy of the function to be executed.