20# include <type_traits>
28#ifndef FMT_SAFE_DURATION_CAST
29# define FMT_SAFE_DURATION_CAST 1
31#if FMT_SAFE_DURATION_CAST
39namespace safe_duration_cast {
41template <
typename To,
typename From,
43 std::numeric_limits<From>::is_signed ==
44 std::numeric_limits<To>::is_signed)>
48 using F = std::numeric_limits<From>;
49 using T = std::numeric_limits<To>;
50 static_assert(F::is_integer,
"From must be integral");
51 static_assert(T::is_integer,
"To must be integral");
58 if (
from < (T::min)() ||
from > (T::max)()) {
64 return static_cast<To
>(
from);
69template <
typename To,
typename From,
71 std::numeric_limits<From>::is_signed !=
72 std::numeric_limits<To>::is_signed)>
76 using F = std::numeric_limits<From>;
77 using T = std::numeric_limits<To>;
78 static_assert(F::is_integer,
"From must be integral");
79 static_assert(T::is_integer,
"To must be integral");
83 if (fmt::detail::is_negative(
from)) {
96 F::digits >= T::digits) &&
101 return static_cast<To
>(
from);
104template <
typename To,
typename From,
126template <
typename To,
typename From,
130 using T = std::numeric_limits<To>;
131 static_assert(std::is_floating_point<From>::value,
"From must be floating");
132 static_assert(std::is_floating_point<To>::value,
"To must be floating");
135 if (std::isfinite(
from)) {
136 if (
from >= T::lowest() &&
from <= (T::max)()) {
137 return static_cast<To
>(
from);
145 return static_cast<To
>(
from);
148template <
typename To,
typename From,
152 static_assert(std::is_floating_point<From>::value,
"From must be floating");
157template <
typename To,
typename FromRep,
typename FromPeriod,
159 FMT_ENABLE_IF(std::is_floating_point<typename To::rep>::value)>
160auto safe_duration_cast(std::chrono::duration<FromRep, FromPeriod>
from,
162 using From = std::chrono::duration<FromRep, FromPeriod>;
164 if (std::isnan(
from.count())) {
166 return To{std::numeric_limits<typename To::rep>::quiet_NaN()};
172 if (std::isinf(
from.count())) {
173 return To{
from.count()};
179 : std::ratio_divide<typename From::period, typename To::period> {};
181 static_assert(Factor::num > 0,
"num must be positive");
182 static_assert(Factor::den > 0,
"den must be positive");
188 using IntermediateRep =
189 typename std::common_type<
typename From::rep,
typename To::rep,
190 decltype(Factor::num)>::type;
194 IntermediateRep count =
195 safe_float_conversion<IntermediateRep>(
from.count(), ec);
203 static_cast<IntermediateRep
>(Factor::num);
208 constexpr auto min1 = std::numeric_limits<IntermediateRep>::lowest() /
209 static_cast<IntermediateRep
>(Factor::num);
214 count *=
static_cast<IntermediateRep
>(Factor::num);
219 using common_t =
typename std::common_type<IntermediateRep, intmax_t>::type;
220 count /=
static_cast<common_t
>(Factor::den);
224 using ToRep =
typename To::rep;
226 const ToRep tocount = safe_float_conversion<ToRep>(count, ec);
238#ifdef FMT_USE_UTC_TIME
240#elif defined(__cpp_lib_chrono)
241# define FMT_USE_UTC_TIME (__cpp_lib_chrono >= 201907L)
243# define FMT_USE_UTC_TIME 0
246using utc_clock = std::chrono::utc_clock;
254#ifdef FMT_USE_LOCAL_TIME
256#elif defined(__cpp_lib_chrono)
257# define FMT_USE_LOCAL_TIME (__cpp_lib_chrono >= 201907L)
259# define FMT_USE_LOCAL_TIME 0
261#if FMT_USE_LOCAL_TIME
262using local_t = std::chrono::local_t;
269template <
typename Duration>
270using sys_time = std::chrono::time_point<std::chrono::system_clock, Duration>;
272template <
typename Duration>
273using utc_time = std::chrono::time_point<detail::utc_clock, Duration>;
275template <
class Duration>
276using local_time = std::chrono::time_point<detail::local_t, Duration>;
284template <
typename T =
void>
struct null {};
292template <
typename StreamBuf>
class formatbuf :
public StreamBuf {
294 using char_type =
typename StreamBuf::char_type;
295 using streamsize =
decltype(std::declval<StreamBuf>().sputn(
nullptr, 0));
296 using int_type =
typename StreamBuf::int_type;
297 using traits_type =
typename StreamBuf::traits_type;
312 if (!traits_type::eq_int_type(ch, traits_type::eof()))
313 buffer_.
push_back(
static_cast<char_type
>(ch));
317 auto xsputn(
const char_type* s, streamsize
count) -> streamsize
override {
324 static const auto&
locale = std::locale::classic();
334template <
typename CodeUnit>
336 const std::locale& loc) {
339 auto& f = std::use_facet<std::codecvt<CodeUnit, char, std::mbstate_t>>(loc);
341 auto mb = std::mbstate_t();
342 const char* from_next =
nullptr;
343 auto result = f.in(mb, in.begin(), in.end(), from_next, std::begin(out.buf),
344 std::end(out.buf), out.end);
345 if (result != std::codecvt_base::ok)
346 FMT_THROW(format_error(
"failed to format time"));
349template <
typename OutputIt>
355#if FMT_MSC_VERSION != 0 || \
356 (defined(__GLIBCXX__) && \
357 (!defined(_GLIBCXX_USE_DUAL_ABI) || _GLIBCXX_USE_DUAL_ABI == 0))
360 using code_unit = wchar_t;
362 using code_unit = char32_t;
371 if (!u.convert({unit.buf, to_unsigned(unit.end - unit.buf)}))
372 FMT_THROW(format_error(
"failed to format time"));
373 return copy<char>(u.c_str(), u.c_str() + u.size(), out);
375 return copy<char>(in.data(), in.data() + in.size(), out);
378template <
typename Char,
typename OutputIt,
387template <
typename Char,
typename OutputIt,
394template <
typename Char>
396 const std::locale& loc,
char format,
char modifier) {
398 auto&& os = std::basic_ostream<Char>(&format_buf);
400 const auto& facet = std::use_facet<std::time_put<Char>>(loc);
401 auto end = facet.put(os, os, Char(
' '), &time,
format, modifier);
402 if (end.failed())
FMT_THROW(format_error(
"failed to format time"));
405template <
typename Char,
typename OutputIt,
407auto write(OutputIt out,
const std::tm& time,
const std::locale& loc,
408 char format,
char modifier = 0) -> OutputIt {
414template <
typename Char,
typename OutputIt,
416auto write(OutputIt out,
const std::tm& time,
const std::locale& loc,
417 char format,
char modifier = 0) -> OutputIt {
423template <
typename T,
typename U>
425 bool_constant<(std::is_integral<T>::value && std::is_integral<U>::value) ||
426 (std::is_floating_point<T>::value &&
427 std::is_floating_point<U>::value)>;
430 FMT_THROW(format_error(
"cannot format duration"));
434template <
typename To,
typename FromRep,
typename FromPeriod,
436 std::is_integral<typename To::rep>::value)>
438#if !FMT_SAFE_DURATION_CAST
439 return std::chrono::duration_cast<To>(
from);
442 using factor = std::ratio_divide<FromPeriod, typename To::period>;
444 using common_rep =
typename std::common_type<FromRep,
typename To::rep,
445 decltype(factor::num)>::type;
448 auto count = safe_duration_cast::lossless_integral_conversion<common_rep>(
455 const auto min = (std::numeric_limits<common_rep>::min)() / factor::num;
458 count *= factor::num;
462 To(safe_duration_cast::lossless_integral_conversion<typename To::rep>(
469template <
typename To,
typename FromRep,
typename FromPeriod,
471 std::is_floating_point<typename To::rep>::value)>
473#if FMT_SAFE_DURATION_CAST
477 To to = safe_duration_cast::safe_duration_cast<To>(
from, ec);
482 return std::chrono::duration_cast<To>(
from);
486template <
typename To,
typename FromRep,
typename FromPeriod,
488 !is_similar_arithmetic_type<FromRep, typename To::rep>::value)>
491 return std::chrono::duration_cast<To>(
from);
494template <
typename Duration>
500 time_point.time_since_epoch())
508 template <
typename Duration,
typename LocalTime>
517template <
typename... T>
void _tzset(T...) {}
522 static bool init = []() {
543 inline dispatcher(std::time_t t) : time_(t) {}
545 inline auto run() ->
bool {
546 using namespace fmt::detail;
547 return handle(localtime_r(&time_, &tm_));
550 inline auto handle(std::tm* tm) ->
bool {
return tm !=
nullptr; }
553 using namespace fmt::detail;
554 return fallback(localtime_s(&tm_, &time_));
557 inline auto fallback(
int res) ->
bool {
return res == 0; }
561 using namespace fmt::detail;
562 std::tm* tm = std::localtime(&time_);
564 return tm !=
nullptr;
570 if (!lt.run())
FMT_THROW(format_error(
"time_t value out of range"));
574#if FMT_USE_LOCAL_TIME
575template <
typename Duration>
578 using namespace std::chrono;
589inline auto gmtime(std::time_t time) -> std::tm {
594 inline dispatcher(std::time_t t) : time_(t) {}
596 inline auto run() ->
bool {
597 using namespace fmt::detail;
598 return handle(gmtime_r(&time_, &tm_));
601 inline auto handle(std::tm* tm) ->
bool {
return tm !=
nullptr; }
604 using namespace fmt::detail;
605 return fallback(gmtime_s(&tm_, &time_));
608 inline auto fallback(
int res) ->
bool {
return res == 0; }
612 std::tm* tm = std::gmtime(&time_);
614 return tm !=
nullptr;
618 auto gt = dispatcher(time);
620 if (!gt.run())
FMT_THROW(format_error(
"time_t value out of range"));
624template <
typename Duration>
635 unsigned c,
char sep) {
636 unsigned long long digits =
637 a | (b << 24) | (static_cast<unsigned long long>(c) << 48);
647 digits += (((digits * 205) >> 11) & 0x000f00000f00000f) * 6;
649 digits = ((digits & 0x00f00000f00000f0) >> 4) |
650 ((digits & 0x000f00000f00000f) << 8);
651 auto usep =
static_cast<unsigned long long>(sep);
653 digits |= 0x3030003030003030 | (usep << 16) | (usep << 40);
655 constexpr size_t len = 8;
658 std::memcpy(tmp, &digits, len);
659 std::reverse_copy(tmp, tmp + len, buf);
661 std::memcpy(buf, &digits, len);
665template <
typename Period>
667 if (std::is_same<Period, std::atto>::value)
return "as";
668 if (std::is_same<Period, std::femto>::value)
return "fs";
669 if (std::is_same<Period, std::pico>::value)
return "ps";
670 if (std::is_same<Period, std::nano>::value)
return "ns";
671 if (std::is_same<Period, std::micro>::value)
673 if (std::is_same<Period, std::milli>::value)
return "ms";
674 if (std::is_same<Period, std::centi>::value)
return "cs";
675 if (std::is_same<Period, std::deci>::value)
return "ds";
676 if (std::is_same<Period, std::ratio<1>>
::value)
return "s";
677 if (std::is_same<Period, std::deca>::value)
return "das";
678 if (std::is_same<Period, std::hecto>::value)
return "hs";
679 if (std::is_same<Period, std::kilo>::value)
return "ks";
680 if (std::is_same<Period, std::mega>::value)
return "Ms";
681 if (std::is_same<Period, std::giga>::value)
return "Gs";
682 if (std::is_same<Period, std::tera>::value)
return "Ts";
683 if (std::is_same<Period, std::peta>::value)
return "Ps";
684 if (std::is_same<Period, std::exa>::value)
return "Es";
685 if (std::is_same<Period, std::ratio<60>>
::value)
return "min";
686 if (std::is_same<Period, std::ratio<3600>>
::value)
return "h";
687 if (std::is_same<Period, std::ratio<86400>>
::value)
return "d";
707template <
typename OutputIt>
713template <
typename OutputIt>
720template <
typename Char,
typename Handler>
722 Handler&& handler) ->
const Char* {
723 if (begin == end || *begin ==
'}')
return begin;
724 if (*begin !=
'%')
FMT_THROW(format_error(
"invalid format"));
734 if (begin !=
ptr) handler.on_text(begin,
ptr);
736 if (
ptr == end)
FMT_THROW(format_error(
"invalid format"));
748 if (
ptr == end)
FMT_THROW(format_error(
"invalid format"));
751 case '%': handler.on_text(
ptr - 1,
ptr);
break;
753 const Char newline[] = {
'\n'};
754 handler.on_text(newline, newline + 1);
758 const Char tab[] = {
'\t'};
759 handler.on_text(tab, tab + 1);
766 case 'G': handler.on_iso_week_based_year();
break;
767 case 'g': handler.on_iso_week_based_short_year();
break;
769 case 'a': handler.on_abbr_weekday();
break;
770 case 'A': handler.on_full_weekday();
break;
775 case 'h': handler.on_abbr_month();
break;
776 case 'B': handler.on_full_month();
break;
786 case 'j': handler.on_day_of_year(pad);
break;
800 case 'D': handler.on_us_date();
break;
801 case 'F': handler.on_iso_date();
break;
802 case 'r': handler.on_12_hour_time();
break;
803 case 'R': handler.on_24_hour_time();
break;
804 case 'T': handler.on_iso_time();
break;
805 case 'p': handler.on_am_pm();
break;
806 case 'Q': handler.on_duration_value();
break;
807 case 'q': handler.on_duration_unit();
break;
809 case 'Z': handler.on_tz_name();
break;
812 if (
ptr == end)
FMT_THROW(format_error(
"invalid format"));
816 case 'y': handler.on_offset_year();
break;
822 default:
FMT_THROW(format_error(
"invalid format"));
827 if (
ptr == end)
FMT_THROW(format_error(
"invalid format"));
854 default:
FMT_THROW(format_error(
"invalid format"));
857 default:
FMT_THROW(format_error(
"invalid format"));
861 if (begin !=
ptr) handler.on_text(begin,
ptr);
916 bool has_timezone_ =
false;
920 : has_timezone_(has_timezone) {}
926 template <
typename Char>
960 if (!has_timezone_)
FMT_THROW(format_error(
"no timezone"));
963 if (!has_timezone_)
FMT_THROW(format_error(
"no timezone"));
968 static constexpr const char* full_name_list[] = {
969 "Sunday",
"Monday",
"Tuesday",
"Wednesday",
970 "Thursday",
"Friday",
"Saturday"};
971 return wday >= 0 && wday <= 6 ? full_name_list[wday] :
"?";
974 static constexpr const char* short_name_list[] = {
"Sun",
"Mon",
"Tue",
"Wed",
975 "Thu",
"Fri",
"Sat"};
976 return wday >= 0 && wday <= 6 ? short_name_list[wday] :
"???";
980 static constexpr const char* full_name_list[] = {
981 "January",
"February",
"March",
"April",
"May",
"June",
982 "July",
"August",
"September",
"October",
"November",
"December"};
983 return mon >= 0 && mon <= 11 ? full_name_list[mon] :
"?";
986 static constexpr const char* short_name_list[] = {
987 "Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
988 "Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
990 return mon >= 0 && mon <= 11 ? short_name_list[mon] :
"???";
993template <
typename T,
typename =
void>
998template <
typename T,
typename =
void>
struct has_tm_zone : std::false_type {};
1002template <
typename T, FMT_ENABLE_IF(has_tm_zone<T>::value)>
1007template <
typename T, FMT_ENABLE_IF(!has_tm_zone<T>::value)>
1013 static char tz[] =
"UTC";
1018template <
typename T,
typename Int, FMT_ENABLE_IF(std::is_
integral<T>::value)>
1020 if (!std::is_unsigned<Int>::value &&
1022 FMT_THROW(format_error(
"chrono value is out of range"));
1024 return static_cast<Int
>(
value);
1026template <
typename T,
typename Int, FMT_ENABLE_IF(!std::is_
integral<T>::value)>
1028 auto int_value =
static_cast<Int
>(
value);
1029 if (int_value < 0 || value >
static_cast<T
>(upper))
1030 FMT_THROW(format_error(
"invalid value"));
1034constexpr auto pow10(std::uint32_t n) ->
long long {
1035 return n == 0 ? 1 : 10 *
pow10(n - 1);
1041template <
long long Num,
long long Den,
int N = 0,
1042 bool Enabled = (N < 19) && (Num <= max_value<long long>() / 10)>
1050template <
long long Num,
long long Den,
int N>
1052 static constexpr int value = (Num % Den == 0) ? N : 6;
1057template <
typename Char,
typename OutputIt,
typename Duration>
1059 constexpr auto num_fractional_digits =
1061 Duration::period::den>
::value;
1063 using subsecond_precision = std::chrono::duration<
1064 typename std::common_type<
typename Duration::rep,
1065 std::chrono::seconds::rep>
::type,
1066 std::ratio<1,
pow10(num_fractional_digits)>>;
1069 const auto subseconds =
1070 std::chrono::treat_as_floating_point<
1071 typename subsecond_precision::rep>
::value
1072 ? fractional.count()
1077 int leading_zeroes = (std::max)(0, num_fractional_digits - num_digits);
1079 FMT_ASSERT(!std::is_floating_point<typename Duration::rep>::value,
"");
1080 if (std::ratio_less<
typename subsecond_precision::period,
1081 std::chrono::seconds::period>
::value) {
1089 int remaining =
precision - leading_zeroes;
1091 if (remaining < num_digits) {
1092 int num_truncated_digits = num_digits - remaining;
1099 remaining -= num_digits;
1108template <
typename Duration>
1110 int num_fractional_digits = -1) {
1111 using rep =
typename Duration::rep;
1112 FMT_ASSERT(std::is_floating_point<rep>::value,
"");
1114 auto val = duration.count();
1116 if (num_fractional_digits < 0) {
1119 using namespace std;
1120 num_fractional_digits =
1122 Duration::period::den>
::value;
1123 if (num_fractional_digits < 6 &&
static_cast<rep
>(round(val)) != val)
1124 num_fractional_digits = 6;
1127 fmt::format_to(std::back_inserter(buf),
FMT_STRING(
"{:.{}f}"),
1128 std::fmod(val *
static_cast<rep
>(Duration::period::num) /
1129 static_cast<rep
>(Duration::period::den),
1130 static_cast<rep
>(60)),
1131 num_fractional_digits);
1134template <
typename OutputIt,
typename Char,
1135 typename Duration = std::chrono::seconds>
1138 static constexpr int days_per_week = 7;
1140 const std::locale& loc_;
1143 const Duration* subsecs_;
1146 auto tm_sec()
const noexcept ->
int {
1147 FMT_ASSERT(tm_.tm_sec >= 0 && tm_.tm_sec <= 61,
"");
1150 auto tm_min()
const noexcept ->
int {
1151 FMT_ASSERT(tm_.tm_min >= 0 && tm_.tm_min <= 59,
"");
1154 auto tm_hour()
const noexcept ->
int {
1155 FMT_ASSERT(tm_.tm_hour >= 0 && tm_.tm_hour <= 23,
"");
1158 auto tm_mday()
const noexcept ->
int {
1159 FMT_ASSERT(tm_.tm_mday >= 1 && tm_.tm_mday <= 31,
"");
1162 auto tm_mon()
const noexcept ->
int {
1163 FMT_ASSERT(tm_.tm_mon >= 0 && tm_.tm_mon <= 11,
"");
1166 auto tm_year()
const noexcept ->
long long {
return 1900ll + tm_.tm_year; }
1167 auto tm_wday()
const noexcept ->
int {
1168 FMT_ASSERT(tm_.tm_wday >= 0 && tm_.tm_wday <= 6,
"");
1171 auto tm_yday()
const noexcept ->
int {
1172 FMT_ASSERT(tm_.tm_yday >= 0 && tm_.tm_yday <= 365,
"");
1176 auto tm_hour12()
const noexcept ->
int {
1178 auto z = h < 12 ? h : h - 12;
1179 return z == 0 ? 12 : z;
1186 auto split_year_lower(
long long year)
const noexcept ->
int {
1187 auto l =
year % 100;
1189 return static_cast<int>(l);
1193 auto iso_year_weeks(
long long curr_year)
const noexcept ->
int {
1194 auto prev_year = curr_year - 1;
1196 (curr_year + curr_year / 4 - curr_year / 100 + curr_year / 400) %
1199 (prev_year + prev_year / 4 - prev_year / 100 + prev_year / 400) %
1201 return 52 + ((curr_p == 4 || prev_p == 3) ? 1 : 0);
1203 auto iso_week_num(
int tm_yday,
int tm_wday)
const noexcept ->
int {
1204 return (tm_yday + 11 - (tm_wday == 0 ? days_per_week : tm_wday)) /
1207 auto tm_iso_week_year()
const noexcept ->
long long {
1208 auto year = tm_year();
1209 auto w = iso_week_num(tm_yday(), tm_wday());
1210 if (w < 1)
return year - 1;
1211 if (w > iso_year_weeks(
year))
return year + 1;
1214 auto tm_iso_week_of_year()
const noexcept ->
int {
1215 auto year = tm_year();
1216 auto w = iso_week_num(tm_yday(), tm_wday());
1217 if (w < 1)
return iso_year_weeks(
year - 1);
1218 if (w > iso_year_weeks(
year))
return 1;
1222 void write1(
int value) {
1225 void write2(
int value) {
1238 *out_++ =
static_cast<char>(
'0' + v);
1242 void write_year_extended(
long long year,
pad_type pad) {
1245 bool negative =
year < 0;
1253 if (
width > num_digits)
1259 write_year_extended(
year, pad);
1270 write2(
static_cast<int>(offset / 60));
1272 write2(
static_cast<int>(offset % 60));
1275 template <
typename T, FMT_ENABLE_IF(has_tm_gmtoff<T>::value)>
1277 write_utc_offset(tm.tm_gmtoff, ns);
1279 template <
typename T, FMT_ENABLE_IF(!has_tm_gmtoff<T>::value)>
1281 write_utc_offset(0, ns);
1284 template <
typename T, FMT_ENABLE_IF(has_tm_zone<T>::value)>
1285 void format_tz_name(
const T& tm) {
1288 template <
typename T, FMT_ENABLE_IF(!has_tm_zone<T>::value)>
1289 void format_tz_name(
const T&) {
1290 out_ = std::copy_n(
utc(), 3, out_);
1293 void format_localized(
char format,
char modifier = 0) {
1298 tm_writer(
const std::locale& loc, OutputIt out,
const std::tm& tm,
1299 const Duration* subsecs =
nullptr)
1306 auto out() const -> OutputIt {
return out_; }
1316 format_localized(
'a');
1322 format_localized(
'A');
1326 format_localized(
'w',
'O');
1330 auto wday = tm_wday();
1331 write1(wday == 0 ? days_per_week : wday);
1333 format_localized(
'u',
'O');
1341 format_localized(
'b');
1347 format_localized(
'B');
1382 out_ =
copy<Char>(std::begin(buf), std::end(buf), out_);
1385 auto year = tm_year();
1398 out_ =
copy<Char>(std::begin(buf) + offset, std::end(buf), out_);
1406 return write_year(tm_year(), pad);
1407 format_localized(
'Y',
'E');
1411 return write2(split_year_lower(tm_year()));
1412 format_localized(
'y',
'O');
1415 if (is_classic_)
return write2(split_year_lower(tm_year()));
1416 format_localized(
'y',
'E');
1421 auto year = tm_year();
1422 auto upper =
year / 100;
1427 }
else if (upper >= 0 && upper < 100) {
1428 write2(
static_cast<int>(upper));
1433 format_localized(
'C',
'E');
1439 return write2(tm_mon() + 1, pad);
1440 format_localized(
'm',
'O');
1445 return write2((tm_yday() + days_per_week - tm_wday()) / days_per_week,
1447 format_localized(
'U',
'O');
1451 auto wday = tm_wday();
1452 write2((tm_yday() + days_per_week -
1453 (wday == 0 ? (days_per_week - 1) : (wday - 1))) /
1457 format_localized(
'W',
'O');
1462 return write2(tm_iso_week_of_year(), pad);
1463 format_localized(
'V',
'O');
1470 write2(split_year_lower(tm_iso_week_year()));
1474 auto yday = tm_yday() + 1;
1475 auto digit1 = yday / 100;
1480 write2(yday % 100, pad);
1485 return write2(tm_mday(), pad);
1486 format_localized(
'd',
'O');
1491 return write2(tm_hour(), pad);
1492 format_localized(
'H',
'O');
1496 return write2(tm_hour12(), pad);
1497 format_localized(
'I',
'O');
1501 return write2(tm_min(), pad);
1502 format_localized(
'M',
'O');
1507 write2(tm_sec(), pad);
1509 if (std::is_floating_point<typename Duration::rep>::value) {
1512 if (buf.size() > 1) {
1514 out_ =
copy<Char>(buf.begin() + 1, buf.end(), out_);
1522 format_localized(
'S',
'O');
1531 out_ =
copy<Char>(std::begin(buf), std::end(buf), out_);
1535 format_localized(
'r');
1551 *out_++ = tm_hour() < 12 ?
'A' :
'P';
1554 format_localized(
'p');
1568 template <
typename Char>
1581 FMT_THROW(format_error(
"precision not allowed for this argument type"));
1586template <
typename T,
1592template <
typename T, FMT_ENABLE_IF(std::is_
integral<T>::value)>
1593inline auto mod(T x,
int y) -> T {
1594 return x %
static_cast<T
>(y);
1596template <
typename T, FMT_ENABLE_IF(std::is_
floating_po
int<T>::value)>
1597inline auto mod(T x,
int y) -> T {
1598 return std::fmod(x,
static_cast<T
>(y));
1603template <typename T, bool INTEGRAL = std::is_integral<T>::value>
1609 using type =
typename std::make_unsigned<T>::type;
1612template <
typename Rep,
typename Period,
1615 -> std::chrono::duration<Rep, std::milli> {
1617#if FMT_SAFE_DURATION_CAST
1618 using common_seconds_type =
1619 typename std::common_type<
decltype(d), std::chrono::seconds>::type;
1621 auto d_as_whole_seconds =
1624 auto diff = d_as_common - d_as_whole_seconds;
1633template <
typename Char,
typename Rep,
typename OutputIt,
1639template <
typename Char,
typename Rep,
typename OutputIt,
1649template <
typename Char,
typename OutputIt>
1651 return copy<Char>(unit.begin(), unit.end(), out);
1654template <
typename OutputIt>
1662template <
typename Char,
typename Period,
typename OutputIt>
1682 bool has_locale_ =
false;
1687 ::new (&
locale_) std::locale(loc.template get<std::locale>());
1690 if (has_locale_)
locale_.~locale();
1692 inline operator const std::locale&()
const {
1697template <
typename Char,
typename Rep,
typename Period>
1719 if (d.count() < 0) {
1739 std::copy_n(
"inf", 3, out);
1741 std::copy_n(
"-inf", 4, out);
1745 auto days() const -> Rep {
return static_cast<Rep
>(
s.count() / 86400); }
1747 return static_cast<Rep
>(
mod((
s.count() / 3600), 24));
1751 Rep
hour =
static_cast<Rep
>(
mod((
s.count() / 3600), 12));
1756 return static_cast<Rep
>(
mod((
s.count() / 60), 60));
1758 auto second() const -> Rep {
return static_cast<Rep
>(
mod(
s.count(), 60)); }
1761 auto time = std::tm();
1780 if (
width > num_digits) {
1788 template <
typename Callback,
typename... Args>
1797 void on_text(
const Char* begin,
const Char* end) {
1863 if (std::is_floating_point<rep>::value) {
1868 if (buf.size() < 2 || buf[1] ==
'.')
1870 out =
copy<Char>(buf.begin(), buf.end(), out);
1874 out, std::chrono::duration<rep, Period>(
val),
precision);
1923#if defined(__cpp_lib_chrono) && __cpp_lib_chrono >= 201907
1924using weekday = std::chrono::weekday;
1925using day = std::chrono::day;
1926using month = std::chrono::month;
1927using year = std::chrono::year;
1933 unsigned char value_;
1938 : value_(
static_cast<unsigned char>(wd != 7 ? wd : 0)) {}
1939 constexpr auto c_encoding() const noexcept ->
unsigned {
return value_; }
1944 unsigned char value_;
1948 constexpr explicit day(
unsigned d) noexcept
1949 : value_(
static_cast<unsigned char>(d)) {}
1950 constexpr explicit operator unsigned() const noexcept {
return value_; }
1955 unsigned char value_;
1959 constexpr explicit month(
unsigned m) noexcept
1960 : value_(
static_cast<unsigned char>(m)) {}
1961 constexpr explicit operator unsigned() const noexcept {
return value_; }
1970 constexpr explicit year(
int y) noexcept : value_(y) {}
1971 constexpr explicit operator int() const noexcept {
return value_; }
1983 : year_(y), month_(m), day_(d) {}
1984 constexpr auto year() const noexcept -> fmt::
year {
return year_; }
1985 constexpr auto month() const noexcept -> fmt::
month {
return month_; }
1986 constexpr auto day() const noexcept -> fmt::
day {
return day_; }
1990template <
typename Char>
1993 bool use_tm_formatter_ =
false;
1997 auto it = ctx.begin(), end = ctx.end();
1998 if (it != end && *it ==
'L') {
2000 this->set_localized();
2002 use_tm_formatter_ = it != end && *it !=
'}';
2006 template <
typename FormatContext>
2008 auto time = std::tm();
2009 time.tm_wday =
static_cast<int>(wd.c_encoding());
2013 w.on_abbr_weekday();
2018template <
typename Char>
2021 bool use_tm_formatter_ =
false;
2025 auto it = ctx.begin(), end = ctx.end();
2026 use_tm_formatter_ = it != end && *it !=
'}';
2030 template <
typename FormatContext>
2031 auto format(
day d, FormatContext& ctx)
const ->
decltype(ctx.out()) {
2032 auto time = std::tm();
2033 time.tm_mday =
static_cast<int>(
static_cast<unsigned>(d));
2042template <
typename Char>
2045 bool use_tm_formatter_ =
false;
2049 auto it = ctx.begin(), end = ctx.end();
2050 if (it != end && *it ==
'L') {
2052 this->set_localized();
2054 use_tm_formatter_ = it != end && *it !=
'}';
2058 template <
typename FormatContext>
2059 auto format(
month m, FormatContext& ctx)
const ->
decltype(ctx.out()) {
2060 auto time = std::tm();
2061 time.tm_mon =
static_cast<int>(
static_cast<unsigned>(m)) - 1;
2070template <
typename Char>
2073 bool use_tm_formatter_ =
false;
2077 auto it = ctx.begin(), end = ctx.end();
2078 use_tm_formatter_ = it != end && *it !=
'}';
2082 template <
typename FormatContext>
2083 auto format(
year y, FormatContext& ctx)
const ->
decltype(ctx.out()) {
2084 auto time = std::tm();
2085 time.tm_year =
static_cast<int>(y) - 1900;
2094template <
typename Char>
2097 bool use_tm_formatter_ =
false;
2101 auto it = ctx.begin(), end = ctx.end();
2102 use_tm_formatter_ = it != end && *it !=
'}';
2106 template <
typename FormatContext>
2108 ->
decltype(ctx.out()) {
2109 auto time = std::tm();
2110 time.tm_year =
static_cast<int>(val.year()) - 1900;
2111 time.tm_mon =
static_cast<int>(
static_cast<unsigned>(val.month())) - 1;
2112 time.tm_mday =
static_cast<int>(
static_cast<unsigned>(val.day()));
2121template <
typename Rep,
typename Period,
typename Char>
2131 auto it = ctx.begin(), end = ctx.end();
2132 if (it == end || *it ==
'}')
return it;
2135 if (it == end)
return it;
2138 if ((c >=
'0' && c <=
'9') || c ==
'{') {
2140 if (it == end)
return it;
2145 checker.has_precision_integral = !std::is_floating_point<Rep>::value;
2148 if (it != end && *it ==
'L') {
2157 template <
typename FormatContext>
2158 auto format(std::chrono::duration<Rep, Period> d, FormatContext& ctx)
const
2159 ->
decltype(ctx.out()) {
2160 auto specs = specs_;
2161 auto precision = specs.precision;
2162 specs.precision = -1;
2163 auto begin = fmt_.
begin(), end = fmt_.
end();
2171 precision_ref_, ctx);
2172 if (begin == end || *begin ==
'}') {
2178 f.precision = precision;
2200 auto it = ctx.begin(), end = ctx.end();
2201 if (it == end || *it ==
'}')
return it;
2204 if (it == end)
return it;
2207 if ((c >=
'0' && c <=
'9') || c ==
'{') {
2209 if (it == end)
return it;
2224 template <
typename Duration,
typename FormatContext>
2226 const Duration* subsecs)
const ->
decltype(ctx.out()) {
2227 auto specs = specs_;
2236 loc, out, tm, subsecs);
2247 template <
typename FormatContext>
2248 auto format(
const std::tm& tm, FormatContext& ctx)
const
2249 ->
decltype(ctx.out()) {
2250 return do_format<std::chrono::seconds>(tm, ctx,
nullptr);
2255template <
typename Char,
typename Duration>
2258 return this->do_parse(ctx,
true);
2261 template <
typename FormatContext>
2263 ->
decltype(ctx.out()) {
2264 std::tm tm =
gmtime(val);
2265 using period =
typename Duration::period;
2267 period::num == 1 && period::den == 1 &&
2268 !std::is_floating_point<typename Duration::rep>::value)) {
2272 Duration epoch = val.time_since_epoch();
2275 if (subsecs.count() < 0) {
2277 if (tm.tm_sec != 0) {
2280 tm =
gmtime(val - second);
2289template <
typename Duration,
typename Char>
2292 template <
typename FormatContext>
2294 ->
decltype(ctx.out()) {
2300template <
typename Duration,
typename Char>
2304 return this->do_parse(ctx,
false);
2307 template <
typename FormatContext>
2309 ->
decltype(ctx.out()) {
2310 auto time_since_epoch = val.time_since_epoch();
2311 auto seconds_since_epoch =
2315 std::tm t =
gmtime(seconds_since_epoch.count());
2316 using period =
typename Duration::period;
2317 if (period::num == 1 && period::den == 1 &&
2318 !std::is_floating_point<typename Duration::rep>::value) {
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or glfw and nanopb were modified for use in Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation and configuration files Object form shall mean any form resulting from mechanical transformation or translation of a Source including but not limited to compiled object generated and conversions to other media types Work shall mean the work of whether in Source or Object made available under the as indicated by a copyright notice that is included in or attached to the whether in Source or Object that is based or other modifications as a an original work of authorship For the purposes of this Derivative Works shall not include works that remain separable from
Definition ThirdPartyNotices.txt:140
A dynamically growing memory buffer for trivially copyable/constructible types with the first SIZE el...
Definition format.h:774
constexpr auto localized() const -> bool
Definition base.h:801
FMT_CONSTEXPR void set_localized()
Definition base.h:804
constexpr auto end() const noexcept -> iterator
Definition base.h:566
constexpr auto begin() const noexcept -> iterator
Definition base.h:565
constexpr day(unsigned d) noexcept
Definition chrono.h:1948
A contiguous memory buffer with an optional growing ability.
Definition base.h:1746
FMT_CONSTEXPR20 void append(const U *begin, const U *end)
Appends data to the end of the buffer.
Definition base.h:1828
FMT_CONSTEXPR void push_back(const T &value)
Definition base.h:1815
get_locale(bool localized, locale_ref loc)
Definition chrono.h:1685
std::locale locale_
Definition chrono.h:1680
~get_locale()
Definition chrono.h:1689
void on_offset_year()
Definition chrono.h:1414
void on_12_hour_time()
Definition chrono.h:1526
void on_dec0_week_of_year(numeric_system ns, pad_type pad)
Definition chrono.h:1443
void on_abbr_month()
Definition chrono.h:1337
void on_iso_date()
Definition chrono.h:1384
void on_iso_week_based_year()
Definition chrono.h:1466
void on_dec_month(numeric_system ns, pad_type pad)
Definition chrono.h:1437
void on_abbr_weekday()
Definition chrono.h:1312
void on_am_pm()
Definition chrono.h:1549
void on_dec0_weekday(numeric_system ns)
Definition chrono.h:1324
tm_writer(const std::locale &loc, OutputIt out, const std::tm &tm, const Duration *subsecs=nullptr)
Definition chrono.h:1298
void on_us_date()
Definition chrono.h:1377
void on_iso_time()
Definition chrono.h:1543
void on_duration_unit()
Definition chrono.h:1560
void on_24_hour_time()
Definition chrono.h:1538
void on_second(numeric_system ns, pad_type pad)
Definition chrono.h:1505
void on_full_weekday()
Definition chrono.h:1318
void on_12_hour(numeric_system ns, pad_type pad)
Definition chrono.h:1494
FMT_CONSTEXPR void on_text(const Char *begin, const Char *end)
Definition chrono.h:1308
void on_loc_time(numeric_system ns)
Definition chrono.h:1371
auto out() const -> OutputIt
Definition chrono.h:1306
void on_day_of_month(numeric_system ns, pad_type pad)
Definition chrono.h:1483
void on_tz_name()
Definition chrono.h:1402
void on_day_of_year(pad_type pad)
Definition chrono.h:1473
void on_short_year(numeric_system ns)
Definition chrono.h:1409
void on_iso_week_based_short_year()
Definition chrono.h:1469
void on_century(numeric_system ns)
Definition chrono.h:1419
void on_dec1_week_of_year(numeric_system ns, pad_type pad)
Definition chrono.h:1449
void on_minute(numeric_system ns, pad_type pad)
Definition chrono.h:1499
void on_dec1_weekday(numeric_system ns)
Definition chrono.h:1328
void on_year(numeric_system ns, pad_type pad)
Definition chrono.h:1404
void on_loc_date(numeric_system ns)
Definition chrono.h:1365
void on_full_month()
Definition chrono.h:1343
void on_utc_offset(numeric_system ns)
Definition chrono.h:1401
void on_duration_value()
Definition chrono.h:1559
void on_24_hour(numeric_system ns, pad_type pad)
Definition chrono.h:1489
void on_datetime(numeric_system ns)
Definition chrono.h:1350
void on_iso_week_of_year(numeric_system ns, pad_type pad)
Definition chrono.h:1460
auto size() const -> size_t
Definition format.h:1265
auto c_str() const -> const wchar_t *
Definition format.h:1266
constexpr month(unsigned m) noexcept
Definition chrono.h:1959
Parsing context consisting of a format string range being parsed and an argument counter for automati...
Definition base.h:866
constexpr auto c_encoding() const noexcept -> unsigned
Definition chrono.h:1939
constexpr weekday(unsigned wd) noexcept
Definition chrono.h:1937
constexpr auto year() const noexcept -> fmt::year
Definition chrono.h:1984
constexpr year_month_day(const year &y, const month &m, const day &d) noexcept
Definition chrono.h:1982
constexpr auto month() const noexcept -> fmt::month
Definition chrono.h:1985
constexpr auto day() const noexcept -> fmt::day
Definition chrono.h:1986
constexpr year(int y) noexcept
Definition chrono.h:1970
#define FMT_NOMACRO
Definition chrono.h:282
std::chrono::time_point< detail::utc_clock, Duration > utc_time
Definition chrono.h:273
std::chrono::time_point< std::chrono::system_clock, Duration > sys_time
Definition chrono.h:270
std::chrono::time_point< detail::local_t, Duration > local_time
Definition chrono.h:276
auto gmtime(std::time_t time) -> std::tm
Converts given time since epoch as std::time_t value into calendar time, expressed in Coordinated Uni...
Definition chrono.h:589
FMT_BEGIN_EXPORT FMT_DEPRECATED auto localtime(std::time_t time) -> std::tm
Converts given time since epoch as std::time_t value into calendar time, expressed in local time.
Definition chrono.h:538
void _tzset(T...)
Definition chrono.h:517
auto current_zone(T...) -> time_zone *
Definition chrono.h:513
detail namespace with internal helper functions
Definition input_adapters.h:32
conditional_t< num_bits< T >()<=32 &&!FMT_REDUCE_INT_INSTANTIATIONS, uint32_t, conditional_t< num_bits< T >()<=64, uint64_t, uint128_t > > uint32_or_64_or_128_t
Definition format.h:978
auto get_iterator(Buf &buf, OutputIt) -> decltype(buf.out())
Definition base.h:2109
FMT_CONSTEXPR20 auto isfinite(T value) -> bool
Definition format.h:2575
auto tm_mon_short_name(int mon) -> const char *
Definition chrono.h:985
void write_floating_seconds(memory_buffer &buf, Duration duration, int num_fractional_digits=-1)
Definition chrono.h:1109
FMT_CONSTEXPR void ignore_unused(const T &...)
Definition base.h:363
FMT_CONSTEXPR auto parse_precision(const Char *begin, const Char *end, format_specs &specs, arg_ref< Char > &precision_ref, parse_context< Char > &ctx) -> const Char *
Definition base.h:1425
FMT_CONSTEXPR auto get_units() -> const char *
Definition chrono.h:666
auto is_big_endian() -> bool
Definition format.h:287
FMT_CONSTEXPR auto write(OutputIt out, Char value, const format_specs &specs, locale_ref loc={}) -> OutputIt
Definition format.h:1815
pad_type
Definition chrono.h:698
bool set_tm_zone(T &time, char *tz)
Definition chrono.h:1003
auto duration_cast(std::chrono::duration< FromRep, FromPeriod > from) -> To
Definition chrono.h:437
auto localtime_s(...) -> null<>
Definition chrono.h:286
void write_fractional_seconds(OutputIt &out, Duration d, int precision=-1)
Definition chrono.h:1058
auto format_duration_unit(OutputIt out) -> OutputIt
Definition chrono.h:1663
constexpr auto max_value() -> T
Definition format.h:424
@ value
the parser finished reading a JSON value
FMT_CONSTEXPR auto to_unsigned(Int value) -> make_unsigned_t< Int >
Definition base.h:437
numeric_system
Definition chrono.h:691
auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale &loc) -> OutputIt
Definition chrono.h:350
void do_write(buffer< Char > &buf, const std::tm &time, const std::locale &loc, char format, char modifier)
Definition chrono.h:395
@ use_utf8
Definition base.h:457
constexpr auto pow10(std::uint32_t n) -> long long
Definition chrono.h:1034
auto tm_wday_short_name(int wday) -> const char *
Definition chrono.h:973
auto to_time_t(sys_time< Duration > time_point) -> std::time_t
Definition chrono.h:495
auto digits2(size_t value) -> const char *
Definition format.h:992
auto get_classic_locale() -> const std::locale &
Definition chrono.h:323
FMT_CONSTEXPR auto fill_n(OutputIt out, Size count, const T &value) -> OutputIt
Definition format.h:549
auto mod(T x, int y) -> T
Definition chrono.h:1593
void write_digit2_separated(char *buf, unsigned a, unsigned b, unsigned c, char sep)
Definition chrono.h:634
FMT_ALWAYS_INLINE constexpr auto const_check(T val) -> T
Definition base.h:382
void tzset_once()
Definition chrono.h:521
FMT_CONSTEXPR auto parse_width(const Char *begin, const Char *end, format_specs &specs, arg_ref< Char > &width_ref, parse_context< Char > &ctx) -> const Char *
Definition base.h:1416
FMT_NORETURN void throw_duration_error()
Definition chrono.h:429
auto get_milliseconds(std::chrono::duration< Rep, Period > d) -> std::chrono::duration< Rep, std::milli >
Definition chrono.h:1614
auto tm_mon_full_name(int mon) -> const char *
Definition chrono.h:979
FMT_CONSTEXPR20 auto copy(InputIt begin, InputIt end, OutputIt out) -> OutputIt
Definition base.h:2051
auto gmtime_r(...) -> null<>
Definition chrono.h:287
typename make_void< Ts... >::type void_t
Definition void_t.h:21
FMT_CONSTEXPR auto parse_align(const Char *begin, const Char *end, format_specs &specs) -> const Char *
Definition format.h:2258
char * utc()
Definition chrono.h:1012
auto to_nonnegative_int(T value, Int upper) -> Int
Definition chrono.h:1019
auto copy_unit(string_view unit, OutputIt out, Char) -> OutputIt
Definition chrono.h:1650
auto write_padding(OutputIt out, pad_type pad, int width) -> OutputIt
Definition chrono.h:708
FMT_CONSTEXPR void handle_dynamic_spec(arg_id_kind kind, int &value, const arg_ref< typename Context::char_type > &ref, Context &ctx)
Definition format.h:3646
std::integral_constant< bool, Value > bool_constant
Definition type_traits.h:743
auto format_duration_value(OutputIt out, Rep val, int) -> OutputIt
Definition chrono.h:1635
type
Definition base.h:958
auto write_tm_str(OutputIt out, string_view sv, const std::locale &loc) -> OutputIt
Definition chrono.h:380
auto get_buffer(OutputIt out) -> iterator_buffer< OutputIt, T >
Definition base.h:2099
auto gmtime_s(...) -> null<>
Definition chrono.h:288
FMT_CONSTEXPR20 FMT_INLINE void write2digits(Char *out, size_t value)
Definition format.h:1162
constexpr auto count() -> int
Definition base.h:1054
FMT_CONSTEXPR20 auto count_digits(uint64_t n) -> int
Definition format.h:1052
auto tm_wday_full_name(int wday) -> const char *
Definition chrono.h:967
FMT_CONSTEXPR auto parse_chrono_format(const Char *begin, const Char *end, Handler &&handler) -> const Char *
Definition chrono.h:721
FMT_CONSTEXPR FMT_INLINE auto format_decimal(Char *out, UInt value, int num_digits) -> Char *
Definition format.h:1197
void write_codecvt(codecvt_result< CodeUnit > &out, string_view in, const std::locale &loc)
Definition chrono.h:335
constexpr auto isnan(T value) -> bool
Definition format.h:2562
bool_constant<(std::is_integral< T >::value &&std::is_integral< U >::value)||(std::is_floating_point< T >::value && std::is_floating_point< U >::value)> is_similar_arithmetic_type
Definition chrono.h:424
Definition PointerIntPair.h:280
CodeUnit * end
Definition chrono.h:331
static constexpr size_t max_size
Definition chrono.h:329
CodeUnit buf[max_size]
Definition chrono.h:330
Definition format-inl.h:92
typename std::make_unsigned< T >::type type
Definition chrono.h:1609
T type
Definition chrono.h:1605
FMT_CONSTEXPR void on_dec0_weekday(numeric_system)
Definition chrono.h:877
FMT_CONSTEXPR void on_iso_week_of_year(numeric_system, pad_type)
Definition chrono.h:888
FMT_CONSTEXPR void on_iso_date()
Definition chrono.h:903
FMT_CONSTEXPR void on_loc_date(numeric_system)
Definition chrono.h:900
FMT_CONSTEXPR void on_day_of_year(pad_type)
Definition chrono.h:891
FMT_CONSTEXPR void on_duration_value()
Definition chrono.h:908
FMT_CONSTEXPR void on_dec1_weekday(numeric_system)
Definition chrono.h:878
FMT_CONSTEXPR void on_12_hour(numeric_system)
Definition chrono.h:896
FMT_CONSTEXPR void on_duration_unit()
Definition chrono.h:909
FMT_CONSTEXPR void on_24_hour_time()
Definition chrono.h:905
FMT_CONSTEXPR void on_century(numeric_system)
Definition chrono.h:872
FMT_CONSTEXPR void on_minute(numeric_system)
Definition chrono.h:897
FMT_CONSTEXPR void on_utc_offset(numeric_system)
Definition chrono.h:910
FMT_CONSTEXPR void on_day_of_month(numeric_system, pad_type)
Definition chrono.h:892
FMT_CONSTEXPR void on_dec_month(numeric_system, pad_type)
Definition chrono.h:881
FMT_CONSTEXPR void on_iso_time()
Definition chrono.h:906
FMT_CONSTEXPR void on_datetime(numeric_system)
Definition chrono.h:899
FMT_CONSTEXPR void on_offset_year()
Definition chrono.h:871
FMT_CONSTEXPR void on_abbr_month()
Definition chrono.h:879
FMT_CONSTEXPR void on_second(numeric_system)
Definition chrono.h:898
FMT_CONSTEXPR void on_full_weekday()
Definition chrono.h:876
FMT_CONSTEXPR void on_iso_week_based_short_year()
Definition chrono.h:874
FMT_CONSTEXPR void on_us_date()
Definition chrono.h:902
FMT_CONSTEXPR void on_year(numeric_system, pad_type)
Definition chrono.h:869
FMT_CONSTEXPR void on_short_year(numeric_system)
Definition chrono.h:870
FMT_CONSTEXPR void on_tz_name()
Definition chrono.h:911
FMT_CONSTEXPR void on_dec1_week_of_year(numeric_system, pad_type)
Definition chrono.h:885
FMT_CONSTEXPR void on_12_hour_time()
Definition chrono.h:904
FMT_CONSTEXPR void on_full_month()
Definition chrono.h:880
FMT_CONSTEXPR void unsupported()
Definition chrono.h:866
FMT_CONSTEXPR void on_dec0_week_of_year(numeric_system, pad_type)
Definition chrono.h:882
FMT_CONSTEXPR void on_loc_time(numeric_system)
Definition chrono.h:901
FMT_CONSTEXPR void on_am_pm()
Definition chrono.h:907
FMT_CONSTEXPR void on_abbr_weekday()
Definition chrono.h:875
FMT_CONSTEXPR void on_iso_week_based_year()
Definition chrono.h:873
FMT_CONSTEXPR void on_24_hour(numeric_system)
Definition chrono.h:895
auto to_sys(LocalTime) -> sys_time< Duration >
Definition chrono.h:509
#define FMT_ASSERT(condition, message)
Definition base.h:396
#define FMT_END_EXPORT
Definition base.h:272
#define FMT_PRAGMA_CLANG(x)
Definition base.h:230
basic_string_view< char > string_view
Definition base.h:616
constexpr auto min_of(T a, T b) -> T
Definition base.h:352
#define FMT_CONSTEXPR
Definition base.h:113
#define FMT_BEGIN_NAMESPACE
Definition base.h:261
#define FMT_ENABLE_IF(...)
Definition base.h:349
#define FMT_BEGIN_EXPORT
Definition base.h:271
std::is_constructible< formatter< T, Char > > FMT_DEPRECATED
Definition base.h:2801
#define FMT_NORETURN
Definition base.h:193
typename std::conditional< B, T, F >::type conditional_t
Definition base.h:314
#define FMT_END_NAMESPACE
Definition base.h:264