Skip to content

Commit e887fd8

Browse files
authored
Merge 2024-11 LWG Motion 14
P3508R0 and P3369R0 constexpr for specialized memory algorithms
2 parents fdc4de0 + f5b7bb8 commit e887fd8

File tree

3 files changed

+69
-59
lines changed

3 files changed

+69
-59
lines changed

source/algorithms.tex

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11255,7 +11255,8 @@
1125511255
\indexlibraryglobal{uninitialized_default_construct}%
1125611256
\begin{itemdecl}
1125711257
template<class NoThrowForwardIterator>
11258-
void uninitialized_default_construct(NoThrowForwardIterator first, NoThrowForwardIterator last);
11258+
constexpr void uninitialized_default_construct(NoThrowForwardIterator first,
11259+
NoThrowForwardIterator last);
1125911260
\end{itemdecl}
1126011261

1126111262
\begin{itemdescr}
@@ -11274,10 +11275,10 @@
1127411275
namespace ranges {
1127511276
template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@<I> S>
1127611277
requires @\libconcept{default_initializable}@<iter_value_t<I>>
11277-
I uninitialized_default_construct(I first, S last);
11278+
constexpr I uninitialized_default_construct(I first, S last);
1127811279
template<@\exposconcept{nothrow-forward-range}@ R>
1127911280
requires @\libconcept{default_initializable}@<range_value_t<R>>
11280-
borrowed_iterator_t<R> uninitialized_default_construct(R&& r);
11281+
constexpr borrowed_iterator_t<R> uninitialized_default_construct(R&& r);
1128111282
}
1128211283
\end{itemdecl}
1128311284

@@ -11295,7 +11296,8 @@
1129511296
\indexlibraryglobal{uninitialized_default_construct_n}%
1129611297
\begin{itemdecl}
1129711298
template<class NoThrowForwardIterator, class Size>
11298-
NoThrowForwardIterator uninitialized_default_construct_n(NoThrowForwardIterator first, Size n);
11299+
constexpr NoThrowForwardIterator
11300+
uninitialized_default_construct_n(NoThrowForwardIterator first, Size n);
1129911301
\end{itemdecl}
1130011302

1130111303
\begin{itemdescr}
@@ -11315,7 +11317,7 @@
1131511317
namespace ranges {
1131611318
template<@\exposconcept{nothrow-forward-iterator}@ I>
1131711319
requires @\libconcept{default_initializable}@<iter_value_t<I>>
11318-
I uninitialized_default_construct_n(I first, iter_difference_t<I> n);
11320+
constexpr I uninitialized_default_construct_n(I first, iter_difference_t<I> n);
1131911321
}
1132011322
\end{itemdecl}
1132111323

@@ -11334,7 +11336,8 @@
1133411336
\indexlibraryglobal{uninitialized_value_construct}%
1133511337
\begin{itemdecl}
1133611338
template<class NoThrowForwardIterator>
11337-
void uninitialized_value_construct(NoThrowForwardIterator first, NoThrowForwardIterator last);
11339+
constexpr void uninitialized_value_construct(NoThrowForwardIterator first,
11340+
NoThrowForwardIterator last);
1133811341
\end{itemdecl}
1133911342

1134011343
\begin{itemdescr}
@@ -11353,10 +11356,10 @@
1135311356
namespace ranges {
1135411357
template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@<I> S>
1135511358
requires @\libconcept{default_initializable}@<iter_value_t<I>>
11356-
I uninitialized_value_construct(I first, S last);
11359+
constexpr I uninitialized_value_construct(I first, S last);
1135711360
template<@\exposconcept{nothrow-forward-range}@ R>
1135811361
requires @\libconcept{default_initializable}@<range_value_t<R>>
11359-
borrowed_iterator_t<R> uninitialized_value_construct(R&& r);
11362+
constexpr borrowed_iterator_t<R> uninitialized_value_construct(R&& r);
1136011363
}
1136111364
\end{itemdecl}
1136211365

@@ -11374,7 +11377,8 @@
1137411377
\indexlibraryglobal{uninitialized_value_construct_n}%
1137511378
\begin{itemdecl}
1137611379
template<class NoThrowForwardIterator, class Size>
11377-
NoThrowForwardIterator uninitialized_value_construct_n(NoThrowForwardIterator first, Size n);
11380+
constexpr NoThrowForwardIterator
11381+
uninitialized_value_construct_n(NoThrowForwardIterator first, Size n);
1137811382
\end{itemdecl}
1137911383

1138011384
\begin{itemdescr}
@@ -11394,7 +11398,7 @@
1139411398
namespace ranges {
1139511399
template<@\exposconcept{nothrow-forward-iterator}@ I>
1139611400
requires @\libconcept{default_initializable}@<iter_value_t<I>>
11397-
I uninitialized_value_construct_n(I first, iter_difference_t<I> n);
11401+
constexpr I uninitialized_value_construct_n(I first, iter_difference_t<I> n);
1139811402
}
1139911403
\end{itemdecl}
1140011404

@@ -11413,8 +11417,8 @@
1141311417
\indexlibraryglobal{uninitialized_copy}%
1141411418
\begin{itemdecl}
1141511419
template<class InputIterator, class NoThrowForwardIterator>
11416-
NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
11417-
NoThrowForwardIterator result);
11420+
constexpr NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
11421+
NoThrowForwardIterator result);
1141811422
\end{itemdecl}
1141911423

1142011424
\begin{itemdescr}
@@ -11442,11 +11446,11 @@
1144211446
template<@\libconcept{input_iterator}@ I, @\libconcept{sentinel_for}@<I> S1,
1144311447
@\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@<O> S2>
1144411448
requires @\libconcept{constructible_from}@<iter_value_t<O>, iter_reference_t<I>>
11445-
uninitialized_copy_result<I, O>
11449+
constexpr uninitialized_copy_result<I, O>
1144611450
uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast);
1144711451
template<@\libconcept{input_range}@ IR, @\exposconcept{nothrow-forward-range}@ OR>
1144811452
requires @\libconcept{constructible_from}@<range_value_t<OR>, range_reference_t<IR>>
11449-
uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
11453+
constexpr uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
1145011454
uninitialized_copy(IR&& in_range, OR&& out_range);
1145111455
}
1145211456
\end{itemdecl}
@@ -11469,8 +11473,8 @@
1146911473
\indexlibraryglobal{uninitialized_copy_n}%
1147011474
\begin{itemdecl}
1147111475
template<class InputIterator, class Size, class NoThrowForwardIterator>
11472-
NoThrowForwardIterator uninitialized_copy_n(InputIterator first, Size n,
11473-
NoThrowForwardIterator result);
11476+
constexpr NoThrowForwardIterator uninitialized_copy_n(InputIterator first, Size n,
11477+
NoThrowForwardIterator result);
1147411478
\end{itemdecl}
1147511479

1147611480
\begin{itemdescr}
@@ -11497,7 +11501,7 @@
1149711501
namespace ranges {
1149811502
template<@\libconcept{input_iterator}@ I, @\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@<O> S>
1149911503
requires @\libconcept{constructible_from}@<iter_value_t<O>, iter_reference_t<I>>
11500-
uninitialized_copy_n_result<I, O>
11504+
constexpr uninitialized_copy_n_result<I, O>
1150111505
uninitialized_copy_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
1150211506
}
1150311507
\end{itemdecl}
@@ -11523,8 +11527,8 @@
1152311527
\indexlibraryglobal{uninitialized_move}%
1152411528
\begin{itemdecl}
1152511529
template<class InputIterator, class NoThrowForwardIterator>
11526-
NoThrowForwardIterator uninitialized_move(InputIterator first, InputIterator last,
11527-
NoThrowForwardIterator result);
11530+
constexpr NoThrowForwardIterator uninitialized_move(InputIterator first, InputIterator last,
11531+
NoThrowForwardIterator result);
1152811532
\end{itemdecl}
1152911533

1153011534
\begin{itemdescr}
@@ -11549,11 +11553,11 @@
1154911553
template<@\libconcept{input_iterator}@ I, @\libconcept{sentinel_for}@<I> S1,
1155011554
@\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@<O> S2>
1155111555
requires @\libconcept{constructible_from}@<iter_value_t<O>, iter_rvalue_reference_t<I>>
11552-
uninitialized_move_result<I, O>
11556+
constexpr uninitialized_move_result<I, O>
1155311557
uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast);
1155411558
template<@\libconcept{input_range}@ IR, @\exposconcept{nothrow-forward-range}@ OR>
1155511559
requires @\libconcept{constructible_from}@<range_value_t<OR>, range_rvalue_reference_t<IR>>
11556-
uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
11560+
constexpr uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
1155711561
uninitialized_move(IR&& in_range, OR&& out_range);
1155811562
}
1155911563
\end{itemdecl}
@@ -11583,7 +11587,7 @@
1158311587
\indexlibraryglobal{uninitialized_move_n}%
1158411588
\begin{itemdecl}
1158511589
template<class InputIterator, class Size, class NoThrowForwardIterator>
11586-
pair<InputIterator, NoThrowForwardIterator>
11590+
constexpr pair<InputIterator, NoThrowForwardIterator>
1158711591
uninitialized_move_n(InputIterator first, Size n, NoThrowForwardIterator result);
1158811592
\end{itemdecl}
1158911593

@@ -11608,7 +11612,7 @@
1160811612
namespace ranges {
1160911613
template<@\libconcept{input_iterator}@ I, @\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@<O> S>
1161011614
requires @\libconcept{constructible_from}@<iter_value_t<O>, iter_rvalue_reference_t<I>>
11611-
uninitialized_move_n_result<I, O>
11615+
constexpr uninitialized_move_n_result<I, O>
1161211616
uninitialized_move_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
1161311617
}
1161411618
\end{itemdecl}
@@ -11640,7 +11644,8 @@
1164011644
\indexlibraryglobal{uninitialized_fill}%
1164111645
\begin{itemdecl}
1164211646
template<class NoThrowForwardIterator, class T>
11643-
void uninitialized_fill(NoThrowForwardIterator first, NoThrowForwardIterator last, const T& x);
11647+
constexpr void uninitialized_fill(NoThrowForwardIterator first,
11648+
NoThrowForwardIterator last, const T& x);
1164411649
\end{itemdecl}
1164511650

1164611651
\begin{itemdescr}
@@ -11659,10 +11664,10 @@
1165911664
namespace ranges {
1166011665
template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@<I> S, class T>
1166111666
requires @\libconcept{constructible_from}@<iter_value_t<I>, const T&>
11662-
I uninitialized_fill(I first, S last, const T& x);
11667+
constexpr I uninitialized_fill(I first, S last, const T& x);
1166311668
template<@\exposconcept{nothrow-forward-range}@ R, class T>
1166411669
requires @\libconcept{constructible_from}@<range_value_t<R>, const T&>
11665-
borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x);
11670+
constexpr borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x);
1166611671
}
1166711672
\end{itemdecl}
1166811673

@@ -11680,7 +11685,8 @@
1168011685
\indexlibraryglobal{uninitialized_fill_n}%
1168111686
\begin{itemdecl}
1168211687
template<class NoThrowForwardIterator, class Size, class T>
11683-
NoThrowForwardIterator uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x);
11688+
constexpr NoThrowForwardIterator
11689+
uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x);
1168411690
\end{itemdecl}
1168511691

1168611692
\begin{itemdescr}
@@ -11700,7 +11706,7 @@
1170011706
namespace ranges {
1170111707
template<@\exposconcept{nothrow-forward-iterator}@ I, class T>
1170211708
requires @\libconcept{constructible_from}@<iter_value_t<I>, const T&>
11703-
I uninitialized_fill_n(I first, iter_difference_t<I> n, const T& x);
11709+
constexpr I uninitialized_fill_n(I first, iter_difference_t<I> n, const T& x);
1170411710
}
1170511711
\end{itemdecl}
1170611712

0 commit comments

Comments
 (0)