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

履歴 編集

function
<chrono>

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

namespace std::chrono {
  constexpr bool operator==(const weekday_last& x, const weekday_last& y) noexcept; // (1) C++20
}

概要

weekday_last同士の等値比較を行う。

戻り値

  • (1) :

return x.weekday() == y.weekday();

例外

投げない

備考

  • この演算子により、operator!=が使用可能になる

#include <cassert>
#include <chrono>

namespace chrono = std::chrono;

int main()
{
  assert(chrono::Sunday[chrono::last] == chrono::Sunday[chrono::last]);
  assert(chrono::Sunday[chrono::last] != chrono::Monday[chrono::last]);
}

出力

バージョン

言語

  • C++20

処理系

  • Clang: 8.0
  • GCC: (9.2時点で実装なし)
  • Visual C++: (2019 Update 3時点で実装なし)