24 Containers library [containers]

24.6 Container adaptors [container.adaptors]

24.6.8 Class template stack [stack]

24.6.8.7 Specialized algorithms [stack.special]

template<class T, class Container> void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
Constraints: is_swappable_v<Container> is true.
Effects: As if by x.swap(y).