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
;
|
(ライブラリ基盤 TS) | |
std::experimental::nullopt_t
は、未初期化状態の
optional
型を示すために使用される空のクラス型です。特に、
std::
experimental
::
optional
は
nullopt_t
を単一引数とするコンストラクタを持ち、これにより値を含まないoptionalが作成されます。
std::experimental::nullopt_t
は
LiteralType
でなければならず、デフォルトコンストラクタを持つことはできません。
実装定義のリテラル型を受け取る
constexpr
コンストラクタを持たなければならない。
注記
nullopt_t
は
DefaultConstructible
ではありません。これは、
op
=
{
}
;
と
op
=
nullopt
;
の両方の構文をoptionalオブジェクトの無効化としてサポートするためです。
このクラスの可能な実装は以下の通りです。
struct nullopt_t { constexpr nullopt_t(int) {} };
関連項目
|
(C++17)
|
nullopt_t
型のオブジェクト
(定数) |