Skip to content

IntelliSense-based Go to Definition can give incorrect result with overloads that return a template with a default template param (e.g. vector) #2736

@sean-mcmanus

Description

@sean-mcmanus

For 0.20.0. Repros when "funcv(0)" in the code below is the goto target:

#include <vector>
std::vector<int> funcv(int){}
int funcv(double){}

Both definitions get returned instead of the 1st. "Caused" by the default "allocator" 2nd param on the vector. We fixed the case when vector is used as a param, but missed the return type case (it didn't seem important enough to delay 0.20.0).

UPDATE:

Should be fixed with 0.21.0-insiders (auto installed if "C_Cpp.updateChannel": "Insiders" is set, or manually installed from the offline vsix). Let us know if you find any problems with it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.quick fix

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions