This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
[uninitialized.fill]
# 26 Algorithms library [[algorithms]](./#algorithms)
## 26.11 Specialized <memory> algorithms [[specialized.algorithms]](specialized.algorithms#uninitialized.fill)
### 26.11.7 uninitialized_fill [uninitialized.fill]
[🔗](#lib:uninitialized_fill)
`template<class NoThrowForwardIterator, class T>
constexpr void uninitialized_fill(NoThrowForwardIterator first,
NoThrowForwardIterator last, const T& x);
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14107)
*Effects*: Equivalent to:for (; first != last; ++first)::new (*voidify*(*first))typename iterator_traits<NoThrowForwardIterator>::value_type(x);
[🔗](#lib:uninitialized_fill_)
`namespace ranges {
template<[nothrow-forward-iterator](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2Special memory concepts[special.mem.concepts]") I, [nothrow-sentinel-for](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2Special memory concepts[special.mem.concepts]")<I> S, class T>
requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11Concept constructible_­from[concept.constructible]")<iter_value_t<I>, const T&>
constexpr I uninitialized_fill(I first, S last, const T& x);
template<[nothrow-forward-range](special.mem.concepts#concept:nothrow-forward-range "26.11.2Special memory concepts[special.mem.concepts]") R, class T>
requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11Concept constructible_­from[concept.constructible]")<range_value_t<R>, const T&>
constexpr borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x);
}
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14130)
*Effects*: Equivalent to:for (; first != last; ++first)::new (*voidify*(*first)) remove_reference_t<iter_reference_t<I>>(x);return first;
[🔗](#lib:uninitialized_fill_n)
`template<class NoThrowForwardIterator, class Size, class T>
constexpr NoThrowForwardIterator
uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x);
`
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14148)
*Effects*: Equivalent to:for (; n--; ++first)::new (*voidify*(*first))typename iterator_traits<NoThrowForwardIterator>::value_type(x);return first;
[🔗](#lib:uninitialized_fill_n_)
`namespace ranges {
template<[nothrow-forward-iterator](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2Special memory concepts[special.mem.concepts]") I, class T>
requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11Concept constructible_­from[concept.constructible]")<iter_value_t<I>, const T&>
constexpr I uninitialized_fill_n(I first, iter_difference_t<I> n, const T& x);
}
`
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14169)
*Effects*: Equivalent to:return uninitialized_fill(counted_iterator(first, n), default_sentinel, x).base();