The C++11 standard library includes the following related algorithms:
template <class InputIterator, class ForwardIterator>
ForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
ForwardIterator result);
template <class ForwardIterator, class T>
void uninitialized_fill(ForwardIterator first, ForwardIterator last,
const T& x);
template<class InputIterator, class OutputIterator>
OutputIterator copy(InputIterator first, InputIterator last,
OutputIterator result);
template<class ForwardIterator, class T>
void fill(ForwardIterator first, ForwardIterator last, const T& value);
template<class InputIterator, class OutputIterator>
OutputIterator move(InputIterator first, InputIterator last,
OutputIterator result);
There is no standard uninitialized_move algorithm. Is this an oversight, or by design?
If it is by design, what is the rationale?
You can get the effect of an
uninitialized_movewithuninitialized_copyand move iterators:std::moveexists even though it can also be implemented withstd::copyand move iterators, because the committee anticipated its use to be frequent and decided to provide it as a convenience function [1][2].