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.
- Relevant section of the standard.
- Paper.
- Based on D62259.
Thanks for the help @mclow.lists and @EricWF
IMO it would be cleaner to eliminate the partial specialization and just write
template <class _Array, class _Alloc> struct __unbounded_array_control_block : __shared_weak_count { using _Tp = remove_extent_t<_Array>;Ditto for __bounded_array_control_block below. But admittedly I'd expect this to be marginally more expensive in terms of compile time.