From Jason Turner

[time.cal.mdlast]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpf744n_df/{from.md → to.md} +75 -0
tmp/tmpf744n_df/{from.md → to.md} RENAMED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Class `month_day_last` <a id="time.cal.mdlast">[[time.cal.mdlast]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::chrono {
5
+ class month_day_last {
6
+ chrono::month m_; // exposition only
7
+
8
+ public:
9
+ constexpr explicit month_day_last(const chrono::month& m) noexcept;
10
+
11
+ constexpr chrono::month month() const noexcept;
12
+ constexpr bool ok() const noexcept;
13
+ };
14
+ }
15
+ ```
16
+
17
+ `month_day_last` represents the last day of a month.
18
+
19
+ [*Note 1*: A `month_day_last` object can be constructed using the
20
+ expression `m/last` or `last/m`, where `m` is an expression of type
21
+ `month`. — *end note*]
22
+
23
+ [*Example 1*:
24
+
25
+ ``` cpp
26
+ constexpr auto mdl = February/last; // mdl is the last day of February of an as yet unspecified year
27
+ static_assert(mdl.month() == February);
28
+ ```
29
+
30
+ — *end example*]
31
+
32
+ `month_day_last` is a trivially copyable and standard-layout class type.
33
+
34
+ ``` cpp
35
+ constexpr explicit month_day_last(const chrono::month& m) noexcept;
36
+ ```
37
+
38
+ *Effects:* Initializes `m_` with `m`.
39
+
40
+ ``` cpp
41
+ constexpr month month() const noexcept;
42
+ ```
43
+
44
+ *Returns:* `m_`.
45
+
46
+ ``` cpp
47
+ constexpr bool ok() const noexcept;
48
+ ```
49
+
50
+ *Returns:* `m_.ok()`.
51
+
52
+ ``` cpp
53
+ constexpr bool operator==(const month_day_last& x, const month_day_last& y) noexcept;
54
+ ```
55
+
56
+ *Returns:* `x.month() == y.month()`.
57
+
58
+ ``` cpp
59
+ constexpr strong_ordering operator<=>(const month_day_last& x, const month_day_last& y) noexcept;
60
+ ```
61
+
62
+ *Returns:* `x.month() <=> y.month()`.
63
+
64
+ ``` cpp
65
+ template<class charT, class traits>
66
+ basic_ostream<charT, traits>&
67
+ operator<<(basic_ostream<charT, traits>& os, const month_day_last& mdl);
68
+ ```
69
+
70
+ *Effects:* Equivalent to:
71
+
72
+ ``` cpp
73
+ return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/last"), mdl.month());
74
+ ```
75
+