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

履歴 編集

function
<stop_token>

std::operator!=(C++20)

namespace std {
  [[nodiscard]] friend bool operator!=(const stop_source& x, const stop_source& y) noexcept;
}

概要

stop_sourceオブジェクトの非等値比較を行う。

戻り値

!(x == y)

例外

投げない。

#include <cassert>
#include <stop_token>

int main()
{
  std::stop_source ss1;
  std::stop_source ss2 = ss1;
  std::stop_source ss3;
  std::stop_source ss4(std::nostopstate);
  std::stop_source ss5(std::nostopstate);

  assert(ss1 == ss2);
  assert(ss1 != ss3);
  assert(ss1 != ss4);
  assert(ss4 == ss5);
}

出力

バージョン

言語

  • C++20

処理系