Closed brabebhin closed 2 years ago
Sorry I was out and about the past few days. I see what you mean with the AttachedFile, however, that api has been public for quite some time. Changing it would be a breaking change.
That's true. But since there was no way to create it (no public ctor, no other API), I would not really consider this a breaking change. I have created a PR to remove it from old implementation as well.
TBH I never used that API since we merged it the first time around.
Proudly presenting my first template method, see end of pch.h ^^
That one was difficult to get right. It creates a weak referenced proxy delegate, so even normal C++ classes can easily use weak event handlers, without any boilerplate code. The class must inherit enable_shared_from_this.
C++/WinRT classes can use get_weak() or get_strong() to decide lifetime behavior for event handlers.
We should never pass this
to an event handler registration, because that is dangerous.
Nice work! Surely trumps my template method in pch.
If i remember correctly, i only used one event handler with weak references, can't remember which one
For me this is looking all good now. Maybe a little final testing and we are good to merge.
Cool. I will give it some short tests over the weekend.
On a side note: biggest PR yet?
Looking good for me.
We are on master now. Nice work!
Really good to see this work.
Kenji Mouri
Hi all,
This is the PR for migrating the library to C++/winRT. The migration currently exists as a separate project, with a separate namespace, but this is just nicities for later.
What happened here, in a nuttshell:
Some additional breaking changes: