logo       

Re: overloaded template functions: msg#00101

programming.swig

Subject: Re: overloaded template functions

I made the problem go away, but only if I use:

%rename(fooINTb) spam::foo(const int, const bool);
namespace spam {
int foo(const int, const bool);
}

fooINTb will not be generated if I use:
%rename(fooINTb) spam::foo(const int, const bool);
int spam::foo(const int, const bool);

Is this sort of bug? Thanks for your help.

Zhong



--- Zhong Ren <renz@xxxxxxxxxxxxxxxx> wrote:
>This worked only when foo is not in any namespace. The following did not work
>for me:
>
>%rename(fooINTb) spam::foo(const int, const bool);
>int spam::foo(const int, const bool);
>%include "mod.h"
>%template(fooINT) spam::foo<int>
>%template(fooDBL) spam::foo<double>
>
>I got only fooINT and fooDBL, but not fooINTb. More help please.
>
>Zhong
>
>
>
>--- David Beazley <beazley@xxxxxxxxxxxxxxx> wrote:
>>Zhong Ren writes:
>> > Where should I put %rename, before or after %include? And which statement
>> > below is correct?
>> >
>> > %rename(fooINTb) foo(const int, const bool);
>> > %rename(fooINTb) foo<int>(const int, const bool);
>> >
>> > I tried all these possibilities, but swig does not generate fooINTb for
>> > me. I must be missing something.
>> >
>>
>>%rename needs to go before. Try
>>
>>%rename(fooINTb) foo(const int, const bool);
>>int foo(const int, const bool);
>>
>>(I think I forgot the last part, which might be the problem).
>>
>>-- Dave
>>
>>_______________________________________________
>>Swig maillist - Swig@xxxxxxxxxxxxxxx
>>http://mailman.cs.uchicago.edu/mailman/listinfo/swig
>
>_____________________________________________________________
>Get email for your site ---> http://www.everyone.net
>
>_____________________________________________________________
>Select your own custom email address for FREE! Get you@xxxxxxxxxxxxxx w/No
>Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag
>_______________________________________________
>Swig maillist - Swig@xxxxxxxxxxxxxxx
>http://mailman.cs.uchicago.edu/mailman/listinfo/swig

_____________________________________________________________
Get email for your site ---> http://www.everyone.net

_____________________________________________________________
Select your own custom email address for FREE! Get you@xxxxxxxxxxxxxx w/No Ads,
6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag
_______________________________________________
Swig maillist - Swig@xxxxxxxxxxxxxxx
http://mailman.cs.uchicago.edu/mailman/listinfo/swig



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise