mirror of
https://github.com/TartanLlama/optional.git
synced 2025-07-31 18:34:26 +02:00
reset
This commit is contained in:
@@ -610,7 +610,12 @@ namespace tl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// [optional.mod], modifiers
|
// [optional.mod], modifiers
|
||||||
void reset() noexcept;
|
void reset() noexcept {
|
||||||
|
if (has_value()) {
|
||||||
|
this->m_value.~T();
|
||||||
|
this->m_has_value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user