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

Function swap

Exercises/NoModules/Chapter 21/Soln21_06/Array.h:143–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141// Swap non-member function template (optional)
142template <typename T>
143void swap(Array<T>& one, Array<T>& other) noexcept
144{
145 one.swap(other); // Forward to public member function
146}
147
148// push_back() overload for lvalue references
149template <typename T>

Callers 3

Array.hFile · 0.70
swapMethod · 0.70
push_backMethod · 0.70

Calls 1

swapMethod · 0.45

Tested by

no test coverage detected