Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1649: create implementation template miscues

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
Frunobulax Posted - Sep 16 2008 : 11:27:44 AM
Hi,

a few things that go wrong when calling create implementation with template parameters.

First is the case of a template function in a non-template class:

class foo {
    template <class T>
    void function1(T parameter);
};

// generated implementation
template <class T>
void foo<T>::function1( T parameter )
{

}


The generated code is wrong, this should be "foo::function1" instead of "foo<T>::function1".

Next problem is in case of a specialization:


class bar;
template<>
class foo<bar> {
    void function1(T parameter);
};

// generated implementation
template<>
void foo<bar><>::function1( T parameter )
{

}


The correct implementation would be

void foo<bar>::function1( T parameter );


and can/should be located in the .cpp file.

Regards, Thomas
1   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Sep 16 2008 : 2:48:39 PM
I am seeing the same effect here. Thank you for the clear description.

The first problem is

case=5476

I have put in a bug report for specialized template class member functions

case=19782

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