2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-26 18:52:26 +00:00

Support for wrapping function objects and classes which use virtual

inheritance.  Completely killed off member_function_cast!


[SVN r19945]
This commit is contained in:
Dave Abrahams
2003-09-07 16:56:05 +00:00
parent 4a7b8fe839
commit b3910f4e4d
10 changed files with 340 additions and 375 deletions

View File

@@ -25,6 +25,7 @@ struct P
{
virtual ~P(){}
virtual std::string f() = 0;
std::string g() { return "P::g()"; }
};
struct PCallback : P, Callback
@@ -37,7 +38,7 @@ struct PCallback : P, Callback
}
};
struct Q : P
struct Q : virtual P
{
std::string f() { return "Q::f()"; }
};
@@ -155,6 +156,7 @@ BOOST_PYTHON_MODULE_INIT(polymorphism_ext)
;
class_<Q, bases<P> >("Q")
.def("g", &P::g) // make sure virtual inheritance doesn't interfere
;
}