26 Algorithms library [algorithms]

26.11 Specialized <memory> algorithms [specialized.algorithms]

26.11.3 uninitialized_default_construct [uninitialized.construct.default]

template<class NoThrowForwardIterator> constexpr void uninitialized_default_construct(NoThrowForwardIterator first, NoThrowForwardIterator last);
Effects: Equivalent to: for (; first != last; ++first) ::new (voidify(*first)) typename iterator_traits<NoThrowForwardIterator>::value_type;
namespace ranges { template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S> requires default_initializable<iter_value_t<I>> constexpr I uninitialized_default_construct(I first, S last); template<nothrow-forward-range R> requires default_initializable<range_value_t<R>> constexpr borrowed_iterator_t<R> uninitialized_default_construct(R&& r); }
Effects: Equivalent to: for (; first != last; ++first) ::new (voidify(*first)) remove_reference_t<iter_reference_t<I>>; return first;
template<class NoThrowForwardIterator, class Size> constexpr NoThrowForwardIterator uninitialized_default_construct_n(NoThrowForwardIterator first, Size n);
Effects: Equivalent to: for (; n > 0; (void)++first, --n) ::new (voidify(*first)) typename iterator_traits<NoThrowForwardIterator>::value_type; return first;
namespace ranges { template<nothrow-forward-iterator I> requires default_initializable<iter_value_t<I>> constexpr I uninitialized_default_construct_n(I first, iter_difference_t<I> n); }
Effects: Equivalent to: return uninitialized_default_construct(counted_iterator(first, n), default_sentinel).base();