Skip to content

nb::cast<std::string>() bad cast #896

Closed Answered by fraguada
fraguada asked this question in Q&A
Discussion options

You must be logged in to vote

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"));

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@fraguada
Comment options

@fraguada
Comment options

@fraguada
Comment options

Answer selected by fraguada
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants