mirror of
https://github.com/apple/swift-collections
synced 2026-11-25 04:37:48 +00:00
Review and update container protocols and conformances
- @inlinable → @_alwaysEmitIntoClient for now, to avoid temporary ABI issues
- Review RangeReplaceableContainer algorithms; add missing ones:
- New requirements: `removeFirst()`, `removeFirst(_:)`, `_customRemoveLast()`, `_customRemoveLast(_:) (with default implementations)
- `func removeAll()`
- `func removeLast()`, `func removeLast(_:)`, `func popLast()` when self is also bidirectional
- Review RigidArray, UniqueArray algorithms; remove ones needlessly duplicating functionality already provided by RRC. Try not to break source compatibility.
This commit is contained in:
36 files changed
+415
-644
No files matched your search
@@ -48,10 +48,10 @@ extension UniqueArray: RandomAccessContainer where Element: ~Copyable {}
|
||||
extension UniqueArray: MutableContainer where Element: ~Copyable {}
|
||||
|
||||
#if compiler(>=6.4)
|
||||
@available(SwiftStdlib 6.4, *)
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueArray: RangeReplaceableContainer where Element: ~Copyable {}
|
||||
|
||||
@available(SwiftStdlib 6.4, *)
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueArray: DynamicContainer where Element: ~Copyable {}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user