Skip to content

Commit 91ba0b2

Browse files
committed
P3369R0 constexpr for uninitialized_default_construct
1 parent 392fc1e commit 91ba0b2

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

source/algorithms.tex

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11267,7 +11267,8 @@
1126711267
\indexlibraryglobal{uninitialized_default_construct}%
1126811268
\begin{itemdecl}
1126911269
template<class NoThrowForwardIterator>
11270-
void uninitialized_default_construct(NoThrowForwardIterator first, NoThrowForwardIterator last);
11270+
constexpr void uninitialized_default_construct(NoThrowForwardIterator first,
11271+
NoThrowForwardIterator last);
1127111272
\end{itemdecl}
1127211273

1127311274
\begin{itemdescr}
@@ -11286,10 +11287,10 @@
1128611287
namespace ranges {
1128711288
template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@<I> S>
1128811289
requires @\libconcept{default_initializable}@<iter_value_t<I>>
11289-
I uninitialized_default_construct(I first, S last);
11290+
constexpr I uninitialized_default_construct(I first, S last);
1129011291
template<@\exposconcept{nothrow-forward-range}@ R>
1129111292
requires @\libconcept{default_initializable}@<range_value_t<R>>
11292-
borrowed_iterator_t<R> uninitialized_default_construct(R&& r);
11293+
constexpr borrowed_iterator_t<R> uninitialized_default_construct(R&& r);
1129311294
}
1129411295
\end{itemdecl}
1129511296

@@ -11307,7 +11308,8 @@
1130711308
\indexlibraryglobal{uninitialized_default_construct_n}%
1130811309
\begin{itemdecl}
1130911310
template<class NoThrowForwardIterator, class Size>
11310-
NoThrowForwardIterator uninitialized_default_construct_n(NoThrowForwardIterator first, Size n);
11311+
constexpr NoThrowForwardIterator
11312+
uninitialized_default_construct_n(NoThrowForwardIterator first, Size n);
1131111313
\end{itemdecl}
1131211314

1131311315
\begin{itemdescr}
@@ -11327,7 +11329,7 @@
1132711329
namespace ranges {
1132811330
template<@\exposconcept{nothrow-forward-iterator}@ I>
1132911331
requires @\libconcept{default_initializable}@<iter_value_t<I>>
11330-
I uninitialized_default_construct_n(I first, iter_difference_t<I> n);
11332+
constexpr I uninitialized_default_construct_n(I first, iter_difference_t<I> n);
1133111333
}
1133211334
\end{itemdecl}
1133311335

source/memory.tex

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,14 @@
185185
concept @\exposconcept{nothrow-forward-range}@ = @\seebelow@; // \expos
186186

187187
template<class NoThrowForwardIterator>
188-
void uninitialized_default_construct(NoThrowForwardIterator first, // freestanding
189-
NoThrowForwardIterator last);
188+
constexpr void uninitialized_default_construct(NoThrowForwardIterator first, // freestanding
189+
NoThrowForwardIterator last);
190190
template<class ExecutionPolicy, class NoThrowForwardIterator>
191191
void uninitialized_default_construct(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
192192
NoThrowForwardIterator first,
193193
NoThrowForwardIterator last);
194194
template<class NoThrowForwardIterator, class Size>
195-
NoThrowForwardIterator
195+
constexpr NoThrowForwardIterator
196196
uninitialized_default_construct_n(NoThrowForwardIterator first, Size n); // freestanding
197197
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size>
198198
NoThrowForwardIterator
@@ -202,14 +202,15 @@
202202
namespace ranges {
203203
template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@<I> S>
204204
requires @\libconcept{default_initializable}@<iter_value_t<I>>
205-
I uninitialized_default_construct(I first, S last); // freestanding
205+
constexpr I uninitialized_default_construct(I first, S last); // freestanding
206206
template<@\exposconcept{nothrow-forward-range}@ R>
207207
requires @\libconcept{default_initializable}@<range_value_t<R>>
208-
borrowed_iterator_t<R> uninitialized_default_construct(R&& r); // freestanding
208+
constexpr borrowed_iterator_t<R> uninitialized_default_construct(R&& r); // freestanding
209209

210210
template<@\exposconcept{nothrow-forward-iterator}@ I>
211211
requires @\libconcept{default_initializable}@<iter_value_t<I>>
212-
I uninitialized_default_construct_n(I first, iter_difference_t<I> n); // freestanding
212+
constexpr I uninitialized_default_construct_n(I first, // freestanding
213+
iter_difference_t<I> n);
213214
}
214215

215216
template<class NoThrowForwardIterator>

0 commit comments

Comments
 (0)