[stdlib] Restore Array value semantics

'nuff said.

Swift SVN r18923
This commit is contained in:
Dave Abrahams
2014-06-16 13:56:15 +00:00
parent acc2c3be40
commit 85533dd7d3
9 changed files with 69 additions and 46 deletions

View File

@@ -183,6 +183,10 @@ extension ArrayBuffer {
}
return nil
}
mutating func isMutableAndUniquelyReferenced() -> Bool {
return Swift.isUniquelyReferenced(&storage) && _hasMutableBuffer
}
/// If this buffer is backed by a ContiguousArrayBuffer, return it.
/// Otherwise, return nil. Note: the result's elementStorage may