
12 Jun
2014
12 Jun
'14
12:43 p.m.
I'm trying to expose an operator: struct my_class : boost::noncopyable {}; my_class &operator <<(my_class &e, int i); // in the module definition: class_<my_class, boost::noncopyable>("my_class") .def(self << int()) ; However, an attempt to invoke this operator in python causes the following error: TypeError: No to_python (by-value) converter found for C++ type: my_class I guess this is related to the fact my_class is noncopyable, isn't it? Is there a workaround for this issue? Thanks.