30 #ifndef _GLIBCXX_CHRONO_H 31 #define _GLIBCXX_CHRONO_H 1 33 #pragma GCC system_header 35 #if __cplusplus >= 201103L 42 #if __cplusplus >= 202002L 47 namespace std _GLIBCXX_VISIBILITY(default)
49 _GLIBCXX_BEGIN_NAMESPACE_VERSION
51 #if __cplusplus >= 201703L 52 namespace filesystem {
struct __file_clock; };
61 template<
typename _Rep,
typename _Period = ratio<1>>
65 template<
typename _Clock,
typename _Dur =
typename _Clock::duration>
77 template<
typename _CT,
typename _Period1,
typename _Period2,
typename =
void>
78 struct __duration_common_type
81 template<
typename _CT,
typename _Period1,
typename _Period2>
82 struct __duration_common_type<_CT, _Period1, _Period2,
83 __void_t<typename _CT::type>>
86 using __gcd_num = __static_gcd<_Period1::num, _Period2::num>;
87 using __gcd_den = __static_gcd<_Period1::den, _Period2::den>;
88 using __cr =
typename _CT::type;
89 using __r =
ratio<__gcd_num::value,
90 (_Period1::den / __gcd_den::value) * _Period2::den>;
102 template<
typename _Rep1,
typename _Period1,
typename _Rep2,
typename _Period2>
105 : __duration_common_type<common_type<_Rep1, _Rep2>,
106 typename _Period1::type,
107 typename _Period2::type>
111 template<
typename _Rep,
typename _Period>
116 typename _Period::type>;
120 template<
typename _Rep,
typename _Period>
124 typename _Period::type>;
132 template<
typename _CT,
typename _Clock,
typename =
void>
133 struct __timepoint_common_type
136 template<
typename _CT,
typename _Clock>
137 struct __timepoint_common_type<_CT, _Clock, __void_t<typename _CT::
type>>
148 template<
typename _Clock,
typename _Duration1,
typename _Duration2>
151 : __timepoint_common_type<common_type<_Duration1, _Duration2>, _Clock>
155 template<
typename _Clock,
typename _Duration>
161 template<
typename _Clock,
typename _Duration>
176 template<
typename _ToDur,
typename _CF,
typename _CR,
177 bool _NumIsOne =
false,
bool _DenIsOne =
false>
178 struct __duration_cast_impl
180 template<
typename _Rep,
typename _Period>
181 static constexpr _ToDur
182 __cast(
const duration<_Rep, _Period>& __d)
184 typedef typename _ToDur::rep __to_rep;
185 return _ToDur(static_cast<__to_rep>(static_cast<_CR>(__d.count())
186 * static_cast<_CR>(_CF::num)
187 /
static_cast<_CR
>(_CF::den)));
191 template<
typename _ToDur,
typename _CF,
typename _CR>
192 struct __duration_cast_impl<_ToDur, _CF, _CR, true, true>
194 template<
typename _Rep,
typename _Period>
195 static constexpr _ToDur
196 __cast(
const duration<_Rep, _Period>& __d)
198 typedef typename _ToDur::rep __to_rep;
199 return _ToDur(static_cast<__to_rep>(__d.count()));
203 template<
typename _ToDur,
typename _CF,
typename _CR>
204 struct __duration_cast_impl<_ToDur, _CF, _CR, true, false>
206 template<
typename _Rep,
typename _Period>
207 static constexpr _ToDur
208 __cast(
const duration<_Rep, _Period>& __d)
210 typedef typename _ToDur::rep __to_rep;
211 return _ToDur(static_cast<__to_rep>(
212 static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den)));
216 template<
typename _ToDur,
typename _CF,
typename _CR>
217 struct __duration_cast_impl<_ToDur, _CF, _CR, false, true>
219 template<
typename _Rep,
typename _Period>
220 static constexpr _ToDur
221 __cast(
const duration<_Rep, _Period>& __d)
223 typedef typename _ToDur::rep __to_rep;
224 return _ToDur(static_cast<__to_rep>(
225 static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num)));
229 template<
typename _Tp>
234 template<
typename _Rep,
typename _Period>
235 struct __is_duration<duration<_Rep, _Period>>
239 template<
typename _Tp>
240 using __enable_if_is_duration
243 template<
typename _Tp>
244 using __disable_if_is_duration
259 template<
typename _ToDur,
typename _Rep,
typename _Period>
261 constexpr __enable_if_is_duration<_ToDur>
264 typedef typename _ToDur::period __to_period;
265 typedef typename _ToDur::rep __to_rep;
268 typedef __duration_cast_impl<_ToDur, __cf, __cr,
269 __cf::num == 1, __cf::den == 1> __dc;
270 return __dc::__cast(__d);
284 template<
typename _Rep>
289 #if __cplusplus > 201402L 290 template <
typename _Rep>
291 inline constexpr
bool treat_as_floating_point_v =
295 #if __cplusplus > 201703L 296 template<
typename _Tp>
299 template<
typename _Tp>
300 inline constexpr
bool is_clock_v = is_clock<_Tp>::value;
302 #if __cpp_lib_concepts 303 template<
typename _Tp>
307 template<
typename _Tp>
310 typename _Tp::period;
311 typename _Tp::duration;
312 typename _Tp::time_point::clock;
313 typename _Tp::time_point::duration;
314 { &_Tp::is_steady } -> same_as<const bool*>;
315 { _Tp::now() } -> same_as<typename _Tp::time_point>;
316 requires
same_as<
typename _Tp::duration,
318 requires
same_as<
typename _Tp::time_point::duration,
319 typename _Tp::duration>;
324 template<
typename _Tp,
typename =
void>
328 template<
typename _Tp>
329 struct __is_clock_impl<_Tp,
330 void_t<typename _Tp::rep, typename _Tp::period,
331 typename _Tp::duration,
332 typename _Tp::time_point::duration,
333 decltype(_Tp::is_steady),
334 decltype(_Tp::now())>>
335 : __and_<is_same<typename _Tp::duration,
336 duration<typename _Tp::rep, typename _Tp::period>>,
337 is_same<typename _Tp::time_point::duration,
338 typename _Tp::duration>,
339 is_same<decltype(&_Tp::is_steady), const bool*>,
340 is_same<decltype(_Tp::now()), typename _Tp::time_point>>::type
343 template<
typename _Tp>
344 struct is_clock : __is_clock_impl<_Tp>::type
349 #if __cplusplus >= 201703L 350 # define __cpp_lib_chrono 201611L 362 template<
typename _ToDur,
typename _Rep,
typename _Period>
363 [[nodiscard]] constexpr __enable_if_is_duration<_ToDur>
368 return __to - _ToDur{1};
382 template<
typename _ToDur,
typename _Rep,
typename _Period>
383 [[nodiscard]] constexpr __enable_if_is_duration<_ToDur>
388 return __to + _ToDur{1};
403 template <
typename _ToDur,
typename _Rep,
typename _Period>
404 [[nodiscard]] constexpr
406 __and_<__is_duration<_ToDur>,
407 __not_<treat_as_floating_point<typename _ToDur::rep>>>::value,
411 _ToDur __t0 = chrono::floor<_ToDur>(__d);
412 _ToDur __t1 = __t0 + _ToDur{1};
413 auto __diff0 = __d - __t0;
414 auto __diff1 = __t1 - __d;
415 if (__diff0 == __diff1)
417 if (__t0.count() & 1)
421 else if (__diff0 < __diff1)
432 template<
typename _Rep,
typename _Period>
433 [[nodiscard]] constexpr
437 if (__d >= __d.zero())
452 template<
typename _Tp,
typename _Up>
454 __ceil_impl(
const _Tp& __t,
const _Up& __u)
456 return (__t < __u) ? (__t + _Tp{1}) : __t;
460 template<
typename _ToDur,
typename _Rep,
typename _Period>
464 return __detail::__ceil_impl(chrono::duration_cast<_ToDur>(__d), __d);
470 template<
typename _Rep>
473 static constexpr _Rep
477 static constexpr _Rep
481 static constexpr _Rep
486 template<
typename _Rep,
typename _Period>
489 static_assert(!__is_duration<_Rep>::value,
490 "rep cannot be a std::chrono::duration");
491 static_assert(__is_ratio<_Period>::value,
492 "period must be a specialization of std::ratio");
493 static_assert(_Period::num > 0,
"period must be positive");
495 template<
typename _Rep2>
498 static constexpr intmax_t
499 _S_gcd(intmax_t __m, intmax_t __n) noexcept
503 #if __cplusplus >= 201402L 506 intmax_t __rem = __m % __n;
515 return (__n == 0) ? __m : _S_gcd(__n, __m % __n);
523 template<
typename _R1,
typename _R2,
524 intmax_t __gcd1 = _S_gcd(_R1::num, _R2::num),
525 intmax_t __gcd2 = _S_gcd(_R1::den, _R2::den)>
526 using __divide =
ratio<(_R1::num / __gcd1) * (_R2::den / __gcd2),
527 (_R1::den / __gcd2) * (_R2::num / __gcd1)>;
530 template<
typename _Period2>
532 = __bool_constant<__divide<_Period2, _Period>::den == 1>;
537 using period =
typename _Period::type;
540 constexpr duration() =
default;
542 duration(
const duration&) =
default;
546 template<
typename _Rep2,
typename = _Require<
548 __or_<__is_float<rep>, __not_<__is_float<_Rep2>>>>>
549 constexpr
explicit duration(
const _Rep2& __rep)
550 : __r(static_cast<rep>(__rep)) { }
552 template<
typename _Rep2,
typename _Period2,
typename = _Require<
553 is_convertible<const _Rep2&, rep>,
554 __or_<__is_float<rep>,
555 __and_<__is_harmonic<_Period2>,
556 __not_<__is_float<_Rep2>>>>>>
558 : __r(duration_cast<duration>(__d).count()) { }
560 ~duration() =
default;
561 duration& operator=(
const duration&) =
default;
572 {
return duration<typename common_type<rep>::type, period>(__r); }
574 constexpr duration<typename common_type<rep>::type, period>
576 {
return duration<typename common_type<rep>::type, period>(-__r); }
578 _GLIBCXX17_CONSTEXPR duration&
585 _GLIBCXX17_CONSTEXPR duration
587 {
return duration(__r++); }
589 _GLIBCXX17_CONSTEXPR duration&
596 _GLIBCXX17_CONSTEXPR duration
598 {
return duration(__r--); }
600 _GLIBCXX17_CONSTEXPR duration&
601 operator+=(
const duration& __d)
607 _GLIBCXX17_CONSTEXPR duration&
608 operator-=(
const duration& __d)
614 _GLIBCXX17_CONSTEXPR duration&
615 operator*=(
const rep& __rhs)
621 _GLIBCXX17_CONSTEXPR duration&
622 operator/=(
const rep& __rhs)
629 template<
typename _Rep2 = rep>
633 operator%=(
const rep& __rhs)
639 template<
typename _Rep2 = rep>
641 typename enable_if<!treat_as_floating_point<_Rep2>::value,
643 operator%=(
const duration& __d)
650 static constexpr duration
654 static constexpr duration
658 static constexpr duration
670 template<
typename _Rep1,
typename _Period1,
671 typename _Rep2,
typename _Period2>
680 return __cd(__cd(__lhs).count() + __cd(__rhs).count());
684 template<
typename _Rep1,
typename _Period1,
685 typename _Rep2,
typename _Period2>
686 constexpr
typename common_type<duration<_Rep1, _Period1>,
694 return __cd(__cd(__lhs).count() - __cd(__rhs).count());
705 template<
typename _Rep1,
typename _Rep2,
707 using __common_rep_t =
typename 717 template<
typename _Rep1,
typename _Period,
typename _Rep2>
723 return __cd(__cd(__d).count() * __s);
726 template<
typename _Rep1,
typename _Rep2,
typename _Period>
729 {
return __d * __s; }
731 template<
typename _Rep1,
typename _Period,
typename _Rep2>
738 return __cd(__cd(__d).count() / __s);
741 template<
typename _Rep1,
typename _Period1,
742 typename _Rep2,
typename _Period2>
750 return __cd(__lhs).count() / __cd(__rhs).count();
754 template<
typename _Rep1,
typename _Period,
typename _Rep2>
756 duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period>
761 return __cd(__cd(__d).count() % __s);
764 template<
typename _Rep1,
typename _Period1,
765 typename _Rep2,
typename _Period2>
766 constexpr
typename common_type<duration<_Rep1, _Period1>,
774 return __cd(__cd(__lhs).count() % __cd(__rhs).count());
785 template<
typename _Rep1,
typename _Period1,
786 typename _Rep2,
typename _Period2>
794 return __ct(__lhs).count() == __ct(__rhs).count();
797 template<
typename _Rep1,
typename _Period1,
798 typename _Rep2,
typename _Period2>
800 operator<(const duration<_Rep1, _Period1>& __lhs,
806 return __ct(__lhs).count() < __ct(__rhs).count();
809 #if __cpp_lib_three_way_comparison 810 template<
typename _Rep1,
typename _Period1,
811 typename _Rep2,
typename _Period2>
812 requires three_way_comparable<common_type_t<_Rep1, _Rep2>>
819 return __ct(__lhs).count() <=> __ct(__rhs).count();
822 template<
typename _Rep1,
typename _Period1,
823 typename _Rep2,
typename _Period2>
827 {
return !(__lhs == __rhs); }
830 template<
typename _Rep1,
typename _Period1,
831 typename _Rep2,
typename _Period2>
833 operator<=(const duration<_Rep1, _Period1>& __lhs,
835 {
return !(__rhs < __lhs); }
837 template<
typename _Rep1,
typename _Period1,
838 typename _Rep2,
typename _Period2>
842 {
return __rhs < __lhs; }
844 template<
typename _Rep1,
typename _Period1,
845 typename _Rep2,
typename _Period2>
849 {
return !(__lhs < __rhs); }
854 #ifdef _GLIBCXX_USE_C99_STDINT_TR1 855 # define _GLIBCXX_CHRONO_INT64_T int64_t 856 #elif defined __INT64_TYPE__ 857 # define _GLIBCXX_CHRONO_INT64_T __INT64_TYPE__ 860 "Representation type for nanoseconds must have at least 64 bits");
861 # define _GLIBCXX_CHRONO_INT64_T long long 883 #if __cplusplus > 201703L 897 #undef _GLIBCXX_CHRONO_INT64_T 899 template<
typename _Clock,
typename _Dur>
902 static_assert(__is_duration<_Dur>::value,
903 "duration must be a specialization of std::chrono::duration");
906 typedef _Clock clock;
907 typedef _Dur duration;
908 typedef typename duration::rep rep;
909 typedef typename duration::period period;
911 constexpr
time_point() : __d(duration::zero())
914 constexpr
explicit time_point(
const duration& __dur)
919 template<
typename _Dur2,
920 typename = _Require<is_convertible<_Dur2, _Dur>>>
922 : __d(__t.time_since_epoch())
927 time_since_epoch()
const 930 #if __cplusplus > 201703L 931 constexpr time_point&
940 {
return time_point{__d++}; }
942 constexpr time_point&
951 {
return time_point{__d--}; }
955 _GLIBCXX17_CONSTEXPR time_point&
956 operator+=(
const duration& __dur)
962 _GLIBCXX17_CONSTEXPR time_point&
963 operator-=(
const duration& __dur)
970 static constexpr time_point
972 {
return time_point(duration::min()); }
974 static constexpr time_point
976 {
return time_point(duration::max()); }
994 template<
typename _ToDur,
typename _Clock,
typename _Dur>
995 _GLIBCXX_NODISCARD constexpr
1000 return __time_point(duration_cast<_ToDur>(__t.time_since_epoch()));
1003 #if __cplusplus > 201402L 1016 template<
typename _ToDur,
typename _Clock,
typename _Dur>
1017 [[nodiscard]] constexpr
1022 chrono::floor<_ToDur>(__tp.time_since_epoch())};
1037 template<
typename _ToDur,
typename _Clock,
typename _Dur>
1038 [[nodiscard]] constexpr
1043 chrono::ceil<_ToDur>(__tp.time_since_epoch())};
1059 template<
typename _ToDur,
typename _Clock,
typename _Dur>
1060 [[nodiscard]] constexpr
1062 __and_<__is_duration<_ToDur>,
1063 __not_<treat_as_floating_point<typename _ToDur::rep>>>::value,
1068 chrono::round<_ToDur>(__tp.time_since_epoch())};
1076 template<
typename _Clock,
typename _Dur1,
1077 typename _Rep2,
typename _Period2>
1081 const duration<_Rep2, _Period2>& __rhs)
1083 typedef duration<_Rep2, _Period2> __dur2;
1086 return __time_point(__lhs.time_since_epoch() + __rhs);
1090 template<
typename _Rep1,
typename _Period1,
1091 typename _Clock,
typename _Dur2>
1093 typename common_type<duration<_Rep1, _Period1>, _Dur2>::type>
1100 return __time_point(__rhs.time_since_epoch() + __lhs);
1104 template<
typename _Clock,
typename _Dur1,
1105 typename _Rep2,
typename _Period2>
1114 return __time_point(__lhs.time_since_epoch() -__rhs);
1118 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
1122 {
return __lhs.time_since_epoch() - __rhs.time_since_epoch(); }
1130 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
1134 {
return __lhs.time_since_epoch() == __rhs.time_since_epoch(); }
1136 #if __cpp_lib_three_way_comparison 1137 template<
typename _Clock,
typename _Dur1,
1138 three_way_comparable_with<_Dur1> _Dur2>
1142 {
return __lhs.time_since_epoch() <=> __rhs.time_since_epoch(); }
1144 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
1148 {
return !(__lhs == __rhs); }
1151 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
1153 operator<(const time_point<_Clock, _Dur1>& __lhs,
1155 {
return __lhs.time_since_epoch() < __rhs.time_since_epoch(); }
1157 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
1159 operator<=(const time_point<_Clock, _Dur1>& __lhs,
1161 {
return !(__rhs < __lhs); }
1163 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
1167 {
return __rhs < __lhs; }
1169 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
1173 {
return !(__lhs < __rhs); }
1196 _GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE(_V2)
1207 typedef duration::rep rep;
1208 typedef duration::period period;
1211 static_assert(system_clock::duration::min()
1212 < system_clock::duration::zero(),
1213 "a clock's minimum duration cannot be less than its epoch");
1215 static constexpr
bool is_steady =
false;
1221 [[__gnu__::__always_inline__]]
1223 to_time_t(
const time_point& __t) noexcept
1225 return std::time_t(duration_cast<chrono::seconds>
1226 (__t.time_since_epoch()).count());
1229 [[__gnu__::__always_inline__]]
1231 from_time_t(std::time_t __t) noexcept
1249 typedef duration::rep rep;
1250 typedef duration::period period;
1253 static constexpr
bool is_steady =
true;
1270 _GLIBCXX_END_INLINE_ABI_NAMESPACE(_V2)
1272 #if __cplusplus >= 202002L 1275 template<
typename _Duration>
1280 using file_clock = ::std::filesystem::__file_clock;
1282 template<
typename _Duration>
1286 template<>
struct is_clock<steady_clock> :
true_type { };
1287 template<>
struct is_clock<file_clock> :
true_type { };
1289 template<>
inline constexpr
bool is_clock_v<system_clock> =
true;
1290 template<>
inline constexpr
bool is_clock_v<steady_clock> =
true;
1291 template<>
inline constexpr
bool is_clock_v<file_clock> =
true;
1296 #if __cplusplus >= 201402L 1297 #define __cpp_lib_chrono_udls 201304L 1299 inline namespace literals
1325 inline namespace chrono_literals
1330 #pragma GCC diagnostic push 1331 #pragma GCC diagnostic ignored "-Wliteral-suffix" 1333 template<
typename _Dur,
char... _Digits>
1334 constexpr _Dur __check_overflow()
1336 using _Val = __parse_int::_Parse_int<_Digits...>;
1337 constexpr
typename _Dur::rep __repval = _Val::value;
1338 static_assert(__repval >= 0 && __repval == _Val::value,
1339 "literal value cannot be represented by duration type");
1340 return _Dur(__repval);
1346 operator""h(
long double __hours)
1350 template <
char... _Digits>
1357 operator""min(
long double __mins)
1361 template <
char... _Digits>
1368 operator""s(
long double __secs)
1372 template <
char... _Digits>
1379 operator""ms(
long double __msecs)
1383 template <
char... _Digits>
1390 operator""us(
long double __usecs)
1394 template <
char... _Digits>
1401 operator""ns(
long double __nsecs)
1405 template <
char... _Digits>
1410 #pragma GCC diagnostic pop 1417 using namespace literals::chrono_literals;
1421 #if __cplusplus >= 201703L 1422 namespace filesystem
1427 using rep = duration::rep;
1428 using period = duration::period;
1430 static constexpr
bool is_steady =
false;
1434 {
return _S_from_sys(chrono::system_clock::now()); }
1436 #if __cplusplus > 201703L 1437 template<
typename _Dur>
1441 {
return _S_from_sys(__t); }
1444 template<
typename _Dur>
1448 {
return _S_to_sys(__t); }
1461 template<
typename _Dur>
1467 return __file_time{__t.time_since_epoch()} - _S_epoch_diff;
1471 template<
typename _Dur>
1477 return __sys_time{__t.time_since_epoch()} + _S_epoch_diff;
1483 _GLIBCXX_END_NAMESPACE_VERSION
1488 #endif //_GLIBCXX_CHRONO_H
constexpr complex< _Tp > operator/(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x divided by y.
chrono::time_point represents a point in time as measured by a clock
Provides compile-time rational arithmetic.
Properties of fundamental types.
constexpr complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
constexpr __enable_if_t< __is_duration< _ToDur >::value, time_point< _Clock, _ToDur > > time_point_cast(const time_point< _Clock, _Dur > &__t)
typename __ratio_divide< _R1, _R2 >::type ratio_divide
ratio_divide
constexpr complex< _Tp > operator-(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x minus y.
duration< int64_t, milli > milliseconds
milliseconds
duration< int64_t, micro > microseconds
microseconds
typename enable_if< _Cond, _Tp >::type enable_if_t
Alias template for enable_if.
duration< int64_t, ratio< 60 > > minutes
minutes
constexpr bool operator==(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
concept same_as
[concept.same], concept same_as
duration< int64_t > seconds
seconds
constexpr __enable_if_is_duration< _ToDur > ceil(const duration< _Rep, _Period > &__d)
typename common_type< _Tp... >::type common_type_t
Alias template for common_type.
static constexpr _Tp lowest() noexcept
constexpr enable_if_t< __and_< __is_duration< _ToDur >, __not_< treat_as_floating_point< typename _ToDur::rep > > >::value, time_point< _Clock, _ToDur > > round(const time_point< _Clock, _Dur > &__tp)
constexpr complex< _Tp > operator+(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x plus y.
constexpr duration< __common_rep_t< _Rep1, _Rep2 >, _Period > operator*(const duration< _Rep1, _Period > &__d, const _Rep2 &__s)
ISO C++ entities toplevel namespace is std.
constexpr time_point< _Clock, typename common_type< _Dur1, duration< _Rep2, _Period2 > >::type > operator+(const time_point< _Clock, _Dur1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
duration< int64_t, nano > nanoseconds
nanoseconds
constexpr __enable_if_is_duration< _ToDur > duration_cast(const duration< _Rep, _Period > &__d)
static constexpr _Tp max() noexcept
constexpr duration< __common_rep_t< _Rep1, __disable_if_is_duration< _Rep2 > >, _Period > operator%(const duration< _Rep1, _Period > &__d, const _Rep2 &__s)
chrono::duration represents a distance between two points in time
duration< int64_t, ratio< 3600 > > hours
hours
constexpr const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
constexpr common_type< duration< _Rep1, _Period1 >, duration< _Rep2, _Period2 > >::type operator+(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
_Tp abs(const complex< _Tp > &)
Return magnitude of z.
Define a member typedef type only if a boolean constant is true.
constexpr const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.