tmp/tmprzz17kp9/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Member functions <a id="time.cal.ym.members">[[time.cal.ym.members]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
constexpr year_month(const chrono::year& y, const chrono::month& m) noexcept;
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
*Effects:* Initializes `y_` with `y`, and `m_` with `m`.
|
| 8 |
+
|
| 9 |
+
``` cpp
|
| 10 |
+
constexpr chrono::year year() const noexcept;
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
*Returns:* `y_`.
|
| 14 |
+
|
| 15 |
+
``` cpp
|
| 16 |
+
constexpr chrono::month month() const noexcept;
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
*Returns:* `m_`.
|
| 20 |
+
|
| 21 |
+
``` cpp
|
| 22 |
+
constexpr year_month& operator+=(const months& dm) noexcept;
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
*Constraints:* If the argument supplied by the caller for the `months`
|
| 26 |
+
parameter is convertible to `years`, its implicit conversion sequence to
|
| 27 |
+
`years` is worse than its implicit conversion sequence to `months`
|
| 28 |
+
[[over.ics.rank]].
|
| 29 |
+
|
| 30 |
+
*Effects:* `*this = *this + dm`.
|
| 31 |
+
|
| 32 |
+
*Returns:* `*this`.
|
| 33 |
+
|
| 34 |
+
``` cpp
|
| 35 |
+
constexpr year_month& operator-=(const months& dm) noexcept;
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
*Constraints:* If the argument supplied by the caller for the `months`
|
| 39 |
+
parameter is convertible to `years`, its implicit conversion sequence to
|
| 40 |
+
`years` is worse than its implicit conversion sequence to `months`
|
| 41 |
+
[[over.ics.rank]].
|
| 42 |
+
|
| 43 |
+
*Effects:* `*this = *this - dm`.
|
| 44 |
+
|
| 45 |
+
*Returns:* `*this`.
|
| 46 |
+
|
| 47 |
+
``` cpp
|
| 48 |
+
constexpr year_month& operator+=(const years& dy) noexcept;
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
*Effects:* `*this = *this + dy`.
|
| 52 |
+
|
| 53 |
+
*Returns:* `*this`.
|
| 54 |
+
|
| 55 |
+
``` cpp
|
| 56 |
+
constexpr year_month& operator-=(const years& dy) noexcept;
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
*Effects:* `*this = *this - dy`.
|
| 60 |
+
|
| 61 |
+
*Returns:* `*this`.
|
| 62 |
+
|
| 63 |
+
``` cpp
|
| 64 |
+
constexpr bool ok() const noexcept;
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
*Returns:* `y_.ok() && m_.ok()`.
|
| 68 |
+
|