Skip to content

Commit f5b7bb8

Browse files
jensmaurertkoeppe
authored andcommitted
P3369R0 constexpr for uninitialized_default_construct
1 parent 3123fa0 commit f5b7bb8

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
@@ -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

source/memory.tex

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

189189
template<class NoThrowForwardIterator>
190-
void uninitialized_default_construct(NoThrowForwardIterator first, // freestanding
191-
NoThrowForwardIterator last);
190+
constexpr void uninitialized_default_construct(NoThrowForwardIterator first, // freestanding
191+
NoThrowForwardIterator last);
192192
template<class ExecutionPolicy, class NoThrowForwardIterator>
193193
void uninitialized_default_construct(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
194194
NoThrowForwardIterator first,
195195
NoThrowForwardIterator last);
196196
template<class NoThrowForwardIterator, class Size>
197-
NoThrowForwardIterator
197+
constexpr NoThrowForwardIterator
198198
uninitialized_default_construct_n(NoThrowForwardIterator first, Size n); // freestanding
199199
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size>
200200
NoThrowForwardIterator
@@ -204,14 +204,15 @@
204204
namespace ranges {
205205
template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@<I> S>
206206
requires @\libconcept{default_initializable}@<iter_value_t<I>>
207-
I uninitialized_default_construct(I first, S last); // freestanding
207+
constexpr I uninitialized_default_construct(I first, S last); // freestanding
208208
template<@\exposconcept{nothrow-forward-range}@ R>
209209
requires @\libconcept{default_initializable}@<range_value_t<R>>
210-
borrowed_iterator_t<R> uninitialized_default_construct(R&& r); // freestanding
210+
constexpr borrowed_iterator_t<R> uninitialized_default_construct(R&& r); // freestanding
211211

212212
template<@\exposconcept{nothrow-forward-iterator}@ I>
213213
requires @\libconcept{default_initializable}@<iter_value_t<I>>
214-
I uninitialized_default_construct_n(I first, iter_difference_t<I> n); // freestanding
214+
constexpr I uninitialized_default_construct_n(I first, // freestanding
215+
iter_difference_t<I> n);
215216
}
216217

217218
template<class NoThrowForwardIterator>

0 commit comments

Comments
 (0)