When i instantiate a structure defined in swift in C++ and then i pass it to swift function as a IN param, it is passed as a constant value to the function. Here the same structure instance is passed or a copy is created?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have a use-case where I want to pass the user defined swift structure instantiated in swift and then pass it to a C++ Function as a Input Param. Is there a way to do that?
I am trying to use the swift type UnsafeMutablePointer directly in C++. According to the documentation mentioned, swift expose this type to C++. But I am not able to use it .
void
GetPointerFromSwift () {
// Calls a swift function to get a pointer.
swift::UnsafeMutablePointer<swit::Int> x = Interop::GetPointer ()
}