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

履歴 編集

function
<chrono>

std::chrono::month_weekday_last::weekday_last(C++20)

constexpr chrono::weekday_last weekday_last() const noexcept; // (1) C++20

概要

最終曜日要素を取得する。

戻り値

コンストラクタで設定されて保持している最終曜日オブジェクトを返す。

#include <cassert>
#include <chrono>

namespace chrono = std::chrono;

int main()
{
  chrono::month_weekday_last mwdl = chrono::March/chrono::Sunday[chrono::last];

  chrono::weekday_last wdl = mwdl.weekday_last();
  assert(wdl == chrono::Sunday[chrono::last]);
}

出力

バージョン

言語

  • C++20

処理系