What is the suggested way to pass array/vector data back and forth from swift and cpp?

// cpp side

using KeyVector = std::vector<Key*>;



// swift side

func convert (_ inputArray: [scad.Key]) -> scad.KeyVector {
    var tempResult = scad.KeyVector()
    tempResult.reserve(inputArray.count)
    for item in inputArray {
        tempResult.push_back(item) // cannot convert value of type 'scad.Key' to expected argument type 'std.__1.vector<UnsafeMutablePointer<Key>, allocator<UnsafeMutablePointer<Key>>>.value_type?' (aka 'Optional<UnsafeMutablePointer<scad.Key>>')sourcek
    }
    return tempResult
}