From Jason Turner

[time.cal.day.nonmembers]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp6hdoxwjn/{from.md → to.md} +77 -0
tmp/tmp6hdoxwjn/{from.md → to.md} RENAMED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Non-member functions <a id="time.cal.day.nonmembers">[[time.cal.day.nonmembers]]</a>
2
+
3
+ ``` cpp
4
+ constexpr bool operator==(const day& x, const day& y) noexcept;
5
+ ```
6
+
7
+ *Returns:* `unsigned{x} == unsigned{y}`.
8
+
9
+ ``` cpp
10
+ constexpr strong_ordering operator<=>(const day& x, const day& y) noexcept;
11
+ ```
12
+
13
+ *Returns:* `unsigned{x} <=> unsigned{y}`.
14
+
15
+ ``` cpp
16
+ constexpr day operator+(const day& x, const days& y) noexcept;
17
+ ```
18
+
19
+ *Returns:* `day(unsigned{x} + y.count())`.
20
+
21
+ ``` cpp
22
+ constexpr day operator+(const days& x, const day& y) noexcept;
23
+ ```
24
+
25
+ *Returns:* `y + x`.
26
+
27
+ ``` cpp
28
+ constexpr day operator-(const day& x, const days& y) noexcept;
29
+ ```
30
+
31
+ *Returns:* `x + -y`.
32
+
33
+ ``` cpp
34
+ constexpr days operator-(const day& x, const day& y) noexcept;
35
+ ```
36
+
37
+ *Returns:* `days{int(unsigned{x}) - int(unsigned{y})}`.
38
+
39
+ ``` cpp
40
+ template<class charT, class traits>
41
+ basic_ostream<charT, traits>&
42
+ operator<<(basic_ostream<charT, traits>& os, const day& d);
43
+ ```
44
+
45
+ *Effects:* Equivalent to:
46
+
47
+ ``` cpp
48
+ return os << (d.ok() ?
49
+ format(STATICALLY-WIDEN<charT>("{:%d}"), d) :
50
+ format(STATICALLY-WIDEN<charT>("{:%d} is not a valid day"), d));
51
+ ```
52
+
53
+ ``` cpp
54
+ template<class charT, class traits, class Alloc = allocator<charT>>
55
+ basic_istream<charT, traits>&
56
+ from_stream(basic_istream<charT, traits>& is, const charT* fmt,
57
+ day& d, basic_string<charT, traits, Alloc>* abbrev = nullptr,
58
+ minutes* offset = nullptr);
59
+ ```
60
+
61
+ *Effects:* Attempts to parse the input stream `is` into the `day` `d`
62
+ using the format flags given in the NTCTS `fmt` as specified in
63
+ [[time.parse]]. If the parse fails to decode a valid day,
64
+ `is.setstate(ios_base::failbit)` is called and `d` is not modified. If
65
+ `%Z` is used and successfully parsed, that value will be assigned to
66
+ `*abbrev` if `abbrev` is non-null. If `%z` (or a modified variant) is
67
+ used and successfully parsed, that value will be assigned to `*offset`
68
+ if `offset` is non-null.
69
+
70
+ *Returns:* `is`.
71
+
72
+ ``` cpp
73
+ constexpr chrono::day operator""d(unsigned long long d) noexcept;
74
+ ```
75
+
76
+ *Returns:* `day{static_cast<unsigned>(d)}`.
77
+