Luna::move_construct_range

template <typename _Iter1, typename _Iter2>
auto move_construct_range(_Iter1 first, _Iter1 last, _Iter2 d_first) -> enable_if_t< Impl::move_construct_range_is_value_type_trivial< _Iter1, _Iter2 >::value, _Iter2 >

Move-constructs a range of objects.

Parameters

  • in first

    An iterator to the first object to be moved from.

  • in last

    An iterator to one-past-last object to be moved from.

  • in d_first

    An iterator to the first object to be constructed.

Return value

Returns an iterator to the one-past-last object to be constructed.

This function uses each object in the range [first, last) to performs move initialization on corresponding objects beginning with d_first.

Valid Usage

  • The source range and the destination range must not overlap.

Remark

If value_type of _Iter2 is trivially move constructible, calls copy_construct_range to do the move construct. Otherwise, the move constructor is called for every object to construct objects in destination range.