aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-18 14:36:44 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-18 14:36:44 +0000
commit950ddfdb823891136043ae22dce0c66424c57b9d (patch)
tree0c7adf760042911b5631125a22fc8d53fe19ca0d /src/libutil/util.hh
parent9357512d7379337c3636fa495ad7b4bbe3d8266d (diff)
parent1c8b550e34414d0f4cb0fa20322a2dfe06ce2de0 (diff)
Merge remote-tracking branch 'upstream/master' into derivation-header-include-order
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 6850b5a7a..3a20679a8 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -601,4 +601,9 @@ constexpr auto enumerate(T && iterable)
}
+// C++17 std::visit boilerplate
+template<class... Ts> struct overloaded : Ts... { using Ts::operator()...; };
+template<class... Ts> overloaded(Ts...) -> overloaded<Ts...>;
+
+
}