std::experimental::optional<T>:: ~optional
From cppreference.net
<
cpp
|
experimental
|
optional
C++
Experimental
| Technical Specification | ||||
| Filesystem library (filesystem TS) | ||||
| Library fundamentals (library fundamentals TS) | ||||
| Library fundamentals 2 (library fundamentals TS v2) | ||||
| Library fundamentals 3 (library fundamentals TS v3) | ||||
| Extensions for parallelism (parallelism TS) | ||||
| Extensions for parallelism 2 (parallelism TS v2) | ||||
| Extensions for concurrency (concurrency TS) | ||||
| Extensions for concurrency 2 (concurrency TS v2) | ||||
| Concepts (concepts TS) | ||||
| Ranges (ranges TS) | ||||
| Reflection (reflection TS) | ||||
| Mathematical special functions (special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
std::experimental::optional
| Member functions | ||||
|
optional::~optional
|
||||
| Observers | ||||
| Modifiers | ||||
| Non-member functions | ||||
| Helper classes | ||||
| Helper objects | ||||
|
~optional
(
)
;
|
(라이브러리 fundamentals TS) | |
객체가 값을 포함하고 있고 타입
T
가 trivially destructible이 아닌 경우(
std::is_trivially_destructible
참조), 포함된 값을 소멸자를 호출하여 파괴합니다. 다음과 같이 수행됩니다:
val
-
>
T
::
~T
(
)
.
그 외의 경우, 아무 작업도 수행하지 않습니다.
참고 사항
만약
T
가 trivial-destructible(사소하게 파괴 가능)하다면, 이 소멸자 또한 trivial(사소)하므로
optional<T>
또한 trivial-destructible(사소하게 파괴 가능)합니다.