summaryrefslogtreecommitdiffhomepage
path: root/compat/overloaded.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-04-07 00:20:13 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-04-07 00:20:13 +0200
commitc3fec2466ed44e3d65b8dceb5a80bc621176d45d (patch)
treebb1afdd6ca8e23a2d3098d1253985d82a45eff16 /compat/overloaded.hpp
parent9cc74826f71bfc08595ff93ac931c751f52c833c (diff)
b
Diffstat (limited to 'compat/overloaded.hpp')
-rw-r--r--compat/overloaded.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/compat/overloaded.hpp b/compat/overloaded.hpp
new file mode 100644
index 00000000..77cfc9dc
--- /dev/null
+++ b/compat/overloaded.hpp
@@ -0,0 +1,8 @@
+#pragma once
+
+namespace floormat {
+
+template<typename... Ts> struct overloaded : Ts... { using Ts::operator()...; };
+template<typename... Ts> overloaded(Ts...) -> overloaded<Ts...>;
+
+} // namespace floormat