[英]No autocompletion when using a std::unordered_map::find
I have some piece of code that looks like this: 我有一些看起来像这样的代码:
std::unordered_map<std::string, std::shared_ptr<Foo>> map;
auto result = map.find("key i'm looking for");
when I try to use result in this fashion: 当我尝试以这种方式使用result时:
result->second->Bar()
my IDE can't autocomplete and tells me "No suggestions for members of auto0" 我的IDE无法自动完成,并告诉我“没有为auto0成员提供建议”
Is my syntax wrong or is it a shortcoming of the API? 我的语法错误还是API的缺点?
EDIT: As it was pointed out, it would probably be a problem with my IDE. 编辑:有人指出,这可能是我的IDE的问题。 If anyone else can confirm this, I will report the issue on their issue tracker.
如果其他人可以确认这一点,我将在其问题跟踪器中报告该问题。 I'm using CLion build CL 140.1740.3 Thank you
我正在使用CLion build CL 140.1740.3谢谢
EDIT2: So I made a ticket. EDIT2:所以我做了票。 If anyone with the same problem reads this, here is the link to the issue https://youtrack.jetbrains.com/issue/CPP-2278
如果有相同问题的任何人都读过这篇文章,那么这里是指向问题的链接https://youtrack.jetbrains.com/issue/CPP-2278
由于某些原因,您的自动完成功能无法正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.