Closed kingofthebongo2008 closed 5 years ago
As of C++/WinRT 2.0, you need to include winrt/Windows.Foundation.Collections.h
in order to use winrt::single_threaded_vector
because this function implements collection interfaces that are defined in this namespace header. I'm working on an update to make the compiler error more understandable, but simply including this header should fix the problem.
Thank you, I have figured this out. I guess you can close the issue.
On Mon, 8 Apr 2019 at 05:56, Kenny Kerr notifications@github.com wrote:
As of C++/WinRT 2.0, you need to include winrt/Windows.Foundation.Collections.h in order to use winrt::single_threaded_vector because this function implements collection interfaces that are defined in this namespace header. I'm working on an update to make the compiler error more understandable, but simply including this header should fix the problem.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/xlang/issues/291#issuecomment-480666097, or mute the thread https://github.com/notifications/unsubscribe-auth/ABF5cbD3gEqMllOnZnPCypKG5jlo3mT5ks5veq_WgaJpZM4cgl2a .
One needs to import this code from the windows sdk in order to make it compile
namespace winrt::impl { template <typename D, typename T> struct produce<D, wfc::IIterator> : produce_base<D, wfc::IIterator>
{
int32_t WINRT_CALL get_Current(arg_out current) noexcept final
{
try
{
clear_abi(current);
typename D::abi_guard guard(this->shim());
*current = detach_from(this->shim().Current());
return error_ok;
}
catch (...) { return to_hresult(); }
}
}