std::valarray<T>::swap

void swap( valarray& other );
(until C++11)
void swap( valarray& other ) noexcept;
(since C++11)

Swaps the contents with those of other.

Parameters

other - another valarray to swap the contents with

Return value

(none).

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/numeric/valarray/swap