Skip to content

Commit e3b4927

Browse files
committed
[memory.syn, util.smartptr.shared] Add missing {make,allocate}_shared declarations to synopsis
We list those functions in two places: the main synopsis in [memory.syn], and also a smaller subset in [util.smartptr.shared] just for shared_ptr. Also contains some minor presentational improvements for both instances. Fixes #1697.
1 parent a35fb3e commit e3b4927

File tree

1 file changed

+39
-16
lines changed

1 file changed

+39
-16
lines changed

source/utilities.tex

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6666,7 +6666,8 @@
66666666
template <class T> unique_ptr<T> make_unique(size_t n);
66676667
template <class T, class... Args> @\unspec@ make_unique(Args&&...) = delete;
66686668

6669-
template <class T, class D> void swap(unique_ptr<T, D>& x, unique_ptr<T, D>& y) noexcept;
6669+
template <class T, class D>
6670+
void swap(unique_ptr<T, D>& x, unique_ptr<T, D>& y) noexcept;
66706671

66716672
template <class T1, class D1, class T2, class D2>
66726673
bool operator==(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
@@ -6714,9 +6715,30 @@
67146715

67156716
// \ref{util.smartptr.shared.create}, \tcode{shared_ptr} creation
67166717
template<class T, class... Args>
6717-
shared_ptr<T> make_shared(Args&&... args);
6718+
shared_ptr<T> make_shared(Args&&... args); // \tcode{T} is not array
67186719
template<class T, class A, class... Args>
6719-
shared_ptr<T> allocate_shared(const A& a, Args&&... args);
6720+
shared_ptr<T> allocate_shared(const A& a, Args&&... args); // \tcode{T} is not array
6721+
6722+
template<class T>
6723+
shared_ptr<T> make_shared(size_t N); // \tcode{T} is \tcode{U[]}
6724+
template<class T, class A>
6725+
shared_ptr<T> allocate_shared(const A& a, size_t N); // \tcode{T} is \tcode{U[]}
6726+
6727+
template<class T>
6728+
shared_ptr<T> make_shared(); // \tcode{T} is \tcode{U[N]}
6729+
template<class T, class A>
6730+
shared_ptr<T> allocate_shared(const A& a); // \tcode{T} is \tcode{U[N]}
6731+
6732+
template<class T>
6733+
shared_ptr<T> make_shared(size_t N, const remove_extent_t<T>& u); // \tcode{T} is \tcode{U[]}
6734+
template<class T, class A>
6735+
shared_ptr<T> allocate_shared(const A& a, size_t N,
6736+
const remove_extent_t<T>& u); // \tcode{T} is \tcode{U[]}
6737+
6738+
template<class T> shared_ptr<T>
6739+
make_shared(const remove_extent_t<T>& u); // \tcode{T} is \tcode{U[N]}
6740+
template<class T, class A>
6741+
shared_ptr<T> allocate_shared(const A& a, const remove_extent_t<T>& u); // \tcode{T} is \tcode{U[N]}
67206742

67216743
// \ref{util.smartptr.shared.cmp}, \tcode{shared_ptr} comparisons
67226744
template<class T, class U>
@@ -7987,7 +8009,8 @@
79878009
template<class T> unique_ptr<T> make_unique(size_t n);
79888010
template<class T, class... Args> @\unspec@ make_unique(Args&&...) = delete;
79898011

7990-
template<class T, class D> void swap(unique_ptr<T, D>& x, unique_ptr<T, D>& y) noexcept;
8012+
template<class T, class D>
8013+
void swap(unique_ptr<T, D>& x, unique_ptr<T, D>& y) noexcept;
79918014

79928015
template<class T1, class D1, class T2, class D2>
79938016
bool operator==(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
@@ -8026,7 +8049,6 @@
80268049
bool operator>=(const unique_ptr<T, D>& x, nullptr_t);
80278050
template <class T, class D>
80288051
bool operator>=(nullptr_t, const unique_ptr<T, D>& y);
8029-
80308052
}
80318053
\end{codeblock}
80328054

@@ -9167,29 +9189,30 @@
91679189

91689190
// \ref{util.smartptr.shared.create}, \tcode{shared_ptr} creation
91699191
template<class T, class... Args>
9170-
shared_ptr<T> make_shared(Args&&... args); // \tcode{T} is not array
9192+
shared_ptr<T> make_shared(Args&&... args); // \tcode{T} is not array
91719193
template<class T, class A, class... Args>
9172-
shared_ptr<T> allocate_shared(const A& a, Args&&... args); // \tcode{T} is not array
9194+
shared_ptr<T> allocate_shared(const A& a, Args&&... args); // \tcode{T} is not array
91739195

9174-
template<class T> shared_ptr<T> make_shared(size_t N); // \tcode{T} is \tcode{U[]}
9196+
template<class T>
9197+
shared_ptr<T> make_shared(size_t N); // \tcode{T} is \tcode{U[]}
91759198
template<class T, class A>
9176-
shared_ptr<T> allocate_shared(const A& a, size_t N); // \tcode{T} is \tcode{U[]}
9199+
shared_ptr<T> allocate_shared(const A& a, size_t N); // \tcode{T} is \tcode{U[]}
91779200

9178-
template<class T> shared_ptr<T> make_shared(); // \tcode{T} is \tcode{U[N]}
9201+
template<class T>
9202+
shared_ptr<T> make_shared(); // \tcode{T} is \tcode{U[N]}
91799203
template<class T, class A>
9180-
shared_ptr<T> allocate_shared(const A& a); // \tcode{T} is \tcode{U[N]}
9204+
shared_ptr<T> allocate_shared(const A& a); // \tcode{T} is \tcode{U[N]}
91819205

91829206
template<class T>
9183-
shared_ptr<T> make_shared(size_t N, const remove_extent_t<T>& u); // \tcode{T} is \tcode{U[]}
9207+
shared_ptr<T> make_shared(size_t N, const remove_extent_t<T>& u); // \tcode{T} is \tcode{U[]}
91849208
template<class T, class A>
91859209
shared_ptr<T> allocate_shared(const A& a, size_t N,
9186-
const remove_extent_t<T>& u); // \tcode{T} is \tcode{U[]}
9210+
const remove_extent_t<T>& u); // \tcode{T} is \tcode{U[]}
91879211

91889212
template<class T> shared_ptr<T>
9189-
make_shared(const remove_extent_t<T>& u); // \tcode{T} is \tcode{U[N]}
9213+
make_shared(const remove_extent_t<T>& u); // \tcode{T} is \tcode{U[N]}
91909214
template<class T, class A>
9191-
shared_ptr<T> allocate_shared(const A& a,
9192-
const remove_extent_t<T>& u); // \tcode{T} is \tcode{U[N]}
9215+
shared_ptr<T> allocate_shared(const A& a, const remove_extent_t<T>& u); // \tcode{T} is \tcode{U[N]}
91939216

91949217
// \ref{util.smartptr.shared.cmp}, \tcode{shared_ptr} comparisons
91959218
template<class T, class U>

0 commit comments

Comments
 (0)