inheriting of winrt::implements #4444
Unanswered
ifgotmoney
asked this question in
Q&A
Replies: 1 comment
-
Look at how the generated code defines these things. However, as more of a hint, a runtime class never defines a dependence on or implements IInspectable directly. So your FlowLine definition should be: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello community,
in my WinUI3 project (C++/WinRT), in order to use
winrt::weak_ref<>
&get_weak()
for events. I defined a base class as below:class IDrawable: public winrt::implements<IDrawable, winrt::Windows::Foundation::IInspectable>
and a "derived" class as below:
class FlowLine : public winrt::implements<FlowLine,IDrawable,winrt::Windows::Foundation::IInspectable>
this pattern works fine for me with C++17 in Visual Studio Community 2022, however, when I try to change to C++20, the same code can not be compiled,
'to_abi': no matching overloaded function found
any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions