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

Function noexcept

include/tabulate/optional_lite.hpp:1111–1124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1109 void swap(optional &other)
1110#if optional_CPP11_OR_GREATER
1111 noexcept(std::is_nothrow_move_constructible<T>::value &&std17::is_nothrow_swappable<T>::value)
1112#endif
1113 {
1114 using std::swap;
1115 if ((has_value() == true) && (other.has_value() == true)) {
1116 swap(**this, *other);
1117 } else if ((has_value() == false) && (other.has_value() == true)) {
1118 initialize(std11::move(*other));
1119 other.reset();
1120 } else if ((has_value() == true) && (other.has_value() == false)) {
1121 other.initialize(std11::move(**this));
1122 reset();
1123 }
1124 }
1125
1126 // x.x.3.5, observers
1127

Callers 2

satisfiesMethod · 0.70
optional_lite.hppFile · 0.70

Calls 1

initializeFunction · 0.70

Tested by

no test coverage detected