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
 Intellisense stoped working on template function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

CandyJay
Starting Member

Canada
1 Posts

Posted - Nov 26 2018 :  11:34:46 PM  Show Profile  Reply with Quote
So I decided to try out Visual Assist few days ago.
I noticed that in C++, Visual Assist's intellisense stopped working on return result of template function that's being put into a "auto".

I am using Visual Assist 10.9.2291.5 built 2018.10.02 and visual studio 2017 EN 15.9.2.

This problem only happens with Visual Assist's intellisense as going to option and switching back to default visual studio intellisense solves this issue.

Here is the code




struct Test
{
int a, b;
};

struct FuncTest
{
template <typename T>
Test TemplateReturnStuff()
{
return Test{ 1, 2 };
}

Test NormalReturnStuff()
{
return Test{ 1, 2 };
}
};

int main()
{
// C/C++ source content is from Visual Assist
FuncTest ft;
ft.NormalReturnStuff().a; // Intellisense Working
ft.TemplateReturnStuff<int>().a; // Intellisense Working

auto n_auto_test = ft.NormalReturnStuff();
n_auto_test.a; // Intellisense Working

auto t_auto_test = ft.TemplateReturnStuff<int>();
t_auto_test.a; // Intellisense Not Working Here!!!

return 0;
}




When the result of ft.TemplateReturnStuff<int>() is put into an auto variable VAX's intellisense stopped working while default visual studio intellisense worked just fine.

JaymieX

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Nov 27 2018 :  11:57:19 AM  Show Profile  Reply with Quote
Thank you for the very clear bug report, and I am a little surprised that we are not following this code correctly. I have never seen exactly this situation come up before, so I have put in a bug report for this:

case=132516

For now setting the source of default intellisense to the IDE is the best solution I can offer you. Hopefully apart from this Visual Assist is making a good impression on you, and being useful.

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