Empty holder object
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
I have a class that is held in a smart pointer. The class is not default constructable.
In Python, I would like to instantiate the holder without an object held within, and later assign that object.
Is there a way to instantiate a holder in this manner? All my attempts to override the constructor ended up in pybind11 runtime exceptions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported empty-holder construction attempts in a minimal pybind11 binding, focusing on smart pointers and non-default-constructible classes. Determine whether a holder can be created without an object and assigned later; done means a supported approach is identified or the limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100