bsl::swap

Swap the value of the specified lhs stack with the value of the specified rhs stack.

Synopsis

Declared in <bslstl_stack.h>

template<
    class VALUE,
    class CONTAINER>
void
swap(
    stack<VALUE, CONTAINER>& lhs,
    stack<VALUE, CONTAINER>& rhs) noexcept(false);

Parameters

NameDescription
lhsfirst stack to exchange
rhssecond stack to exchange