Namespaces
Variants

std::nullopt

来自 zh.cppreference.net
 
 
 
 
定义于头文件 <optional>
inline constexpr nullopt_t nullopt{/*unspecified*/};
(C++17 起)

std::nullopt 是类型 std::nullopt_t 的常量,用于指示 std::optional 不含值。

参阅

(C++17)
指示不包含值的 std::optional 的标记类型
(类)