[time.cal.wdlast.overview] (original) (raw)

30 Time library [time]

30.8 The civil calendar [time.cal]

30.8.8 Class weekday_last [time.cal.wdlast]

30.8.8.1 Overview [time.cal.wdlast.overview]

namespace std::chrono { class weekday_last { chrono::weekday wd_; public: constexpr explicit weekday_last(const chrono::weekday& wd) noexcept;constexpr chrono::weekday weekday() const noexcept;constexpr bool ok() const noexcept;};}

weekday_last represents the last weekday of a month.

[Note 1:

A weekday_last object can be constructed by indexing a weekday with last.

— _end note_]

[Example 1: constexpr auto wdl = Sunday[last]; static_assert(wdl.weekday() == Sunday); — _end example_]

weekday_last is a trivially copyable and standard-layout class type.