Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

When I use std::map or std::vector iterator,it can not remind...

(1/2) > >>

chenjl:
eg.

--- Code: (cpp) ---#include <iostream>
#include <map>
#include <vector>
struct Info
{
string name;
int age;
};

int main()
{
vector<Info*> vecInfos;
Info* p = new Info;
p->name = "account1";
p->age = 28;
vecInfos.push_back(p);
p = new Info;
p->name = "account2";
p->age = 17;
vecInfos.push_back(p);


vector<Info*>::iterator itVec = vecInfos.begin();
while (itVec != vecInfos.end())
{
cout << itVec->name /* at here */
<< itVec->age /* and at here */
<< endl;
}

map<string, Info*> mapInfos;
p = new Info;
p->name = "test1";
p->age = 21;
mapInfos.insert(make_pair(p->name, p));

p = new Info;
p->name = "test2";
p->age = 22;
mapInfos.insert(make_pair(p->name, p));

map<string, Info*>::iterator itMap = mapInfos.begin();
while (itMap != mapInfos.end())
{
cout << itMap->first /* at here */
cout << itMap->second->name /* at here */
}
return 0;
}

--- End code ---
the codeCompletion can't display 'first','second',and the Members of struct Info.
If there are a lot of members for struct or class;
I'll feel Coding difficult;

ollydbg:
This is a known bug of our CC, it can't handle the template related code very well.
Currently, you can use the clang based code completion plugin. Or help us by supplying patches ;)

jat1:
Is anyone currently working on improving the template related code? If not, I'll work on it and come up with a solution for this issue.

ollydbg:

--- Quote from: jat1 on May 24, 2015, 02:02:46 am ---Is anyone currently working on improving the template related code? If not, I'll work on it and come up with a solution for this issue.

--- End quote ---
Hi, jat1. I think currently no one is working on the template related part of the parser and the codecompletion. It was two or three years ago that someone like blueshake, me, loaden worked on that parts. It is quite complex as I know, so if any question, ask here. Thanks.

padget:
Indeed, with the new standart (11 and 14), the template is better than before. The code completion for template is very important for me (I use exclusively template :D).
 jat1, Thanks in advance if you work on that subject !

Navigation

[0] Message Index

[#] Next page

Go to full version