31 Regular expressions library [re]

31.8 Class template basic_­regex [re.regex]

31.8.6 basic_­regex swap [re.regex.swap]

void swap(basic_regex& e);
Effects: Swaps the contents of the two regular expressions.
Postconditions: *this contains the regular expression that was in e, e contains the regular expression that was in *this.
Complexity: Constant time.