Page MenuHomePhabricator

Support arrays in make_shared and allocate_shared (P0674R1)
Needs ReviewPublic

Authored by zoecarver on May 29 2019, 7:25 PM.

Details

Summary

This patch implements P0674R1. It might be a bit rough around the edges, but I wanted to get it out so it can be reviewed and I can make changes to it as I straighten out the last few parts.

The main changes are how __shared_ptr_pointer deallocates itself and (obviously) the added overloads.

Thanks for the help @mclow.lists and @EricWF

Diff Detail

Event Timeline

zoecarver created this revision.May 29 2019, 7:25 PM
zoecarver marked 2 inline comments as done.May 29 2019, 7:28 PM
zoecarver added inline comments.
include/memory
4637

Oops, I will fix this.

4740

I couldn't find a better way to do initializer_lists. Let me know if there is one.

zoecarver marked an inline comment as done.May 30 2019, 8:25 PM
zoecarver added inline comments.
include/memory
4686

This might create problems with scary pointers. Pointer traits should be used.

I think D62760 is a good stepping stone for this patch because of the implementation similarities. Once it has been reviewed, I can update this patch with the changes.