Skip to content

Using std::unique_ptr<std::string> return type #909

Answered by wjakob
romanfomin asked this question in Q&A
Discussion options

You must be logged in to vote

The first error message

Conversion of unique_ptr<T> requires that T is handled by nanobind's regular class binding mechanism. However, a type caster was registered to intercept this particular type, which is not allowed.```

already has all the information. You cannot mix unique_ptr and types handled by casting (std::string) in this way. It's not supported and will not be supported in the future.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@hpkfft
Comment options

@romanfomin
Comment options

@hpkfft
Comment options

@wjakob
Comment options

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