[C++-sig] Boost.Python v2: implicit conversion support
David Abrahams
david.abrahams at rcn.com
Tue Mar 26 18:10:18 CET 2002
Support for C++ implicit conversions has now been added to the v2
codebase. Please see libs/python/test/implicit.* for examples.
The facility looks like:
boost::python::implicitly_convertible<SourceType,DestType>();
which declares that SourceType is implicitly convertible to DestType.
This declaration allows a Python object which can be converted to
SourceType to be passed to a wrapped C++ function in place of a DestType
or DestType const& parameter.
-Dave
+---------------------------------------------------------------+
David Abrahams
C++ Booster (http://www.boost.org) O__ ==
Pythonista (http://www.python.org) c/ /'_ ==
resume: http://users.rcn.com/abrahams/resume.html (*) \(*) ==
email: david.abrahams at rcn.com
+---------------------------------------------------------------+
More information about the Cplusplus-sig
mailing list