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