29 lines
849 B
Markdown
29 lines
849 B
Markdown
[expected.object.dtor]
|
|
|
|
# 22 General utilities library [[utilities]](./#utilities)
|
|
|
|
## 22.8 Expected objects [[expected]](expected#object.dtor)
|
|
|
|
### 22.8.6 Class template expected [[expected.expected]](expected.expected#expected.object.dtor)
|
|
|
|
#### 22.8.6.3 Destructor [expected.object.dtor]
|
|
|
|
[ð](#lib:expected,destructor)
|
|
|
|
`constexpr ~expected();
|
|
`
|
|
|
|
[1](#1)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L8508)
|
|
|
|
*Effects*: If has_value() is true, destroys *val*,
|
|
otherwise destroys *unex*[.](#1.sentence-1)
|
|
|
|
[2](#2)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L8513)
|
|
|
|
*Remarks*: If is_trivially_destructible_v<T> is true, andis_trivially_destructible_v<E> is true,
|
|
then this destructor is a trivial destructor[.](#2.sentence-1)
|