Template Function TRAP::swap#

Function Documentation#

template<typename T>
constexpr void TRAP::swap(Optional<T> &x, Optional<T> &y) noexcept(noexcept(x.swap(y)))#

Overloads the std::swap algorithm for TRAP::Optional. Exchanges the state of x with that of y. Effectively calls lhs.Swap(rhs).

Parameters:
  • xOptional object whose states to swap.

  • yOptional object whose states to swap.