MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / swap

Method swap

Examples/NoModules/Chapter 17/Ex17_04/Stack.h:102–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100// noexcept swap member function
101template <typename T>
102void Stack<T>::swap(Stack& other) noexcept
103{
104 std::swap(m_head, other.m_head);
105}
106
107// Conventional noexcept swap non-member function
108template <typename T>

Callers 1

swapFunction · 0.45

Calls 1

swapFunction · 0.70

Tested by

no test coverage detected