- tmp/tmpp7d7_fee/{from.md → to.md} +738 -50
tmp/tmpp7d7_fee/{from.md → to.md}
RENAMED
|
@@ -1,8 +1,10 @@
|
|
| 1 |
-
##
|
| 2 |
|
| 3 |
``` cpp
|
|
|
|
|
|
|
| 4 |
namespace std {
|
| 5 |
namespace chrono {
|
| 6 |
// [time.duration], class template duration
|
| 7 |
template<class Rep, class Period = ratio<1>> class duration;
|
| 8 |
|
|
@@ -20,159 +22,845 @@ namespace std {
|
|
| 20 |
chrono::time_point<Clock, Duration2>>;
|
| 21 |
|
| 22 |
namespace chrono {
|
| 23 |
// [time.traits], customization traits
|
| 24 |
template<class Rep> struct treat_as_floating_point;
|
|
|
|
|
|
|
|
|
|
| 25 |
template<class Rep> struct duration_values;
|
| 26 |
-
|
| 27 |
-
|
|
|
|
| 28 |
|
| 29 |
// [time.duration.nonmember], duration arithmetic
|
| 30 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 31 |
-
common_type_t<duration<Rep1, Period1>, duration<Rep2, Period2>>
|
| 32 |
-
|
| 33 |
-
const duration<Rep2, Period2>& rhs);
|
| 34 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 35 |
-
common_type_t<duration<Rep1, Period1>, duration<Rep2, Period2>>
|
| 36 |
-
|
| 37 |
-
const duration<Rep2, Period2>& rhs);
|
| 38 |
template<class Rep1, class Period, class Rep2>
|
| 39 |
-
duration<common_type_t<Rep1, Rep2>, Period>
|
| 40 |
-
|
| 41 |
template<class Rep1, class Rep2, class Period>
|
| 42 |
-
duration<common_type_t<Rep1, Rep2>, Period>
|
| 43 |
-
|
| 44 |
template<class Rep1, class Period, class Rep2>
|
| 45 |
-
duration<common_type_t<Rep1, Rep2>, Period>
|
| 46 |
-
|
| 47 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 48 |
-
common_type_t<Rep1, Rep2>
|
| 49 |
-
|
| 50 |
-
const duration<Rep2, Period2>& rhs);
|
| 51 |
template<class Rep1, class Period, class Rep2>
|
| 52 |
-
duration<common_type_t<Rep1, Rep2>, Period>
|
| 53 |
-
|
| 54 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 55 |
-
common_type_t<duration<Rep1, Period1>, duration<Rep2, Period2>>
|
| 56 |
-
|
| 57 |
-
const duration<Rep2, Period2>& rhs);
|
| 58 |
|
| 59 |
// [time.duration.comparisons], duration comparisons
|
| 60 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 61 |
constexpr bool operator==(const duration<Rep1, Period1>& lhs,
|
| 62 |
const duration<Rep2, Period2>& rhs);
|
| 63 |
-
template <class Rep1, class Period1, class Rep2, class Period2>
|
| 64 |
-
constexpr bool operator!=(const duration<Rep1, Period1>& lhs,
|
| 65 |
-
const duration<Rep2, Period2>& rhs);
|
| 66 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 67 |
constexpr bool operator< (const duration<Rep1, Period1>& lhs,
|
| 68 |
const duration<Rep2, Period2>& rhs);
|
| 69 |
-
template <class Rep1, class Period1, class Rep2, class Period2>
|
| 70 |
-
constexpr bool operator<=(const duration<Rep1, Period1>& lhs,
|
| 71 |
-
const duration<Rep2, Period2>& rhs);
|
| 72 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 73 |
constexpr bool operator> (const duration<Rep1, Period1>& lhs,
|
| 74 |
const duration<Rep2, Period2>& rhs);
|
|
|
|
|
|
|
|
|
|
| 75 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 76 |
constexpr bool operator>=(const duration<Rep1, Period1>& lhs,
|
| 77 |
const duration<Rep2, Period2>& rhs);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
-
// [time.duration.cast],
|
| 80 |
template<class ToDuration, class Rep, class Period>
|
| 81 |
constexpr ToDuration duration_cast(const duration<Rep, Period>& d);
|
| 82 |
template<class ToDuration, class Rep, class Period>
|
| 83 |
constexpr ToDuration floor(const duration<Rep, Period>& d);
|
| 84 |
template<class ToDuration, class Rep, class Period>
|
| 85 |
constexpr ToDuration ceil(const duration<Rep, Period>& d);
|
| 86 |
template<class ToDuration, class Rep, class Period>
|
| 87 |
constexpr ToDuration round(const duration<Rep, Period>& d);
|
| 88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
// convenience typedefs
|
| 90 |
using nanoseconds = duration<signed integer type of at least 64 bits, nano>;
|
| 91 |
using microseconds = duration<signed integer type of at least 55 bits, micro>;
|
| 92 |
using milliseconds = duration<signed integer type of at least 45 bits, milli>;
|
| 93 |
using seconds = duration<signed integer type of at least 35 bits>;
|
| 94 |
using minutes = duration<signed integer type of at least 29 bits, ratio< 60>>;
|
| 95 |
using hours = duration<signed integer type of at least 23 bits, ratio<3600>>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
// [time.point.nonmember], time_point arithmetic
|
| 98 |
template<class Clock, class Duration1, class Rep2, class Period2>
|
| 99 |
constexpr time_point<Clock, common_type_t<Duration1, duration<Rep2, Period2>>>
|
| 100 |
-
|
| 101 |
-
const duration<Rep2, Period2>& rhs);
|
| 102 |
template<class Rep1, class Period1, class Clock, class Duration2>
|
| 103 |
constexpr time_point<Clock, common_type_t<duration<Rep1, Period1>, Duration2>>
|
| 104 |
-
|
| 105 |
-
const time_point<Clock, Duration2>& rhs);
|
| 106 |
template<class Clock, class Duration1, class Rep2, class Period2>
|
| 107 |
constexpr time_point<Clock, common_type_t<Duration1, duration<Rep2, Period2>>>
|
| 108 |
-
|
| 109 |
-
const duration<Rep2, Period2>& rhs);
|
| 110 |
template<class Clock, class Duration1, class Duration2>
|
| 111 |
constexpr common_type_t<Duration1, Duration2>
|
| 112 |
operator-(const time_point<Clock, Duration1>& lhs,
|
| 113 |
const time_point<Clock, Duration2>& rhs);
|
| 114 |
|
| 115 |
// [time.point.comparisons], time_point comparisons
|
| 116 |
template<class Clock, class Duration1, class Duration2>
|
| 117 |
constexpr bool operator==(const time_point<Clock, Duration1>& lhs,
|
| 118 |
const time_point<Clock, Duration2>& rhs);
|
| 119 |
-
template <class Clock, class Duration1, class Duration2>
|
| 120 |
-
constexpr bool operator!=(const time_point<Clock, Duration1>& lhs,
|
| 121 |
-
const time_point<Clock, Duration2>& rhs);
|
| 122 |
template<class Clock, class Duration1, class Duration2>
|
| 123 |
constexpr bool operator< (const time_point<Clock, Duration1>& lhs,
|
| 124 |
const time_point<Clock, Duration2>& rhs);
|
| 125 |
-
template <class Clock, class Duration1, class Duration2>
|
| 126 |
-
constexpr bool operator<=(const time_point<Clock, Duration1>& lhs,
|
| 127 |
-
const time_point<Clock, Duration2>& rhs);
|
| 128 |
template<class Clock, class Duration1, class Duration2>
|
| 129 |
constexpr bool operator> (const time_point<Clock, Duration1>& lhs,
|
| 130 |
const time_point<Clock, Duration2>& rhs);
|
|
|
|
|
|
|
|
|
|
| 131 |
template<class Clock, class Duration1, class Duration2>
|
| 132 |
constexpr bool operator>=(const time_point<Clock, Duration1>& lhs,
|
| 133 |
const time_point<Clock, Duration2>& rhs);
|
|
|
|
|
|
|
|
|
|
| 134 |
|
| 135 |
-
// [time.point.cast],
|
| 136 |
template<class ToDuration, class Clock, class Duration>
|
| 137 |
constexpr time_point<Clock, ToDuration>
|
| 138 |
time_point_cast(const time_point<Clock, Duration>& t);
|
| 139 |
template<class ToDuration, class Clock, class Duration>
|
| 140 |
-
constexpr time_point<Clock, ToDuration>
|
| 141 |
-
floor(const time_point<Clock, Duration>& tp);
|
| 142 |
template<class ToDuration, class Clock, class Duration>
|
| 143 |
-
constexpr time_point<Clock, ToDuration>
|
| 144 |
-
ceil(const time_point<Clock, Duration>& tp);
|
| 145 |
template<class ToDuration, class Clock, class Duration>
|
| 146 |
-
constexpr time_point<Clock, ToDuration>
|
| 147 |
-
round(const time_point<Clock, Duration>& tp);
|
| 148 |
|
| 149 |
// [time.duration.alg], specialized algorithms
|
| 150 |
template<class Rep, class Period>
|
| 151 |
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ace literals {
|
| 160 |
inline namespace chrono_literals {
|
| 161 |
// [time.duration.literals], suffixes for duration literals
|
| 162 |
constexpr chrono::hours operator""h(unsigned long long);
|
| 163 |
constexpr chrono::duration<unspecified, ratio<3600, 1>> operator""h(long double);
|
|
|
|
| 164 |
constexpr chrono::minutes operator""min(unsigned long long);
|
| 165 |
constexpr chrono::duration<unspecified, ratio<60, 1>> operator""min(long double);
|
|
|
|
| 166 |
constexpr chrono::seconds operator""s(unsigned long long);
|
| 167 |
constexpr chrono::duration<unspecified> operator""s(long double);
|
|
|
|
| 168 |
constexpr chrono::milliseconds operator""ms(unsigned long long);
|
| 169 |
constexpr chrono::duration<unspecified, milli> operator""ms(long double);
|
|
|
|
| 170 |
constexpr chrono::microseconds operator""us(unsigned long long);
|
| 171 |
constexpr chrono::duration<unspecified, micro> operator""us(long double);
|
|
|
|
| 172 |
constexpr chrono::nanoseconds operator""ns(unsigned long long);
|
| 173 |
constexpr chrono::duration<unspecified, nano> operator""ns(long double);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
}
|
| 175 |
}
|
| 176 |
|
| 177 |
namespace chrono {
|
| 178 |
using namespace literals::chrono_literals;
|
|
|
|
| 1 |
+
## Header `<chrono>` synopsis <a id="time.syn">[[time.syn]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
#include <compare> // see [compare.syn]
|
| 5 |
+
|
| 6 |
namespace std {
|
| 7 |
namespace chrono {
|
| 8 |
// [time.duration], class template duration
|
| 9 |
template<class Rep, class Period = ratio<1>> class duration;
|
| 10 |
|
|
|
|
| 22 |
chrono::time_point<Clock, Duration2>>;
|
| 23 |
|
| 24 |
namespace chrono {
|
| 25 |
// [time.traits], customization traits
|
| 26 |
template<class Rep> struct treat_as_floating_point;
|
| 27 |
+
template<class Rep>
|
| 28 |
+
inline constexpr bool treat_as_floating_point_v = treat_as_floating_point<Rep>::value;
|
| 29 |
+
|
| 30 |
template<class Rep> struct duration_values;
|
| 31 |
+
|
| 32 |
+
template<class T> struct is_clock;
|
| 33 |
+
template<class T> inline constexpr bool is_clock_v = is_clock<T>::value;
|
| 34 |
|
| 35 |
// [time.duration.nonmember], duration arithmetic
|
| 36 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 37 |
+
constexpr common_type_t<duration<Rep1, Period1>, duration<Rep2, Period2>>
|
| 38 |
+
operator+(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
|
|
|
|
| 39 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 40 |
+
constexpr common_type_t<duration<Rep1, Period1>, duration<Rep2, Period2>>
|
| 41 |
+
operator-(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
|
|
|
|
| 42 |
template<class Rep1, class Period, class Rep2>
|
| 43 |
+
constexpr duration<common_type_t<Rep1, Rep2>, Period>
|
| 44 |
+
operator*(const duration<Rep1, Period>& d, const Rep2& s);
|
| 45 |
template<class Rep1, class Rep2, class Period>
|
| 46 |
+
constexpr duration<common_type_t<Rep1, Rep2>, Period>
|
| 47 |
+
operator*(const Rep1& s, const duration<Rep2, Period>& d);
|
| 48 |
template<class Rep1, class Period, class Rep2>
|
| 49 |
+
constexpr duration<common_type_t<Rep1, Rep2>, Period>
|
| 50 |
+
operator/(const duration<Rep1, Period>& d, const Rep2& s);
|
| 51 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 52 |
+
constexpr common_type_t<Rep1, Rep2>
|
| 53 |
+
operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
|
|
|
|
| 54 |
template<class Rep1, class Period, class Rep2>
|
| 55 |
+
constexpr duration<common_type_t<Rep1, Rep2>, Period>
|
| 56 |
+
operator%(const duration<Rep1, Period>& d, const Rep2& s);
|
| 57 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 58 |
+
constexpr common_type_t<duration<Rep1, Period1>, duration<Rep2, Period2>>
|
| 59 |
+
operator%(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
|
|
|
|
| 60 |
|
| 61 |
// [time.duration.comparisons], duration comparisons
|
| 62 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 63 |
constexpr bool operator==(const duration<Rep1, Period1>& lhs,
|
| 64 |
const duration<Rep2, Period2>& rhs);
|
|
|
|
|
|
|
|
|
|
| 65 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 66 |
constexpr bool operator< (const duration<Rep1, Period1>& lhs,
|
| 67 |
const duration<Rep2, Period2>& rhs);
|
|
|
|
|
|
|
|
|
|
| 68 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 69 |
constexpr bool operator> (const duration<Rep1, Period1>& lhs,
|
| 70 |
const duration<Rep2, Period2>& rhs);
|
| 71 |
+
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 72 |
+
constexpr bool operator<=(const duration<Rep1, Period1>& lhs,
|
| 73 |
+
const duration<Rep2, Period2>& rhs);
|
| 74 |
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 75 |
constexpr bool operator>=(const duration<Rep1, Period1>& lhs,
|
| 76 |
const duration<Rep2, Period2>& rhs);
|
| 77 |
+
template<class Rep1, class Period1, class Rep2, class Period2>
|
| 78 |
+
requires see below
|
| 79 |
+
constexpr auto operator<=>(const duration<Rep1, Period1>& lhs,
|
| 80 |
+
const duration<Rep2, Period2>& rhs);
|
| 81 |
|
| 82 |
+
// [time.duration.cast], conversions
|
| 83 |
template<class ToDuration, class Rep, class Period>
|
| 84 |
constexpr ToDuration duration_cast(const duration<Rep, Period>& d);
|
| 85 |
template<class ToDuration, class Rep, class Period>
|
| 86 |
constexpr ToDuration floor(const duration<Rep, Period>& d);
|
| 87 |
template<class ToDuration, class Rep, class Period>
|
| 88 |
constexpr ToDuration ceil(const duration<Rep, Period>& d);
|
| 89 |
template<class ToDuration, class Rep, class Period>
|
| 90 |
constexpr ToDuration round(const duration<Rep, Period>& d);
|
| 91 |
|
| 92 |
+
// [time.duration.io], duration I/O
|
| 93 |
+
template<class charT, class traits, class Rep, class Period>
|
| 94 |
+
basic_ostream<charT, traits>&
|
| 95 |
+
operator<<(basic_ostream<charT, traits>& os,
|
| 96 |
+
const duration<Rep, Period>& d);
|
| 97 |
+
template<class charT, class traits, class Rep, class Period, class Alloc = allocator<charT>>
|
| 98 |
+
basic_istream<charT, traits>&
|
| 99 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 100 |
+
duration<Rep, Period>& d,
|
| 101 |
+
basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 102 |
+
minutes* offset = nullptr);
|
| 103 |
+
|
| 104 |
// convenience typedefs
|
| 105 |
using nanoseconds = duration<signed integer type of at least 64 bits, nano>;
|
| 106 |
using microseconds = duration<signed integer type of at least 55 bits, micro>;
|
| 107 |
using milliseconds = duration<signed integer type of at least 45 bits, milli>;
|
| 108 |
using seconds = duration<signed integer type of at least 35 bits>;
|
| 109 |
using minutes = duration<signed integer type of at least 29 bits, ratio< 60>>;
|
| 110 |
using hours = duration<signed integer type of at least 23 bits, ratio<3600>>;
|
| 111 |
+
using days = duration<signed integer type of at least 25 bits,
|
| 112 |
+
ratio_multiply<ratio<24>, hours::period>>;
|
| 113 |
+
using weeks = duration<signed integer type of at least 22 bits,
|
| 114 |
+
ratio_multiply<ratio<7>, days::period>>;
|
| 115 |
+
using years = duration<signed integer type of at least 17 bits,
|
| 116 |
+
ratio_multiply<ratio<146097, 400>, days::period>>;
|
| 117 |
+
using months = duration<signed integer type of at least 20 bits,
|
| 118 |
+
ratio_divide<years::period, ratio<12>>>;
|
| 119 |
|
| 120 |
// [time.point.nonmember], time_point arithmetic
|
| 121 |
template<class Clock, class Duration1, class Rep2, class Period2>
|
| 122 |
constexpr time_point<Clock, common_type_t<Duration1, duration<Rep2, Period2>>>
|
| 123 |
+
operator+(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs);
|
|
|
|
| 124 |
template<class Rep1, class Period1, class Clock, class Duration2>
|
| 125 |
constexpr time_point<Clock, common_type_t<duration<Rep1, Period1>, Duration2>>
|
| 126 |
+
operator+(const duration<Rep1, Period1>& lhs, const time_point<Clock, Duration2>& rhs);
|
|
|
|
| 127 |
template<class Clock, class Duration1, class Rep2, class Period2>
|
| 128 |
constexpr time_point<Clock, common_type_t<Duration1, duration<Rep2, Period2>>>
|
| 129 |
+
operator-(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs);
|
|
|
|
| 130 |
template<class Clock, class Duration1, class Duration2>
|
| 131 |
constexpr common_type_t<Duration1, Duration2>
|
| 132 |
operator-(const time_point<Clock, Duration1>& lhs,
|
| 133 |
const time_point<Clock, Duration2>& rhs);
|
| 134 |
|
| 135 |
// [time.point.comparisons], time_point comparisons
|
| 136 |
template<class Clock, class Duration1, class Duration2>
|
| 137 |
constexpr bool operator==(const time_point<Clock, Duration1>& lhs,
|
| 138 |
const time_point<Clock, Duration2>& rhs);
|
|
|
|
|
|
|
|
|
|
| 139 |
template<class Clock, class Duration1, class Duration2>
|
| 140 |
constexpr bool operator< (const time_point<Clock, Duration1>& lhs,
|
| 141 |
const time_point<Clock, Duration2>& rhs);
|
|
|
|
|
|
|
|
|
|
| 142 |
template<class Clock, class Duration1, class Duration2>
|
| 143 |
constexpr bool operator> (const time_point<Clock, Duration1>& lhs,
|
| 144 |
const time_point<Clock, Duration2>& rhs);
|
| 145 |
+
template<class Clock, class Duration1, class Duration2>
|
| 146 |
+
constexpr bool operator<=(const time_point<Clock, Duration1>& lhs,
|
| 147 |
+
const time_point<Clock, Duration2>& rhs);
|
| 148 |
template<class Clock, class Duration1, class Duration2>
|
| 149 |
constexpr bool operator>=(const time_point<Clock, Duration1>& lhs,
|
| 150 |
const time_point<Clock, Duration2>& rhs);
|
| 151 |
+
template<class Clock, class Duration1, three_way_comparable_with<Duration1> Duration2>
|
| 152 |
+
constexpr auto operator<=>(const time_point<Clock, Duration1>& lhs,
|
| 153 |
+
const time_point<Clock, Duration2>& rhs);
|
| 154 |
|
| 155 |
+
// [time.point.cast], conversions
|
| 156 |
template<class ToDuration, class Clock, class Duration>
|
| 157 |
constexpr time_point<Clock, ToDuration>
|
| 158 |
time_point_cast(const time_point<Clock, Duration>& t);
|
| 159 |
template<class ToDuration, class Clock, class Duration>
|
| 160 |
+
constexpr time_point<Clock, ToDuration> floor(const time_point<Clock, Duration>& tp);
|
|
|
|
| 161 |
template<class ToDuration, class Clock, class Duration>
|
| 162 |
+
constexpr time_point<Clock, ToDuration> ceil(const time_point<Clock, Duration>& tp);
|
|
|
|
| 163 |
template<class ToDuration, class Clock, class Duration>
|
| 164 |
+
constexpr time_point<Clock, ToDuration> round(const time_point<Clock, Duration>& tp);
|
|
|
|
| 165 |
|
| 166 |
// [time.duration.alg], specialized algorithms
|
| 167 |
template<class Rep, class Period>
|
| 168 |
constexpr duration<Rep, Period> abs(duration<Rep, Period> d);
|
| 169 |
|
| 170 |
+
// [time.clock.system], class system_clock
|
| 171 |
class system_clock;
|
| 172 |
+
|
| 173 |
+
template<class Duration>
|
| 174 |
+
using sys_time = time_point<system_clock, Duration>;
|
| 175 |
+
using sys_seconds = sys_time<seconds>;
|
| 176 |
+
using sys_days = sys_time<days>;
|
| 177 |
+
|
| 178 |
+
template<class charT, class traits, class Duration>
|
| 179 |
+
basic_ostream<charT, traits>&
|
| 180 |
+
operator<<(basic_ostream<charT, traits>& os, const sys_time<Duration>& tp);
|
| 181 |
+
|
| 182 |
+
template<class charT, class traits>
|
| 183 |
+
basic_ostream<charT, traits>&
|
| 184 |
+
operator<<(basic_ostream<charT, traits>& os, const sys_days& dp);
|
| 185 |
+
|
| 186 |
+
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
|
| 187 |
+
basic_istream<charT, traits>&
|
| 188 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 189 |
+
sys_time<Duration>& tp,
|
| 190 |
+
basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 191 |
+
minutes* offset = nullptr);
|
| 192 |
+
|
| 193 |
+
// [time.clock.utc], class utc_clock
|
| 194 |
+
class utc_clock;
|
| 195 |
+
|
| 196 |
+
template<class Duration>
|
| 197 |
+
using utc_time = time_point<utc_clock, Duration>;
|
| 198 |
+
using utc_seconds = utc_time<seconds>;
|
| 199 |
+
|
| 200 |
+
template<class charT, class traits, class Duration>
|
| 201 |
+
basic_ostream<charT, traits>&
|
| 202 |
+
operator<<(basic_ostream<charT, traits>& os, const utc_time<Duration>& t);
|
| 203 |
+
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
|
| 204 |
+
basic_istream<charT, traits>&
|
| 205 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 206 |
+
utc_time<Duration>& tp,
|
| 207 |
+
basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 208 |
+
minutes* offset = nullptr);
|
| 209 |
+
|
| 210 |
+
struct leap_second_info;
|
| 211 |
+
|
| 212 |
+
template<class Duration>
|
| 213 |
+
leap_second_info get_leap_second_info(const utc_time<Duration>& ut);
|
| 214 |
+
|
| 215 |
+
// [time.clock.tai], class tai_clock
|
| 216 |
+
class tai_clock;
|
| 217 |
+
|
| 218 |
+
template<class Duration>
|
| 219 |
+
using tai_time = time_point<tai_clock, Duration>;
|
| 220 |
+
using tai_seconds = tai_time<seconds>;
|
| 221 |
+
|
| 222 |
+
template<class charT, class traits, class Duration>
|
| 223 |
+
basic_ostream<charT, traits>&
|
| 224 |
+
operator<<(basic_ostream<charT, traits>& os, const tai_time<Duration>& t);
|
| 225 |
+
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
|
| 226 |
+
basic_istream<charT, traits>&
|
| 227 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 228 |
+
tai_time<Duration>& tp,
|
| 229 |
+
basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 230 |
+
minutes* offset = nullptr);
|
| 231 |
+
|
| 232 |
+
// [time.clock.gps], class gps_clock
|
| 233 |
+
class gps_clock;
|
| 234 |
+
|
| 235 |
+
template<class Duration>
|
| 236 |
+
using gps_time = time_point<gps_clock, Duration>;
|
| 237 |
+
using gps_seconds = gps_time<seconds>;
|
| 238 |
+
|
| 239 |
+
template<class charT, class traits, class Duration>
|
| 240 |
+
basic_ostream<charT, traits>&
|
| 241 |
+
operator<<(basic_ostream<charT, traits>& os, const gps_time<Duration>& t);
|
| 242 |
+
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
|
| 243 |
+
basic_istream<charT, traits>&
|
| 244 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 245 |
+
gps_time<Duration>& tp,
|
| 246 |
+
basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 247 |
+
minutes* offset = nullptr);
|
| 248 |
+
|
| 249 |
+
// [time.clock.file], type file_clock
|
| 250 |
+
using file_clock = see below;
|
| 251 |
+
|
| 252 |
+
template<class Duration>
|
| 253 |
+
using file_time = time_point<file_clock, Duration>;
|
| 254 |
+
|
| 255 |
+
template<class charT, class traits, class Duration>
|
| 256 |
+
basic_ostream<charT, traits>&
|
| 257 |
+
operator<<(basic_ostream<charT, traits>& os, const file_time<Duration>& tp);
|
| 258 |
+
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
|
| 259 |
+
basic_istream<charT, traits>&
|
| 260 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 261 |
+
file_time<Duration>& tp,
|
| 262 |
+
basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 263 |
+
minutes* offset = nullptr);
|
| 264 |
+
|
| 265 |
+
// [time.clock.steady], class steady_clock
|
| 266 |
class steady_clock;
|
| 267 |
+
|
| 268 |
+
// [time.clock.hires], class high_resolution_clock
|
| 269 |
class high_resolution_clock;
|
| 270 |
+
|
| 271 |
+
// [time.clock.local], local time
|
| 272 |
+
struct local_t {};
|
| 273 |
+
template<class Duration>
|
| 274 |
+
using local_time = time_point<local_t, Duration>;
|
| 275 |
+
using local_seconds = local_time<seconds>;
|
| 276 |
+
using local_days = local_time<days>;
|
| 277 |
+
|
| 278 |
+
template<class charT, class traits, class Duration>
|
| 279 |
+
basic_ostream<charT, traits>&
|
| 280 |
+
operator<<(basic_ostream<charT, traits>& os, const local_time<Duration>& tp);
|
| 281 |
+
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
|
| 282 |
+
basic_istream<charT, traits>&
|
| 283 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 284 |
+
local_time<Duration>& tp,
|
| 285 |
+
basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 286 |
+
minutes* offset = nullptr);
|
| 287 |
+
|
| 288 |
+
// [time.clock.cast], time_point conversions
|
| 289 |
+
template<class DestClock, class SourceClock>
|
| 290 |
+
struct clock_time_conversion;
|
| 291 |
+
|
| 292 |
+
template<class DestClock, class SourceClock, class Duration>
|
| 293 |
+
auto clock_cast(const time_point<SourceClock, Duration>& t);
|
| 294 |
+
|
| 295 |
+
// [time.cal.last], class last_spec
|
| 296 |
+
struct last_spec;
|
| 297 |
+
|
| 298 |
+
// [time.cal.day], class day
|
| 299 |
+
class day;
|
| 300 |
+
|
| 301 |
+
constexpr bool operator==(const day& x, const day& y) noexcept;
|
| 302 |
+
constexpr strong_ordering operator<=>(const day& x, const day& y) noexcept;
|
| 303 |
+
|
| 304 |
+
constexpr day operator+(const day& x, const days& y) noexcept;
|
| 305 |
+
constexpr day operator+(const days& x, const day& y) noexcept;
|
| 306 |
+
constexpr day operator-(const day& x, const days& y) noexcept;
|
| 307 |
+
constexpr days operator-(const day& x, const day& y) noexcept;
|
| 308 |
+
|
| 309 |
+
template<class charT, class traits>
|
| 310 |
+
basic_ostream<charT, traits>&
|
| 311 |
+
operator<<(basic_ostream<charT, traits>& os, const day& d);
|
| 312 |
+
template<class charT, class traits, class Alloc = allocator<charT>>
|
| 313 |
+
basic_istream<charT, traits>&
|
| 314 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 315 |
+
day& d, basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 316 |
+
minutes* offset = nullptr);
|
| 317 |
+
|
| 318 |
+
// [time.cal.month], class month
|
| 319 |
+
class month;
|
| 320 |
+
|
| 321 |
+
constexpr bool operator==(const month& x, const month& y) noexcept;
|
| 322 |
+
constexpr strong_ordering operator<=>(const month& x, const month& y) noexcept;
|
| 323 |
+
|
| 324 |
+
constexpr month operator+(const month& x, const months& y) noexcept;
|
| 325 |
+
constexpr month operator+(const months& x, const month& y) noexcept;
|
| 326 |
+
constexpr month operator-(const month& x, const months& y) noexcept;
|
| 327 |
+
constexpr months operator-(const month& x, const month& y) noexcept;
|
| 328 |
+
|
| 329 |
+
template<class charT, class traits>
|
| 330 |
+
basic_ostream<charT, traits>&
|
| 331 |
+
operator<<(basic_ostream<charT, traits>& os, const month& m);
|
| 332 |
+
template<class charT, class traits, class Alloc = allocator<charT>>
|
| 333 |
+
basic_istream<charT, traits>&
|
| 334 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 335 |
+
month& m, basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 336 |
+
minutes* offset = nullptr);
|
| 337 |
+
|
| 338 |
+
// [time.cal.year], class year
|
| 339 |
+
class year;
|
| 340 |
+
|
| 341 |
+
constexpr bool operator==(const year& x, const year& y) noexcept;
|
| 342 |
+
constexpr strong_ordering operator<=>(const year& x, const year& y) noexcept;
|
| 343 |
+
|
| 344 |
+
constexpr year operator+(const year& x, const years& y) noexcept;
|
| 345 |
+
constexpr year operator+(const years& x, const year& y) noexcept;
|
| 346 |
+
constexpr year operator-(const year& x, const years& y) noexcept;
|
| 347 |
+
constexpr years operator-(const year& x, const year& y) noexcept;
|
| 348 |
+
|
| 349 |
+
template<class charT, class traits>
|
| 350 |
+
basic_ostream<charT, traits>&
|
| 351 |
+
operator<<(basic_ostream<charT, traits>& os, const year& y);
|
| 352 |
+
|
| 353 |
+
template<class charT, class traits, class Alloc = allocator<charT>>
|
| 354 |
+
basic_istream<charT, traits>&
|
| 355 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 356 |
+
year& y, basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 357 |
+
minutes* offset = nullptr);
|
| 358 |
+
|
| 359 |
+
// [time.cal.wd], class weekday
|
| 360 |
+
class weekday;
|
| 361 |
+
|
| 362 |
+
constexpr bool operator==(const weekday& x, const weekday& y) noexcept;
|
| 363 |
+
|
| 364 |
+
constexpr weekday operator+(const weekday& x, const days& y) noexcept;
|
| 365 |
+
constexpr weekday operator+(const days& x, const weekday& y) noexcept;
|
| 366 |
+
constexpr weekday operator-(const weekday& x, const days& y) noexcept;
|
| 367 |
+
constexpr days operator-(const weekday& x, const weekday& y) noexcept;
|
| 368 |
+
|
| 369 |
+
template<class charT, class traits>
|
| 370 |
+
basic_ostream<charT, traits>&
|
| 371 |
+
operator<<(basic_ostream<charT, traits>& os, const weekday& wd);
|
| 372 |
+
|
| 373 |
+
template<class charT, class traits, class Alloc = allocator<charT>>
|
| 374 |
+
basic_istream<charT, traits>&
|
| 375 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 376 |
+
weekday& wd, basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 377 |
+
minutes* offset = nullptr);
|
| 378 |
+
|
| 379 |
+
// [time.cal.wdidx], class weekday_indexed
|
| 380 |
+
class weekday_indexed;
|
| 381 |
+
|
| 382 |
+
constexpr bool operator==(const weekday_indexed& x, const weekday_indexed& y) noexcept;
|
| 383 |
+
|
| 384 |
+
template<class charT, class traits>
|
| 385 |
+
basic_ostream<charT, traits>&
|
| 386 |
+
operator<<(basic_ostream<charT, traits>& os, const weekday_indexed& wdi);
|
| 387 |
+
|
| 388 |
+
// [time.cal.wdlast], class weekday_last
|
| 389 |
+
class weekday_last;
|
| 390 |
+
|
| 391 |
+
constexpr bool operator==(const weekday_last& x, const weekday_last& y) noexcept;
|
| 392 |
+
|
| 393 |
+
template<class charT, class traits>
|
| 394 |
+
basic_ostream<charT, traits>&
|
| 395 |
+
operator<<(basic_ostream<charT, traits>& os, const weekday_last& wdl);
|
| 396 |
+
|
| 397 |
+
// [time.cal.md], class month_day
|
| 398 |
+
class month_day;
|
| 399 |
+
|
| 400 |
+
constexpr bool operator==(const month_day& x, const month_day& y) noexcept;
|
| 401 |
+
constexpr strong_ordering operator<=>(const month_day& x, const month_day& y) noexcept;
|
| 402 |
+
|
| 403 |
+
template<class charT, class traits>
|
| 404 |
+
basic_ostream<charT, traits>&
|
| 405 |
+
operator<<(basic_ostream<charT, traits>& os, const month_day& md);
|
| 406 |
+
|
| 407 |
+
template<class charT, class traits, class Alloc = allocator<charT>>
|
| 408 |
+
basic_istream<charT, traits>&
|
| 409 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 410 |
+
month_day& md, basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 411 |
+
minutes* offset = nullptr);
|
| 412 |
+
|
| 413 |
+
// [time.cal.mdlast], class month_day_last
|
| 414 |
+
class month_day_last;
|
| 415 |
+
|
| 416 |
+
constexpr bool operator==(const month_day_last& x, const month_day_last& y) noexcept;
|
| 417 |
+
constexpr strong_ordering operator<=>(const month_day_last& x,
|
| 418 |
+
const month_day_last& y) noexcept;
|
| 419 |
+
|
| 420 |
+
template<class charT, class traits>
|
| 421 |
+
basic_ostream<charT, traits>&
|
| 422 |
+
operator<<(basic_ostream<charT, traits>& os, const month_day_last& mdl);
|
| 423 |
+
|
| 424 |
+
// [time.cal.mwd], class month_weekday
|
| 425 |
+
class month_weekday;
|
| 426 |
+
|
| 427 |
+
constexpr bool operator==(const month_weekday& x, const month_weekday& y) noexcept;
|
| 428 |
+
|
| 429 |
+
template<class charT, class traits>
|
| 430 |
+
basic_ostream<charT, traits>&
|
| 431 |
+
operator<<(basic_ostream<charT, traits>& os, const month_weekday& mwd);
|
| 432 |
+
|
| 433 |
+
// [time.cal.mwdlast], class month_weekday_last
|
| 434 |
+
class month_weekday_last;
|
| 435 |
+
|
| 436 |
+
constexpr bool operator==(const month_weekday_last& x, const month_weekday_last& y) noexcept;
|
| 437 |
+
|
| 438 |
+
template<class charT, class traits>
|
| 439 |
+
basic_ostream<charT, traits>&
|
| 440 |
+
operator<<(basic_ostream<charT, traits>& os, const month_weekday_last& mwdl);
|
| 441 |
+
|
| 442 |
+
// [time.cal.ym], class year_month
|
| 443 |
+
class year_month;
|
| 444 |
+
|
| 445 |
+
constexpr bool operator==(const year_month& x, const year_month& y) noexcept;
|
| 446 |
+
constexpr strong_ordering operator<=>(const year_month& x, const year_month& y) noexcept;
|
| 447 |
+
|
| 448 |
+
constexpr year_month operator+(const year_month& ym, const months& dm) noexcept;
|
| 449 |
+
constexpr year_month operator+(const months& dm, const year_month& ym) noexcept;
|
| 450 |
+
constexpr year_month operator-(const year_month& ym, const months& dm) noexcept;
|
| 451 |
+
constexpr months operator-(const year_month& x, const year_month& y) noexcept;
|
| 452 |
+
constexpr year_month operator+(const year_month& ym, const years& dy) noexcept;
|
| 453 |
+
constexpr year_month operator+(const years& dy, const year_month& ym) noexcept;
|
| 454 |
+
constexpr year_month operator-(const year_month& ym, const years& dy) noexcept;
|
| 455 |
+
|
| 456 |
+
template<class charT, class traits>
|
| 457 |
+
basic_ostream<charT, traits>&
|
| 458 |
+
operator<<(basic_ostream<charT, traits>& os, const year_month& ym);
|
| 459 |
+
|
| 460 |
+
template<class charT, class traits, class Alloc = allocator<charT>>
|
| 461 |
+
basic_istream<charT, traits>&
|
| 462 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 463 |
+
year_month& ym, basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 464 |
+
minutes* offset = nullptr);
|
| 465 |
+
|
| 466 |
+
// [time.cal.ymd], class year_month_day
|
| 467 |
+
class year_month_day;
|
| 468 |
+
|
| 469 |
+
constexpr bool operator==(const year_month_day& x, const year_month_day& y) noexcept;
|
| 470 |
+
constexpr strong_ordering operator<=>(const year_month_day& x,
|
| 471 |
+
const year_month_day& y) noexcept;
|
| 472 |
+
|
| 473 |
+
constexpr year_month_day operator+(const year_month_day& ymd, const months& dm) noexcept;
|
| 474 |
+
constexpr year_month_day operator+(const months& dm, const year_month_day& ymd) noexcept;
|
| 475 |
+
constexpr year_month_day operator+(const year_month_day& ymd, const years& dy) noexcept;
|
| 476 |
+
constexpr year_month_day operator+(const years& dy, const year_month_day& ymd) noexcept;
|
| 477 |
+
constexpr year_month_day operator-(const year_month_day& ymd, const months& dm) noexcept;
|
| 478 |
+
constexpr year_month_day operator-(const year_month_day& ymd, const years& dy) noexcept;
|
| 479 |
+
|
| 480 |
+
template<class charT, class traits>
|
| 481 |
+
basic_ostream<charT, traits>&
|
| 482 |
+
operator<<(basic_ostream<charT, traits>& os, const year_month_day& ymd);
|
| 483 |
+
|
| 484 |
+
template<class charT, class traits, class Alloc = allocator<charT>>
|
| 485 |
+
basic_istream<charT, traits>&
|
| 486 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 487 |
+
year_month_day& ymd,
|
| 488 |
+
basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 489 |
+
minutes* offset = nullptr);
|
| 490 |
+
|
| 491 |
+
// [time.cal.ymdlast], class year_month_day_last
|
| 492 |
+
class year_month_day_last;
|
| 493 |
+
|
| 494 |
+
constexpr bool operator==(const year_month_day_last& x,
|
| 495 |
+
const year_month_day_last& y) noexcept;
|
| 496 |
+
constexpr strong_ordering operator<=>(const year_month_day_last& x,
|
| 497 |
+
const year_month_day_last& y) noexcept;
|
| 498 |
+
|
| 499 |
+
constexpr year_month_day_last
|
| 500 |
+
operator+(const year_month_day_last& ymdl, const months& dm) noexcept;
|
| 501 |
+
constexpr year_month_day_last
|
| 502 |
+
operator+(const months& dm, const year_month_day_last& ymdl) noexcept;
|
| 503 |
+
constexpr year_month_day_last
|
| 504 |
+
operator+(const year_month_day_last& ymdl, const years& dy) noexcept;
|
| 505 |
+
constexpr year_month_day_last
|
| 506 |
+
operator+(const years& dy, const year_month_day_last& ymdl) noexcept;
|
| 507 |
+
constexpr year_month_day_last
|
| 508 |
+
operator-(const year_month_day_last& ymdl, const months& dm) noexcept;
|
| 509 |
+
constexpr year_month_day_last
|
| 510 |
+
operator-(const year_month_day_last& ymdl, const years& dy) noexcept;
|
| 511 |
+
|
| 512 |
+
template<class charT, class traits>
|
| 513 |
+
basic_ostream<charT, traits>&
|
| 514 |
+
operator<<(basic_ostream<charT, traits>& os, const year_month_day_last& ymdl);
|
| 515 |
+
|
| 516 |
+
// [time.cal.ymwd], class year_month_weekday
|
| 517 |
+
class year_month_weekday;
|
| 518 |
+
|
| 519 |
+
constexpr bool operator==(const year_month_weekday& x,
|
| 520 |
+
const year_month_weekday& y) noexcept;
|
| 521 |
+
|
| 522 |
+
constexpr year_month_weekday
|
| 523 |
+
operator+(const year_month_weekday& ymwd, const months& dm) noexcept;
|
| 524 |
+
constexpr year_month_weekday
|
| 525 |
+
operator+(const months& dm, const year_month_weekday& ymwd) noexcept;
|
| 526 |
+
constexpr year_month_weekday
|
| 527 |
+
operator+(const year_month_weekday& ymwd, const years& dy) noexcept;
|
| 528 |
+
constexpr year_month_weekday
|
| 529 |
+
operator+(const years& dy, const year_month_weekday& ymwd) noexcept;
|
| 530 |
+
constexpr year_month_weekday
|
| 531 |
+
operator-(const year_month_weekday& ymwd, const months& dm) noexcept;
|
| 532 |
+
constexpr year_month_weekday
|
| 533 |
+
operator-(const year_month_weekday& ymwd, const years& dy) noexcept;
|
| 534 |
+
|
| 535 |
+
template<class charT, class traits>
|
| 536 |
+
basic_ostream<charT, traits>&
|
| 537 |
+
operator<<(basic_ostream<charT, traits>& os, const year_month_weekday& ymwdi);
|
| 538 |
+
|
| 539 |
+
// [time.cal.ymwdlast], class year_month_weekday_last
|
| 540 |
+
class year_month_weekday_last;
|
| 541 |
+
|
| 542 |
+
constexpr bool operator==(const year_month_weekday_last& x,
|
| 543 |
+
const year_month_weekday_last& y) noexcept;
|
| 544 |
+
|
| 545 |
+
constexpr year_month_weekday_last
|
| 546 |
+
operator+(const year_month_weekday_last& ymwdl, const months& dm) noexcept;
|
| 547 |
+
constexpr year_month_weekday_last
|
| 548 |
+
operator+(const months& dm, const year_month_weekday_last& ymwdl) noexcept;
|
| 549 |
+
constexpr year_month_weekday_last
|
| 550 |
+
operator+(const year_month_weekday_last& ymwdl, const years& dy) noexcept;
|
| 551 |
+
constexpr year_month_weekday_last
|
| 552 |
+
operator+(const years& dy, const year_month_weekday_last& ymwdl) noexcept;
|
| 553 |
+
constexpr year_month_weekday_last
|
| 554 |
+
operator-(const year_month_weekday_last& ymwdl, const months& dm) noexcept;
|
| 555 |
+
constexpr year_month_weekday_last
|
| 556 |
+
operator-(const year_month_weekday_last& ymwdl, const years& dy) noexcept;
|
| 557 |
+
|
| 558 |
+
template<class charT, class traits>
|
| 559 |
+
basic_ostream<charT, traits>&
|
| 560 |
+
operator<<(basic_ostream<charT, traits>& os, const year_month_weekday_last& ymwdl);
|
| 561 |
+
|
| 562 |
+
// [time.cal.operators], civil calendar conventional syntax operators
|
| 563 |
+
constexpr year_month
|
| 564 |
+
operator/(const year& y, const month& m) noexcept;
|
| 565 |
+
constexpr year_month
|
| 566 |
+
operator/(const year& y, int m) noexcept;
|
| 567 |
+
constexpr month_day
|
| 568 |
+
operator/(const month& m, const day& d) noexcept;
|
| 569 |
+
constexpr month_day
|
| 570 |
+
operator/(const month& m, int d) noexcept;
|
| 571 |
+
constexpr month_day
|
| 572 |
+
operator/(int m, const day& d) noexcept;
|
| 573 |
+
constexpr month_day
|
| 574 |
+
operator/(const day& d, const month& m) noexcept;
|
| 575 |
+
constexpr month_day
|
| 576 |
+
operator/(const day& d, int m) noexcept;
|
| 577 |
+
constexpr month_day_last
|
| 578 |
+
operator/(const month& m, last_spec) noexcept;
|
| 579 |
+
constexpr month_day_last
|
| 580 |
+
operator/(int m, last_spec) noexcept;
|
| 581 |
+
constexpr month_day_last
|
| 582 |
+
operator/(last_spec, const month& m) noexcept;
|
| 583 |
+
constexpr month_day_last
|
| 584 |
+
operator/(last_spec, int m) noexcept;
|
| 585 |
+
constexpr month_weekday
|
| 586 |
+
operator/(const month& m, const weekday_indexed& wdi) noexcept;
|
| 587 |
+
constexpr month_weekday
|
| 588 |
+
operator/(int m, const weekday_indexed& wdi) noexcept;
|
| 589 |
+
constexpr month_weekday
|
| 590 |
+
operator/(const weekday_indexed& wdi, const month& m) noexcept;
|
| 591 |
+
constexpr month_weekday
|
| 592 |
+
operator/(const weekday_indexed& wdi, int m) noexcept;
|
| 593 |
+
constexpr month_weekday_last
|
| 594 |
+
operator/(const month& m, const weekday_last& wdl) noexcept;
|
| 595 |
+
constexpr month_weekday_last
|
| 596 |
+
operator/(int m, const weekday_last& wdl) noexcept;
|
| 597 |
+
constexpr month_weekday_last
|
| 598 |
+
operator/(const weekday_last& wdl, const month& m) noexcept;
|
| 599 |
+
constexpr month_weekday_last
|
| 600 |
+
operator/(const weekday_last& wdl, int m) noexcept;
|
| 601 |
+
constexpr year_month_day
|
| 602 |
+
operator/(const year_month& ym, const day& d) noexcept;
|
| 603 |
+
constexpr year_month_day
|
| 604 |
+
operator/(const year_month& ym, int d) noexcept;
|
| 605 |
+
constexpr year_month_day
|
| 606 |
+
operator/(const year& y, const month_day& md) noexcept;
|
| 607 |
+
constexpr year_month_day
|
| 608 |
+
operator/(int y, const month_day& md) noexcept;
|
| 609 |
+
constexpr year_month_day
|
| 610 |
+
operator/(const month_day& md, const year& y) noexcept;
|
| 611 |
+
constexpr year_month_day
|
| 612 |
+
operator/(const month_day& md, int y) noexcept;
|
| 613 |
+
constexpr year_month_day_last
|
| 614 |
+
operator/(const year_month& ym, last_spec) noexcept;
|
| 615 |
+
constexpr year_month_day_last
|
| 616 |
+
operator/(const year& y, const month_day_last& mdl) noexcept;
|
| 617 |
+
constexpr year_month_day_last
|
| 618 |
+
operator/(int y, const month_day_last& mdl) noexcept;
|
| 619 |
+
constexpr year_month_day_last
|
| 620 |
+
operator/(const month_day_last& mdl, const year& y) noexcept;
|
| 621 |
+
constexpr year_month_day_last
|
| 622 |
+
operator/(const month_day_last& mdl, int y) noexcept;
|
| 623 |
+
constexpr year_month_weekday
|
| 624 |
+
operator/(const year_month& ym, const weekday_indexed& wdi) noexcept;
|
| 625 |
+
constexpr year_month_weekday
|
| 626 |
+
operator/(const year& y, const month_weekday& mwd) noexcept;
|
| 627 |
+
constexpr year_month_weekday
|
| 628 |
+
operator/(int y, const month_weekday& mwd) noexcept;
|
| 629 |
+
constexpr year_month_weekday
|
| 630 |
+
operator/(const month_weekday& mwd, const year& y) noexcept;
|
| 631 |
+
constexpr year_month_weekday
|
| 632 |
+
operator/(const month_weekday& mwd, int y) noexcept;
|
| 633 |
+
constexpr year_month_weekday_last
|
| 634 |
+
operator/(const year_month& ym, const weekday_last& wdl) noexcept;
|
| 635 |
+
constexpr year_month_weekday_last
|
| 636 |
+
operator/(const year& y, const month_weekday_last& mwdl) noexcept;
|
| 637 |
+
constexpr year_month_weekday_last
|
| 638 |
+
operator/(int y, const month_weekday_last& mwdl) noexcept;
|
| 639 |
+
constexpr year_month_weekday_last
|
| 640 |
+
operator/(const month_weekday_last& mwdl, const year& y) noexcept;
|
| 641 |
+
constexpr year_month_weekday_last
|
| 642 |
+
operator/(const month_weekday_last& mwdl, int y) noexcept;
|
| 643 |
+
|
| 644 |
+
// [time.hms], class template hh_mm_ss
|
| 645 |
+
template<class Duration> class hh_mm_ss;
|
| 646 |
+
|
| 647 |
+
template<class charT, class traits, class Duration>
|
| 648 |
+
basic_ostream<charT, traits>&
|
| 649 |
+
operator<<(basic_ostream<charT, traits>& os, const hh_mm_ss<Duration>& hms);
|
| 650 |
+
|
| 651 |
+
// [time.12], 12/24 hour functions
|
| 652 |
+
constexpr bool is_am(const hours& h) noexcept;
|
| 653 |
+
constexpr bool is_pm(const hours& h) noexcept;
|
| 654 |
+
constexpr hours make12(const hours& h) noexcept;
|
| 655 |
+
constexpr hours make24(const hours& h, bool is_pm) noexcept;
|
| 656 |
+
|
| 657 |
+
// [time.zone.db], time zone database
|
| 658 |
+
struct tzdb;
|
| 659 |
+
class tzdb_list;
|
| 660 |
+
|
| 661 |
+
// [time.zone.db.access], time zone database access
|
| 662 |
+
const tzdb& get_tzdb();
|
| 663 |
+
tzdb_list& get_tzdb_list();
|
| 664 |
+
const time_zone* locate_zone(string_view tz_name);
|
| 665 |
+
const time_zone* current_zone();
|
| 666 |
+
|
| 667 |
+
// [time.zone.db.remote], remote time zone database support
|
| 668 |
+
const tzdb& reload_tzdb();
|
| 669 |
+
string remote_version();
|
| 670 |
+
|
| 671 |
+
// [time.zone.exception], exception classes
|
| 672 |
+
class nonexistent_local_time;
|
| 673 |
+
class ambiguous_local_time;
|
| 674 |
+
|
| 675 |
+
// [time.zone.info], information classes
|
| 676 |
+
struct sys_info;
|
| 677 |
+
template<class charT, class traits>
|
| 678 |
+
basic_ostream<charT, traits>&
|
| 679 |
+
operator<<(basic_ostream<charT, traits>& os, const sys_info& si);
|
| 680 |
+
|
| 681 |
+
struct local_info;
|
| 682 |
+
template<class charT, class traits>
|
| 683 |
+
basic_ostream<charT, traits>&
|
| 684 |
+
operator<<(basic_ostream<charT, traits>& os, const local_info& li);
|
| 685 |
+
|
| 686 |
+
// [time.zone.timezone], class time_zone
|
| 687 |
+
enum class choose {earliest, latest};
|
| 688 |
+
class time_zone;
|
| 689 |
+
|
| 690 |
+
bool operator==(const time_zone& x, const time_zone& y) noexcept;
|
| 691 |
+
strong_ordering operator<=>(const time_zone& x, const time_zone& y) noexcept;
|
| 692 |
+
|
| 693 |
+
// [time.zone.zonedtraits], class template zoned_traits
|
| 694 |
+
template<class T> struct zoned_traits;
|
| 695 |
+
|
| 696 |
+
// [time.zone.zonedtime], class template zoned_time
|
| 697 |
+
template<class Duration, class TimeZonePtr = const time_zone*> class zoned_time;
|
| 698 |
+
|
| 699 |
+
using zoned_seconds = zoned_time<seconds>;
|
| 700 |
+
|
| 701 |
+
template<class Duration1, class Duration2, class TimeZonePtr>
|
| 702 |
+
bool operator==(const zoned_time<Duration1, TimeZonePtr>& x,
|
| 703 |
+
const zoned_time<Duration2, TimeZonePtr>& y);
|
| 704 |
+
|
| 705 |
+
template<class charT, class traits, class Duration, class TimeZonePtr>
|
| 706 |
+
basic_ostream<charT, traits>&
|
| 707 |
+
operator<<(basic_ostream<charT, traits>& os,
|
| 708 |
+
const zoned_time<Duration, TimeZonePtr>& t);
|
| 709 |
+
|
| 710 |
+
// [time.zone.leap], leap second support
|
| 711 |
+
class leap_second;
|
| 712 |
+
|
| 713 |
+
bool operator==(const leap_second& x, const leap_second& y);
|
| 714 |
+
strong_ordering operator<=>(const leap_second& x, const leap_second& y);
|
| 715 |
+
|
| 716 |
+
template<class Duration>
|
| 717 |
+
bool operator==(const leap_second& x, const sys_time<Duration>& y);
|
| 718 |
+
template<class Duration>
|
| 719 |
+
bool operator< (const leap_second& x, const sys_time<Duration>& y);
|
| 720 |
+
template<class Duration>
|
| 721 |
+
bool operator< (const sys_time<Duration>& x, const leap_second& y);
|
| 722 |
+
template<class Duration>
|
| 723 |
+
bool operator> (const leap_second& x, const sys_time<Duration>& y);
|
| 724 |
+
template<class Duration>
|
| 725 |
+
bool operator> (const sys_time<Duration>& x, const leap_second& y);
|
| 726 |
+
template<class Duration>
|
| 727 |
+
bool operator<=(const leap_second& x, const sys_time<Duration>& y);
|
| 728 |
+
template<class Duration>
|
| 729 |
+
bool operator<=(const sys_time<Duration>& x, const leap_second& y);
|
| 730 |
+
template<class Duration>
|
| 731 |
+
bool operator>=(const leap_second& x, const sys_time<Duration>& y);
|
| 732 |
+
template<class Duration>
|
| 733 |
+
bool operator>=(const sys_time<Duration>& x, const leap_second& y);
|
| 734 |
+
template<class Duration>
|
| 735 |
+
requires three_way_comparable_with<sys_seconds, sys_time<Duration>>
|
| 736 |
+
constexpr auto operator<=>(const leap_second& x, const sys_time<Duration>& y);
|
| 737 |
+
|
| 738 |
+
// [time.zone.link], class time_zone_link
|
| 739 |
+
class time_zone_link;
|
| 740 |
+
|
| 741 |
+
bool operator==(const time_zone_link& x, const time_zone_link& y);
|
| 742 |
+
strong_ordering operator<=>(const time_zone_link& x, const time_zone_link& y);
|
| 743 |
+
|
| 744 |
+
// [time.format], formatting
|
| 745 |
+
template<class Duration> struct local-time-format-t; // exposition only
|
| 746 |
+
template<class Duration>
|
| 747 |
+
local-time-format-t<Duration>
|
| 748 |
+
local_time_format(local_time<Duration> time, const string* abbrev = nullptr,
|
| 749 |
+
const seconds* offset_sec = nullptr);
|
| 750 |
+
}
|
| 751 |
+
|
| 752 |
+
template<class Rep, class Period, class charT>
|
| 753 |
+
struct formatter<chrono::duration<Rep, Period>, charT>;
|
| 754 |
+
template<class Duration, class charT>
|
| 755 |
+
struct formatter<chrono::sys_time<Duration>, charT>;
|
| 756 |
+
template<class Duration, class charT>
|
| 757 |
+
struct formatter<chrono::utc_time<Duration>, charT>;
|
| 758 |
+
template<class Duration, class charT>
|
| 759 |
+
struct formatter<chrono::tai_time<Duration>, charT>;
|
| 760 |
+
template<class Duration, class charT>
|
| 761 |
+
struct formatter<chrono::gps_time<Duration>, charT>;
|
| 762 |
+
template<class Duration, class charT>
|
| 763 |
+
struct formatter<chrono::file_time<Duration>, charT>;
|
| 764 |
+
template<class Duration, class charT>
|
| 765 |
+
struct formatter<chrono::local_time<Duration>, charT>;
|
| 766 |
+
template<class Duration, class charT>
|
| 767 |
+
struct formatter<chrono::local-time-format-t<Duration>, charT>;
|
| 768 |
+
template<class charT> struct formatter<chrono::day, charT>;
|
| 769 |
+
template<class charT> struct formatter<chrono::month, charT>;
|
| 770 |
+
template<class charT> struct formatter<chrono::year, charT>;
|
| 771 |
+
template<class charT> struct formatter<chrono::weekday, charT>;
|
| 772 |
+
template<class charT> struct formatter<chrono::weekday_indexed, charT>;
|
| 773 |
+
template<class charT> struct formatter<chrono::weekday_last, charT>;
|
| 774 |
+
template<class charT> struct formatter<chrono::month_day, charT>;
|
| 775 |
+
template<class charT> struct formatter<chrono::month_day_last, charT>;
|
| 776 |
+
template<class charT> struct formatter<chrono::month_weekday, charT>;
|
| 777 |
+
template<class charT> struct formatter<chrono::month_weekday_last, charT>;
|
| 778 |
+
template<class charT> struct formatter<chrono::year_month, charT>;
|
| 779 |
+
template<class charT> struct formatter<chrono::year_month_day, charT>;
|
| 780 |
+
template<class charT> struct formatter<chrono::year_month_day_last, charT>;
|
| 781 |
+
template<class charT> struct formatter<chrono::year_month_weekday, charT>;
|
| 782 |
+
template<class charT> struct formatter<chrono::year_month_weekday_last, charT>;
|
| 783 |
+
template<class Rep, class Period, class charT>
|
| 784 |
+
struct formatter<chrono::hh_mm_ss<duration<Rep, Period>>, charT>;
|
| 785 |
+
template<class charT> struct formatter<chrono::sys_info, charT>;
|
| 786 |
+
template<class charT> struct formatter<chrono::local_info, charT>;
|
| 787 |
+
template<class Duration, class TimeZonePtr, class charT>
|
| 788 |
+
struct formatter<chrono::zoned_time<Duration, TimeZonePtr>, charT>;
|
| 789 |
+
|
| 790 |
+
namespace chrono {
|
| 791 |
+
// [time.parse], parsing
|
| 792 |
+
template<class charT, class traits, class Alloc, class Parsable>
|
| 793 |
+
unspecified
|
| 794 |
+
parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp);
|
| 795 |
+
|
| 796 |
+
template<class charT, class traits, class Alloc, class Parsable>
|
| 797 |
+
unspecified
|
| 798 |
+
parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp,
|
| 799 |
+
basic_string<charT, traits, Alloc>& abbrev);
|
| 800 |
+
|
| 801 |
+
template<class charT, class traits, class Alloc, class Parsable>
|
| 802 |
+
unspecified
|
| 803 |
+
parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp,
|
| 804 |
+
minutes& offset);
|
| 805 |
+
|
| 806 |
+
template<class charT, class traits, class Alloc, class Parsable>
|
| 807 |
+
unspecified
|
| 808 |
+
parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp,
|
| 809 |
+
basic_string<charT, traits, Alloc>& abbrev, minutes& offset);
|
| 810 |
+
|
| 811 |
+
// calendrical constants
|
| 812 |
+
inline constexpr last_spec last{};
|
| 813 |
+
|
| 814 |
+
inline constexpr weekday Sunday{0};
|
| 815 |
+
inline constexpr weekday Monday{1};
|
| 816 |
+
inline constexpr weekday Tuesday{2};
|
| 817 |
+
inline constexpr weekday Wednesday{3};
|
| 818 |
+
inline constexpr weekday Thursday{4};
|
| 819 |
+
inline constexpr weekday Friday{5};
|
| 820 |
+
inline constexpr weekday Saturday{6};
|
| 821 |
+
|
| 822 |
+
inline constexpr month January{1};
|
| 823 |
+
inline constexpr month February{2};
|
| 824 |
+
inline constexpr month March{3};
|
| 825 |
+
inline constexpr month April{4};
|
| 826 |
+
inline constexpr month May{5};
|
| 827 |
+
inline constexpr month June{6};
|
| 828 |
+
inline constexpr month July{7};
|
| 829 |
+
inline constexpr month August{8};
|
| 830 |
+
inline constexpr month September{9};
|
| 831 |
+
inline constexpr month October{10};
|
| 832 |
+
inline constexpr month November{11};
|
| 833 |
+
inline constexpr month December{12};
|
| 834 |
}
|
| 835 |
|
| 836 |
inline namespace literals {
|
| 837 |
inline namespace chrono_literals {
|
| 838 |
// [time.duration.literals], suffixes for duration literals
|
| 839 |
constexpr chrono::hours operator""h(unsigned long long);
|
| 840 |
constexpr chrono::duration<unspecified, ratio<3600, 1>> operator""h(long double);
|
| 841 |
+
|
| 842 |
constexpr chrono::minutes operator""min(unsigned long long);
|
| 843 |
constexpr chrono::duration<unspecified, ratio<60, 1>> operator""min(long double);
|
| 844 |
+
|
| 845 |
constexpr chrono::seconds operator""s(unsigned long long);
|
| 846 |
constexpr chrono::duration<unspecified> operator""s(long double);
|
| 847 |
+
|
| 848 |
constexpr chrono::milliseconds operator""ms(unsigned long long);
|
| 849 |
constexpr chrono::duration<unspecified, milli> operator""ms(long double);
|
| 850 |
+
|
| 851 |
constexpr chrono::microseconds operator""us(unsigned long long);
|
| 852 |
constexpr chrono::duration<unspecified, micro> operator""us(long double);
|
| 853 |
+
|
| 854 |
constexpr chrono::nanoseconds operator""ns(unsigned long long);
|
| 855 |
constexpr chrono::duration<unspecified, nano> operator""ns(long double);
|
| 856 |
+
|
| 857 |
+
// [time.cal.day.nonmembers], non-member functions
|
| 858 |
+
constexpr chrono::day operator""d(unsigned long long d) noexcept;
|
| 859 |
+
|
| 860 |
+
// [time.cal.year.nonmembers], non-member functions
|
| 861 |
+
constexpr chrono::year operator""y(unsigned long long y) noexcept;
|
| 862 |
}
|
| 863 |
}
|
| 864 |
|
| 865 |
namespace chrono {
|
| 866 |
using namespace literals::chrono_literals;
|