problems with constructor/implicitly_convertible
1 Feb
2005
1 Feb
'05
6:38 p.m.
Hi, I have defined the following: bigint* bigint_constructor(long_ l){ return new bigint(to_bigint(l)); } class_<bigint>("bigint") .def("__init__", make_constructor(bigint_constructor)) .... .... implicitly_convertible<boost::python::long_, bigint>(); Now I want to have a implicit conversion from long_ to bigint. My original c++ class has no constructor with long_ but my python-bigint class. The compiler tries to find one on c++ bigint and doesn't find it. How should I use implicitly_convertible to reach my goal? Benjamin
7171
Age (days ago)
7171
Last active (days ago)
0 comments
1 participants
participants (1)
-
Benjamin Schmeling