mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Common/VariantUtil: Add 'overloaded' helper struct for use with std::variant.
This commit is contained in:
@@ -26,3 +26,12 @@ auto VariantCast(const std::variant<From...>& v)
|
||||
{
|
||||
return detail::VariantCastProxy<From...>{v};
|
||||
}
|
||||
|
||||
template <class... Ts>
|
||||
struct overloaded : Ts...
|
||||
{
|
||||
using Ts::operator()...;
|
||||
};
|
||||
|
||||
template <class... Ts>
|
||||
overloaded(Ts...) -> overloaded<Ts...>;
|
||||
|
||||
Reference in New Issue
Block a user