-
Notifications
You must be signed in to change notification settings - Fork 263
Closed
Labels
Description
Version
2.0.240111.5
Summary
I have a feeling that this is perhaps an API bug, but CppWinRT could be made to work around it. A new class added in Windows App SDK 1.7 has an explicit interface implementation (in C# terms) that isn't seen in other APIs and doesn't seem to follow the WinRT type system guidelines.
This causes CppWinRT to generate multiple Run methods. One for the public interface and another for the explicit interface implementation that should actually be private and therefore not projected.
Reproducible example
It will take some time to make a minimal test case.Expected behavior
CppWinRT should not generate ambiguous methods.
Actual behavior
Code fails to compile with error.
Additional comments
Here is the actual compiler error.
C:\Users\extra\work\pywinrt\projection\winui3\winui3-Microsoft.Windows.ApplicationModel.Background.Univer
salBGTask\py.Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.cpp(71,31): error C2668: 'winr
t::impl::consume_Windows_ApplicationModel_Background_IBackgroundTask<D>::Run': ambiguous call to overload
ed function [C:\Users\extra\work\pywinrt\_build\release\_winui3_microsoft_windows_applicationmodel_backgr
ound_universalbgtask.vcxproj]
C:\Users\extra\work\pywinrt\projection\winui3\winui3-Microsoft.Windows.ApplicationModel.Background.Univer
salBGTask\py.Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.cpp(71,31): error C2668:
with [C:\Users\extra\work\pywinrt\_build\release\_winui3_microsoft_windows_applicationmodel_background
_universalbgtask.vcxproj]
C:\Users\extra\work\pywinrt\projection\winui3\winui3-Microsoft.Windows.ApplicationModel.Background.Univer
salBGTask\py.Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.cpp(71,31): error C2668:
[ [C:\Users\extra\work\pywinrt\_build\release\_winui3_microsoft_windows_applicationmodel_background_un
iversalbgtask.vcxproj]
C:\Users\extra\work\pywinrt\projection\winui3\winui3-Microsoft.Windows.ApplicationModel.Background.Univer
salBGTask\py.Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.cpp(71,31): error C2668:
D=winrt::Microsoft::Windows::ApplicationModel::Background::UniversalBGTask::Task [C:\Users\extra\w
ork\pywinrt\_build\release\_winui3_microsoft_windows_applicationmodel_background_universalbgtask.vcxproj]
C:\Users\extra\work\pywinrt\projection\winui3\winui3-Microsoft.Windows.ApplicationModel.Background.Univer
salBGTask\py.Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.cpp(71,31): error C2668:
] [C:\Users\extra\work\pywinrt\_build\release\_winui3_microsoft_windows_applicationmodel_background_un
iversalbgtask.vcxproj]