[C++-sig] Re: Boost.Python not resolving overloads

Niall Douglas s_sourceforge at nedprod.com
Tue Sep 23 21:02:30 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 22 Sep 2003 at 19:11, David Abrahams wrote:

> > If so, it would appear to me to be trivial - just insert the object
> > instance as the first parameter if all else fails.
> 
> That is *not* the right fix.  A regular member function with signature
> 
>      void (A::*)(A&, int);
> 
> might inadvertently be called via
> 
>      >>> A().f(3)
> 
> without issuing an error.  Errors are good.  If you want the
> library/language to guess at what you meant when you screw up instead
> of telling you what went wrong, you should be using Perl, not Python.

Mmm, agreed. The mixed static/normal method flag is needed.

> I'll tell you what.  Why don't you start by writing a doctest case
> which would succeed only with your proposed feature, and also includes
> calls like my example above that should fail overload resolution.  We
> can look that over, and if it's acceptable to me, you can try to write
> a patch which makes the tests pass.

I've thought about this at length. I'd really like it, true, but 
after weighing up the consequenes to my users of having an incomplete 
interface - well, right now, I'm tending to think they can manage 
without.

However if there were sufficient demand, I'd probably come back to 
this. We'll see.

Cheers,
Niall





-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2

iQA/AwUBP3CYxsEcvDLFGKbPEQKukQCg3fZZZ1xcc+hzSVvayIw9Nh6RQH4AoJYC
nhAMgIbPgL1ZfB/cXnkoSO2V
=CLVX
-----END PGP SIGNATURE-----




More information about the Cplusplus-sig mailing list