Common/VariantUtil: Add 'overloaded' helper struct for use with std::variant.
This commit is contained in:
parent
87ae7ccd75
commit
3286d2df3d
|
@ -26,3 +26,12 @@ auto VariantCast(const std::variant<From...>& v)
|
||||||
{
|
{
|
||||||
return detail::VariantCastProxy<From...>{v};
|
return detail::VariantCastProxy<From...>{v};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class... Ts>
|
||||||
|
struct overloaded : Ts...
|
||||||
|
{
|
||||||
|
using Ts::operator()...;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class... Ts>
|
||||||
|
overloaded(Ts...) -> overloaded<Ts...>;
|
||||||
|
|
Loading…
Reference in New Issue