Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Fails to deduce type when using 'using' keyword

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
joostn Posted - Mar 13 2015 : 05:45:03 AM
Hi,

Given this code:

struct C
{
  enum class D { D1, D2 };
  D d;
};

template <class T1, class T2>
struct B
{
  T1 t1;
};

using A = B<C, int>;

void func()
{
  C c;
  if (c.d == C::D::D1) {}

  A a;
  if (a.t1.d == C::D::D1) {}
}


Visual Assist X is able to deduce the type of c.d. Ctrl+Click on d shows me a popup with the definition and type of symbol. And if I start typing
if (c.d ==
I get a suggestion list with the enum values.

However this fails for the second example (a.t1.d). Is this a known issue?
2   L A T E S T    R E P L I E S    (Newest First)
sean Posted - May 10 2016 : 3:49:27 PM
case=88462 is fixed in build 2097
accord Posted - Mar 13 2015 : 2:01:18 PM
I am seeing the same effect here. I have put in a bug report for this:

case=88462

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