Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Create impl for template methods/functions

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
andre.horst Posted - Sep 04 2008 : 04:24:51 AM
It would be nice if VAX were able to create a specialized implementation for a template method or function. F.e.


template< class T > void F( T p )
{
    T foo ;
}

After "Create Implementation" from the refactor men++ i choose or write down the type for T and get the special implementation for it. Note that should also work for more than one template argument. A bit difficult to handle could be default template arguments. Especially more than one template argument could be interesting to refactor, if all combinations for the given type-replacements will be generated automatically.
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Sep 16 2008 : 08:09:56 AM
You can run Rename on a template argument, but VA finds to many references. This is a known problem and is on our list of things to fix:

case=16397
andre.horst Posted - Sep 16 2008 : 05:54:06 AM
Ok. This works, but that isnt that mighty as i wanted it. But i understand that the use-case isnt reuired very often. Btw: renaming of template arguments is still a missing feature.
feline Posted - Sep 10 2008 : 09:56:49 AM
Have you considered using the IDE's Find and Replace feature? Just copy the template and then use Find and Replace to replace "T" with the type. Turn on whole word and case matching and this should do what you want.
andre.horst Posted - Sep 04 2008 : 08:17:36 AM
Yes, thats right. But for some circumstances it is better to have the implementation for a specific type (special and optimized handling/programming for that type) and to avoid inlining all the time. Thus the code gets smaller if you have a call to a specialized complex template method instead of the whole code be inlined again and again and faster if you can optimize for a specific type.
feline Posted - Sep 04 2008 : 08:05:08 AM
I do not understand what you want. The compiler creates an instance of a template class / function its self. This is what templates are for.

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