Swap
Synopsis
Declared in <boost/url/url.hpp>
|
Note
|
This function is a hidden friend of url, declared only inside that class: it can be found only through argument-dependent lookup. |
Description
Exchanges the contents of v0 with another v1. All views, iterators and references remain valid.
If &v0 == &v1, this function call has no effect.
Example
url u1( "https://www.example.com" );
url u2( "https://www.boost.org" );
std::swap(u1, u2);
assert(u1 == "https://www.boost.org" );
assert(u2 == "https://www.example.com" );
Effects
v0.swap( v1 );
Complexity
Constant
Exception Safety
Throws nothing
Parameters
Name |
Description |
v0 |
The first object to swap |
v1 |
The second object to swap |
See Also
Created with MrDocs