Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
vector<int> is OK, but string or wstring no-work.
Loaden:
Hello, everyone! I compiled SVN6056 version, and do not use already existing default.conf, but by the CB to generate a new configuration file.
After I found: vector <int> can already be a normal CB resolved, but the string and wstring not be resolved CB. As shown in the following code: there is no intelligence tips.
--- Code: ---#include <iostream>
#include <string>
int main()
{
std::string s;
s.
return 0;
}
--- End code ---
--- Code: ---#include <iostream>
#include <string>
using namespace std;
int main()
{
string s;
s.
return 0;
}
--- End code ---
[attachment deleted by admin]
Loaden:
but if i use this code, it's work!
--- Code: ---#include <iostream>
#include <string>
using namespace std;
int main()
{
basic_string<char> s;
s.
return 0;
}
--- End code ---
but if use wchar_t, it's no-work too.
--- Code: ---#include <iostream>
#include <string>
using namespace std;
int main()
{
basic_string<wchar_t> ws;
ws.
return 0;
}
--- End code ---
[attachment deleted by admin]
Loaden:
but this code is work fine.
--- Code: ---#include <iostream>
#include <string>
int main()
{
std::basic_string<char> s;
s.
return 0;
}
--- End code ---
[attachment deleted by admin]
blueshake:
the string's ancestor is lost.that is why it can not work.
Note:it work in svn 5986.
MortenMacFly:
--- Quote from: blueshake on January 06, 2010, 06:03:44 am ---the string's ancestor is lost.that is why it can not work.
--- End quote ---
I don't thinks that's the reason. In fact I think I found it.
I've submitted some minor enhancements to debug SmartSense.
If you do exactly the following (with this code base):
0.) Open C::B with debug log enabled
1.) Open the CC testing project
2.) Activate the STL project
3.) Open the stl.cpp file
4.) Uncomment the "s." line (do not save!)
5.) Go to the symbols browser, enable SmartSense
6.) Clear the Debug log
7.) After the "s." try CTRL+SPACE (CC kicks in)
8.) Notice this output in the debug log:
FindCurrentFunctionStart() Looking for tokens in 'C:\Devel\CodeBlocks\src\plugins\codecompletion\testing\stl.cpp'
FindCurrentFunctionStart() Found 1 results
FindCurrentFunctionStart() (Next) Iteration...
FindCurrentFunctionStart() Iterating: tN='int main(void)', tF='C:\Devel\CodeBlocks\src\plugins\codecompletion\testing\duplicate_header.cpp', tStart=52, tEnd=117
FindCurrentFunctionStart() Function out of bounds: tN='int main(void)', tF='C:\Devel\CodeBlocks\src\plugins\codecompletion\testing\duplicate_header.cpp', tStart=52, tEnd=117, line=9 (size_t)line=9
FindCurrentFunctionStart() Can't determine current function...
You will realise that the token returned does not match in the file name even though FindTokensInFile was given the right file name. The result: The function bounds check will fail and thus CC cannot code complete (no matter if it's string or vector or alike).
blueshake: I believe this is related to the "real time parse" where probably some false file information is passed... Could that be? Can you please try SVN trunk?
Navigation
[0] Message Index
[#] Next page
Go to full version