Hi all !
I have read some of the topics involving the problems with macro parsing in this forum, but i am not sure if my problems fit in there. Frist off, some code:
#include <sstream>
#include <iostream>
void someMethod()
{
std::stringstream foo;
foo.str();
}
int main(int argc, char* argv[])
{
someMethod();
std::stringstream foo;
foo.str();
return 0;
}
This is makes no sense, it's just to recreate the problems, and there are several. I use VS2005 with VAX Build 1649 and no further Addons. I have enabled deep macro parsing (http://docs.wholetomato.com?W363&SearchTerms=macro,parsing).
1. VAX does not recognize the member str() of std::stringstream. It shows it in the VA View, but not in the suggestions box and it is underlined as bad symbol.
2. Now if i do this (wich should not change anything):
#define bar someMethod
void bar()
It recognizes the function. But now it offers me different refactorings on the local variable foo in someMethod. Before i could only choose Rename. Now i can also choose Add similar member and encapsulate field, wich produces:
void bar()
{
std::stringstream foo;
std::stringstream Foo() const { return foo; }
void Foo(std::stringstream val) { foo = val; }
foo.str();
}
This is rather not the intention. I hope this was understandable.
wbr
space_cowboy
P.S.: I just found out about the copy info button:
VA_X.dll file version 10.4.1649.0 built 2008.09.09
Licensed to:
VA X: [email protected] (10-user license) Support ends 2009.12.05
DevEnv.exe version 8.0.50727.762
msenv.dll version 8.0.50727.762
Font: Courier New 13(Pixels)
Comctl32.dll version 6.0.2900.5512
Windows XP 5.1 Build 2600 Service Pack 3
2 processors
Platform: Custom
Stable Includes:
C:\\Programme\\Microsoft Visual Studio 8\\VC\\include;
C:\\Programme\\Microsoft Visual Studio 8\\VC\\atlmfc\\include;
C:\\Programme\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include;
C:\\Programme\\Microsoft Visual Studio 8\\SDK\\v2.0\\include;
C:\\Programme\\Microsoft DirectX SDK (August 2007)\\Include;
C:\\Programme\\Intel\\IPP\\5.3.4.087\\ia32\\include;
C:\\Programme\\Microsoft SDKs\\Windows\\v6.1\\Include;
Other Includes:
Stable Source Directories:
C:\\Programme\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfc;
C:\\Programme\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfcm;
C:\\Programme\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\atl;
C:\\Programme\\Microsoft Visual Studio 8\\VC\\crt\\src;