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

履歴 編集

function template
<chrono>

std::chrono::operator!=(C++11)

namespace std {
namespace chrono {
  // operator==により、以下の演算子が使用可能になる (C++20)
  template <class Rep1, class Period1, class Rep2, class Period2>
  constexpr bool operator!=(const duration<Rep1, Period1>& lhs,
                            const duration<Rep2, Period2>& rhs); // (1) C++11
}}

概要

非等値の判定を行う

戻り値

!(lhs == rhs)

#include <cassert>
#include <chrono>

using namespace std::chrono;

int main()
{
  const bool result = seconds(3) != seconds(2);
  assert(result);
}

出力

バージョン

言語

  • C++11

処理系

参照