Range.memory = rangeOut has been changed

to:

range.pointee = rangeOut

as of Swift 3 and still works in Swift 4.1