From 47a84ab8895c86d2788dcacae7ec022ba92e0d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanislav=20Angelovi=C4=8D?= Date: Tue, 5 Dec 2023 18:16:59 +0100 Subject: [PATCH] feat: implement Overload pattern in utils (#385) --- src/Utils.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Utils.h b/src/Utils.h index e2913e2..ace4a85 100644 --- a/src/Utils.h +++ b/src/Utils.h @@ -78,6 +78,10 @@ namespace sdbus::internal { return true; } + // Implementation of the overload pattern for variant visitation + template struct overload : Ts... { using Ts::operator()...; }; + template overload(Ts...) -> overload; + } #endif /* SDBUS_CXX_INTERNAL_UTILS_H_ */