Re: [pygccxml-development] Proper overload resolution
Brought to you by:
mbaas,
roman_yakovenko
From: Benoit L. <ben...@mo...> - 2010-05-17 18:09:30
|
Roman Yakovenko wrote: > On Mon, May 17, 2010 at 8:31 PM, Benoit Leveau > <ben...@mo...> wrote: >> I already took a look at that page and: >> - solution 1 doesn't work if you want to bind all the functions to one >> unique alias: __setitem__ > > Ok. > >> - solution 2 & 3 don't change the fact that only one of the two functions >> will be called (as bool and int can be converted to each other, it's always >> the last one exposed that will be called) > > You are right. > >> - solution 4 is what I was mentionning in my message, but it doesn't seem >> py++ can generate that code yet. Or does it? > > No, it doesn't. I guess you have no choice, but to implement that > last method by yourself :-( Ok, that's what I thought! And I guess there is no way to "register" some Python code to be executed when the module is loaded, it must be done in the __init__.py file, right? > The only help, you get from Py++, is warning "W1010". You can use > "x.readme()" functionality to check whether set of functions have such > problem or not. You can use that functionality as assert for the > "solution 4". Good, I didn't know a warning was issued in that case. >>From my experience patching boost, creates a huge headache. This is > exactly the reason, why I migrated indexing suite v2 to be header only > library. Thanks! |