Commit cbc9eb15 authored by Olivier Parcollet's avatar Olivier Parcollet

Fix destructor name ...

There appears to be a pb in 9df8c9da.

For a template class, A::B::C<T1,T2>
the destructor name was C<T1,T2>
leading to code like
A::B::C<T1,T2>::~C<T1,T2>()

which does not compile on gcc (4.6, 4.7), also it seems to be correct code ...
clang and intel C++ compile it, but not gcc.

I changed the name to generate the code :

A::B::C<T1,T2>::~C()

which compiles on gcc, clang, intel

by further cutting the <...> in the destructor name.
parent e2e70dc8
......@@ -1139,6 +1139,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
# Make sure the namespace delimiter was not in a template arg.
while destructor_name.count('<') != destructor_name.count('>'):
destructor_name = split_cname.pop() + '::' + destructor_name
destructor_name = destructor_name.split('<',1)[0]
code.putln("p->%s.%s::~%s();" %
(entry.cname, entry.type.declaration_code(""), destructor_name))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment