diff --git a/common/include/villas/utils.hpp b/common/include/villas/utils.hpp index 64b7a728b..6736f60b7 100644 --- a/common/include/villas/utils.hpp +++ b/common/include/villas/utils.hpp @@ -194,6 +194,14 @@ bool isContainer(); // Check if the process is running in a privileged environment (has SYS_ADMIN capability). bool isPrivileged(); +// helper type for std::visit +template +struct overloaded : Ts... { using Ts::operator()...; }; + +// explicit deduction guide (not needed as of C++20) +template +overloaded(Ts...) -> overloaded; + namespace base64 { using byte = std::uint8_t;