-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: compiler error when inheriting from DataTemplateSelectorT #1457
Comments
The error from the reproducible test case says "is not a member of a base class of ", but I think this is actually a case of a ambiguous name. Here is the output from compiling some similar code with the clang compiler instead of msvc.
|
Opened #1458 with a fix. Was relatively trivial thankfully. |
Wow, same day service! Thanks for having a look! |
Haha. I wanted to make sure it wasn't a regression introduced by a previous PR of mine, which was the last change to code touching overridable members. Once I realized it was a bug in The code was writing an |
This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
* Fix overloads coming from overridable interfaces Fixes #1457 * PR feedback
Version
2.0.240405.15
Summary
There is a compiler error due to code generated by cppwinrt when trying to use
winrt::Windows::UI::Xaml::Controls::DataTemplateSelectorT
as a base class.Reproducible example
Grab the project from https://github.com/dlech/BlankApp1, open in Visual Studio and build.
Code that causes the problem is here: https://github.com/dlech/BlankApp1/blob/d2869cb888d4d67534ba76643816a15bfa0274c8/BlankApp1/App.cpp#L16-L18
Expected behavior
cppwrint should generate code that doesn't cause a compile error.
Actual behavior
Build fails with the following error:
Additional comments
I discovered this while working on the PyWinRT bindings. Using any other
TypeT
as a base class compiles fine. There seems to be something odd aboutwinrt::Windows::UI::Xaml::Controls::DataTemplateSelectorT::SelectTemplateCore
specially. It is likely the only type where it has two overloads with the same name and different parameters defined in two different interfaces.The text was updated successfully, but these errors were encountered: