Skip to content

[4.2] [SE-0210] Add a MemoryLayout<T>.offset(of:) method for getting the offset of inline storage #16499

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

Merged
merged 2 commits into from
May 10, 2018

Conversation

DougGregor
Copy link
Member

If a key path refers to inline storage of the root type, this produces the offset in bytes between a pointer to the root and a pointer to the projected storage. Otherwise, returns nil.

jckarter and others added 2 commits May 10, 2018 09:22
…inline storage.

If a key path refers to inline storage of the root type, this produces the offset in bytes between a pointer to the root and a pointer to the projected storage. Otherwise, returns nil.

(cherry picked from commit a6a792c)
@DougGregor
Copy link
Member Author

@swift-ci please test and merge

@swift-ci swift-ci merged commit 2ed2b61 into swiftlang:swift-4.2-branch May 10, 2018
@DougGregor DougGregor deleted the se-0210-offset-of-4.2 branch May 10, 2018 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants