std:: nullopt
From cppreference.net
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::optional
| Member functions | ||||
| Observers | ||||
| Iterators | ||||
|
(C++26)
|
||||
|
(C++26)
|
||||
| Monadic operations | ||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
| Modifiers | ||||
| Non-member functions | ||||
| Deduction guides | ||||
| Helper classes | ||||
| Helper objects | ||||
|
nullopt
|
||||
|
定义于头文件
<optional>
|
||
|
inline
constexpr
nullopt_t nullopt
{
/*未指定*/
}
;
|
(C++17 起) | |
std::nullopt
是类型为
std::nullopt_t
的常量。用于指示
std::optional
不包含值。
参阅
|
(C++17)
|
指示不包含值的
std::optional
的标记类型
(类) |