aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/types.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/types.hh')
-rw-r--r--src/libutil/types.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libutil/types.hh b/src/libutil/types.hh
index 20b96a85c..a1ce7b372 100644
--- a/src/libutil/types.hh
+++ b/src/libutil/types.hh
@@ -157,4 +157,12 @@ typedef list<Path> Paths;
typedef set<Path> PathSet;
+/* Helper class to run code at startup. */
+template<typename T>
+struct OnStartup
+{
+ OnStartup(T && t) { t(); }
+};
+
+
}