27 Time library [time]

27.8 The civil calendar [time.cal]

27.8.7 Class weekday_­indexed [time.cal.wdidx]

27.8.7.2 Member functions [time.cal.wdidx.members]

constexpr weekday_indexed(const chrono::weekday& wd, unsigned index) noexcept;
Effects: Initializes wd_­ with wd and index_­ with index.
The values held are unspecified if !wd.ok() or index is not in the range [0, 7].
constexpr chrono::weekday weekday() const noexcept;
Returns: wd_­.
constexpr unsigned index() const noexcept;
Returns: index_­.
constexpr bool ok() const noexcept;
Returns: wd_­.ok() && 1 <= index_­ && index_­ <= 5.