mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-08 20:12:56 -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 {
|
||||
public:
|
||||
explicit scope_exit(F&& f)
|
||||
: f_{std::forward<F>(f)} {}
|
||||
: f_{std::move(f)} {}
|
||||
~scope_exit() { f_(); }
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user