[C++-sig] Re: Boost.Python not resolving overloads
s_sourceforge at nedprod.com
Sun Sep 21 04:34:04 CEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
On 20 Sep 2003 at 22:10, David Abrahams wrote:
> >> Wha??? No, it can't just guess at what you mean.
> > I don't see why. If one of my name()'s is zero parameters and the
> > other one takes a string
> Neither is zero parameters, as the error indicates. One takes an
> FXString and the other takes an FXFile.
As in, the non-static version takes "self", yes I get that ...
> Boost.Python uses the Python staticmethod wrapper to create static
Which I used. And I should add there's no docs saying that you can't
mix static and non-static names though I admit it's implied by how
> In this case, though, the behavior is known and expected.
Might it be an idea in the name of flexibility that boost.python
marks mixed static and non-static functions and tries matching the
static one first. If that fails, then it makes the first parameter
"self" and tries again.
That way you get both working nicely in almost all cases, and a more
accurate interface is provided to python?
-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 18.104.22.168 / 9-2003 + PGP 8.0.2
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig