Skip to content

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