MCPcopy Create free account
hub / github.com/ThePhD/sol2 / reset

Function reset

include/sol/optional_implementation.hpp:1435–1440  ·  view source on GitHub ↗

Destroys the stored value if one exists, making the optional empty

Source from the content-addressed store, hash-verified

1433
1434 /// Destroys the stored value if one exists, making the optional empty
1435 void reset() noexcept {
1436 if (has_value()) {
1437 this->m_value.~T();
1438 this->m_has_value = false;
1439 }
1440 }
1441 }; // namespace sol
1442
1443 /// \group relop

Callers 5

resetMethod · 0.85
basic_referenceClass · 0.85
resetMethod · 0.85
takeMethod · 0.85
takeMethod · 0.85

Calls 1

has_valueFunction · 0.85

Tested by

no test coverage detected