> On Oct 10, 2017, at 01:50, Martin R via swift-users <[email protected]> 
> wrote:
> 
> Thank you Howard for you response! However, I have a follow-up question:
> 
> Why are UnsafeMutableBufferPointer methods which modify not the buffer 
> pointer itself, but only the pointed-to memory, mutating at all?

Don’t forget that UnsafeMutableBufferPointer conforms to MutableCollection, and 
that many MutableCollection methods (such as swapAt) must be mutating. The 
BufferPointer types are unusual among Collection conformers in not having value 
semantics.

Cheers,
Guillaume Lessard

_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to