We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! Is it possible to take pointer from shred_ptr in julia?
I found the following behaviour:
Here is a binded class:
types.add_type<DataBase>("DataBase") .method("AddMaterial", &DataBase::addMaterial); types.method("GetTemplate", [](DataBase *db, const std::string &name) -> PropTemplate
Lets return raw pointer to DataBase:
DataBase
db = OpenDb() println(typeof(db)) # CxxPtr{DataBase} AddMaterial(db, "", InN) # ok templ = GetTemplate(db[], "") # ok
its ok.
Let return stdL::shared_ptr
db = OpenDb() println(typeof(db)) # CxxWrap.StdLib.SharedPtrAllocated{DataBase} AddMaterial(db[], "", InN) # ok templ = GetTemplate(db[], "") # error
i got error trying to pass shared_ptr[] to non member function taking pointer.
shared_ptr[]
Its obvious that operator[] return reference and there is internal workaround for members.
operator[]
Is it possible to get it work same way for member and non member functions? (Could i add some function taking pointer from shared_ptr?)
(i have a lot of function taking pointers, and get 20% slow down on simple functions taking reference)
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi!
Is it possible to take pointer from shred_ptr in julia?
I found the following behaviour:
Here is a binded class:
Lets return raw pointer to
DataBase
:its ok.
Let return stdL::shared_ptr
i got error trying to pass
shared_ptr[]
to non member function taking pointer.Its obvious that
operator[]
return reference and there is internal workaround for members.Is it possible to get it work same way for member and non member functions? (Could i add some function taking pointer from shared_ptr?)
(i have a lot of function taking pointers, and get 20% slow down on simple functions taking reference)
Thanks!
The text was updated successfully, but these errors were encountered: