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
template<class T, class... Args> shared_ptr<T> make_shared(Args&&... args); // T is not array template<class T, class A, class... Args> shared_ptr<T> allocate_shared(const A& a, Args&&... args); // T is not array template<class T> shared_ptr<T> make_shared(size_t N); // T is U[] (since C++20) template<class T, class A> shared_ptr<T> allocate_shared(const A& a, size_t N); // T is U[] (since C++20) template<class T> shared_ptr<T> make_shared(); // T is U[N] (since C++20) template<class T, class A> shared_ptr<T> allocate_shared(const A& a); // T is U[N] (since C++20) template<class T> shared_ptr<T> make_shared(size_t N, const remove_extent_t<T>& u); // T is U[] (since C++20) template<class T, class A> shared_ptr<T> allocate_shared(const A& a, size_t N, const remove_extent_t<T>& u); // T is U[] (since C++20) template<class T> shared_ptr<T> make_shared(const remove_extent_t<T>& u); // T is U[N] (since C++20) template<class T, class A> shared_ptr<T> allocate_shared(const A& a, const remove_extent_t<T>& u); // T is U[N] (since C++20)