boost::urls::swap

Swap

Synopsis

Declared in <include/boost/url/url.hpp>

void
swap(
    url& v0,
    url& v1) noexcept;

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.

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" ); v0.swap( v1 );

Constant

Throws nothing

Parameters

Name Description
v0,

v1 The objects to swap

See Also

url::swap

Created with MrDocs