From 3286d2df3d75095afb2d3a38ee92d1856850902a Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Wed, 27 Jan 2021 02:31:46 +0100 Subject: [PATCH] Common/VariantUtil: Add 'overloaded' helper struct for use with std::variant. --- Source/Core/Common/VariantUtil.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/Common/VariantUtil.h b/Source/Core/Common/VariantUtil.h index e9e2987d9c..a7c962e9f8 100644 --- a/Source/Core/Common/VariantUtil.h +++ b/Source/Core/Common/VariantUtil.h @@ -26,3 +26,12 @@ auto VariantCast(const std::variant& v) { return detail::VariantCastProxy{v}; } + +template +struct overloaded : Ts... +{ + using Ts::operator()...; +}; + +template +overloaded(Ts...) -> overloaded;