Skip to content
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

Test for a failing double-template with default #1417

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

stuglaser
Copy link
Contributor

Integration test for #1413

autocxx appears to drop the first template, and then the C++ compiler cannot handle the resulting incompatible types.

@adetaylor
Copy link
Collaborator

Thanks very much for raising this.

I've taken a bit of a look, and for some reason the unused_template_parameter annotation isn't being applied to the typedef. I'll see if I can work out why.

@adetaylor
Copy link
Collaborator

Diagnosis:

  • The typedef phase happens before the POD analysis phase (for reasons I can't remember, but I remember they were good reasons)
  • The POD analysis phase replaces Holder with an IgnoredItem due to the unused template parameter.
  • So, if these phases happened the other way round, then find_ignored_types would have marked Holder as troublesome, and convert_type_path would have (correctly) rejected the WidgetRefHolder with ConvertErrorFromCpp::ConcreteVersionOfIgnoredTemplate

We might need a POD pre-analysis phase to spot this annotation before the typedef phase.

@adetaylor adetaylor merged commit 506ea0d into google:main Jan 8, 2025
12 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants