feat: implement Overload pattern in utils (#385)

This commit is contained in:
Stanislav Angelovič
2023-12-05 18:16:59 +01:00
committed by GitHub
parent d80483cdc0
commit 47a84ab889

View File

@@ -78,6 +78,10 @@ namespace sdbus::internal {
return true;
}
// Implementation of the overload pattern for variant visitation
template <class... Ts> struct overload : Ts... { using Ts::operator()...; };
template <class... Ts> overload(Ts...) -> overload<Ts...>;
}
#endif /* SDBUS_CXX_INTERNAL_UTILS_H_ */