25 Time library [time]

25.8 The civil calendar [time.cal]

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

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

constexpr weekday_indexed(const chrono::weekday& wd, unsigned index) noexcept;
Effects: Constructs an object of type weekday_­indexed by initializing wd_­ with wd and index_­ with index.
The values held are unspecified if !wd.ok() or index is not in the range [1, 5].
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.