Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => CodeCompletion redesign => Topic started by: stefanos_ on June 10, 2013, 04:17:35 pm

Title: STL class member or standard C++ keyword?
Post by: stefanos_ on June 10, 2013, 04:17:35 pm
I have got confused with the following output.

If I start typing for example, "std::vector::ite...", the auto completion mechanism will display "iterator" as part of vector class.

std::vector::iterator (http://pasteboard.co/fnAGXer.png)

If I start typing "std::vector<int>::iter...", the auto completion will display "iterator" as part of C++ keyword list.

std::vector<int>::iterator (http://pasteboard.co/fnO40wd.png)

Is this how it supposed to work? I got confused :S

P.S.: Is there a reason why "img" does not work with pasteboard.co (and I had to use "url") or is it because forums need upgrade to the latest version of SMF that could have fixed this issue?
Title: Re: STL class member or standard C++ keyword?
Post by: ollydbg on June 10, 2013, 04:45:54 pm
Quote
P.S.: Is there a reason why "img" does not work with pasteboard.co (and I had to use "url") or is it because forums need upgrade to the latest version of SMF that could have fixed this issue?
I think the site (pasteboard.co) does no allow an external link/access to the image. Our forum does not have the issue.

Quote
I have got confused with the following output.

If I start typing for example, "std::vector::ite...", the auto completion mechanism will display "iterator" as part of vector class.

std::vector::iterator

If I start typing "std::vector<int>::iter...", the auto completion will display "iterator" as part of C++ keyword list.

std::vector<int>::iterator

Is this how it supposed to work? I got confused :S
I think:
In the first case, "iterator" is a member of std::vector, so it show it correctly.
In the second case, the parser failed to parse the statement "std::vector<int>::iter", so as a fullback, it shows some C++ keyword, which contains a C++ keyword named "iterator".
Title: Re: STL class member or standard C++ keyword?
Post by: stefanos_ on June 12, 2013, 07:05:00 pm
Another question I would like to ask if I may. With NetBeans, I hover on a keyword and press Ctrl key and that keyword becomes a symbolic link to the original location of that keyword; if it's class String, it would take me to the actual location of that class file and so forth.

Is it difficult to implement the same logic more or less for Code::Blocks? If yes, which part of project should I look at so I would experiment a bit?
Title: Re: STL class member or standard C++ keyword?
Post by: oBFusCATed on June 12, 2013, 08:23:20 pm
Is it difficult to implement the same logic more or less for Code::Blocks? If yes, which part of project should I look at so I would experiment a bit?
Ctrl-shift+. or Ctrl-. does almost the same thing.