1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

add overloaded helper util for std::visit

Signed-off-by: Philipp Jungkamp <Philipp.Jungkamp@opal-rt.com>
This commit is contained in:
Philipp Jungkamp 2023-06-13 17:01:55 +02:00 committed by Steffen Vogel
parent 97b2e916c1
commit 2103e4b05f

View file

@ -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<class... Ts>
struct overloaded : Ts... { using Ts::operator()...; };
// explicit deduction guide (not needed as of C++20)
template<class... Ts>
overloaded(Ts...) -> overloaded<Ts...>;
namespace base64 {
using byte = std::uint8_t;