How to navigate to ctor from make_unique statement?

Answered

Consider pretty common code style:

auto var1 = std::make_unique<MyClass>(1, 2, 3);
auto var2 = std::make_unique<MyClass>("str1", "str2");

Question is: how to "ctrl+click" into corresponding ctor?

 

0
2 comments

Hi! 

For now std::make_unique are not detected as usages, unfortunately - https://youtrack.jetbrains.com/issue/CPP-2697. Feel free to comment or upvote.

0

"Find Usages" is more advanced feature. I use CLion primarily for code navigation and secondary for code completion. Refactoring is very rare and advanced feature.

CLion now understands that this is a ctor call. It correctly highlights and hints ctor parameters. The only problem -> no way to "go to" ctor. I don't even know what symbol to hover the mouse onto (or where to stay for ctrl+b).

0

Please sign in to leave a comment.