[C++-sig] Trying to clone (again)
David Abrahams
dave at boost-consulting.com
Wed Aug 3 05:39:50 CEST 2005
"Paul F. Kunz" <Paul_Kunz at slac.stanford.edu> writes:
> FunctionBase *
> FunctionWrap::
> clone () const // overrides FunctionBase::clone()
> {
> #ifndef HAVE_OLD_PYTHON
> PyGILState_STATE state = PyGILState_Ensure ();
> object py_result;
> if (override clone = this->get_override("clone")) {
> try {
> // The Python class author overrode clone; do
> // whatever she says
> py_result = clone();
The result of invoking an override is not meant to be used this way,
but you might be able to force it by doing:
py_result = boost::implicit_cast<object>(clone());
What compiler are you using, incidentally?
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list