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
 Find References bug
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

HarryStorbacka
New Member

4 Posts

Posted - Feb 28 2012 :  07:06:56 AM  Show Profile  Reply with Quote
There seems to be a problem with "Find References" when using a #define and std::tr1::shared_ptr.


#include <memory>

#define MySharedPtr std::tr1::shared_ptr

class Foo_Impl
{
public:
	Foo_Impl() : value(1) {}
	int value;
};

class Foo
{
public:
	Foo() {}
	// std::tr1::shared_ptr<Foo_Impl> impl;
	MySharedPtr<Foo_Impl> impl;

	void set_value(int v)
	{
		impl->value = v;
	}
};

int _tmain(int argc, _TCHAR* argv[])
{
	Foo foo;
	foo.set_value(2);
	return 0;
}


Doing a "Find References" on "value" in "impl->value" results in a unrecognized symbol message popping up. When just using std::tr1::shared_ptr it works fine.

Visual Studio 2008 SP1 and VA 10.6. 1862.0

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Feb 28 2012 :  4:18:16 PM  Show Profile  Reply with Quote
Thank you for the very clear example. Can you try turning on deep macro parsing, as explained in this FAQ entry please:

http://docs.wholetomato.com?W363

this fixes the problem with your sample code for me, so hopefully this will help in your main solution.

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

HarryStorbacka
New Member

4 Posts

Posted - Feb 28 2012 :  5:16:13 PM  Show Profile  Reply with Quote
Adding the #define to VA's StdAfx.h per instructions in the link above fixed it. Thanks!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Feb 28 2012 :  5:41:24 PM  Show Profile  Reply with Quote
Thank you for the update, I am glad this helped and fixed this for you.

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