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:
parent
97b2e916c1
commit
2103e4b05f
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue