boost python - Why can't I pass T as HeldType to class_? -


according boost docs default heldtype t. should able explicitly pass t. cannot, because boost asks me provide public constructor class accepts arguments

pyobject*&, boost::reference_wrapper<const t>::type& 

why? boost behaves if following rule applied:

if heldtype derived t, exposed constructor(s) must accept initial pyobject* argument refers python object contains heldtype instance, shown in example.

(source)

is bug or oversimplification in documentation?


Comments

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -