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

履歴 編集

function
<chrono>

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

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

概要

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

戻り値

  • (1) :

例外

投げない

備考

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

#include <cassert>
#include <chrono>

using std::chrono::last;
using namespace std::chrono_literals;

int main()
{
  assert(2020y/3/last == 2020y/3/last);
  assert(2020y/3/last != 2020y/2/last);
}

出力

バージョン

言語

  • C++20

処理系