Swap assignment operator (noexcept + move-and-swap of course!)
| 75 | |
| 76 | // Swap assignment operator (noexcept + move-and-swap of course!) |
| 77 | void Truckload::swap(Truckload& other) noexcept |
| 78 | { |
| 79 | std::swap(m_head, other.m_head); |
| 80 | std::swap(m_tail, other.m_tail); |
| 81 | } |
| 82 | |
| 83 | // Optional yet conventional non-member function (forwards to member function) |
| 84 | void swap(Truckload& one, Truckload& other) noexcept |