Date: 2001-07-17 10:21:05
This is another installment in my exploration of the boundaries of
class_builder<Term> Term_(module, "Term");
class_builder<Expression> Expression_(module, "Expression");
class_builder<User> User_(module, "User");
Using the original C++ code, I could write
, because C++ is smart enough to figure out how to construct an
Expression from a Term.
Now, trying the same in Python, we get
>>>t = Term()
>>>u = User(t)
TypeError: extension class 'Term' is not convertible
Short of modifying the original C++ code to add a User::User(const
Term&) constructor, is there anything I can do to get the Boost
typesystem to apply Expression::Expression(const Term&) for me?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk