function template
<regex>

std::swap (basic_regex)

template <class charT, class traits>
void swap (basic_regex<charT,traits>& lhs, basic_regex<charT,traits>& rhs);
Exchanges the contents of two regex
The content of the basic_regex object lhs is exchanged with the content of rhs.

This is done in constant time by exchanging internal pointers, just like basic_regex member swap.

Parameters

lhs,rhs
basic_regex objects (to the left- and right-hand side of the operator, respectively).

Return value

none.

See also