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

Function swap

Examples/NoModules/Chapter 17/Ex17_02A/Array.h:88–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86// Swap non-member function template (can only swap arrays with identical startIndex)
87template <typename T, int startIndex>
88void swap(Array<T, startIndex>& one, Array<T, startIndex>& other) noexcept
89{
90 one.swap(other); // Forward to public member function
91}
92
93#endif

Callers 2

Array.hFile · 0.70
swapMethod · 0.70

Calls 1

swapMethod · 0.45

Tested by

no test coverage detected