[C++-sig] Type converter not found for property
Wichert Akkerman
wichert at wiggy.net
Wed May 8 22:33:51 CEST 2013
I am trying to expose a class with a boost::uuids::uuid member to Python. The class is pretty simple:
class Article {
public:
boost::uuids::uuid uuid;
};
which is exposed like this:
article
.def(init<boost::uuids::uuid, Article::Type>((arg("uuid")))
.def_readwrite("uuid", &Article::uuid);
and I have basic converter registered (see https://gist.github.com/wichert/5543390 , it is a bit large to include in this email). This compiles fine and the uuid convertor works correctly when trying converting from python to C++, but trying to access the uuid property results in "TypeError: No Python class registered for C++ class boost::uuids::uuid". I don't understand why that doesn't work; does anyone see what I missed?
Wichert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20130508/68085ef7/attachment.html>
More information about the Cplusplus-sig
mailing list