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

Method swap

Examples/NoModules/Chapter 17/Ex17_04B/Stack.h:103–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

swapFunction · 0.45

Calls 1

swapFunction · 0.70

Tested by

no test coverage detected