Skip to content

[init] no_init and noncopyable #265

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

You must be logged in to vote

Class bindings are no_init by default unless you bind some kind of a constructor. A copy constructor must also be bound explicitly.

If you completely want to avoid copies of a class being made, then that only works if the class declares a deleted copy constructor (which nanobind detects and respects).

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@huangweiwu
Comment options

Answer selected by huangweiwu
Comment options

You must be logged in to vote
0 replies
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