Closed schlzber closed 6 years ago
Hi, @schlzber, thanks for opening this issue: it looks like I need to improve this topic. winrt::make
For folks using the released SDK (version 17134), one thing I forgot to add to the topic is that you need to #include "single_threaded_observable_vector.h" in BookstoreViewModel.h.
I'll go ahead and make these fixes to the topic asap. Please let me know if you're still blocked with the info above.
-Steve
Hello Steve,
thanks for you explanation. I was using the 17713 Preview SDK. I switched back to the 17134 SDK and included the header and now it works. Thanks. :-)
Daniel
Great, thanks, Daniel!
When I use the apropriate call to winrt::make<> in the constructor of my class I get compiler errors (translated from German):
musiclibrary.cpp(10): error C2672: "winrt::make": no matching overloaded function found musiclibrary.cpp(10): error C2974: "winrt::make": invalid template argument for "D", Type expected. 1>c:\program files (x86)\windows kits\10\include\10.0.17713.0\cppwinrt\winrt\base.h(8501): note: See declaration of "winrt::make"
The line in my code is this:
m_Artists = winrt::make<single_threaded_observable_vector<Windows::Foundation::IInspectable>>();
And m_Artists is defined like this: public: IVector<IInspectable> Artists(); private: IVector<IInspectable> m_Artists;
and in IDL:
Any ideas what I'm missing?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.