On 12/05/07, Roman Yakovenko <roman.yakovenko@gmail.com> wrote:
On 5/12/07, Gustavo Carneiro <gjcarneiro@gmail.com> wrote:
>   Sometimes Py++ _knows_ a method won't compile, but tries to bind it anyway.  This can be bad when you have developers adding C++ methods and not aware or not caring about Python bindings; sometimes they add methods that won't compile. 

>Not to mention that is a pain to have to manually exclude the methods that won't compile.

Why? I think Py++ provide a convenient interface for such things.

  Yes, Py++ provides the best possible interface for everything.  But sometimes no interface at all is even better ;-)

>   Couldn't Py++ just not bind methods that will not compile for sure?

Yes. Today every declaration has "exclude" method. I will add new argument - "declarations_that_cause_compile_time_errors_only" ( please give a better name ).
You will have to set it to "True". The function will write to the log all declarations it excluded.

I guess you don't want to exclude function that missing call policies, right?

  Yes, missing call policies is what usually hits me.  I am not sure if there are other cases when Py++ definitely knows the generated code won't compile...

The way I am going to implement this is to check messages reported by "readme" method, to find all those I will define as problematic and exclude the declarations.

P.S. I am a little bit busy these days, can you add new "feature request" to the project? Thanks.

  Sure.

  I should try to produce a patch, I guess... :P

  PS:  0.9 was a _great_ release; it even produces code that compiles fine with "off the shelf " Boost 1.33.1.  That is a great thing; thank you so much :-)

--
Gustavo J. A. M. Carneiro
"The universe is always one step beyond logic." -- Frank Herbert