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
 VAX cant disambiguate implementation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

swinefeaster
Tomato Guru

310 Posts

Posted - May 03 2022 :  2:28:12 PM  Show Profile  Reply with Quote
I have multiple functions called Render, and in a cpp, i use the VAX.GotoImplementation command on an invocation of the function. it shows me a popup listing all the Render functions in my cmake project. if i use the build in visual studio ctrl+click, it goes directly to the correct function. the object that is invoking the function is a unique_ptr and i include the header for the Render()-implementing class in this cpp.

any ideas how to fix this? super annoying.

thanks

latest VAX release

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - May 04 2022 :  07:00:22 AM  Show Profile  Reply with Quote
It sounds like our parser is confused by this code, and does not properly understand the type of the unique_ptr template instance. As a first test, can you please try adding the following simple test code to one of your files, and see if Alt-G works correctly on the unique_ptr function calls. Alt-G is working correctly for all of these for me:

#include <memory>

class FelineTestUniqueSquare
{
public:
	void RenderFillShape() { }
	std::string GetSquareName() { return "Yellow Square"; }
};

class FelineTestUniqueCircle
{
public:
	void RenderFillShape() { }
	std::string GetCircleName() { return "Blue Circle"; }
};

static void makingPointers()
{
	std::unique_ptr<FelineTestUniqueSquare> uniqueSquarePtr;
	std::unique_ptr<FelineTestUniqueCircle> uniqueCirclePtr;
	uniqueSquarePtr->RenderFillShape();
	uniqueSquarePtr->GetSquareName();
	uniqueCirclePtr->RenderFillShape();
	uniqueCirclePtr->GetCircleName();
}

this will tell us if VA is handling unique_ptr correctly in your solution, since if it isn't then that could well explain all of the problems you are seeing.

If this sample code does work correctly, what happens when you use Alt-G on the pointer object, rather than the function call? If VA doesn't understand the pointer then this could also cause this problem.

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