std::rotate_copy
Материал из cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Заголовочный файл <algorithm>
|
||
template< class ForwardIt, class OutputIt > OutputIt rotate_copy( ForwardIt first, ForwardIt n_first, |
||
Копирует элементы из диапазона
[first, last)
, в другой диапазон начало в d_first
таким образом, что элемент n_first
становится первым элементом нового диапазона и n_first - 1
становится последним элементом. Original:
Copies the elements from the range
[first, last)
, to another range beginning at d_first
in such a way, that the element n_first
becomes the first element of the new range and n_first - 1
becomes the last element. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Содержание |
[править] Параметры
first, last | - | диапазон элементов для копирования
Original: the range of elements to copy The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
n_first | - | элемент для перехода к началу нового диапазона
Original: the element to move to the beginning of the new range The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
d_first | - | начала назначения диапазона
Original: beginning of the destination range The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Type requirements | ||
-ForwardIt must meet the requirements of ForwardIterator .
| ||
-OutputIt must meet the requirements of OutputIterator .
|
[править] Возвращаемое значение
Выходной итератор на элемент, следующий за последним элементом скопировал.
Original:
Output iterator to the element past the last element copied.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[править] Возможная реализация
[править] Пример
Этот раздел не завершён Причина: no example |
[править] Сложность
линейные по расстоянию между
first
и last
Original:
linear in the distance between
first
and last
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[править] См. также
вращается порядок элементов в диапазоне Original: rotates the order of elements in a range The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (шаблон функции) |