tmp/tmp8gdo523v/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Overview <a id="time.cal.mwdlast.overview">[[time.cal.mwdlast.overview]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std::chrono {
|
| 5 |
+
class month_weekday_last {
|
| 6 |
+
chrono::month m_; // exposition only
|
| 7 |
+
chrono::weekday_last wdl_; // exposition only
|
| 8 |
+
public:
|
| 9 |
+
constexpr month_weekday_last(const chrono::month& m,
|
| 10 |
+
const chrono::weekday_last& wdl) noexcept;
|
| 11 |
+
|
| 12 |
+
constexpr chrono::month month() const noexcept;
|
| 13 |
+
constexpr chrono::weekday_last weekday_last() const noexcept;
|
| 14 |
+
constexpr bool ok() const noexcept;
|
| 15 |
+
};
|
| 16 |
+
}
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
`month_weekday_last` represents the last weekday of a month, of an as
|
| 20 |
+
yet unspecified year. To do this the `month_weekday_last` stores a
|
| 21 |
+
`month` and a `weekday_last`.
|
| 22 |
+
|
| 23 |
+
[*Example 1*:
|
| 24 |
+
|
| 25 |
+
``` cpp
|
| 26 |
+
constexpr auto mwd
|
| 27 |
+
= February/Tuesday[last]; // mwd is the last Tuesday of February of an as yet unspecified year
|
| 28 |
+
static_assert(mwd.month() == February);
|
| 29 |
+
static_assert(mwd.weekday_last() == Tuesday[last]);
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
— *end example*]
|
| 33 |
+
|
| 34 |
+
`month_weekday_last` is a trivially copyable and standard-layout class
|
| 35 |
+
type.
|
| 36 |
+
|