std::experimental:: nullopt_t
| 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 |
| Member functions | ||||
| Observers | ||||
| Modifiers | ||||
| Non-member functions | ||||
| Helper classes | ||||
|
nullopt_t
|
||||
| Helper objects | ||||
|
헤더에 정의됨
<experimental/optional>
|
||
|
struct
nullopt_t
;
|
(라이브러리 fundamentals TS) | |
std::experimental::nullopt_t
는 초기화되지 않은 상태의
optional
타입을 나타내기 위해 사용되는 빈 클래스 타입입니다. 특히,
std::
experimental
::
optional
는
nullopt_t
를 단일 인자로 받는 생성자를 가지며, 이는 값을 포함하지 않는 optional을 생성합니다.
std::experimental::nullopt_t
는
LiteralType
이어야 하며 기본 생성자를 가질 수 없습니다.
이것은 구현에서 정의된 리터럴 타입을 받는
constexpr
생성자를 가져야 합니다.
참고 사항
nullopt_t
는 옵셔널 객체를 비활성화하는 구문으로
op
=
{
}
;
와
op
=
nullopt
;
모두를 지원하기 위해
DefaultConstructible
가 아닙니다.
이 클래스의 가능한 구현은 다음과 같습니다
struct nullopt_t { constexpr nullopt_t(int) {} };
참고 항목
|
(C++17)
|
nullopt_t
타입의 객체
(상수) |