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

Implement deduction guide template #580

Conversation

i-garrison
Copy link
Contributor

Add missing implementation for deduction guide template.

Add test and new indexer test strategy which more closely mirror what happens in real life (i.e. index is rebuilt after files are already in the project) which helps reproducing issue #438

Closes #438

@i-garrison i-garrison force-pushed the pr/issue-438-implement-deduction-guide-template branch from aecde92 to 2cc5920 Compare October 10, 2023 00:17
@jonahgraham jonahgraham added the language C/C++ Language Support label Oct 11, 2023
Copy link
Member

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At recent CDT calls we discussed how to handle reviews where there is insufficient expertise to review amongst existing committers and decided to accept such changes that look reasonable and appear sufficiently tested.

Add new index binding resolution test strategy SinglePDOMReindexedTestStrategy
which does reindex project after adding test case sources. Clean up redundand
C++17 setup helper classes from test since deduction guides are always enabled.

Add test case modelling std::map resolution problem and make sure to run it with
new test strategy to reproduce the issue.

Bug eclipse-cdt#438
Turned out that index is missing information about template parameters of
deduction guide templates, and all affected names which are only available
via index could not be resolved. This happens to e.g. std::map<> which is
usually looked up via index populated from <map> header file.

Fix this by implementing ICPPTemplateParameterOwner and ICPPTemplateDefinition
interfaces in new CPPDeductionGuideTemplate which delegates missing resolution
calls to the function object which already carry required template information.

Closes eclipse-cdt#438
@jonahgraham jonahgraham force-pushed the pr/issue-438-implement-deduction-guide-template branch from 2cc5920 to 036cebf Compare December 28, 2023 21:55
@jonahgraham jonahgraham merged commit f648174 into eclipse-cdt:main Dec 28, 2023
5 checks passed
@i-garrison i-garrison deleted the pr/issue-438-implement-deduction-guide-template branch December 28, 2023 22:51
@jonahgraham jonahgraham added this to the 11.5.0 milestone Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language C/C++ Language Support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

intellisense with std::map is broken
2 participants