Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Find reference failed.

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
superzmy Posted - Dec 22 2024 : 9:34:55 PM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000