mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-08 09:40:23 +01:00
14 lines
230 B
C++
14 lines
230 B
C++
#pragma once
|
|
|
|
#include <utility>
|
|
|
|
namespace rx {
|
|
template <typename T> class atScopeExit {
|
|
T _object;
|
|
|
|
public:
|
|
atScopeExit(T &&object) : _object(std::forward<T>(object)) {}
|
|
~atScopeExit() { _object(); }
|
|
};
|
|
} // namespace rx
|