scoped: declare copy and move constructors
they aren't defined currently because we haven't needed them. this is just to avoid accidents where the defaults will prove problematic.
This commit is contained in:
parent
3722c8aaa3
commit
db90a4db53
@ -87,9 +87,8 @@ namespace util::scoped {
|
||||
m_args (std::forward<Args> (_args)...)
|
||||
{ ; }
|
||||
|
||||
|
||||
void disable (void) { m_enabled = false; }
|
||||
|
||||
function (function&&);
|
||||
function (const function&);
|
||||
|
||||
~function ()
|
||||
{
|
||||
@ -97,6 +96,8 @@ namespace util::scoped {
|
||||
std::apply (std::move (m_function), std::move (m_args));
|
||||
}
|
||||
|
||||
void disable (void) { m_enabled = false; }
|
||||
|
||||
private:
|
||||
bool m_enabled = true;
|
||||
FuncT m_function;
|
||||
|
Loading…
Reference in New Issue
Block a user