There's a bunch of code like this:
ValueSet v = /* ... */
auto g = winrt::unbox_value<winrt::guid>(v.Lookup(L"someKey"));
auto q = winrt::unbox_value_or<winrt::hstring>(v.TryLookup(L"anotherKey"), winrt::hstring{});
It'd be neat if 'unbox object to type' was directly supported so I could have written:
ValueSet v = /* ... */
auto g = v.Lookup<winrt::guid>(L"someKey");
auto q = v.TryLookup<winrt::hstring>(L"anotherKey");
There's a bunch of code like this:
It'd be neat if 'unbox object to type' was directly supported so I could have written: