最終更新日時(UTC):
が更新

履歴 編集

function

::node_handle::operator bool(C++17)

explicit operator bool() const noexcept;

概要

ノードハンドルが空であれば false、そうでなければ true を返す。

戻り値

ptr_ != nullptr

#include <iostream>
#include <set>

int main()
{
  std::set<int>::node_type nh;
  std::cout << std::boolalpha << static_cast<bool>(nh);
}

出力

false

バージョン

言語

  • C++17

処理系

参照