Closed HGuillemet closed 9 months ago
I guess either one work, but give it a try with a @Cast
like there already are for SharedPtrAdapter.
i don't think @Cast
works on fields setter.
I'm sure it does, try with the third element.
Ok, it seems to work with this info:
new Info("S::p").annotations("@UniquePtr", "@Cast({\"\", \"\", \"std::unique_ptr<int>&&\"})")
The @Cast
is put on the getter only, but it affects the generation of the setter JNI, somehow.
Thanks, closing this issue.
parses to this getter and setter:
Compiling the JNI triggers:
=
forunique_ptr
has 2 overloads : one taking astd::unique_ptr &&
and another taking aconst std::unique_ptr &
. And the adapter has cast overloads for both.What's the best way to handle this ?
(case seen in Pytorch 2.1)