mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-09 20:41:04 -04:00
fix(scope_exit): move, don't forward
This commit is contained in:
parent
c68820d40f
commit
328abe1303
@ -29,7 +29,7 @@ template <typename F>
|
|||||||
class scope_exit {
|
class scope_exit {
|
||||||
public:
|
public:
|
||||||
explicit scope_exit(F&& f)
|
explicit scope_exit(F&& f)
|
||||||
: f_{std::forward<F>(f)} {}
|
: f_{std::move(f)} {}
|
||||||
~scope_exit() { f_(); }
|
~scope_exit() { f_(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user