template <class InputIterator, class OutputIterator, class T> OutputIterator replace_copy (InputIterator first, InputIterator last, OutputIterator result, const T& old_value, const T& new_value);
[first,last)
中的元素複製到以 result 開頭的範圍中,將 old_value 的出現替換為 new_value。operator==
將各個元素與 old_value 進行比較。
|
|
[first,last)
,它包含 first 和 last 之間的所有元素,包括 first 指向的元素,但不包括 last 指向的元素。
|
|
myvector contains: 10 99 30 30 99 10 10 99 |
[first,last)
中的物件。