[GCC-XML] (__GLOBAL function was Problem exposing templates)
Balasubramanyam, Shivakumar
sbalasub at qualcomm.com
Tue Aug 8 00:57:16 EDT 2006
Roman, Bjorn,
The template instantiations happens in both declarations below.
1. typedef Stack<int>::Stack Stack_int;
This would result in a template instantiation with user defined class name "Stack_int"
2. template class Stack<int> as instructed in http://www.gccxml.org/HTML/FAQ.html
This would result in a template instantiation with class name picked by gcc "Stack_less_int_grate_"
Though I used step 1, I think it makes sense to use step 2 and probably rename the class name in py++ or pyapp to Stack_Int or StackOfInt.
This would be generic way for naming the template instantiations,
BTW, I used the following code to get rid of _GLOBAL functions,
***
for decl in mb.free_functions():
if(decl.name.startswith('_GLOBAL')):
mb.free_functions(decl.name).exclude()
***
HTH,
Shiva
>-----Original Message-----
>From: Bjørn Roald [mailto:bjorn at 4roald.org]
>Sent: Wednesday, August 02, 2006 10:35 PM
>To: Roman Yakovenko
>Cc: Balasubramanyam, Shivakumar; gccxml at gccxml.org; Development of
>Python/C++ integration
>Subject: Re: [GCC-XML] (__GLOBAL function was Problem exposing templates)
>
>Roman Yakovenko wrote:
>> On 8/3/06, Balasubramanyam, Shivakumar <sbalasub at qualcomm.com> wrote:
>>> [shiva] Roman, I understood the second part of my question, which was
>>> using typedef for explicit instantiation.
>>>
>>> Now I declared using "typedef Stack<int>::Stack Stack_Int;"
>>
>> This does not couse to template instantiation.
>>
>> Please write:
>>
>> Stack_Int s;
>Why do you need the typdef?
>
>Stack<int>::Stack Stack_Int;
>
>Should do it! Or am I missing some other purpose of the typedef?
>
> Bjorn
More information about the gccxml
mailing list