Skip to content

Commit

Permalink
P3369R0 constexpr for uninitialized_default_construct
Browse files Browse the repository at this point in the history
  • Loading branch information
jensmaurer authored and tkoeppe committed Dec 17, 2024
1 parent 3123fa0 commit f5b7bb8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
12 changes: 7 additions & 5 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11255,7 +11255,8 @@
\indexlibraryglobal{uninitialized_default_construct}%
\begin{itemdecl}
template<class NoThrowForwardIterator>
void uninitialized_default_construct(NoThrowForwardIterator first, NoThrowForwardIterator last);
constexpr void uninitialized_default_construct(NoThrowForwardIterator first,
NoThrowForwardIterator last);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -11274,10 +11275,10 @@
namespace ranges {
template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@<I> S>
requires @\libconcept{default_initializable}@<iter_value_t<I>>
I uninitialized_default_construct(I first, S last);
constexpr I uninitialized_default_construct(I first, S last);
template<@\exposconcept{nothrow-forward-range}@ R>
requires @\libconcept{default_initializable}@<range_value_t<R>>
borrowed_iterator_t<R> uninitialized_default_construct(R&& r);
constexpr borrowed_iterator_t<R> uninitialized_default_construct(R&& r);
}
\end{itemdecl}

Expand All @@ -11295,7 +11296,8 @@
\indexlibraryglobal{uninitialized_default_construct_n}%
\begin{itemdecl}
template<class NoThrowForwardIterator, class Size>
NoThrowForwardIterator uninitialized_default_construct_n(NoThrowForwardIterator first, Size n);
constexpr NoThrowForwardIterator
uninitialized_default_construct_n(NoThrowForwardIterator first, Size n);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -11315,7 +11317,7 @@
namespace ranges {
template<@\exposconcept{nothrow-forward-iterator}@ I>
requires @\libconcept{default_initializable}@<iter_value_t<I>>
I uninitialized_default_construct_n(I first, iter_difference_t<I> n);
constexpr I uninitialized_default_construct_n(I first, iter_difference_t<I> n);
}
\end{itemdecl}

Expand Down
13 changes: 7 additions & 6 deletions source/memory.tex
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@
concept @\exposconcept{nothrow-forward-range}@ = @\seebelow@; // \expos

template<class NoThrowForwardIterator>
void uninitialized_default_construct(NoThrowForwardIterator first, // freestanding
NoThrowForwardIterator last);
constexpr void uninitialized_default_construct(NoThrowForwardIterator first, // freestanding
NoThrowForwardIterator last);
template<class ExecutionPolicy, class NoThrowForwardIterator>
void uninitialized_default_construct(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
NoThrowForwardIterator first,
NoThrowForwardIterator last);
template<class NoThrowForwardIterator, class Size>
NoThrowForwardIterator
constexpr NoThrowForwardIterator
uninitialized_default_construct_n(NoThrowForwardIterator first, Size n); // freestanding
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size>
NoThrowForwardIterator
Expand All @@ -204,14 +204,15 @@
namespace ranges {
template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@<I> S>
requires @\libconcept{default_initializable}@<iter_value_t<I>>
I uninitialized_default_construct(I first, S last); // freestanding
constexpr I uninitialized_default_construct(I first, S last); // freestanding
template<@\exposconcept{nothrow-forward-range}@ R>
requires @\libconcept{default_initializable}@<range_value_t<R>>
borrowed_iterator_t<R> uninitialized_default_construct(R&& r); // freestanding
constexpr borrowed_iterator_t<R> uninitialized_default_construct(R&& r); // freestanding

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

template<class NoThrowForwardIterator>
Expand Down

0 comments on commit f5b7bb8

Please sign in to comment.