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 Previous Topic 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.
  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