23 Containers library [containers]

23.6 Container adaptors [container.adaptors]

23.6.6 Class template stack [stack]

23.6.6.5 stack specialized algorithms [stack.special]

template <class T, class Container> void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));

Remarks: This function shall not participate in overload resolution unless is_swappable_v<Container> is true.

Effects: As if by x.swap(y).