MCPcopy Create free account
hub / github.com/p-ranav/tabulate / operator=

Function operator=

include/tabulate/optional_lite.hpp:991–1000  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

989 // && std::is_move_assignable<T>::value
990 )
991 operator=(optional &&other) noexcept {
992 if ((has_value() == true) && (other.has_value() == false)) {
993 reset();
994 } else if ((has_value() == false) && (other.has_value() == true)) {
995 initialize(std::move(*other));
996 } else if ((has_value() == true) && (other.has_value() == true)) {
997 contained.value() = std::move(*other);
998 }
999 return *this;
1000 }
1001
1002 // 4 (C++11) - move-assign from value
1003 template <typename U = T>

Callers

nothing calls this directly

Calls 2

initializeFunction · 0.70
optionalFunction · 0.70

Tested by

no test coverage detected