@@ -448,8 +448,8 @@ template <typename T> constexpr const char* narrow(const T*) { return nullptr; }
448
448
constexpr FMT_ALWAYS_INLINE const char * narrow (const char * s) { return s; }
449
449
450
450
template <typename Char>
451
- FMT_CONSTEXPR auto compare (const Char* s1, const Char* s2, std:: size_t n)
452
- -> int {
451
+ FMT_CONSTEXPR auto compare (const Char* s1, const Char* s2,
452
+ std:: size_t n) -> int {
453
453
if (!is_constant_evaluated () && sizeof (Char) == 1 ) return memcmp (s1, s2, n);
454
454
for (; n != 0 ; ++s1, ++s2, --n) {
455
455
if (*s1 < *s2) return -1 ;
@@ -1088,16 +1088,16 @@ struct use_format_as_member<
1088
1088
T, bool_constant<std::is_arithmetic<format_as_member_result<T>>::value>>
1089
1089
: std::true_type {};
1090
1090
1091
- template <typename T, typename U = remove_const_t <T>>
1091
+ template <typename T, typename UT = remove_const_t <T>>
1092
1092
using use_formatter =
1093
1093
bool_constant<(std::is_class<T>::value || std::is_enum<T>::value ||
1094
1094
std::is_union<T>::value || std::is_array<T>::value) &&
1095
1095
!has_to_string_view<T>::value && !is_named_arg<T>::value &&
1096
1096
!use_format_as<T>::value && !use_format_as_member<T>::value>;
1097
1097
1098
- template <typename Char, typename T, typename U = remove_const_t <T>>
1098
+ template <typename Char, typename T, typename UT = remove_const_t <T>>
1099
1099
auto has_formatter_impl (T* p, buffered_context<Char>* ctx = nullptr )
1100
- -> decltype(formatter<U , Char>().format(*p, *ctx), std::true_type());
1100
+ -> decltype(formatter<UT , Char>().format(*p, *ctx), std::true_type());
1101
1101
template <typename Char> auto has_formatter_impl (...) -> std::false_type;
1102
1102
1103
1103
// T can be const-qualified to check if it is const-formattable.
@@ -1129,8 +1129,9 @@ template <typename Char> struct type_mapper {
1129
1129
-> conditional_t<N <= 64, unsigned long long, void>;
1130
1130
1131
1131
template <typename T, FMT_ENABLE_IF(is_char<T>::value)>
1132
- static auto map (T) -> conditional_t<
1133
- std::is_same<T, char>::value || std::is_same<T, Char>::value, Char, void>;
1132
+ static auto map (T) -> conditional_t<std::is_same<T, char>::value ||
1133
+ std::is_same<T, Char>::value,
1134
+ Char, void>;
1134
1135
1135
1136
static auto map (float ) -> float;
1136
1137
static auto map (double ) -> double;
@@ -1336,10 +1337,9 @@ template <typename Char> struct parse_dynamic_spec_result {
1336
1337
1337
1338
// Parses integer | "{" [arg_id] "}".
1338
1339
template <typename Char>
1339
- FMT_CONSTEXPR auto parse_dynamic_spec (const Char* begin, const Char* end,
1340
- int & value, arg_ref<Char>& ref,
1341
- parse_context<Char>& ctx)
1342
- -> parse_dynamic_spec_result<Char> {
1340
+ FMT_CONSTEXPR auto parse_dynamic_spec (
1341
+ const Char* begin, const Char* end, int & value, arg_ref<Char>& ref,
1342
+ parse_context<Char>& ctx) -> parse_dynamic_spec_result<Char> {
1343
1343
FMT_ASSERT (begin != end, " " );
1344
1344
auto kind = arg_id_kind::none;
1345
1345
if (' 0' <= *begin && *begin <= ' 9' ) {
@@ -1399,8 +1399,8 @@ enum class state { start, align, sign, hash, zero, width, precision, locale };
1399
1399
template <typename Char>
1400
1400
FMT_CONSTEXPR auto parse_format_specs (const Char* begin, const Char* end,
1401
1401
dynamic_format_specs<Char>& specs,
1402
- parse_context<Char>& ctx, type arg_type)
1403
- -> const Char* {
1402
+ parse_context<Char>& ctx,
1403
+ type arg_type) -> const Char* {
1404
1404
auto c = ' \0 ' ;
1405
1405
if (end - begin > 1 ) {
1406
1406
auto next = to_ascii (begin[1 ]);
@@ -1535,10 +1535,8 @@ FMT_CONSTEXPR auto parse_format_specs(const Char* begin, const Char* end,
1535
1535
}
1536
1536
1537
1537
template <typename Char, typename Handler>
1538
- FMT_CONSTEXPR FMT_INLINE auto parse_replacement_field (const Char* begin,
1539
- const Char* end,
1540
- Handler&& handler)
1541
- -> const Char* {
1538
+ FMT_CONSTEXPR FMT_INLINE auto parse_replacement_field (
1539
+ const Char* begin, const Char* end, Handler&& handler) -> const Char* {
1542
1540
++begin;
1543
1541
if (begin == end) {
1544
1542
handler.on_error (" invalid format string" );
@@ -1674,8 +1672,8 @@ class format_string_checker {
1674
1672
on_format_specs (id, begin, begin); // Call parse() on empty specs.
1675
1673
}
1676
1674
1677
- FMT_CONSTEXPR auto on_format_specs (int id, const Char* begin, const Char* end)
1678
- -> const Char* {
1675
+ FMT_CONSTEXPR auto on_format_specs (int id, const Char* begin,
1676
+ const Char* end) -> const Char* {
1679
1677
context_.advance_to (begin);
1680
1678
if (id >= 0 && id < NUM_ARGS) return parse_funcs_[id](context_);
1681
1679
while (begin != end && *begin != ' }' ) ++begin;
@@ -1764,14 +1762,14 @@ template <typename T> class buffer {
1764
1762
}
1765
1763
1766
1764
// / Appends data to the end of the buffer.
1767
- template <typename U >
1765
+ template <typename UT >
1768
1766
// Workaround for MSVC2019 to fix error C2893: Failed to specialize function
1769
1767
// template 'void fmt::v11::detail::buffer<T>::append(const U *,const U *)'.
1770
1768
#if !FMT_MSC_VERSION || FMT_MSC_VERSION >= 1940
1771
1769
FMT_CONSTEXPR20
1772
1770
#endif
1773
1771
void
1774
- append (const U * begin, const U * end) {
1772
+ append (const UT * begin, const UT * end) {
1775
1773
while (begin != end) {
1776
1774
auto count = to_unsigned (end - begin);
1777
1775
try_reserve (size_ + count);
@@ -1972,8 +1970,8 @@ struct is_back_insert_iterator<basic_appender<T>> : std::true_type {};
1972
1970
// An optimized version of std::copy with the output value type (T).
1973
1971
template <typename T, typename InputIt, typename OutputIt,
1974
1972
FMT_ENABLE_IF (is_back_insert_iterator<OutputIt>::value)>
1975
- FMT_CONSTEXPR20 auto copy (InputIt begin, InputIt end, OutputIt out)
1976
- -> OutputIt {
1973
+ FMT_CONSTEXPR20 auto copy (InputIt begin, InputIt end,
1974
+ OutputIt out) -> OutputIt {
1977
1975
get_container (out).append (begin, end);
1978
1976
return out;
1979
1977
}
@@ -2325,8 +2323,8 @@ template <typename T, typename Char, type TYPE> struct native_formatter {
2325
2323
2326
2324
FMT_PRAGMA_CLANG (diagnostic ignored " -Wundefined-inline" )
2327
2325
template <typename FormatContext>
2328
- FMT_CONSTEXPR auto format (const T& val, FormatContext& ctx) const
2329
- -> decltype(ctx.out());
2326
+ FMT_CONSTEXPR auto format (const T& val,
2327
+ FormatContext& ctx) const -> decltype(ctx.out());
2330
2328
};
2331
2329
2332
2330
template <typename T, typename Enable = void >
@@ -2466,8 +2464,8 @@ template <typename Context> class basic_format_arg {
2466
2464
}
2467
2465
2468
2466
auto format_custom (const char_type* parse_begin,
2469
- parse_context<char_type>& parse_ctx, Context& ctx)
2470
- -> bool {
2467
+ parse_context<char_type>& parse_ctx,
2468
+ Context& ctx) -> bool {
2471
2469
if (type_ != detail::type::custom_type) return false ;
2472
2470
parse_ctx.advance_to (parse_begin);
2473
2471
value_.custom .format (value_.custom .value , parse_ctx, ctx);
@@ -2755,8 +2753,8 @@ inline auto arg(const Char* name, const T& arg) -> detail::named_arg<Char, T> {
2755
2753
template <typename OutputIt,
2756
2754
FMT_ENABLE_IF (detail::is_output_iterator<remove_cvref_t <OutputIt>,
2757
2755
char >::value)>
2758
- auto vformat_to(OutputIt&& out, string_view fmt, format_args args)
2759
- -> remove_cvref_t<OutputIt> {
2756
+ auto vformat_to(OutputIt&& out, string_view fmt,
2757
+ format_args args) -> remove_cvref_t<OutputIt> {
2760
2758
auto && buf = detail::get_buffer<char >(out);
2761
2759
detail::vformat_to (buf, fmt, args, {});
2762
2760
return detail::get_iterator (buf, out);
@@ -2775,8 +2773,8 @@ auto vformat_to(OutputIt&& out, string_view fmt, format_args args)
2775
2773
template <typename OutputIt, typename ... T,
2776
2774
FMT_ENABLE_IF (detail::is_output_iterator<remove_cvref_t <OutputIt>,
2777
2775
char >::value)>
2778
- FMT_INLINE auto format_to(OutputIt&& out, format_string<T...> fmt, T&&... args)
2779
- -> remove_cvref_t<OutputIt> {
2776
+ FMT_INLINE auto format_to(OutputIt&& out, format_string<T...> fmt,
2777
+ T&&... args) -> remove_cvref_t<OutputIt> {
2780
2778
return vformat_to (out, fmt.str , vargs<T...>{{args...}});
2781
2779
}
2782
2780
@@ -2789,8 +2787,8 @@ template <typename OutputIt> struct format_to_n_result {
2789
2787
2790
2788
template <typename OutputIt, typename ... T,
2791
2789
FMT_ENABLE_IF (detail::is_output_iterator<OutputIt, char >::value)>
2792
- auto vformat_to_n(OutputIt out, size_t n, string_view fmt, format_args args)
2793
- -> format_to_n_result<OutputIt> {
2790
+ auto vformat_to_n(OutputIt out, size_t n, string_view fmt,
2791
+ format_args args) -> format_to_n_result<OutputIt> {
2794
2792
using traits = detail::fixed_buffer_traits;
2795
2793
auto buf = detail::iterator_buffer<OutputIt, char , traits>(out, n);
2796
2794
detail::vformat_to (buf, fmt, args, {});
@@ -2824,15 +2822,15 @@ struct format_to_result {
2824
2822
};
2825
2823
2826
2824
template <size_t N>
2827
- auto vformat_to (char (&out)[N], string_view fmt, format_args args)
2828
- -> format_to_result {
2825
+ auto vformat_to (char (&out)[N], string_view fmt,
2826
+ format_args args) -> format_to_result {
2829
2827
auto result = vformat_to_n (out, N, fmt, args);
2830
2828
return {result.out , result.size > N};
2831
2829
}
2832
2830
2833
2831
template <size_t N, typename ... T>
2834
- FMT_INLINE auto format_to (char (&out)[N], format_string<T...> fmt, T&&... args)
2835
- -> format_to_result {
2832
+ FMT_INLINE auto format_to (char (&out)[N], format_string<T...> fmt,
2833
+ T&&... args) -> format_to_result {
2836
2834
auto result = vformat_to_n (out, N, fmt.str , vargs<T...>{{args...}});
2837
2835
return {result.out , result.size > N};
2838
2836
}
0 commit comments