| Home | Libraries | People | FAQ | More

###### url::swap (1 of 2 overloads)

Swap the contents.

###### Synopsis

    void
    swap(
        url& other);

###### Description

Exchanges the contents of this url with another url. All views, iterators and references remain valid. If `this == &other`, this function call has no effect.

###### Example

    url u1( "https://www.example.com" );
    url u2( "https://www.boost.org" );
    u1.swap(u2);
    assert(u1 == "https://www.boost.org" );
    assert(u2 == "https://www.example.com" );

###### Complexity

Constant

###### Exception Safety

Throws nothing.

###### Parameters

Name | Description
--- | ---
`other` | The object to swap with