template<class T, ...>
shared_ptr<T> make_shared(args);
template<class T, class A, ...>
shared_ptr<T> allocate_shared(const A& a, args);
template<class T, ...>
shared_ptr<T> make_shared_for_overwrite(args);
template<class T, class A, ...>
shared_ptr<T> allocate_shared_for_overwrite(const A& a, args);
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[]
template<class T, class A>
shared_ptr<T> allocate_shared(const A& a, size_t N); // T is U[]
template<class T>
shared_ptr<T> make_shared(); // T is U[N]
template<class T, class A>
shared_ptr<T> allocate_shared(const A& a); // T is U[N]
template<class T>
shared_ptr<T> make_shared(size_t N,
const remove_extent_t<T>& u); // T is U[]
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[]
shared_ptr<double[]> p = make_shared<double[]>(1024, 1.0); // shared_ptr to a double[1024], where each element is 1.0 shared_ptr<double[][2]> q = make_shared<double[][2]>(6, {1.0, 0.0}); // shared_ptr to a double[6][2], where each double[2] element is {1.0, 0.0} shared_ptr<vector<int>[]> r = make_shared<vector<int>[]>(4, {1, 2}); // shared_ptr to a vector<int>[4], where each vector has contents {1, 2}— end example
template<class T>
shared_ptr<T> make_shared(const remove_extent_t<T>& u); // T is U[N]
template<class T, class A>
shared_ptr<T> allocate_shared(const A& a,
const remove_extent_t<T>& u); // T is U[N]
shared_ptr<double[1024]> p = make_shared<double[1024]>(1.0); // shared_ptr to a double[1024], where each element is 1.0 shared_ptr<double[6][2]> q = make_shared<double[6][2]>({1.0, 0.0}); // shared_ptr to a double[6][2], where each double[2] element is {1.0, 0.0} shared_ptr<vector<int>[4]> r = make_shared<vector<int>[4]>({1, 2}); // shared_ptr to a vector<int>[4], where each vector has contents {1, 2}— end example
template<class T>
shared_ptr<T> make_shared_for_overwrite();
template<class T, class A>
shared_ptr<T> allocate_shared_for_overwrite(const A& a);
struct X { double data[1024]; }; shared_ptr<X> p = make_shared_for_overwrite<X>(); // shared_ptr to a default-initialized X, where each element in X::data has an indeterminate value shared_ptr<double[1024]> q = make_shared_for_overwrite<double[1024]>(); // shared_ptr to a default-initialized double[1024], where each element has an indeterminate value— end example
template<class T>
shared_ptr<T> make_shared_for_overwrite(size_t N);
template<class T, class A>
shared_ptr<T> allocate_shared_for_overwrite(const A& a, size_t N);