Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Bug in template method parsing (10.7.1918)

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
hajokirchhoff Posted - Nov 13 2012 : 12:57:45 AM
There seems to be a bug when parsing the definition of a template method inside namespaces.


namespace a {
  namespace b {
    namespace c {
    // declaration
    template <typename Val, typename Cl>
    class foo
    {
       void mark_updated(t1 b, t2 e);
    };

...
    // definition
    template <typename Val, typename C1>
    void a::b::c::foo<Val, C1>::mark_updated(t1 b, t2 e)
    {
    // find next/prev does not work inside this method
    }

  }
 }
}


Find next/prev by context do not work inside the mark_updated definition.

But if I remove the a::b::c:: namespace qualification for the method

namespace a{ namespace b{ namespace c{...
   template <typename Val, typename C1>
   void foo::mark_updated(...)
   {
   // now it works
   }

it works okay.

BTW, I wouldn't myself actually put a::b::c:: in front of the method definition. Since the definition is contained in the corrent namespace, it is superfluous. But the VAssist refactoring menu "Create Implementation" does this. It puts the definition into the correct file, but does not take into account the namespace it puts it into.
8   L A T E S T    R E P L I E S    (Newest First)
support Posted - Dec 17 2012 : 11:47:55 PM
case=70216 is fixed in build 1925
feline Posted - Nov 22 2012 : 2:20:26 PM
Thank you, it is good to know that Visual Assist X works so well for you
hajokirchhoff Posted - Nov 22 2012 : 12:09:14 PM
quote:
Originally posted by feline
... Thank you for the clear description.


Thank you for a really good product. VAssist is a real time saver!
feline Posted - Nov 22 2012 : 12:01:19 PM
I am seeing the same effect here with Create Declaration. Thank you for the clear description.

case=70774
hajokirchhoff Posted - Nov 21 2012 : 03:11:43 AM
And another problem: Create Declaration is broken in the same way.


template <typename Value>
void foo<Value>::function()


Create Declaration will create code like this


template <typename Value>
class foo
{
   template <typename Value> void foo<Value>::function();
};


IOW, the template decoration should be removed from the function declaration.
sean Posted - Nov 16 2012 : 10:36:54 AM
Good point. The Create Implementation namespace issue is case=4240.
hajokirchhoff Posted - Nov 16 2012 : 02:28:44 AM
Good to know. BTW, isn't this two cases? One: the method is not parsed correctly. Two: The "refacture create implementation" puts the method in the correct namespace but also uses a fully qualified identifier for the method.
sean Posted - Nov 15 2012 : 11:54:49 PM
It looks like this is case=70216 which has been addressed for the next build.

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