Skip to content

Commit a287dbd

Browse files
authored
Merge 2021-06 LWG Motion 8
P1518R2 Stop overconstraining allocators in container deduction guides
2 parents 644cb46 + 51b3ccd commit a287dbd

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

source/containers.tex

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3765,8 +3765,8 @@
37653765
deque(InputIterator first, InputIterator last, const Allocator& = Allocator());
37663766
deque(const deque& x);
37673767
deque(deque&&);
3768-
deque(const deque&, const Allocator&);
3769-
deque(deque&&, const Allocator&);
3768+
deque(const deque&, const type_identity_t<Allocator>&);
3769+
deque(deque&&, const type_identity_t<Allocator>&);
37703770
deque(initializer_list<T>, const Allocator& = Allocator());
37713771

37723772
~deque();
@@ -4190,8 +4190,8 @@
41904190
forward_list(InputIterator first, InputIterator last, const Allocator& = Allocator());
41914191
forward_list(const forward_list& x);
41924192
forward_list(forward_list&& x);
4193-
forward_list(const forward_list& x, const Allocator&);
4194-
forward_list(forward_list&& x, const Allocator&);
4193+
forward_list(const forward_list& x, const type_identity_t<Allocator>&);
4194+
forward_list(forward_list&& x, const type_identity_t<Allocator>&);
41954195
forward_list(initializer_list<T>, const Allocator& = Allocator());
41964196
~forward_list();
41974197
forward_list& operator=(const forward_list& x);
@@ -4993,8 +4993,8 @@
49934993
list(InputIterator first, InputIterator last, const Allocator& = Allocator());
49944994
list(const list& x);
49954995
list(list&& x);
4996-
list(const list&, const Allocator&);
4997-
list(list&&, const Allocator&);
4996+
list(const list&, const type_identity_t<Allocator>&);
4997+
list(list&&, const type_identity_t<Allocator>&);
49984998
list(initializer_list<T>, const Allocator& = Allocator());
49994999
~list();
50005000
list& operator=(const list& x);
@@ -5701,8 +5701,8 @@
57015701
constexpr vector(InputIterator first, InputIterator last, const Allocator& = Allocator());
57025702
constexpr vector(const vector& x);
57035703
constexpr vector(vector&&) noexcept;
5704-
constexpr vector(const vector&, const Allocator&);
5705-
constexpr vector(vector&&, const Allocator&);
5704+
constexpr vector(const vector&, const type_identity_t<Allocator>&);
5705+
constexpr vector(vector&&, const type_identity_t<Allocator>&);
57065706
constexpr vector(initializer_list<T>, const Allocator& = Allocator());
57075707
constexpr ~vector();
57085708
constexpr vector& operator=(const vector& x);
@@ -6245,8 +6245,8 @@
62456245
constexpr vector(InputIterator first, InputIterator last, const Allocator& = Allocator());
62466246
constexpr vector(const vector& x);
62476247
constexpr vector(vector&& x);
6248-
constexpr vector(const vector&, const Allocator&);
6249-
constexpr vector(vector&&, const Allocator&);
6248+
constexpr vector(const vector&, const type_identity_t<Allocator>&);
6249+
constexpr vector(vector&&, const type_identity_t<Allocator>&);
62506250
constexpr vector(initializer_list<bool>, const Allocator& = Allocator());
62516251
constexpr ~vector();
62526252
constexpr vector& operator=(const vector& x);
@@ -6612,8 +6612,8 @@
66126612
map(const map& x);
66136613
map(map&& x);
66146614
explicit map(const Allocator&);
6615-
map(const map&, const Allocator&);
6616-
map(map&&, const Allocator&);
6615+
map(const map&, const type_identity_t<Allocator>&);
6616+
map(map&&, const type_identity_t<Allocator>&);
66176617
map(initializer_list<value_type>,
66186618
const Compare& = Compare(),
66196619
const Allocator& = Allocator());
@@ -7158,8 +7158,8 @@
71587158
multimap(const multimap& x);
71597159
multimap(multimap&& x);
71607160
explicit multimap(const Allocator&);
7161-
multimap(const multimap&, const Allocator&);
7162-
multimap(multimap&&, const Allocator&);
7161+
multimap(const multimap&, const type_identity_t<Allocator>&);
7162+
multimap(multimap&&, const type_identity_t<Allocator>&);
71637163
multimap(initializer_list<value_type>,
71647164
const Compare& = Compare(),
71657165
const Allocator& = Allocator());
@@ -7461,8 +7461,8 @@
74617461
set(const set& x);
74627462
set(set&& x);
74637463
explicit set(const Allocator&);
7464-
set(const set&, const Allocator&);
7465-
set(set&&, const Allocator&);
7464+
set(const set&, const type_identity_t<Allocator>&);
7465+
set(set&&, const type_identity_t<Allocator>&);
74667466
set(initializer_list<value_type>, const Compare& = Compare(),
74677467
const Allocator& = Allocator());
74687468
template<class InputIterator>
@@ -7735,8 +7735,8 @@
77357735
multiset(const multiset& x);
77367736
multiset(multiset&& x);
77377737
explicit multiset(const Allocator&);
7738-
multiset(const multiset&, const Allocator&);
7739-
multiset(multiset&&, const Allocator&);
7738+
multiset(const multiset&, const type_identity_t<Allocator>&);
7739+
multiset(multiset&&, const type_identity_t<Allocator>&);
77407740
multiset(initializer_list<value_type>, const Compare& = Compare(),
77417741
const Allocator& = Allocator());
77427742
template<class InputIterator>
@@ -8156,8 +8156,8 @@
81568156
unordered_map(const unordered_map&);
81578157
unordered_map(unordered_map&&);
81588158
explicit unordered_map(const Allocator&);
8159-
unordered_map(const unordered_map&, const Allocator&);
8160-
unordered_map(unordered_map&&, const Allocator&);
8159+
unordered_map(const unordered_map&, const type_identity_t<Allocator>&);
8160+
unordered_map(unordered_map&&, const type_identity_t<Allocator>&);
81618161
unordered_map(initializer_list<value_type> il,
81628162
size_type n = @\seebelow@,
81638163
const hasher& hf = hasher(),
@@ -8751,8 +8751,8 @@
87518751
unordered_multimap(const unordered_multimap&);
87528752
unordered_multimap(unordered_multimap&&);
87538753
explicit unordered_multimap(const Allocator&);
8754-
unordered_multimap(const unordered_multimap&, const Allocator&);
8755-
unordered_multimap(unordered_multimap&&, const Allocator&);
8754+
unordered_multimap(const unordered_multimap&, const type_identity_t<Allocator>&);
8755+
unordered_multimap(unordered_multimap&&, const type_identity_t<Allocator>&);
87568756
unordered_multimap(initializer_list<value_type> il,
87578757
size_type n = @\seebelow@,
87588758
const hasher& hf = hasher(),
@@ -9118,8 +9118,8 @@
91189118
unordered_set(const unordered_set&);
91199119
unordered_set(unordered_set&&);
91209120
explicit unordered_set(const Allocator&);
9121-
unordered_set(const unordered_set&, const Allocator&);
9122-
unordered_set(unordered_set&&, const Allocator&);
9121+
unordered_set(const unordered_set&, const type_identity_t<Allocator>&);
9122+
unordered_set(unordered_set&&, const type_identity_t<Allocator>&);
91239123
unordered_set(initializer_list<value_type> il,
91249124
size_type n = @\seebelow@,
91259125
const hasher& hf = hasher(),
@@ -9443,8 +9443,8 @@
94439443
unordered_multiset(const unordered_multiset&);
94449444
unordered_multiset(unordered_multiset&&);
94459445
explicit unordered_multiset(const Allocator&);
9446-
unordered_multiset(const unordered_multiset&, const Allocator&);
9447-
unordered_multiset(unordered_multiset&&, const Allocator&);
9446+
unordered_multiset(const unordered_multiset&, const type_identity_t<Allocator>&);
9447+
unordered_multiset(unordered_multiset&&, const type_identity_t<Allocator>&);
94489448
unordered_multiset(initializer_list<value_type> il,
94499449
size_type n = @\seebelow@,
94509450
const hasher& hf = hasher(),
@@ -9729,7 +9729,7 @@
97299729
\item It has an \tcode{InputIterator} template parameter and a type that does not qualify as an input iterator is deduced for that parameter.
97309730
\item It has a \tcode{Compare} template parameter and a type that qualifies as an allocator is deduced for that parameter.
97319731
\item It has a \tcode{Container} template parameter and a type that qualifies as an allocator is deduced for that parameter.
9732-
\item It has an \tcode{Allocator} template parameter and a type that does not qualify as an allocator is deduced for that parameter.
9732+
\item It has no \tcode{Container} template parameter, and it has an \tcode{Allocator} template parameter, and a type that does not qualify as an allocator is deduced for that parameter.
97339733
\item It has both \tcode{Container} and \tcode{Allocator} template parameters, and \tcode{uses_allocator_v<Container, Allocator>} is \tcode{false}.
97349734
\end{itemize}
97359735

0 commit comments

Comments
 (0)