-
I have a typedef: In pybind11 I could cast to string with This is my function:
But am getting From my python test:
and I get
Feels like I am missing something simple. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
You are likely missing an include for the type caster, please review the documentation. |
Beta Was this translation helpful? Give feedback.
-
You are likely missing an include for the type caster, please review the documentation. |
Beta Was this translation helpful? Give feedback.
Since I am trying to pass in a uuid.UUID object, what I needed to do was:
std::string s = py::cast<std::string>(id.attr("hex"));