Share

dia2code

Tracker: Bugs

5 cpp code generation for template classes improved - ID: 2142520
Last Update: Attachment added ( weigc )

The boilerplate *.cpp code for a template class looks currently like

func.cpp:

Func::~Func ( ){
}

while it should be
func_improved.cpp:

template <typename T2,typename T>
Func<T2,T>::~Func ( ){
}

where the template class header is
func.h:

template <typename T2,typename T>
// interface
class Func {
// Associations
// Attributes
// Operations
public:
virtual T value ( const T x ) = 0;
virtual Func ( ) = 0;
~Func ( );
};

The attached diff for generate_code_cpp() generates the correct output for
*.cpp files.

I hope you find this useful,
greetings
Cornelius


Cornelius Weig ( weigc ) - 2008-10-02 14:26

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File ( 1 )

Filename Description Download
generate_code_cpp.diff diff file for improved cpp code generation Download

Change ( 1 )

Field Old Value Date By
File Added 295767: generate_code_cpp.diff 2008-10-02 14:26 weigc