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
 namespace alias in c++ doesn't work?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

__PPS__
New Member

2 Posts

Posted - Jun 03 2006 :  4:12:19 PM  Show Profile  Reply with Quote
hello all.

this kind of code doesn't seem to parse correctly/no intellisence shows up:

namespace fs = boost::filesystem;
fs::path pth;
pth.[Ctrl+Space]

.... no intellisence info available. (Status bar: type cannot be resolved)

10x

PS.
it all works well if I do:

boost::filesystem::path pth;
pth.[Ctrl+Space]

Edited by - __PPS__ on Jun 03 2006 4:15:21 PM

jpizzi
Tomato Guru

USA
642 Posts

Posted - Jun 03 2006 :  11:54:36 PM  Show Profile  Reply with Quote
Not having boost handy, I attempted this with the STL stuff:

#include <string>
namespace standard_namespace = std;
standard_namespace::string s;
s.[CTRL-space]

This works fine. Nothing pops up until I hit CRTL-space, but after, it shows everything. I tried this with VA 1445 on VS 2003. What version IDE and VA are you trying this on (with a boost example, I assume C++).

Joe Pizzi
Go to Top of Page

__PPS__
New Member

2 Posts

Posted - Jun 04 2006 :  02:05:18 AM  Show Profile  Reply with Quote
There's a difference in behavior and it's not related to boost. When I do: std:: a popup already opens with a list of members (without pressing anything), but if I do standard_namespace:: then it already doesn't work. I use 1445 & vs2005. I have feeling that VA doesn't work that well in vs2005, in 2003 it works better. For example, in vs.2003 always when I type: "stdstr.siz" then I already have a popup with size() and I simply hit tab, in 2005 when I type the same line I have a list of unrelated crap like sizeof etc, but if I hit ctrl+space it gets completed correctly; however, it is completed like stdstr.size without trailing "()" which I have to type on my own. Same thing with c_str()... By that reasons I uninstalled vs2005 like 3-4 month ago used only ns.net :). Now things changed I need some functionalyty that's not available in 2003...
I tried to clean up cache, rebuild database, reinstall etc.. doesn't work well.
By the way, I want it to parse entire boost, how do I tell it to walk over entire source tree? When I start it it parses standard windows includes c# etc, and like for half of a second I see that it parses boost and stops... When I try then to use boost hilighting etc seems to be somewhat incorect until I open that boost headers and then VA parses this header (...messges in status bar) and then highlighting/intellisence works well (until I use some part of boost that wasn't visited by VA)
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Jun 06 2006 :  01:09:55 AM  Show Profile  Reply with Quote
Let's take this one issue at a time.

First, when you type std::, anything that pops up is from VS, not VA (VA does not suggest in response to ::).

Second, when I do s.siz in VS 2005, I get size suggested (but the listbox does contain numerous other possibilities). Note, this is with "Get content from default Intellisense" turned off.

Just a guess about your completion of size without the parens: this was a completion from the IDE, not VA.

As for your boost question, a quick search through the forum archives seems to indicate that adding the boost\\boost<version\\boost directory to the stable includes works.

One other thing, the message, "no intellisense available" is from VS.

Joe Pizzi

Edited by - jpizzi on Jun 06 2006 01:12:12 AM
Go to Top of Page

studoot
Senior Member

35 Posts

Posted - Jun 09 2006 :  03:23:14 AM  Show Profile  Reply with Quote
Hi - I was going to raise the same issue myself today, but saw this thread and thought I'd contribute here instead...

Anyway, I see the same behavious as __PPS__. I have the following namespace alias

namespace po=boost::program_options;

and typing po::[Ctrl+SPACE] shows no suggestions. I'm using VS.NET 2003 and I *do* have Boost in my stable includes, as shown below.

Using boost::program_options::[Ctrl+SPACE] does yield the expected suggestions.

I then also tried your example (defining an alias for 'std')

namespace flibble=std;
flibble::vector<int> v;
v.[Ctrl+SPACE]

This yielded no suggestions, i.e. different behaviour to Joe Pizzi's...

I'm afraid I won't be able to respond too quickly to any queries, as I'm on vacation for almost three weeks from tomorrow.

Stuart Dootson

(And here's my VA_X info)

VA_X.dll file version 10.2.1446.0 built 2006.05.31
Licensed to:
VA X: [email protected] (1-user license) Support ends 2006.06.27
VA.NET 7.1:
VA 4.1:
VAOpsWin.dll version 1.3.2.4
VATE.dll version 1.0.4.14
DevEnv.exe version 7.10.3077.0
msenv.dll version 7.10.3077.0
Font: Courier New 13(Pixels)
Comctl32.dll version 5.81.4916.400
WindowsNT 5.0 Build 2195 Service Pack 4
Single processor

Platform: Custom
Stable Includes:
c:\\program files\\microsoft visual studio .net 2003\\vc7\\include;
d:\\lib\\antlr\\antlr-2.7.4\\lib\\cpp;
d:\\lib\\boost\\boost_1_33_1\\boost;
d:\\lib\\libxslt\\libxslt-1.1.12+.win32\\include;
d:\\lib\\libxml2\\libxml2-2.6.17.win32\\include;
d:\\lib\\iconv\\iconv-1.9.1.win32\\include;
d:\\lib\\zlib\\zlib-1.2.1.win32\\include;
d:\\lib\\wtl\\wtl-7.5.5160\\include;
C:\\Program Files\\Microsoft Platform SDK\\Include;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\crt\\src\\;
c:\\program files\\microsoft visual studio .net 2003\\vc7\\atlmfc\\include;
c:\\program files\\microsoft visual studio .net 2003\\vc7\\PlatformSDK\\include\\prerelease;
c:\\program files\\microsoft visual studio .net 2003\\vc7\\PlatformSDK\\include;
c:\\program files\\microsoft visual studio .net 2003\\sdk\\v1.1\\include;

Library Includes:
c:\\program files\\microsoft visual studio .net 2003\\vc7\\atlmfc\\src\\mfc;
c:\\program files\\microsoft visual studio .net 2003\\vc7\\atlmfc\\src\\atl;
c:\\program files\\microsoft visual studio .net 2003\\vc7\\crt\\src;

Other Includes:

Go to Top of Page

obirsoy
Junior Member

USA
18 Posts

Posted - Jun 15 2006 :  12:22:23 PM  Show Profile  Reply with Quote
This looks like exactly like this problem.
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=4182
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Jun 18 2006 :  2:58:16 PM  Show Profile  Reply with Quote
this seems to be a different issue to thread 4182

using VS2003 and VA 1446 i see this problem with the boost example, but not with the std::vector example.
however i can reproduce this problem with the std::vector example in VA 1524

case=1364

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - May 12 2011 :  12:46:09 AM  Show Profile  Reply with Quote
case=1364 is fixed in build 1848

Whole Tomato Software, Inc.
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