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
 lose VAX intellisense when macro follows namespace
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

diehard2
Junior Member

19 Posts

Posted - Nov 07 2012 :  3:29:13 PM  Show Profile  Reply with Quote
If I have the following

#define TEST(V)

namespace std TEST(default)
{
iostream test;
}

if I delete TEST(default) it works (i.e. std::test resolves). Is there a workaround?

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 07 2012 :  7:32:16 PM  Show Profile  Reply with Quote
Since I am not quite sure how to test this code sample, I have produced the following simple test code:

#define TEST_NAMESPACE_MACRO(V)

namespace SpaceWithMacro TEST_NAMESPACE_MACRO(default)
{
	void testFuncInSpace();
};

void testUsingSpace()
{
	// alt-g on "testFuncInSpace" here works
	SpaceWithMacro::testFuncInSpace();
}

the comment describes what I am seeing, testing this in VS2010 with VA 1918. Can you please try the same test and see what results you get?

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

diehard2
Junior Member

19 Posts

Posted - Nov 07 2012 :  9:21:04 PM  Show Profile  Reply with Quote
Sorry, I missed an important line. If the keyword extern is in there and the namespace macro is there, it will not resolve. If the namespace macro is removed, it will resolve fine. The following will not link, but shows the problem

#define TEST(V)

namespace std TEST(default)
{
extern iostream test;
}

int main(int argc, char** argv)
{
//Typing std:: will not bring up test. I would expect test to
//be an option. Removing the TEST(default) after the namespace
//leads to the correct behavior. So, I would test it with the
//following line
std::te
}



quote:
Originally posted by feline

Since I am not quite sure how to test this code sample, I have produced the following simple test code:

#define TEST_NAMESPACE_MACRO(V)

namespace SpaceWithMacro TEST_NAMESPACE_MACRO(default)
{
	void testFuncInSpace();
};

void testUsingSpace()
{
	// alt-g on "testFuncInSpace" here works
	SpaceWithMacro::testFuncInSpace();
}

the comment describes what I am seeing, testing this in VS2010 with VA 1918. Can you please try the same test and see what results you get?

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 08 2012 :  5:42:19 PM  Show Profile  Reply with Quote
I still cannot reproduce this problem, "test" is being suggested just fine for me, and Alt-g on test, after accepting it from the listbox goes to the correct line.

Can you please go to:

VA Options -> System Info -> Copy Info

and paste the details (from the clipboard) into your reply. This will give us the basic information about your setup.

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

diehard2
Junior Member

19 Posts

Posted - Nov 21 2012 :  10:09:29 AM  Show Profile  Reply with Quote
Hi,

This is only happening sporadically now.

VA_X.dll file version 10.7.1918.0 built 2012.10.26

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)
Language info: 1252, 0x409

Platform: Custom
Stable Includes:
C:\\libsupc++_gcc_4_7_0;
C:\\libsupc++_gcc_4_7_0\\ginclude;
C:\\libstd_gcc_4_7_0;
C:\\libstd_gcc_4_7_0\\std;
C:\\libstd_gcc_4_7_0\\c_compatibility;
C:\\libstd_gcc_4_7_0\\c_std;
C:\\libstd_gcc_4_7_0\\decimal;
C:\\online_full\\include;
C:\\online_full\\fire;
C:\\online_full;
C:\\libstd_gcc_4_7_0\\tr2;
C:\\libstd_gcc_4_7_0\\tr1;
C:\\libstd_gcc_4_7_0\\parallel;
C:\\libstd_gcc_4_7_0\\ext;
C:\\libstd_gcc_4_7_0\\c_global;
C:\\libstd_gcc_4_7_0\\c;
C:\\libstd_gcc_4_7_0\\bits;
C:\\libstd_gcc_4_7_0\\backward;

Other Includes:

Stable Source Directories:

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 22 2012 :  2:18:11 PM  Show Profile  Reply with Quote
When you say sporadically, do you mean that the same code sometimes works and sometimes fails? Or do you mean that this fails in some places and works in other places?

If it works in some places and fails in others then this sounds like a parser problem. If you get different results on different occasions from the same code then we have something a bit more puzzling.

Can you try the following test code please, it should reproduce the situation you are describing, but the symbol names should be unique, so we won't have to worry about any problems caused by duplicate symbols. Do you get the same results as I do? My results are described in the comments. I am using the same OS, IDE and version of VA to you, so my results should be similar.

#define FELINE_TEST_NAMESPACE_MACRO(V)

namespace FelineSpaceWithMacro FELINE_TEST_NAMESPACE_MACRO(default)
{
	void testFuncInSpace()	{ }
	extern int spaceMemberNumberExtern;
	int spaceMemberNumberNormal;
};

int FelineSpaceWithMacro::spaceMemberNumberExtern;

void FelineTestUsingSpace()
{
	// alt-g on the next three lines works
	FelineSpaceWithMacro::testFuncInSpace();
	FelineSpaceWithMacro::spaceMemberNumberNormal;
	FelineSpaceWithMacro::spaceMemberNumberExtern;
	// type "::" at the end of this line, before the semi-colon
	// and three items are listed in the listbox
	FelineSpaceWithMacro;
}

zen is the art of being at one with the two'ness
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