summaryrefslogtreecommitdiff
path: root/src/util.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.hpp')
-rw-r--r--src/util.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.hpp b/src/util.hpp
index 097e032..4965ae7 100644
--- a/src/util.hpp
+++ b/src/util.hpp
@@ -4,6 +4,11 @@
#include <tuple>
namespace WebStat {
+ template<auto Deleter>
+ using DeleteWith = decltype([](auto obj) {
+ return Deleter(obj);
+ });
+
template<typename... T>
auto
visit(auto && visitor, const std::tuple<T...> & values)