namespace std::chrono {
class month_weekday {
chrono::month m_;
chrono::weekday_indexed wdi_;
public:
constexpr month_weekday(const chrono::month& m, const chrono::weekday_indexed& wdi) noexcept;
constexpr chrono::month month() const noexcept;
constexpr chrono::weekday_indexed weekday_indexed() const noexcept;
constexpr bool ok() const noexcept;
};
}
month_weekday represents the
nth weekday of a month,
of an as yet unspecified year
. To do this the
month_weekday stores a
month and a
weekday_indexed.[
Example 1:
constexpr auto mwd
= February/Tuesday[3];
static_assert(mwd.month() == February);
static_assert(mwd.weekday_indexed() == Tuesday[3]);
—
end example]
month_weekday is a trivially copyable and standard-layout class type
.