mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-13 01:36:15 +02:00
aa3bc3d5dc
Substitution is now simply a Store -> Store copy operation, most typically from BinaryCacheStore to LocalStore.
12 lines
225 B
C++
12 lines
225 B
C++
#pragma once
|
|
|
|
/* A trivial class to run a function at the end of a scope. */
|
|
class Finally
|
|
{
|
|
private:
|
|
std::function<void()> fun;
|
|
|
|
public:
|
|
Finally(std::function<void()> fun) : fun(fun) { }
|
|
~Finally() { fun(); }
|
|
};
|