Answer the question
In order to leave comments, you need to log in
QT Creator - why doesn't intellisense "see" object functions and fields via C++11 auto type?
Hello.
The problem is the following, in QT Creator, intellisense does not "see" functions and fields of an object via the C++11 auto type.
Below is an example of code, in it, iter-> and then intellisense does not show anything, you have to write blindly.
for(auto iter=pingAddr.begin();iter!=pingAddr.end();iter++)
{
avrPing += iter->getResult().avrRTT; //вот тут после iter-> все написано в слепую.
i++;
}
Answer the question
In order to leave comments, you need to log in
Well, it doesn't work. Even bug is wound up.
If you have std::vector<SomeValueType> pingAddr;
, then you can write
for(auto iter=pingAddr.begin();iter!=pingAddr.end();iter++)
{
SomeValueType& v = *iter;
avrPing += v.getResult().avrRTT; //автодополнение будет работать,
//а код все равно проще, чем если писать название типа вместо auto
i++;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question