@DTS Engineer I got your point and i was able to use the pointer in that way.
public func ReturnInteger() -> UnsafeMutablePointer<Int32> {
withUnsafeMutablePointer(to: &value) {pointer in
return pointer
}
}
void
CppClass::GetIntegerPointer() noexcept
{
int32_t * x = (int32_t *)Interop::ReturnInteger();
// The above way works but when i am trying to directly use
// swift::UnsafeMutablePointer<int32_t> x = (int32_t *) Interop::ReturnInteger ();
// it gives build error that UnsafeMutablePointer not found .
}
But in the documentation it's mentioned that it is exposed to C++.
Quote
Pointer types, like OpaquePointer, UnsafePointer, UnsafeMutablePointer, UnsafeRawPointer and UnsafeMutableRawPointer
UnQuote
Can you Explain what does this mean?