Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
101
template <typename T>
102
void Stack<T>::swap(Stack& other) noexcept
103
{
104
std::swap(m_head, other.m_head);
105
}
106
107
// Conventional noexcept swap non-member function
108
template <typename T>
Callers
1
swap
Function · 0.45
Calls
1
swap
Function · 0.70
Tested by
no test coverage detected