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
 Suggestion behavior for using directives
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

onsager
New Member

5 Posts

Posted - Mar 02 2015 :  07:25:45 AM  Show Profile  Reply with Quote
Hi all,

I have the following code fragment:

namespace Traits3D {
[...]
using Triple = glm::dvec3;
[...]
using TripleVector = std::vector < Triple > ;
[...]
It seems, the suggestions for auto-completing have problems with these declarations:

When I start writing "Tr" I get bogus suggestions of the form 'Traits3DTripleVector'. I'm still getting the namespace 'Traits3D' and can drill down to TripleVector and if I'm doing so, the erroneous 'Traits3DTripleVector' is not longer present among the suggestions at the last level. But at the top-level it is and can be selected.

Turning using declarations (in particular the one for the vector) into typedefs seemingly corrects the problem, but is undesired in my case.

Visual Studio 2013 Prof. Update 4
VA 10.9.2059.0 (2015.02.11)

Michael

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 02 2015 :  7:27:31 PM  Show Profile  Reply with Quote
What is Traits3DTripleVector in your code? Is it a type definition by "using" keyword or a class or something else?
Where is this Traits3DTripleVector defined? Is it defined in the same namespace (Traits3D), or in the global namespace or in another namespace?

Suggestions are only Visual Assist's best guest about what you might be typing, and are not typically context aware. There are smart suggestions that appears in some circumstances, however:
http://docs.wholetomato.com/default.asp?W172

So I could imagine a new smart suggestion type, which would appear when pressing space after the keyword "using". It could contain more specific words in the list.
Can you please explain why do you think Traits3DTripleVector should be omitted here? (it's related to my first two questions)

Edited by - accord on Mar 02 2015 7:30:25 PM
Go to Top of Page

onsager
New Member

5 Posts

Posted - Mar 03 2015 :  07:34:54 AM  Show Profile  Reply with Quote
> What is Traits3DTripleVector in your code? Is it a type definition by "using" keyword or a class or something else?

It's all in the code example:

Traits3D::Triple is an alias for glm::dvec3 (this piece of information possibly missing: glm::dvec3 is a data type frome some third-party library (http://glm.g-truc.net/) )

Traits3D::TripleVector is an alias for standard vectors of these Triple's.

There is no 'Traits3DTripleVector', only 'Traits3D::TripleVector'. My problem is not in writing the using directive, but to use these types afterwards in user code. Not till then the bogus suggestions appear. All this doesn't happen with typedef's.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 04 2015 :  01:42:52 AM  Show Profile  Reply with Quote
Thank you for the explanation, I was able to reproduce the problem here and I have put in a bug report for this:

case=88237
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