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
 Bug in template method parsing (10.7.1918)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

hajokirchhoff
Senior Member

Germany
37 Posts

Posted - Nov 13 2012 :  12:57:45 AM  Show Profile  Reply with Quote
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.

Edited by - hajokirchhoff on Nov 13 2012 01:00:04 AM

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 15 2012 :  11:54:49 PM  Show Profile  Reply with Quote
It looks like this is case=70216 which has been addressed for the next build.
Go to Top of Page

hajokirchhoff
Senior Member

Germany
37 Posts

Posted - Nov 16 2012 :  02:28:44 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 16 2012 :  10:36:54 AM  Show Profile  Reply with Quote
Good point. The Create Implementation namespace issue is case=4240.
Go to Top of Page

hajokirchhoff
Senior Member

Germany
37 Posts

Posted - Nov 21 2012 :  03:11:43 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17026 Posts

Posted - Nov 22 2012 :  12:01:19 PM  Show Profile  Reply with Quote
I am seeing the same effect here with Create Declaration. Thank you for the clear description.

case=70774

zen is the art of being at one with the two'ness
Go to Top of Page

hajokirchhoff
Senior Member

Germany
37 Posts

Posted - Nov 22 2012 :  12:09:14 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline
... Thank you for the clear description.


Thank you for a really good product. VAssist is a real time saver!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17026 Posts

Posted - Nov 22 2012 :  2:20:26 PM  Show Profile  Reply with Quote
Thank you, it is good to know that Visual Assist X works so well for you

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Dec 17 2012 :  11:47:55 PM  Show Profile  Reply with Quote
case=70216 is fixed in build 1925
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000