tmp/tmpdl1wrpdg/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Overview <a id="time.cal.wdlast.overview">[[time.cal.wdlast.overview]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std::chrono {
|
| 5 |
+
class weekday_last {
|
| 6 |
+
chrono::weekday wd_; // exposition only
|
| 7 |
+
|
| 8 |
+
public:
|
| 9 |
+
constexpr explicit weekday_last(const chrono::weekday& wd) noexcept;
|
| 10 |
+
|
| 11 |
+
constexpr chrono::weekday weekday() const noexcept;
|
| 12 |
+
constexpr bool ok() const noexcept;
|
| 13 |
+
};
|
| 14 |
+
}
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
`weekday_last` represents the last weekday of a month.
|
| 18 |
+
|
| 19 |
+
[*Note 1*: A `weekday_last` object can be constructed by indexing a
|
| 20 |
+
`weekday` with `last`. — *end note*]
|
| 21 |
+
|
| 22 |
+
[*Example 1*:
|
| 23 |
+
|
| 24 |
+
``` cpp
|
| 25 |
+
constexpr auto wdl = Sunday[last]; // wdl is the last Sunday of an as yet unspecified month
|
| 26 |
+
static_assert(wdl.weekday() == Sunday);
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
— *end example*]
|
| 30 |
+
|
| 31 |
+
`weekday_last` is a trivially copyable and standard-layout class type.
|
| 32 |
+
|