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

Fixed enforcement in emplace #249

Closed
wants to merge 1 commit into from
Closed

Fixed enforcement in emplace #249

wants to merge 1 commit into from

Conversation

tgehr
Copy link
Contributor

@tgehr tgehr commented Sep 8, 2011

std.conv.emplace checked for sizeof(size_t)-byte alignment of emplace'd class instances, but, as far as I know, 16-byte alignment is required. Apparently it was incorrectly assumed that T.alignof would be the alignment of the class instance. Actually it is the alignment of the class reference which is equal to sizeof(size_t).

@tgehr
Copy link
Contributor Author

tgehr commented Sep 9, 2011

It was a bug in my allocator code. But I still think T.alignof should be replaced by size_t.sizeof. I will create a seperate pull request for that.

@tgehr tgehr closed this Sep 9, 2011
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.

1 participant