| Store | Cart

Re: [C++-sig] Overloading methods in derived class

From: Stefan Ring <stef...@gmail.com>
Sat, 19 Aug 2017 19:08:30 +0200
On Thu, Aug 17, 2017 at 12:32 AM, Jeremy Mayes <jere...@gmail.com> wrote:
> File “.../test.py”, line 11, in <module>>     b.foo(0)> Boost.Python.ArgumentError: Python argument types in>     B.foo(B, int)> Did not match C++ signature:>     foo(B {Value}, int, double)>> I’m not surprised by this behavior given python’s method resolution process.> My question is whether there’s a good way to deal with this in boost.python> so that I don’t have to add duplicate entries in sub-classes for methods> I’ve already exposed in base classes.
Would you not have to declare the overloaded methods even if they were
all part of the same class? It might even work exactly the same way,
if the overloaded methods from the base class are not hidden.
_______________________________________________
Cplusplus-sig mailing list
Cplu...@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig
Recent Messages in this Thread
Jeremy Mayes Aug 16, 2017 10:32 pm
Stefan Ring Aug 19, 2017 05:08 pm
Messages in this thread