Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15433] UnsafeRawBufferPointer has no withContiguousStorageIfAvailable implementation #57739

Closed
glessard opened this issue Nov 3, 2021 · 3 comments
Assignees
Labels
improvement standard library Area: Standard library umbrella

Comments

@glessard
Copy link
Contributor

glessard commented Nov 3, 2021

Previous ID SR-15433
Radar rdar://problem/84980367
Original Reporter @glessard
Type Improvement
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Improvement
Assignee @glessard
Priority Medium

md5: 78315b20e4f1dea8d8b4c0ca904ca459

Issue Description:

$ swift
Welcome to Swift version 5.5.1-dev.
Type :help for assistance.
  1> var b = UnsafeMutableRawBufferPointer.allocate(byteCount: 8, alignment: 8)
b: UnsafeMutableRawBufferPointer = 8 values (0x100404080) {
  [0] = 0
  [1] = 0
  [2] = 0
  [3] = 0
  [4] = 0
  [5] = 0
  [6] = 0
  [7] = 0
}
  2> b.withContiguousStorageIfAvailable { $0.count }
$R0: Int? = nil
  3> b.withContiguousMutableStorageIfAvailable { $0.count } 
$R1: Int? = nil
  4>  

I'm not sure there's a good reason to not have them.

@glessard
Copy link
Contributor Author

glessard commented Nov 3, 2021

@swift-ci create

@glessard
Copy link
Contributor Author

glessard commented Feb 9, 2022

Addressed by #41288

@glessard
Copy link
Contributor Author

#41288 has been merged to swift/main.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

1 participant