Constructor usage not detected when called via emplace_back(...)
Answered
When using Find Usages on a class constructor in Rider , calls to the constructor via std::vector::emplace_back(...) are not shown.
struct MyType {
MyType(int a, float b, std::string c);
};
std::vector<MyType> vec;
vec.emplace_back(1, 2.0f, "test"); // this line is NOT shown in "Find Usages" of MyType::MyType(int, float, std::string)
When using "Find Usages" on a constructor, I expect usages like emplace_back(...) (which directly forward arguments to that constructor) to appear in the results.
Please sign in to leave a comment.
Hello!
vec.emplace_back(1, 2.0f, "test");located in the same file as the definitions ofMyTypeandvecor not?1. in CLion
2. not in same file
Here is the related issue - RSCPP-32660. Feel free to comment or upvote it in order to get updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.