Skip to content

Commit

Permalink
Merge 2024-11 LWG Motion 14
Browse files Browse the repository at this point in the history
P3508R0 and P3369R0 constexpr for specialized memory algorithms
  • Loading branch information
tkoeppe authored Dec 17, 2024
2 parents fdc4de0 + f5b7bb8 commit e887fd8
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 59 deletions.
62 changes: 34 additions & 28 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 All @@ -11334,7 +11336,8 @@
\indexlibraryglobal{uninitialized_value_construct}%
\begin{itemdecl}
template<class NoThrowForwardIterator>
void uninitialized_value_construct(NoThrowForwardIterator first, NoThrowForwardIterator last);
constexpr void uninitialized_value_construct(NoThrowForwardIterator first,
NoThrowForwardIterator last);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -11353,10 +11356,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_value_construct(I first, S last);
constexpr I uninitialized_value_construct(I first, S last);
template<@\exposconcept{nothrow-forward-range}@ R>
requires @\libconcept{default_initializable}@<range_value_t<R>>
borrowed_iterator_t<R> uninitialized_value_construct(R&& r);
constexpr borrowed_iterator_t<R> uninitialized_value_construct(R&& r);
}
\end{itemdecl}

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

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

Expand All @@ -11413,8 +11417,8 @@
\indexlibraryglobal{uninitialized_copy}%
\begin{itemdecl}
template<class InputIterator, class NoThrowForwardIterator>
NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
NoThrowForwardIterator result);
constexpr NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
NoThrowForwardIterator result);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -11442,11 +11446,11 @@
template<@\libconcept{input_iterator}@ I, @\libconcept{sentinel_for}@<I> S1,
@\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@<O> S2>
requires @\libconcept{constructible_from}@<iter_value_t<O>, iter_reference_t<I>>
uninitialized_copy_result<I, O>
constexpr uninitialized_copy_result<I, O>
uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast);
template<@\libconcept{input_range}@ IR, @\exposconcept{nothrow-forward-range}@ OR>
requires @\libconcept{constructible_from}@<range_value_t<OR>, range_reference_t<IR>>
uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
constexpr uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
uninitialized_copy(IR&& in_range, OR&& out_range);
}
\end{itemdecl}
Expand All @@ -11469,8 +11473,8 @@
\indexlibraryglobal{uninitialized_copy_n}%
\begin{itemdecl}
template<class InputIterator, class Size, class NoThrowForwardIterator>
NoThrowForwardIterator uninitialized_copy_n(InputIterator first, Size n,
NoThrowForwardIterator result);
constexpr NoThrowForwardIterator uninitialized_copy_n(InputIterator first, Size n,
NoThrowForwardIterator result);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -11497,7 +11501,7 @@
namespace ranges {
template<@\libconcept{input_iterator}@ I, @\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@<O> S>
requires @\libconcept{constructible_from}@<iter_value_t<O>, iter_reference_t<I>>
uninitialized_copy_n_result<I, O>
constexpr uninitialized_copy_n_result<I, O>
uninitialized_copy_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
}
\end{itemdecl}
Expand All @@ -11523,8 +11527,8 @@
\indexlibraryglobal{uninitialized_move}%
\begin{itemdecl}
template<class InputIterator, class NoThrowForwardIterator>
NoThrowForwardIterator uninitialized_move(InputIterator first, InputIterator last,
NoThrowForwardIterator result);
constexpr NoThrowForwardIterator uninitialized_move(InputIterator first, InputIterator last,
NoThrowForwardIterator result);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -11549,11 +11553,11 @@
template<@\libconcept{input_iterator}@ I, @\libconcept{sentinel_for}@<I> S1,
@\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@<O> S2>
requires @\libconcept{constructible_from}@<iter_value_t<O>, iter_rvalue_reference_t<I>>
uninitialized_move_result<I, O>
constexpr uninitialized_move_result<I, O>
uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast);
template<@\libconcept{input_range}@ IR, @\exposconcept{nothrow-forward-range}@ OR>
requires @\libconcept{constructible_from}@<range_value_t<OR>, range_rvalue_reference_t<IR>>
uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
constexpr uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
uninitialized_move(IR&& in_range, OR&& out_range);
}
\end{itemdecl}
Expand Down Expand Up @@ -11583,7 +11587,7 @@
\indexlibraryglobal{uninitialized_move_n}%
\begin{itemdecl}
template<class InputIterator, class Size, class NoThrowForwardIterator>
pair<InputIterator, NoThrowForwardIterator>
constexpr pair<InputIterator, NoThrowForwardIterator>
uninitialized_move_n(InputIterator first, Size n, NoThrowForwardIterator result);
\end{itemdecl}

Expand All @@ -11608,7 +11612,7 @@
namespace ranges {
template<@\libconcept{input_iterator}@ I, @\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@<O> S>
requires @\libconcept{constructible_from}@<iter_value_t<O>, iter_rvalue_reference_t<I>>
uninitialized_move_n_result<I, O>
constexpr uninitialized_move_n_result<I, O>
uninitialized_move_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
}
\end{itemdecl}
Expand Down Expand Up @@ -11640,7 +11644,8 @@
\indexlibraryglobal{uninitialized_fill}%
\begin{itemdecl}
template<class NoThrowForwardIterator, class T>
void uninitialized_fill(NoThrowForwardIterator first, NoThrowForwardIterator last, const T& x);
constexpr void uninitialized_fill(NoThrowForwardIterator first,
NoThrowForwardIterator last, const T& x);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -11659,10 +11664,10 @@
namespace ranges {
template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@<I> S, class T>
requires @\libconcept{constructible_from}@<iter_value_t<I>, const T&>
I uninitialized_fill(I first, S last, const T& x);
constexpr I uninitialized_fill(I first, S last, const T& x);
template<@\exposconcept{nothrow-forward-range}@ R, class T>
requires @\libconcept{constructible_from}@<range_value_t<R>, const T&>
borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x);
constexpr borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x);
}
\end{itemdecl}

Expand All @@ -11680,7 +11685,8 @@
\indexlibraryglobal{uninitialized_fill_n}%
\begin{itemdecl}
template<class NoThrowForwardIterator, class Size, class T>
NoThrowForwardIterator uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x);
constexpr NoThrowForwardIterator
uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -11700,7 +11706,7 @@
namespace ranges {
template<@\exposconcept{nothrow-forward-iterator}@ I, class T>
requires @\libconcept{constructible_from}@<iter_value_t<I>, const T&>
I uninitialized_fill_n(I first, iter_difference_t<I> n, const T& x);
constexpr I uninitialized_fill_n(I first, iter_difference_t<I> n, const T& x);
}
\end{itemdecl}

Expand Down
Loading

0 comments on commit e887fd8

Please sign in to comment.