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 reference failed.
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

superzmy
Senior Member

China
29 Posts

Posted - Dec 22 2024 :  9:34:55 PM  Show Profile  Reply with Quote
struct StructA {};
class X
{
public:
template<bool B>
auto Foo1() const noexcept -> bool
{
return 1;
}

template<bool B>
auto Foo2(StructA * a) const noexcept -> bool
{
return 1;
}
};

void A()
{
X x;
X * pX = new X{};
pX->template Foo1<true>(); //1
pX->Foo1<true>(); //2

StructA * a = nullptr;
(&x)->template Foo2<true>(a); //3
((X *) &x)->Foo2<true>(a); //4
}
-----
Move input cursor to Foo1 or Foo2 (1/2/3/4) and test ctrl-shift-f (find reference).
and only //2 will find success.

feline
Whole Tomato Software

United Kingdom
19061 Posts

Posted - Dec 23 2024 :  12:46:03 PM  Show Profile  Reply with Quote
Thank you for the clear sample code, I am seeing the same problems here. I have put in a bug report for this:

case=165345

If you run Find References on 1 or 2, and right click with the mouse in the Find References Results window, if you make sure "Display unknown/guess hits" is turned On, VA will list 3 and 4, since it recognises that the function name is used here, even though it isn't understanding the code properly. Not ideal, but perhaps helpful.

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