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
Post a Comment