tmp/tmpzkqh4tlm/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Overview <a id="time.cal.day.overview">[[time.cal.day.overview]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std::chrono {
|
| 5 |
+
class day {
|
| 6 |
+
unsigned char d_; // exposition only
|
| 7 |
+
public:
|
| 8 |
+
day() = default;
|
| 9 |
+
constexpr explicit day(unsigned d) noexcept;
|
| 10 |
+
|
| 11 |
+
constexpr day& operator++() noexcept;
|
| 12 |
+
constexpr day operator++(int) noexcept;
|
| 13 |
+
constexpr day& operator--() noexcept;
|
| 14 |
+
constexpr day operator--(int) noexcept;
|
| 15 |
+
|
| 16 |
+
constexpr day& operator+=(const days& d) noexcept;
|
| 17 |
+
constexpr day& operator-=(const days& d) noexcept;
|
| 18 |
+
|
| 19 |
+
constexpr explicit operator unsigned() const noexcept;
|
| 20 |
+
constexpr bool ok() const noexcept;
|
| 21 |
+
};
|
| 22 |
+
}
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
`day` represents a day of a month. It normally holds values in the range
|
| 26 |
+
1 to 31, but may hold non-negative values outside this range. It can be
|
| 27 |
+
constructed with any `unsigned` value, which will be subsequently
|
| 28 |
+
truncated to fit into `day`’s unspecified internal storage. `day` meets
|
| 29 |
+
the *Cpp17EqualityComparable* ([[cpp17.equalitycomparable]]) and
|
| 30 |
+
*Cpp17LessThanComparable* ([[cpp17.lessthancomparable]]) requirements,
|
| 31 |
+
and participates in basic arithmetic with `days` objects, which
|
| 32 |
+
represent a difference between two `day` objects.
|
| 33 |
+
|
| 34 |
+
`day` is a trivially copyable and standard-layout class type.
|
| 35 |
+
|