std::nullopt - cppreference.com

std::nullopt

来自cppreference.com
 
 
 
 
在标头 <optional> 定义
inline constexpr nullopt_t nullopt{/* 未指明 */};
(C++17 起)

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

参阅