MCPcopy Create free account
hub / github.com/dmlc/dmlc-core / swap

Method swap

include/dmlc/optional.h:76–79  ·  view source on GitHub ↗

! \brief swap two optional */

Source from the content-addressed store, hash-verified

74 }
75 /*! \brief swap two optional */
76 void swap(optional<T>& other) {
77 std::swap(val, other.val);
78 std::swap(is_none, other.is_none);
79 }
80 /*! \brief set this object to hold value
81 * \param value the value to hold
82 * \return return self to support chain assignment

Callers 1

optionalClass · 0.45

Calls 1

swapFunction · 0.70

Tested by

no test coverage detected