mirror of
https://github.com/PretendoNetwork/Inkay.git
synced 2026-08-18 11:37:02 +02:00
chore: Introduce common directory to deduplicate shared code
This commit is contained in:
parent
68bc066c7b
commit
ea71879bb1
22 changed files with 110 additions and 278 deletions
|
|
@ -1,13 +0,0 @@
|
|||
#pragma once
|
||||
#include <functional>
|
||||
|
||||
// https://stackoverflow.com/a/61242721
|
||||
template<typename F>
|
||||
struct scope_exit
|
||||
{
|
||||
F func;
|
||||
explicit scope_exit(F&& f): func(std::forward<F>(f)) {}
|
||||
~scope_exit() { func(); }
|
||||
};
|
||||
|
||||
template<typename F> scope_exit(F&& frv) -> scope_exit<F>;
|
||||
Loading…
Reference in a new issue