Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 STL vs. Forced Include vs. "using"?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sitnduck
Senior Member

47 Posts

Posted - Nov 19 2012 :  08:24:10 AM  Show Profile  Reply with Quote
Hi!
I'm pretty sure this has to have been answered somewhere else but I cannot seem to find it.

I'm finding that none of the STL member functions seem to use auto-completion (e.g. push_back, c_str, etc.). I am using a "forced include" prefix.h file that contains the includes and the "using namespace std;" statement.

Is this an issue with using a forced include file (or the "using" statement? Or a combination?)? I just get the feeling I'm missing something obvious. This is a pretty small MFC project that shouldn't be too confusing to the parser otherwise.

Thanks!

Francois

VA_X.dll file version 10.6.1854.0 built 2011.07.18
Licensed to:
xxx
2011.11.10
DevEnv.exe version 10.0.40219.1 Professional
msenv.dll version 10.0.40219.1
Comctl32.dll version 6.10.7601.17514
Windows 7 6.1 Build 7601 Service Pack 1
8 processors (x86-64;
WOW64)

Platform: Project defined
Stable Includes:
C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\include;
C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\atlmfc\\include;
C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\include;

Other Includes:

Stable Source Directories:
C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\atlmfc\\src\\mfc;
C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\atlmfc\\src\\mfcm;
C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\atlmfc\\src\\atl;
C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\crt\\src;


Edited by - sitnduck on Nov 19 2012 08:28:05 AM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 20 2012 :  02:17:46 AM  Show Profile  Reply with Quote
What do you mean by forced included? Do you mean precompiled header? Or you just include it at the beginning of every file?

Is the following setting turned on or off?
VA Options -> Advanced -> Listboxes -> Get content from default intellisense
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 20 2012 :  02:25:50 AM  Show Profile  Reply with Quote
I tried to build a simplified test case and it is working for me:

void func()
{
vector <int> vec;
vec.

}

Push back is offered after typing dot after "vec". Can you please try what happens on your side using this code snippet?
Go to Top of Page

sitnduck
Senior Member

47 Posts

Posted - Nov 20 2012 :  07:52:39 AM  Show Profile  Reply with Quote
Hi!
Thank you for the quick response. Apologies for not going into more detail; I am so used to our setup here. ;)

SO we are doing 2 things:

-Using a "forced include file": in the project properties -> C/C++ -> Advanced -> "Forced include file"
This is the file that includes the STL #include statements as well as the "using" statements

-Using precompiled headers, but I figure this does not matter for the parser? (I can go into more detail if necessary)

My thought is that putting the "using" statement in the forced include file might not be supported?

Thank you!

Francois

Edited by - sitnduck on Nov 20 2012 07:53:20 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 21 2012 :  2:05:53 PM  Show Profile  Reply with Quote
Thank you for the explanation. Well, Visual Assist should see members even if you don't include <vector> because it pre-parses certain system files to be able to familiar with. Even, VA do the "guesswork", so it should work without any using namespace directives.

1. So maybe you just need to rebuild your symbol databases:
VA Options -> Performance -> Rebuild

2. If it doesn't help:
Can you please try creating a clean new win32 test project and type the following into a function?

vector <int> vec;
vec.
It should display the member list with push_back and more. It does for me using VS2010 and VA1918.

3. Can you please try updating your Visual Assist version to see if it makes any difference? You should be able to do so even if your license is expired: you get a 3 day trial in that case. You can go back any time if you want, or renew your license if you're satisfied with the newer version.
Go to Top of Page

sitnduck
Senior Member

47 Posts

Posted - Nov 22 2012 :  08:38:03 AM  Show Profile  Reply with Quote
Interesting! A new project didn't work, until I did a "rebuild".

So did my main project! Thank you!

I'm curious why my new project wouldn't have worked... Is the symbol database shared?
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 22 2012 :  09:12:28 AM  Show Profile  Reply with Quote
The symbol database is not shared as far as I know, maybe this rebuild has reset something that went awry. Anyway, hopefully it was a one-off problem.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000