26 Time library [time]

26.8 The civil calendar [time.cal]

26.8.8 Class weekday_­last [time.cal.wdlast] Overview [time.cal.wdlast.overview]

namespace std::chrono {
  class weekday_last {
    chrono::weekday wd_;                // exposition only

    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.
A weekday_­last object can be constructed by indexing a weekday with last.
end note
constexpr auto wdl = Sunday[last];      // wdl is the last Sunday of an as yet unspecified month
static_assert(wdl.weekday() == Sunday);
end example
weekday_­last is a trivially copyable and standard-layout class type.