1 | // -*- C++ -*- |
2 | //===----------------------------------------------------------------------===// |
3 | // |
4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
5 | // See https://llvm.org/LICENSE.txt for license information. |
6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
7 | // |
8 | //===----------------------------------------------------------------------===// |
9 | |
10 | #ifndef _LIBCPP_CHRONO |
11 | #define _LIBCPP_CHRONO |
12 | |
13 | // clang-format off |
14 | |
15 | /* |
16 | chrono synopsis |
17 | |
18 | #include <compare> // C++20 |
19 | |
20 | namespace std |
21 | { |
22 | namespace chrono |
23 | { |
24 | |
25 | template <class ToDuration, class Rep, class Period> |
26 | constexpr |
27 | ToDuration |
28 | duration_cast(const duration<Rep, Period>& fd); |
29 | |
30 | template <class Rep> struct treat_as_floating_point : is_floating_point<Rep> {}; |
31 | |
32 | template <class Rep> inline constexpr bool treat_as_floating_point_v |
33 | = treat_as_floating_point<Rep>::value; // C++17 |
34 | |
35 | template <class Rep> |
36 | struct duration_values |
37 | { |
38 | public: |
39 | static constexpr Rep zero(); // noexcept in C++20 |
40 | static constexpr Rep max(); // noexcept in C++20 |
41 | static constexpr Rep min(); // noexcept in C++20 |
42 | }; |
43 | |
44 | // duration |
45 | |
46 | template <class Rep, class Period = ratio<1>> |
47 | class duration |
48 | { |
49 | static_assert(!__is_duration<Rep>::value, "A duration representation can not be a duration"); |
50 | static_assert(__is_ratio<Period>::value, "Second template parameter of duration must be a std::ratio"); |
51 | static_assert(Period::num > 0, "duration period must be positive"); |
52 | public: |
53 | typedef Rep rep; |
54 | typedef typename _Period::type period; |
55 | |
56 | constexpr duration() = default; |
57 | template <class Rep2> |
58 | constexpr explicit duration(const Rep2& r, |
59 | typename enable_if |
60 | < |
61 | is_convertible<const Rep2&, rep>::value && |
62 | (treat_as_floating_point<rep>::value || |
63 | !treat_as_floating_point<rep>::value && !treat_as_floating_point<Rep2>::value) |
64 | >::type* = 0); |
65 | |
66 | // conversions |
67 | template <class Rep2, class Period2> |
68 | constexpr duration(const duration<Rep2, Period2>& d, |
69 | typename enable_if |
70 | < |
71 | treat_as_floating_point<rep>::value || |
72 | ratio_divide<Period2, period>::type::den == 1 |
73 | >::type* = 0); |
74 | |
75 | // observer |
76 | |
77 | constexpr rep count() const; |
78 | |
79 | // arithmetic |
80 | |
81 | constexpr common_type<duration>::type operator+() const; |
82 | constexpr common_type<duration>::type operator-() const; |
83 | constexpr duration& operator++(); // constexpr in C++17 |
84 | constexpr duration operator++(int); // constexpr in C++17 |
85 | constexpr duration& operator--(); // constexpr in C++17 |
86 | constexpr duration operator--(int); // constexpr in C++17 |
87 | |
88 | constexpr duration& operator+=(const duration& d); // constexpr in C++17 |
89 | constexpr duration& operator-=(const duration& d); // constexpr in C++17 |
90 | |
91 | duration& operator*=(const rep& rhs); // constexpr in C++17 |
92 | duration& operator/=(const rep& rhs); // constexpr in C++17 |
93 | duration& operator%=(const rep& rhs); // constexpr in C++17 |
94 | duration& operator%=(const duration& rhs); // constexpr in C++17 |
95 | |
96 | // special values |
97 | |
98 | static constexpr duration zero(); // noexcept in C++20 |
99 | static constexpr duration min(); // noexcept in C++20 |
100 | static constexpr duration max(); // noexcept in C++20 |
101 | }; |
102 | |
103 | typedef duration<long long, nano> nanoseconds; |
104 | typedef duration<long long, micro> microseconds; |
105 | typedef duration<long long, milli> milliseconds; |
106 | typedef duration<long long > seconds; |
107 | typedef duration< long, ratio< 60> > minutes; |
108 | typedef duration< long, ratio<3600> > hours; |
109 | |
110 | template <class Clock, class Duration = typename Clock::duration> |
111 | class time_point |
112 | { |
113 | public: |
114 | typedef Clock clock; |
115 | typedef Duration duration; |
116 | typedef typename duration::rep rep; |
117 | typedef typename duration::period period; |
118 | private: |
119 | duration d_; // exposition only |
120 | |
121 | public: |
122 | time_point(); // has value "epoch" // constexpr in C++14 |
123 | explicit time_point(const duration& d); // same as time_point() + d // constexpr in C++14 |
124 | |
125 | // conversions |
126 | template <class Duration2> |
127 | time_point(const time_point<clock, Duration2>& t); // constexpr in C++14 |
128 | |
129 | // observer |
130 | |
131 | duration time_since_epoch() const; // constexpr in C++14 |
132 | |
133 | // arithmetic |
134 | |
135 | time_point& operator+=(const duration& d); // constexpr in C++17 |
136 | time_point& operator-=(const duration& d); // constexpr in C++17 |
137 | |
138 | // special values |
139 | |
140 | static constexpr time_point min(); // noexcept in C++20 |
141 | static constexpr time_point max(); // noexcept in C++20 |
142 | }; |
143 | |
144 | } // chrono |
145 | |
146 | // common_type traits |
147 | template <class Rep1, class Period1, class Rep2, class Period2> |
148 | struct common_type<chrono::duration<Rep1, Period1>, chrono::duration<Rep2, Period2>>; |
149 | |
150 | template <class Clock, class Duration1, class Duration2> |
151 | struct common_type<chrono::time_point<Clock, Duration1>, chrono::time_point<Clock, Duration2>>; |
152 | |
153 | namespace chrono { |
154 | |
155 | // duration arithmetic |
156 | template <class Rep1, class Period1, class Rep2, class Period2> |
157 | constexpr |
158 | typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2>>::type |
159 | operator+(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs); |
160 | template <class Rep1, class Period1, class Rep2, class Period2> |
161 | constexpr |
162 | typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2>>::type |
163 | operator-(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs); |
164 | template <class Rep1, class Period, class Rep2> |
165 | constexpr |
166 | duration<typename common_type<Rep1, Rep2>::type, Period> |
167 | operator*(const duration<Rep1, Period>& d, const Rep2& s); |
168 | template <class Rep1, class Period, class Rep2> |
169 | constexpr |
170 | duration<typename common_type<Rep1, Rep2>::type, Period> |
171 | operator*(const Rep1& s, const duration<Rep2, Period>& d); |
172 | template <class Rep1, class Period, class Rep2> |
173 | constexpr |
174 | duration<typename common_type<Rep1, Rep2>::type, Period> |
175 | operator/(const duration<Rep1, Period>& d, const Rep2& s); |
176 | template <class Rep1, class Period1, class Rep2, class Period2> |
177 | constexpr |
178 | typename common_type<Rep1, Rep2>::type |
179 | operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs); |
180 | |
181 | // duration comparisons |
182 | template <class Rep1, class Period1, class Rep2, class Period2> |
183 | constexpr |
184 | bool operator==(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs); |
185 | template <class Rep1, class Period1, class Rep2, class Period2> |
186 | constexpr |
187 | bool operator!=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs); // removed in C++20 |
188 | template <class Rep1, class Period1, class Rep2, class Period2> |
189 | constexpr |
190 | bool operator< (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs); |
191 | template <class Rep1, class Period1, class Rep2, class Period2> |
192 | constexpr |
193 | bool operator<=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs); |
194 | template <class Rep1, class Period1, class Rep2, class Period2> |
195 | constexpr |
196 | bool operator> (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs); |
197 | template <class Rep1, class Period1, class Rep2, class Period2> |
198 | constexpr |
199 | bool operator>=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs); |
200 | template<class Rep1, class Period1, class Rep2, class Period2> |
201 | requires three_way_comparable<typename CT::rep> |
202 | constexpr auto operator<=>(const duration<Rep1, Period1>& lhs, |
203 | const duration<Rep2, Period2>& rhs); // since C++20 |
204 | |
205 | // duration_cast |
206 | template <class ToDuration, class Rep, class Period> |
207 | ToDuration duration_cast(const duration<Rep, Period>& d); |
208 | |
209 | template <class ToDuration, class Rep, class Period> |
210 | constexpr ToDuration floor(const duration<Rep, Period>& d); // C++17 |
211 | template <class ToDuration, class Rep, class Period> |
212 | constexpr ToDuration ceil(const duration<Rep, Period>& d); // C++17 |
213 | template <class ToDuration, class Rep, class Period> |
214 | constexpr ToDuration round(const duration<Rep, Period>& d); // C++17 |
215 | |
216 | // duration I/O |
217 | template<class charT, class traits, class Rep, class Period> // C++20 |
218 | basic_ostream<charT, traits>& |
219 | operator<<(basic_ostream<charT, traits>& os, |
220 | const duration<Rep, Period>& d); |
221 | |
222 | // time_point arithmetic (all constexpr in C++14) |
223 | template <class Clock, class Duration1, class Rep2, class Period2> |
224 | time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2>>::type> |
225 | operator+(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs); |
226 | template <class Rep1, class Period1, class Clock, class Duration2> |
227 | time_point<Clock, typename common_type<duration<Rep1, Period1>, Duration2>::type> |
228 | operator+(const duration<Rep1, Period1>& lhs, const time_point<Clock, Duration2>& rhs); |
229 | template <class Clock, class Duration1, class Rep2, class Period2> |
230 | time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2>>::type> |
231 | operator-(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs); |
232 | template <class Clock, class Duration1, class Duration2> |
233 | typename common_type<Duration1, Duration2>::type |
234 | operator-(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); |
235 | |
236 | // time_point comparisons (all constexpr in C++14) |
237 | template <class Clock, class Duration1, class Duration2> |
238 | bool operator==(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); |
239 | template <class Clock, class Duration1, class Duration2> |
240 | bool operator!=(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); // removed in C++20 |
241 | template <class Clock, class Duration1, class Duration2> |
242 | bool operator< (const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); |
243 | template <class Clock, class Duration1, class Duration2> |
244 | bool operator<=(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); |
245 | template <class Clock, class Duration1, class Duration2> |
246 | bool operator> (const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); |
247 | template <class Clock, class Duration1, class Duration2> |
248 | bool operator>=(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); |
249 | template<class Clock, class Duration1, |
250 | three_way_comparable_with<Duration1> Duration2> |
251 | constexpr auto operator<=>(const time_point<Clock, Duration1>& lhs, |
252 | const time_point<Clock, Duration2>& rhs); // since C++20 |
253 | |
254 | // time_point_cast (constexpr in C++14) |
255 | |
256 | template <class ToDuration, class Clock, class Duration> |
257 | time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t); |
258 | |
259 | template <class ToDuration, class Clock, class Duration> |
260 | constexpr time_point<Clock, ToDuration> |
261 | floor(const time_point<Clock, Duration>& tp); // C++17 |
262 | |
263 | template <class ToDuration, class Clock, class Duration> |
264 | constexpr time_point<Clock, ToDuration> |
265 | ceil(const time_point<Clock, Duration>& tp); // C++17 |
266 | |
267 | template <class ToDuration, class Clock, class Duration> |
268 | constexpr time_point<Clock, ToDuration> |
269 | round(const time_point<Clock, Duration>& tp); // C++17 |
270 | |
271 | template <class Rep, class Period> |
272 | constexpr duration<Rep, Period> abs(duration<Rep, Period> d); // C++17 |
273 | |
274 | // Clocks |
275 | |
276 | class system_clock |
277 | { |
278 | public: |
279 | typedef microseconds duration; |
280 | typedef duration::rep rep; |
281 | typedef duration::period period; |
282 | typedef chrono::time_point<system_clock> time_point; |
283 | static const bool is_steady = false; // constexpr in C++14 |
284 | |
285 | static time_point now() noexcept; |
286 | static time_t to_time_t (const time_point& __t) noexcept; |
287 | static time_point from_time_t(time_t __t) noexcept; |
288 | }; |
289 | |
290 | template <class Duration> |
291 | using sys_time = time_point<system_clock, Duration>; // C++20 |
292 | using sys_seconds = sys_time<seconds>; // C++20 |
293 | using sys_days = sys_time<days>; // C++20 |
294 | |
295 | template<class charT, class traits, class Duration> // C++20 |
296 | basic_ostream<charT, traits>& |
297 | operator<<(basic_ostream<charT, traits>& os, const sys_time<Duration>& tp); |
298 | |
299 | template<class charT, class traits> // C++20 |
300 | basic_ostream<charT, traits>& |
301 | operator<<(basic_ostream<charT, traits>& os, const sys_days& dp); |
302 | |
303 | class file_clock // C++20 |
304 | { |
305 | public: |
306 | typedef see-below rep; |
307 | typedef nano period; |
308 | typedef chrono::duration<rep, period> duration; |
309 | typedef chrono::time_point<file_clock> time_point; |
310 | static constexpr bool is_steady = false; |
311 | |
312 | static time_point now() noexcept; |
313 | |
314 | template<class Duration> |
315 | static sys_time<see-below> to_sys(const file_time<Duration>&); |
316 | |
317 | template<class Duration> |
318 | static file_time<see-below> from_sys(const sys_time<Duration>&); |
319 | }; |
320 | |
321 | template<class Duration> |
322 | using file_time = time_point<file_clock, Duration>; // C++20 |
323 | |
324 | template<class charT, class traits, class Duration> // C++20 |
325 | basic_ostream<charT, traits>& |
326 | operator<<(basic_ostream<charT, traits>& os, const file_time<Duration>& tp); |
327 | |
328 | class steady_clock |
329 | { |
330 | public: |
331 | typedef nanoseconds duration; |
332 | typedef duration::rep rep; |
333 | typedef duration::period period; |
334 | typedef chrono::time_point<steady_clock, duration> time_point; |
335 | static const bool is_steady = true; // constexpr in C++14 |
336 | |
337 | static time_point now() noexcept; |
338 | }; |
339 | |
340 | typedef steady_clock high_resolution_clock; |
341 | |
342 | // 25.7.8, local time // C++20 |
343 | struct local_t {}; |
344 | template<class Duration> |
345 | using local_time = time_point<local_t, Duration>; |
346 | using local_seconds = local_time<seconds>; |
347 | using local_days = local_time<days>; |
348 | |
349 | template<class charT, class traits, class Duration> // C++20 |
350 | basic_ostream<charT, traits>& |
351 | operator<<(basic_ostream<charT, traits>& os, const local_time<Duration>& tp); |
352 | |
353 | // 25.8.2, class last_spec // C++20 |
354 | struct last_spec; |
355 | |
356 | // 25.8.3, class day // C++20 |
357 | |
358 | class day; |
359 | constexpr bool operator==(const day& x, const day& y) noexcept; |
360 | constexpr strong_ordering operator<=>(const day& x, const day& y) noexcept; |
361 | constexpr day operator+(const day& x, const days& y) noexcept; |
362 | constexpr day operator+(const days& x, const day& y) noexcept; |
363 | constexpr day operator-(const day& x, const days& y) noexcept; |
364 | constexpr days operator-(const day& x, const day& y) noexcept; |
365 | template<class charT, class traits> |
366 | basic_ostream<charT, traits>& |
367 | operator<<(basic_ostream<charT, traits>& os, const day& d); |
368 | |
369 | // 25.8.4, class month // C++20 |
370 | class month; |
371 | constexpr bool operator==(const month& x, const month& y) noexcept; |
372 | constexpr strong_ordering operator<=>(const month& x, const month& y) noexcept; |
373 | |
374 | constexpr month operator+(const month& x, const months& y) noexcept; |
375 | constexpr month operator+(const months& x, const month& y) noexcept; |
376 | constexpr month operator-(const month& x, const months& y) noexcept; |
377 | constexpr months operator-(const month& x, const month& y) noexcept; |
378 | template<class charT, class traits> |
379 | basic_ostream<charT, traits>& |
380 | operator<<(basic_ostream<charT, traits>& os, const month& m); |
381 | |
382 | // 25.8.5, class year // C++20 |
383 | class year; |
384 | constexpr bool operator==(const year& x, const year& y) noexcept; |
385 | constexpr strong_ordering operator<=>(const year& x, const year& y) noexcept; |
386 | |
387 | constexpr year operator+(const year& x, const years& y) noexcept; |
388 | constexpr year operator+(const years& x, const year& y) noexcept; |
389 | constexpr year operator-(const year& x, const years& y) noexcept; |
390 | constexpr years operator-(const year& x, const year& y) noexcept; |
391 | template<class charT, class traits> |
392 | basic_ostream<charT, traits>& |
393 | operator<<(basic_ostream<charT, traits>& os, const year& y); |
394 | |
395 | // 25.8.6, class weekday // C++20 |
396 | class weekday; |
397 | |
398 | constexpr bool operator==(const weekday& x, const weekday& y) noexcept; |
399 | constexpr weekday operator+(const weekday& x, const days& y) noexcept; |
400 | constexpr weekday operator+(const days& x, const weekday& y) noexcept; |
401 | constexpr weekday operator-(const weekday& x, const days& y) noexcept; |
402 | constexpr days operator-(const weekday& x, const weekday& y) noexcept; |
403 | template<class charT, class traits> |
404 | basic_ostream<charT, traits>& |
405 | operator<<(basic_ostream<charT, traits>& os, const weekday& wd); |
406 | |
407 | // 25.8.7, class weekday_indexed // C++20 |
408 | |
409 | class weekday_indexed; |
410 | constexpr bool operator==(const weekday_indexed& x, const weekday_indexed& y) noexcept; |
411 | |
412 | template<class charT, class traits> |
413 | basic_ostream<charT, traits>& |
414 | operator<<(basic_ostream<charT, traits>& os, const weekday_indexed& wdi); |
415 | |
416 | // 25.8.8, class weekday_last // C++20 |
417 | class weekday_last; |
418 | |
419 | constexpr bool operator==(const weekday_last& x, const weekday_last& y) noexcept; |
420 | |
421 | template<class charT, class traits> |
422 | basic_ostream<charT, traits>& |
423 | operator<<(basic_ostream<charT, traits>& os, const weekday_last& wdl); |
424 | |
425 | // 25.8.9, class month_day // C++20 |
426 | class month_day; |
427 | |
428 | constexpr bool operator==(const month_day& x, const month_day& y) noexcept; |
429 | constexpr strong_ordering operator<=>(const month_day& x, const month_day& y) noexcept; |
430 | |
431 | template<class charT, class traits> |
432 | basic_ostream<charT, traits>& |
433 | operator<<(basic_ostream<charT, traits>& os, const month_day& md); |
434 | |
435 | // 25.8.10, class month_day_last // C++20 |
436 | class month_day_last; |
437 | |
438 | constexpr bool operator==(const month_day_last& x, const month_day_last& y) noexcept; |
439 | constexpr strong_ordering operator<=>(const month_day_last& x, const month_day_last& y) noexcept; |
440 | |
441 | template<class charT, class traits> |
442 | basic_ostream<charT, traits>& |
443 | operator<<(basic_ostream<charT, traits>& os, const month_day_last& mdl); |
444 | |
445 | // 25.8.11, class month_weekday // C++20 |
446 | class month_weekday; |
447 | |
448 | constexpr bool operator==(const month_weekday& x, const month_weekday& y) noexcept; |
449 | |
450 | template<class charT, class traits> |
451 | basic_ostream<charT, traits>& |
452 | operator<<(basic_ostream<charT, traits>& os, const month_weekday& mwd); |
453 | |
454 | // 25.8.12, class month_weekday_last // C++20 |
455 | class month_weekday_last; |
456 | |
457 | constexpr bool operator==(const month_weekday_last& x, const month_weekday_last& y) noexcept; |
458 | |
459 | template<class charT, class traits> |
460 | basic_ostream<charT, traits>& |
461 | operator<<(basic_ostream<charT, traits>& os, const month_weekday_last& mwdl); |
462 | |
463 | |
464 | // 25.8.13, class year_month // C++20 |
465 | class year_month; |
466 | |
467 | constexpr bool operator==(const year_month& x, const year_month& y) noexcept; |
468 | constexpr strong_ordering operator<=>(const year_month& x, const year_month& y) noexcept; |
469 | |
470 | constexpr year_month operator+(const year_month& ym, const months& dm) noexcept; |
471 | constexpr year_month operator+(const months& dm, const year_month& ym) noexcept; |
472 | constexpr year_month operator-(const year_month& ym, const months& dm) noexcept; |
473 | constexpr months operator-(const year_month& x, const year_month& y) noexcept; |
474 | constexpr year_month operator+(const year_month& ym, const years& dy) noexcept; |
475 | constexpr year_month operator+(const years& dy, const year_month& ym) noexcept; |
476 | constexpr year_month operator-(const year_month& ym, const years& dy) noexcept; |
477 | |
478 | template<class charT, class traits> |
479 | basic_ostream<charT, traits>& |
480 | operator<<(basic_ostream<charT, traits>& os, const year_month& ym); |
481 | |
482 | // 25.8.14, class year_month_day class // C++20 |
483 | year_month_day; |
484 | |
485 | constexpr bool operator==(const year_month_day& x, const year_month_day& y) noexcept; |
486 | constexpr strong_ordering operator<=>(const year_month_day& x, const year_month_day& y) noexcept; |
487 | |
488 | constexpr year_month_day operator+(const year_month_day& ymd, const months& dm) noexcept; |
489 | constexpr year_month_day operator+(const months& dm, const year_month_day& ymd) noexcept; |
490 | constexpr year_month_day operator+(const year_month_day& ymd, const years& dy) noexcept; |
491 | constexpr year_month_day operator+(const years& dy, const year_month_day& ymd) noexcept; |
492 | constexpr year_month_day operator-(const year_month_day& ymd, const months& dm) noexcept; |
493 | constexpr year_month_day operator-(const year_month_day& ymd, const years& dy) noexcept; |
494 | |
495 | template<class charT, class traits> |
496 | basic_ostream<charT, traits>& |
497 | operator<<(basic_ostream<charT, traits>& os, const year_month_day& ymd); |
498 | |
499 | // 25.8.15, class year_month_day_last // C++20 |
500 | class year_month_day_last; |
501 | |
502 | constexpr bool operator==(const year_month_day_last& x, const year_month_day_last& y) noexcept; |
503 | constexpr strong_ordering operator<=>(const year_month_day_last_day& x, const year_month_day_last_day& y) noexcept; |
504 | |
505 | constexpr year_month_day_last |
506 | operator+(const year_month_day_last& ymdl, const months& dm) noexcept; |
507 | constexpr year_month_day_last |
508 | operator+(const months& dm, const year_month_day_last& ymdl) noexcept; |
509 | constexpr year_month_day_last |
510 | operator+(const year_month_day_last& ymdl, const years& dy) noexcept; |
511 | constexpr year_month_day_last |
512 | operator+(const years& dy, const year_month_day_last& ymdl) noexcept; |
513 | constexpr year_month_day_last |
514 | operator-(const year_month_day_last& ymdl, const months& dm) noexcept; |
515 | constexpr year_month_day_last |
516 | operator-(const year_month_day_last& ymdl, const years& dy) noexcept; |
517 | |
518 | template<class charT, class traits> |
519 | basic_ostream<charT, traits>& |
520 | operator<<(basic_ostream<charT, traits>& os, const year_month_day_last& ymdl); |
521 | |
522 | // 25.8.16, class year_month_weekday // C++20 |
523 | class year_month_weekday; |
524 | |
525 | constexpr bool operator==(const year_month_weekday& x, |
526 | const year_month_weekday& y) noexcept; |
527 | |
528 | constexpr year_month_weekday |
529 | operator+(const year_month_weekday& ymwd, const months& dm) noexcept; |
530 | constexpr year_month_weekday |
531 | operator+(const months& dm, const year_month_weekday& ymwd) noexcept; |
532 | constexpr year_month_weekday |
533 | operator+(const year_month_weekday& ymwd, const years& dy) noexcept; |
534 | constexpr year_month_weekday |
535 | operator+(const years& dy, const year_month_weekday& ymwd) noexcept; |
536 | constexpr year_month_weekday |
537 | operator-(const year_month_weekday& ymwd, const months& dm) noexcept; |
538 | constexpr year_month_weekday |
539 | operator-(const year_month_weekday& ymwd, const years& dy) noexcept; |
540 | |
541 | template<class charT, class traits> |
542 | basic_ostream<charT, traits>& |
543 | operator<<(basic_ostream<charT, traits>& os, const year_month_weekday& ymwd); |
544 | |
545 | // 25.8.17, class year_month_weekday_last // C++20 |
546 | class year_month_weekday_last; |
547 | |
548 | constexpr bool operator==(const year_month_weekday_last& x, |
549 | const year_month_weekday_last& y) noexcept; |
550 | constexpr year_month_weekday_last |
551 | operator+(const year_month_weekday_last& ymwdl, const months& dm) noexcept; |
552 | constexpr year_month_weekday_last |
553 | operator+(const months& dm, const year_month_weekday_last& ymwdl) noexcept; |
554 | constexpr year_month_weekday_last |
555 | operator+(const year_month_weekday_last& ymwdl, const years& dy) noexcept; |
556 | constexpr year_month_weekday_last |
557 | operator+(const years& dy, const year_month_weekday_last& ymwdl) noexcept; |
558 | constexpr year_month_weekday_last |
559 | operator-(const year_month_weekday_last& ymwdl, const months& dm) noexcept; |
560 | constexpr year_month_weekday_last |
561 | operator-(const year_month_weekday_last& ymwdl, const years& dy) noexcept; |
562 | |
563 | template<class charT, class traits> |
564 | basic_ostream<charT, traits>& |
565 | operator<<(basic_ostream<charT, traits>& os, const year_month_weekday_last& ymwdl); |
566 | |
567 | // 25.8.18, civil calendar conventional syntax operators // C++20 |
568 | constexpr year_month |
569 | operator/(const year& y, const month& m) noexcept; |
570 | constexpr year_month |
571 | operator/(const year& y, int m) noexcept; |
572 | constexpr month_day |
573 | operator/(const month& m, const day& d) noexcept; |
574 | constexpr month_day |
575 | operator/(const month& m, int d) noexcept; |
576 | constexpr month_day |
577 | operator/(int m, const day& d) noexcept; |
578 | constexpr month_day |
579 | operator/(const day& d, const month& m) noexcept; |
580 | constexpr month_day |
581 | operator/(const day& d, int m) noexcept; |
582 | constexpr month_day_last |
583 | operator/(const month& m, last_spec) noexcept; |
584 | constexpr month_day_last |
585 | operator/(int m, last_spec) noexcept; |
586 | constexpr month_day_last |
587 | operator/(last_spec, const month& m) noexcept; |
588 | constexpr month_day_last |
589 | operator/(last_spec, int m) noexcept; |
590 | constexpr month_weekday |
591 | operator/(const month& m, const weekday_indexed& wdi) noexcept; |
592 | constexpr month_weekday |
593 | operator/(int m, const weekday_indexed& wdi) noexcept; |
594 | constexpr month_weekday |
595 | operator/(const weekday_indexed& wdi, const month& m) noexcept; |
596 | constexpr month_weekday |
597 | operator/(const weekday_indexed& wdi, int m) noexcept; |
598 | constexpr month_weekday_last |
599 | operator/(const month& m, const weekday_last& wdl) noexcept; |
600 | constexpr month_weekday_last |
601 | operator/(int m, const weekday_last& wdl) noexcept; |
602 | constexpr month_weekday_last |
603 | operator/(const weekday_last& wdl, const month& m) noexcept; |
604 | constexpr month_weekday_last |
605 | operator/(const weekday_last& wdl, int m) noexcept; |
606 | constexpr year_month_day |
607 | operator/(const year_month& ym, const day& d) noexcept; |
608 | constexpr year_month_day |
609 | operator/(const year_month& ym, int d) noexcept; |
610 | constexpr year_month_day |
611 | operator/(const year& y, const month_day& md) noexcept; |
612 | constexpr year_month_day |
613 | operator/(int y, const month_day& md) noexcept; |
614 | constexpr year_month_day |
615 | operator/(const month_day& md, const year& y) noexcept; |
616 | constexpr year_month_day |
617 | operator/(const month_day& md, int y) noexcept; |
618 | constexpr year_month_day_last |
619 | operator/(const year_month& ym, last_spec) noexcept; |
620 | constexpr year_month_day_last |
621 | operator/(const year& y, const month_day_last& mdl) noexcept; |
622 | constexpr year_month_day_last |
623 | operator/(int y, const month_day_last& mdl) noexcept; |
624 | constexpr year_month_day_last |
625 | operator/(const month_day_last& mdl, const year& y) noexcept; |
626 | constexpr year_month_day_last |
627 | operator/(const month_day_last& mdl, int y) noexcept; |
628 | constexpr year_month_weekday |
629 | operator/(const year_month& ym, const weekday_indexed& wdi) noexcept; |
630 | constexpr year_month_weekday |
631 | operator/(const year& y, const month_weekday& mwd) noexcept; |
632 | constexpr year_month_weekday |
633 | operator/(int y, const month_weekday& mwd) noexcept; |
634 | constexpr year_month_weekday |
635 | operator/(const month_weekday& mwd, const year& y) noexcept; |
636 | constexpr year_month_weekday |
637 | operator/(const month_weekday& mwd, int y) noexcept; |
638 | constexpr year_month_weekday_last |
639 | operator/(const year_month& ym, const weekday_last& wdl) noexcept; |
640 | constexpr year_month_weekday_last |
641 | operator/(const year& y, const month_weekday_last& mwdl) noexcept; |
642 | constexpr year_month_weekday_last |
643 | operator/(int y, const month_weekday_last& mwdl) noexcept; |
644 | constexpr year_month_weekday_last |
645 | operator/(const month_weekday_last& mwdl, const year& y) noexcept; |
646 | constexpr year_month_weekday_last |
647 | operator/(const month_weekday_last& mwdl, int y) noexcept; |
648 | |
649 | // 26.9, class template hh_mm_ss |
650 | template <class Duration> |
651 | class hh_mm_ss |
652 | { |
653 | bool is_neg; // exposition only |
654 | chrono::hours h; // exposition only |
655 | chrono::minutes m; // exposition only |
656 | chrono::seconds s; // exposition only |
657 | precision ss; // exposition only |
658 | |
659 | public: |
660 | static unsigned constexpr fractional_width = see below; |
661 | using precision = see below; |
662 | |
663 | constexpr hh_mm_ss() noexcept : hh_mm_ss{Duration::zero()} {} |
664 | constexpr explicit hh_mm_ss(Duration d) noexcept; |
665 | |
666 | constexpr bool is_negative() const noexcept; |
667 | constexpr chrono::hours hours() const noexcept; |
668 | constexpr chrono::minutes minutes() const noexcept; |
669 | constexpr chrono::seconds seconds() const noexcept; |
670 | constexpr precision subseconds() const noexcept; |
671 | |
672 | constexpr explicit operator precision() const noexcept; |
673 | constexpr precision to_duration() const noexcept; |
674 | }; |
675 | |
676 | template<class charT, class traits, class Duration> |
677 | basic_ostream<charT, traits>& |
678 | operator<<(basic_ostream<charT, traits>& os, const hh_mm_ss<Duration>& hms); // C++20 |
679 | |
680 | // 26.10, 12/24 hour functions |
681 | constexpr bool is_am(hours const& h) noexcept; |
682 | constexpr bool is_pm(hours const& h) noexcept; |
683 | constexpr hours make12(const hours& h) noexcept; |
684 | constexpr hours make24(const hours& h, bool is_pm) noexcept; |
685 | |
686 | // [time.zone.db], time zone database |
687 | struct tzdb { // C++20 |
688 | string version; |
689 | vector<time_zone> zones; |
690 | vector<time_zone_link> links; |
691 | vector<leap_second> leap_seconds; |
692 | |
693 | const time_zone* locate_zone(string_view tz_name) const; |
694 | const time_zone* current_zone() const; |
695 | }; |
696 | |
697 | class tzdb_list { // C++20 |
698 | public: |
699 | tzdb_list(const tzdb_list&) = delete; |
700 | tzdb_list& operator=(const tzdb_list&) = delete; |
701 | |
702 | // unspecified additional constructors |
703 | |
704 | class const_iterator; |
705 | |
706 | const tzdb& front() const noexcept; |
707 | |
708 | const_iterator erase_after(const_iterator p); |
709 | |
710 | const_iterator begin() const noexcept; |
711 | const_iterator end() const noexcept; |
712 | |
713 | const_iterator cbegin() const noexcept; |
714 | const_iterator cend() const noexcept; |
715 | }; |
716 | |
717 | // [time.zone.db.access], time zone database access |
718 | const tzdb& get_tzdb(); // C++20 |
719 | tzdb_list& get_tzdb_list(); // C++20 |
720 | const time_zone* locate_zone(string_view tz_name); // C++20 |
721 | const time_zone* current_zone() // C++20 |
722 | |
723 | // [time.zone.db.remote], remote time zone database support |
724 | const tzdb& reload_tzdb(); // C++20 |
725 | string remote_version(); // C++20 |
726 | |
727 | // [time.zone.exception], exception classes |
728 | class nonexistent_local_time; // C++20 |
729 | class ambiguous_local_time; // C++20 |
730 | |
731 | // [time.zone.info], information classes |
732 | struct sys_info { // C++20 |
733 | sys_seconds begin; |
734 | sys_seconds end; |
735 | seconds offset; |
736 | minutes save; |
737 | string abbrev; |
738 | }; |
739 | |
740 | template<class charT, class traits> // C++20 |
741 | basic_ostream<charT, traits>& |
742 | operator<<(basic_ostream<charT, traits>& os, const sys_info& si); |
743 | |
744 | struct local_info { // C++20 |
745 | static constexpr int unique = 0; |
746 | static constexpr int nonexistent = 1; |
747 | static constexpr int ambiguous = 2; |
748 | |
749 | int result; |
750 | sys_info first; |
751 | sys_info second; |
752 | }; |
753 | |
754 | template<class charT, class traits> // C++20 |
755 | basic_ostream<charT, traits>& |
756 | operator<<(basic_ostream<charT, traits>& os, const local_info& li); |
757 | |
758 | // 25.10.5, class time_zone // C++20 |
759 | enum class choose {earliest, latest}; |
760 | class time_zone { |
761 | time_zone(time_zone&&) = default; |
762 | time_zone& operator=(time_zone&&) = default; |
763 | |
764 | // unspecified additional constructors |
765 | |
766 | string_view name() const noexcept; |
767 | |
768 | template<class Duration> |
769 | sys_info get_info(const sys_time<Duration>& st) const; |
770 | |
771 | template<class Duration> |
772 | local_info get_info(const local_time<Duration>& tp) const; |
773 | |
774 | template<class Duration> |
775 | sys_time<common_type_t<Duration, seconds>> |
776 | to_sys(const local_time<Duration>& tp) const; |
777 | |
778 | template<class Duration> |
779 | sys_time<common_type_t<Duration, seconds>> |
780 | to_sys(const local_time<Duration>& tp, choose z) const; |
781 | |
782 | template<class Duration> |
783 | local_time<common_type_t<Duration, seconds>> |
784 | to_local(const sys_time<Duration>& tp) const; |
785 | }; |
786 | bool operator==(const time_zone& x, const time_zone& y) noexcept; // C++20 |
787 | strong_ordering operator<=>(const time_zone& x, const time_zone& y) noexcept; // C++20 |
788 | |
789 | // [time.zone.zonedtraits], class template zoned_traits |
790 | template<class T> struct zoned_traits; // C++20 |
791 | |
792 | // [time.zone.zonedtime], class template zoned_time |
793 | template<class Duration, class TimeZonePtr = const time_zone*> // C++20 |
794 | class zoned_time; |
795 | |
796 | using zoned_seconds = zoned_time<seconds>; // C++20 |
797 | |
798 | template<class Duration1, class Duration2, class TimeZonePtr> // C++20 |
799 | bool operator==(const zoned_time<Duration1, TimeZonePtr>& x, |
800 | const zoned_time<Duration2, TimeZonePtr>& y); |
801 | |
802 | template<class charT, class traits, class Duration, class TimeZonePtr> // C++20 |
803 | basic_ostream<charT, traits>& |
804 | operator<<(basic_ostream<charT, traits>& os, |
805 | const zoned_time<Duration, TimeZonePtr>& t); |
806 | |
807 | // [time.zone.leap], leap second support |
808 | class leap_second { // C++20 |
809 | public: |
810 | leap_second(const leap_second&) = default; |
811 | leap_second& operator=(const leap_second&) = default; |
812 | |
813 | // unspecified additional constructors |
814 | |
815 | constexpr sys_seconds date() const noexcept; |
816 | constexpr seconds value() const noexcept; |
817 | }; |
818 | |
819 | constexpr bool operator==(const leap_second& x, const leap_second& y); // C++20 |
820 | constexpr strong_ordering operator<=>(const leap_second& x, const leap_second& y); |
821 | |
822 | template<class Duration> // C++20 |
823 | constexpr bool operator==(const leap_second& x, const sys_time<Duration>& y); |
824 | template<class Duration> // C++20 |
825 | constexpr bool operator< (const leap_second& x, const sys_time<Duration>& y); |
826 | template<class Duration> // C++20 |
827 | constexpr bool operator< (const sys_time<Duration>& x, const leap_second& y); |
828 | template<class Duration> // C++20 |
829 | constexpr bool operator> (const leap_second& x, const sys_time<Duration>& y); |
830 | template<class Duration> // C++20 |
831 | constexpr bool operator> (const sys_time<Duration>& x, const leap_second& y); |
832 | template<class Duration> // C++20 |
833 | constexpr bool operator<=(const leap_second& x, const sys_time<Duration>& y); |
834 | template<class Duration> // C++20 |
835 | constexpr bool operator<=(const sys_time<Duration>& x, const leap_second& y); |
836 | template<class Duration> // C++20 |
837 | constexpr bool operator>=(const leap_second& x, const sys_time<Duration>& y); |
838 | template<class Duration> // C++20 |
839 | constexpr bool operator>=(const sys_time<Duration>& x, const leap_second& y); |
840 | template<class Duration> // C++20 |
841 | requires three_way_comparable_with<sys_seconds, sys_time<Duration>> |
842 | constexpr auto operator<=>(const leap_second& x, const sys_time<Duration>& y); |
843 | |
844 | // [time.zone.link], class time_zone_link |
845 | class time_zone_link { // C++20 |
846 | public: |
847 | time_zone_link(time_zone_link&&) = default; |
848 | time_zone_link& operator=(time_zone_link&&) = default; |
849 | |
850 | // unspecified additional constructors |
851 | |
852 | string_view name() const noexcept; |
853 | string_view target() const noexcept; |
854 | }; |
855 | |
856 | bool operator==(const time_zone_link& x, const time_zone_link& y); // C++20 |
857 | strong_ordering operator<=>(const time_zone_link& x, const time_zone_link& y); // C++20 |
858 | |
859 | } // chrono |
860 | |
861 | namespace std { |
862 | template<class Duration, class charT> |
863 | struct formatter<chrono::sys_time<Duration>, charT>; // C++20 |
864 | template<class Duration, class charT> |
865 | struct formatter<chrono::filetime<Duration>, charT>; // C++20 |
866 | template<class Duration, class charT> |
867 | struct formatter<chrono::local_time<Duration>, charT>; // C++20 |
868 | template<class Rep, class Period, class charT> |
869 | struct formatter<chrono::duration<Rep, Period>, charT>; // C++20 |
870 | template<class charT> struct formatter<chrono::day, charT>; // C++20 |
871 | template<class charT> struct formatter<chrono::month, charT>; // C++20 |
872 | template<class charT> struct formatter<chrono::year, charT>; // C++20 |
873 | template<class charT> struct formatter<chrono::weekday, charT>; // C++20 |
874 | template<class charT> struct formatter<chrono::weekday_indexed, charT>; // C++20 |
875 | template<class charT> struct formatter<chrono::weekday_last, charT>; // C++20 |
876 | template<class charT> struct formatter<chrono::month_day, charT>; // C++20 |
877 | template<class charT> struct formatter<chrono::month_day_last, charT>; // C++20 |
878 | template<class charT> struct formatter<chrono::month_weekday, charT>; // C++20 |
879 | template<class charT> struct formatter<chrono::month_weekday_last, charT>; // C++20 |
880 | template<class charT> struct formatter<chrono::year_month, charT>; // C++20 |
881 | template<class charT> struct formatter<chrono::year_month_day, charT>; // C++20 |
882 | template<class charT> struct formatter<chrono::year_month_day_last, charT>; // C++20 |
883 | template<class charT> struct formatter<chrono::year_month_weekday, charT>; // C++20 |
884 | template<class charT> struct formatter<chrono::year_month_weekday_last, charT>; // C++20 |
885 | template<class Rep, class Period, class charT> |
886 | struct formatter<chrono::hh_mm_ss<duration<Rep, Period>>, charT>; // C++20 |
887 | template<class charT> struct formatter<chrono::sys_info, charT>; // C++20 |
888 | template<class charT> struct formatter<chrono::local_info, charT>; // C++20 |
889 | template<class Duration, class TimeZonePtr, class charT> // C++20 |
890 | struct formatter<chrono::zoned_time<Duration, TimeZonePtr>, charT>; |
891 | } // namespace std |
892 | |
893 | namespace chrono { |
894 | // calendrical constants |
895 | inline constexpr last_spec last{}; // C++20 |
896 | inline constexpr chrono::weekday Sunday{0}; // C++20 |
897 | inline constexpr chrono::weekday Monday{1}; // C++20 |
898 | inline constexpr chrono::weekday Tuesday{2}; // C++20 |
899 | inline constexpr chrono::weekday Wednesday{3}; // C++20 |
900 | inline constexpr chrono::weekday Thursday{4}; // C++20 |
901 | inline constexpr chrono::weekday Friday{5}; // C++20 |
902 | inline constexpr chrono::weekday Saturday{6}; // C++20 |
903 | |
904 | inline constexpr chrono::month January{1}; // C++20 |
905 | inline constexpr chrono::month February{2}; // C++20 |
906 | inline constexpr chrono::month March{3}; // C++20 |
907 | inline constexpr chrono::month April{4}; // C++20 |
908 | inline constexpr chrono::month May{5}; // C++20 |
909 | inline constexpr chrono::month June{6}; // C++20 |
910 | inline constexpr chrono::month July{7}; // C++20 |
911 | inline constexpr chrono::month August{8}; // C++20 |
912 | inline constexpr chrono::month September{9}; // C++20 |
913 | inline constexpr chrono::month October{10}; // C++20 |
914 | inline constexpr chrono::month November{11}; // C++20 |
915 | inline constexpr chrono::month December{12}; // C++20 |
916 | } // chrono |
917 | |
918 | inline namespace literals { |
919 | inline namespace chrono_literals { |
920 | constexpr chrono::hours operator ""h(unsigned long long); // C++14 |
921 | constexpr chrono::duration<unspecified , ratio<3600,1>> operator ""h(long double); // C++14 |
922 | constexpr chrono::minutes operator ""min(unsigned long long); // C++14 |
923 | constexpr chrono::duration<unspecified , ratio<60,1>> operator ""min(long double); // C++14 |
924 | constexpr chrono::seconds operator ""s(unsigned long long); // C++14 |
925 | constexpr chrono::duration<unspecified > operator ""s(long double); // C++14 |
926 | constexpr chrono::milliseconds operator ""ms(unsigned long long); // C++14 |
927 | constexpr chrono::duration<unspecified , milli> operator ""ms(long double); // C++14 |
928 | constexpr chrono::microseconds operator ""us(unsigned long long); // C++14 |
929 | constexpr chrono::duration<unspecified , micro> operator ""us(long double); // C++14 |
930 | constexpr chrono::nanoseconds operator ""ns(unsigned long long); // C++14 |
931 | constexpr chrono::duration<unspecified , nano> operator ""ns(long double); // C++14 |
932 | constexpr chrono::day operator ""d(unsigned long long d) noexcept; // C++20 |
933 | constexpr chrono::year operator ""y(unsigned long long y) noexcept; // C++20 |
934 | } // chrono_literals |
935 | } // literals |
936 | |
937 | } // std |
938 | */ |
939 | |
940 | // clang-format on |
941 | |
942 | #include <__config> |
943 | |
944 | #include <__chrono/duration.h> |
945 | #include <__chrono/file_clock.h> |
946 | #include <__chrono/high_resolution_clock.h> |
947 | #include <__chrono/steady_clock.h> |
948 | #include <__chrono/system_clock.h> |
949 | #include <__chrono/time_point.h> |
950 | |
951 | #if _LIBCPP_STD_VER >= 20 |
952 | # include <__chrono/calendar.h> |
953 | # include <__chrono/day.h> |
954 | # include <__chrono/exception.h> |
955 | # include <__chrono/hh_mm_ss.h> |
956 | # include <__chrono/literals.h> |
957 | # include <__chrono/local_info.h> |
958 | # include <__chrono/month.h> |
959 | # include <__chrono/month_weekday.h> |
960 | # include <__chrono/monthday.h> |
961 | # include <__chrono/sys_info.h> |
962 | # include <__chrono/weekday.h> |
963 | # include <__chrono/year.h> |
964 | # include <__chrono/year_month.h> |
965 | # include <__chrono/year_month_day.h> |
966 | # include <__chrono/year_month_weekday.h> |
967 | |
968 | # if !defined(_LIBCPP_HAS_NO_LOCALIZATION) |
969 | # include <__chrono/formatter.h> |
970 | # include <__chrono/ostream.h> |
971 | # include <__chrono/parser_std_format_spec.h> |
972 | # include <__chrono/statically_widen.h> |
973 | # endif |
974 | |
975 | # if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \ |
976 | !defined(_LIBCPP_HAS_NO_LOCALIZATION) |
977 | # include <__chrono/leap_second.h> |
978 | # include <__chrono/time_zone.h> |
979 | # include <__chrono/time_zone_link.h> |
980 | # include <__chrono/tzdb.h> |
981 | # include <__chrono/tzdb_list.h> |
982 | # include <__chrono/zoned_time.h> |
983 | # endif |
984 | |
985 | #endif |
986 | |
987 | #include <version> |
988 | |
989 | // standard-mandated includes |
990 | |
991 | // [time.syn] |
992 | #include <compare> |
993 | |
994 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
995 | # pragma GCC system_header |
996 | #endif |
997 | |
998 | #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17 |
999 | # include <cstdint> |
1000 | # include <stdexcept> |
1001 | # include <string_view> |
1002 | # include <vector> |
1003 | #endif |
1004 | |
1005 | #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 |
1006 | # include <bit> |
1007 | # include <concepts> |
1008 | # include <cstring> |
1009 | # include <forward_list> |
1010 | # include <string> |
1011 | # include <tuple> |
1012 | #endif |
1013 | |
1014 | #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER == 20 |
1015 | # include <charconv> |
1016 | # if !defined(_LIBCPP_HAS_NO_LOCALIZATION) |
1017 | # include <locale> |
1018 | # include <ostream> |
1019 | # endif |
1020 | #endif |
1021 | |
1022 | #endif // _LIBCPP_CHRONO |
1023 | |