I am trying to wrap a C++ class that handles binary values using Boost.Python. For this class, the "<<" operator has been defined as
std::ostream &operator<<(std::ostream &output, const bin &inbin);
I tried wrapping it with
class_<bin>("bin", init<>())
.def(str(self));
However, the compilation throws this error:
boost/python/def_visitor.hpp:31:9: error: no matching function for call to
‘boost::python::api::object::visit(boost::python::class_<itpp::bin>&) const’
I am not sure how to resolve this error, anyone have an idea?