- chrono[meta header]
- std::chrono[meta namespace]
- month_weekday[meta class]
- function[meta id-type]
- cpp20[meta cpp]
constexpr chrono::weekday_indexed weekday_indexed() const noexcept; // (1) C++20- chrono::weekday_indexed[link /reference/chrono/weekday_indexed.md]
インデックス付き曜日要素を取得する。
コンストラクタで設定されて保持しているインデックス付き曜日オブジェクトを返す。
#include <cassert>
#include <chrono>
namespace chrono = std::chrono;
int main()
{
chrono::month_weekday mwd = chrono::March/chrono::Sunday[1];
chrono::weekday_indexed wdi = mwd.weekday_indexed();
assert(wdi == chrono::Sunday[1]);
}- mwd.weekday_indexed()[color ff0000]
- chrono::weekday_indexed[link /reference/chrono/weekday_indexed.md]
- chrono::March[link /reference/chrono/month_constants.md]
- chrono::Sunday[link /reference/chrono/weekday_constants.md]
- C++20
- Clang: 8.0
- GCC: 11.1
- Visual C++: (2019 Update 3時点で実装なし)