|
141 | 141 | template<class T, class Alloc, class U, class V>
|
142 | 142 | constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding
|
143 | 143 | const pair<U, V>&& pr) noexcept;
|
| 144 | + template<class T, class Alloc, @\exposconcept{pair-like}@ P> |
| 145 | + constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding |
| 146 | + P&& p) noexcept; |
144 | 147 | template<class T, class Alloc, class U>
|
145 | 148 | constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding
|
146 | 149 | U&& u) noexcept;
|
|
1202 | 1205 | \end{codeblock}
|
1203 | 1206 | \end{itemdescr}
|
1204 | 1207 |
|
| 1208 | +\indexlibraryglobal{uses_allocator_construction_args}% |
| 1209 | +\begin{itemdecl} |
| 1210 | +template<class T, class Alloc, @\exposconcept{pair-like}@ P> |
| 1211 | + constexpr auto uses_allocator_construction_args(const Alloc& alloc, P&& p) noexcept; |
| 1212 | +\end{itemdecl} |
| 1213 | + |
| 1214 | +\begin{itemdescr} |
| 1215 | +\pnum |
| 1216 | +\constraints |
| 1217 | +\tcode{remove_cv_t<T>} is a specialization of \tcode{pair} and |
| 1218 | +\tcode{remove_cvref_t<P>} is not a specialization of \tcode{ranges::subrange}. |
| 1219 | + |
| 1220 | +\pnum |
| 1221 | +\effects |
| 1222 | +Equivalent to: |
| 1223 | +\begin{codeblock} |
| 1224 | +return uses_allocator_construction_args<T>(alloc, piecewise_construct, |
| 1225 | + forward_as_tuple(get<0>(std::forward<P>(p))), |
| 1226 | + forward_as_tuple(get<1>(std::forward<P>(p)))); |
| 1227 | +\end{codeblock} |
| 1228 | +\end{itemdescr} |
| 1229 | + |
1205 | 1230 | \indexlibraryglobal{uses_allocator_construction_args}%
|
1206 | 1231 | \begin{itemdecl}
|
1207 | 1232 | template<class T, class Alloc, class U>
|
|
1218 | 1243 |
|
1219 | 1244 | \pnum
|
1220 | 1245 | \constraints
|
1221 |
| -\tcode{remove_cv_t<T>} is a specialization of \tcode{pair}, and |
| 1246 | +\tcode{remove_cv_t<T>} is a specialization of \tcode{pair}, and either: |
| 1247 | +\begin{itemize} |
| 1248 | +\item |
| 1249 | +\tcode{remove_cvref_t<U>} is a specialization of \tcode{ranges::subrange}, or |
| 1250 | +\item |
| 1251 | +\tcode{U} does not satisfy \exposconcept{pair-like} and |
1222 | 1252 | the expression \tcode{\exposid{FUN}(u)} is not well-formed
|
1223 | 1253 | when considered as an unevaluated operand.
|
| 1254 | +\end{itemize} |
1224 | 1255 |
|
1225 | 1256 | \pnum
|
1226 | 1257 | Let \exposid{pair-constructor} be an exposition-only class defined as follows:
|
|
0 commit comments