std::optional<T>::operator bool, std::optional<T>::has_value
提供: cppreference.com
<tbody>
</tbody>
constexpr explicit operator bool() const noexcept; |
(C++17以上) | |
constexpr bool has_value() const noexcept; |
(C++17以上) | |
*this が値を格納しているかどうか調べます。
引数
(なし)
戻り値
*this が値を格納している場合は true、 *this が値を格納していない場合は false。