Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Suggestion behavior for using directives

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
onsager Posted - Mar 02 2015 : 07:25:45 AM
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

3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Mar 04 2015 : 01:42:52 AM
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
onsager Posted - Mar 03 2015 : 07:34:54 AM
> 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.
accord Posted - Mar 02 2015 : 7:27:31 PM
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)

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