|
215 | 215 | } |
216 | 216 |
|
217 | 217 | template<class NoThrowForwardIterator> |
218 | | - void uninitialized_value_construct(NoThrowForwardIterator first, // freestanding |
219 | | - NoThrowForwardIterator last); |
| 218 | + constexpr void uninitialized_value_construct(NoThrowForwardIterator first, // freestanding |
| 219 | + NoThrowForwardIterator last); |
220 | 220 | template<class ExecutionPolicy, class NoThrowForwardIterator> |
221 | 221 | void uninitialized_value_construct(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads} |
222 | 222 | NoThrowForwardIterator first, |
223 | 223 | NoThrowForwardIterator last); |
224 | 224 | template<class NoThrowForwardIterator, class Size> |
225 | | - NoThrowForwardIterator |
| 225 | + constexpr NoThrowForwardIterator |
226 | 226 | uninitialized_value_construct_n(NoThrowForwardIterator first, Size n); // freestanding |
227 | 227 | template<class ExecutionPolicy, class NoThrowForwardIterator, class Size> |
228 | 228 | NoThrowForwardIterator |
|
232 | 232 | namespace ranges { |
233 | 233 | template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@<I> S> |
234 | 234 | requires @\libconcept{default_initializable}@<iter_value_t<I>> |
235 | | - I uninitialized_value_construct(I first, S last); // freestanding |
| 235 | + constexpr I uninitialized_value_construct(I first, S last); // freestanding |
236 | 236 | template<@\exposconcept{nothrow-forward-range}@ R> |
237 | 237 | requires @\libconcept{default_initializable}@<range_value_t<R>> |
238 | | - borrowed_iterator_t<R> uninitialized_value_construct(R&& r); // freestanding |
| 238 | + constexpr borrowed_iterator_t<R> uninitialized_value_construct(R&& r); // freestanding |
239 | 239 |
|
240 | 240 | template<@\exposconcept{nothrow-forward-iterator}@ I> |
241 | 241 | requires @\libconcept{default_initializable}@<iter_value_t<I>> |
242 | | - I uninitialized_value_construct_n(I first, iter_difference_t<I> n); // freestanding |
| 242 | + constexpr I uninitialized_value_construct_n(I first, // freestanding |
| 243 | + iter_difference_t<I> n); |
243 | 244 | } |
244 | 245 |
|
245 | 246 | template<class InputIterator, class NoThrowForwardIterator> |
246 | | - NoThrowForwardIterator uninitialized_copy(InputIterator first, // freestanding |
247 | | - InputIterator last, |
248 | | - NoThrowForwardIterator result); |
| 247 | + constexpr NoThrowForwardIterator uninitialized_copy(InputIterator first, // freestanding |
| 248 | + InputIterator last, |
| 249 | + NoThrowForwardIterator result); |
249 | 250 | template<class ExecutionPolicy, class ForwardIterator, class NoThrowForwardIterator> |
250 | 251 | NoThrowForwardIterator uninitialized_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads} |
251 | 252 | ForwardIterator first, ForwardIterator last, |
252 | 253 | NoThrowForwardIterator result); |
253 | 254 | template<class InputIterator, class Size, class NoThrowForwardIterator> |
254 | | - NoThrowForwardIterator uninitialized_copy_n(InputIterator first, Size n, // freestanding |
255 | | - NoThrowForwardIterator result); |
| 255 | + constexpr NoThrowForwardIterator uninitialized_copy_n(InputIterator first, // freestanding |
| 256 | + Size n, |
| 257 | + NoThrowForwardIterator result); |
256 | 258 | template<class ExecutionPolicy, class ForwardIterator, class Size, |
257 | 259 | class NoThrowForwardIterator> |
258 | 260 | NoThrowForwardIterator uninitialized_copy_n(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads} |
|
265 | 267 | template<@\libconcept{input_iterator}@ I, @\libconcept{sentinel_for}@<I> S1, |
266 | 268 | @\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@<O> S2> |
267 | 269 | requires @\libconcept{constructible_from}@<iter_value_t<O>, iter_reference_t<I>> |
268 | | - uninitialized_copy_result<I, O> |
| 270 | + constexpr uninitialized_copy_result<I, O> |
269 | 271 | uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); // freestanding |
270 | 272 | template<@\libconcept{input_range}@ IR, @\exposconcept{nothrow-forward-range}@ OR> |
271 | 273 | requires @\libconcept{constructible_from}@<range_value_t<OR>, range_reference_t<IR>> |
272 | | - uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>> |
| 274 | + constexpr uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>> |
273 | 275 | uninitialized_copy(IR&& in_range, OR&& out_range); // freestanding |
274 | 276 |
|
275 | 277 | template<class I, class O> |
276 | 278 | using uninitialized_copy_n_result = in_out_result<I, O>; // freestanding |
277 | 279 | template<@\libconcept{input_iterator}@ I, @\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@<O> S> |
278 | 280 | requires @\libconcept{constructible_from}@<iter_value_t<O>, iter_reference_t<I>> |
279 | | - uninitialized_copy_n_result<I, O> |
| 281 | + constexpr uninitialized_copy_n_result<I, O> |
280 | 282 | uninitialized_copy_n(I ifirst, iter_difference_t<I> n, // freestanding |
281 | 283 | O ofirst, S olast); |
282 | 284 | } |
283 | 285 |
|
284 | 286 | template<class InputIterator, class NoThrowForwardIterator> |
285 | | - NoThrowForwardIterator uninitialized_move(InputIterator first, // freestanding |
| 287 | + constexpr NoThrowForwardIterator uninitialized_move(InputIterator first, // freestanding |
286 | 288 | InputIterator last, |
287 | 289 | NoThrowForwardIterator result); |
288 | 290 | template<class ExecutionPolicy, class ForwardIterator, class NoThrowForwardIterator> |
289 | 291 | NoThrowForwardIterator uninitialized_move(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads} |
290 | 292 | ForwardIterator first, ForwardIterator last, |
291 | 293 | NoThrowForwardIterator result); |
292 | 294 | template<class InputIterator, class Size, class NoThrowForwardIterator> |
293 | | - pair<InputIterator, NoThrowForwardIterator> |
| 295 | + constexpr pair<InputIterator, NoThrowForwardIterator> |
294 | 296 | uninitialized_move_n(InputIterator first, Size n, // freestanding |
295 | 297 | NoThrowForwardIterator result); |
296 | 298 | template<class ExecutionPolicy, class ForwardIterator, class Size, |
|
305 | 307 | template<@\libconcept{input_iterator}@ I, @\libconcept{sentinel_for}@<I> S1, |
306 | 308 | @\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@<O> S2> |
307 | 309 | requires @\libconcept{constructible_from}@<iter_value_t<O>, iter_rvalue_reference_t<I>> |
308 | | - uninitialized_move_result<I, O> |
| 310 | + constexpr uninitialized_move_result<I, O> |
309 | 311 | uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); // freestanding |
310 | 312 | template<@\libconcept{input_range}@ IR, @\exposconcept{nothrow-forward-range}@ OR> |
311 | 313 | requires @\libconcept{constructible_from}@<range_value_t<OR>, range_rvalue_reference_t<IR>> |
312 | | - uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>> |
| 314 | + constexpr uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>> |
313 | 315 | uninitialized_move(IR&& in_range, OR&& out_range); // freestanding |
314 | 316 |
|
315 | 317 | template<class I, class O> |
316 | 318 | using uninitialized_move_n_result = in_out_result<I, O>; // freestanding |
317 | 319 | template<@\libconcept{input_iterator}@ I, |
318 | 320 | @\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@<O> S> |
319 | 321 | requires @\libconcept{constructible_from}@<iter_value_t<O>, iter_rvalue_reference_t<I>> |
320 | | - uninitialized_move_n_result<I, O> |
| 322 | + constexpr uninitialized_move_n_result<I, O> |
321 | 323 | uninitialized_move_n(I ifirst, iter_difference_t<I> n, // freestanding |
322 | 324 | O ofirst, S olast); |
323 | 325 | } |
324 | 326 |
|
325 | 327 | template<class NoThrowForwardIterator, class T> |
326 | | - void uninitialized_fill(NoThrowForwardIterator first, // freestanding |
| 328 | + constexpr void uninitialized_fill(NoThrowForwardIterator first, // freestanding |
327 | 329 | NoThrowForwardIterator last, const T& x); |
328 | 330 | template<class ExecutionPolicy, class NoThrowForwardIterator, class T> |
329 | 331 | void uninitialized_fill(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads} |
330 | 332 | NoThrowForwardIterator first, NoThrowForwardIterator last, |
331 | 333 | const T& x); |
332 | 334 | template<class NoThrowForwardIterator, class Size, class T> |
333 | | - NoThrowForwardIterator |
| 335 | + constexpr NoThrowForwardIterator |
334 | 336 | uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x); // freestanding |
335 | 337 | template<class ExecutionPolicy, class NoThrowForwardIterator, class Size, class T> |
336 | 338 | NoThrowForwardIterator |
|
340 | 342 | namespace ranges { |
341 | 343 | template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@<I> S, class T> |
342 | 344 | requires @\libconcept{constructible_from}@<iter_value_t<I>, const T&> |
343 | | - I uninitialized_fill(I first, S last, const T& x); // freestanding |
| 345 | + constexpr I uninitialized_fill(I first, S last, const T& x); // freestanding |
344 | 346 | template<@\exposconcept{nothrow-forward-range}@ R, class T> |
345 | 347 | requires @\libconcept{constructible_from}@<range_value_t<R>, const T&> |
346 | | - borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x); // freestanding |
| 348 | + constexpr borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x); // freestanding |
347 | 349 |
|
348 | 350 | template<@\exposconcept{nothrow-forward-iterator}@ I, class T> |
349 | 351 | requires @\libconcept{constructible_from}@<iter_value_t<I>, const T&> |
350 | | - I uninitialized_fill_n(I first, iter_difference_t<I> n, const T& x); // freestanding |
| 352 | + constexpr I uninitialized_fill_n(I first, // freestanding |
| 353 | + iter_difference_t<I> n, const T& x); |
351 | 354 | } |
352 | 355 |
|
353 | 356 | // \ref{specialized.construct}, \tcode{construct_at} |
|
0 commit comments