🎨 clang-format affected files! (with the right clang-format 17.0.x, rather than 16.0.x)
This commit is contained in:
parent
4533970bfe
commit
b528976178
@ -643,9 +643,10 @@ OutputIt vformat_to(
|
||||
fmt::emphasis::bold | fg(fmt::color::red), "{}", 42);
|
||||
\endrst
|
||||
*/
|
||||
template <typename OutputIt, typename S, typename... Args,
|
||||
bool enable = detail::is_output_iterator<OutputIt, char_t<S>>::value&&
|
||||
detail::is_string<S>::value>
|
||||
template <
|
||||
typename OutputIt, typename S, typename... Args,
|
||||
bool enable = detail::is_output_iterator<OutputIt, char_t<S>>::value &&
|
||||
detail::is_string<S>::value>
|
||||
inline auto format_to(OutputIt out, const text_style& ts, const S& format_str,
|
||||
Args&&... args) ->
|
||||
typename std::enable_if<enable, OutputIt>::type {
|
||||
|
||||
@ -1161,10 +1161,10 @@ using uint32_or_64_or_128_t =
|
||||
template <typename T>
|
||||
using uint64_or_128_t = conditional_t<num_bits<T>() <= 64, uint64_t, uint128_t>;
|
||||
|
||||
#define FMT_POWERS_OF_10(factor) \
|
||||
factor * 10, (factor)*100, (factor)*1000, (factor)*10000, (factor)*100000, \
|
||||
(factor)*1000000, (factor)*10000000, (factor)*100000000, \
|
||||
(factor)*1000000000
|
||||
#define FMT_POWERS_OF_10(factor) \
|
||||
factor * 10, (factor) * 100, (factor) * 1000, (factor) * 10000, \
|
||||
(factor) * 100000, (factor) * 1000000, (factor) * 10000000, \
|
||||
(factor) * 100000000, (factor) * 1000000000
|
||||
|
||||
// Converts value in the range [0, 100) to a string.
|
||||
constexpr const char* digits2(size_t value) {
|
||||
@ -2123,7 +2123,7 @@ template <typename OutputIt, typename UInt, typename Char>
|
||||
auto write_int(OutputIt out, UInt value, unsigned prefix,
|
||||
const format_specs<Char>& specs,
|
||||
const digit_grouping<Char>& grouping) -> OutputIt {
|
||||
static_assert(std::is_same<uint64_or_128_t<UInt>, UInt>::value, "");
|
||||
static_assert(std::is_same<uint64_or_128_t<UInt>, UInt>::value, "");
|
||||
int num_digits = 0;
|
||||
auto buffer = memory_buffer();
|
||||
switch (specs.type) {
|
||||
@ -2139,7 +2139,7 @@ auto write_int(OutputIt out, UInt value, unsigned prefix,
|
||||
if (specs.alt)
|
||||
prefix_append(prefix, unsigned(upper ? 'X' : 'x') << 8 | '0');
|
||||
num_digits = count_digits<4>(value);
|
||||
format_uint<4,Char>(appender(buffer), value, num_digits, upper);
|
||||
format_uint<4, Char>(appender(buffer), value, num_digits, upper);
|
||||
break;
|
||||
}
|
||||
case presentation_type::bin_lower:
|
||||
@ -2148,7 +2148,7 @@ auto write_int(OutputIt out, UInt value, unsigned prefix,
|
||||
if (specs.alt)
|
||||
prefix_append(prefix, unsigned(upper ? 'B' : 'b') << 8 | '0');
|
||||
num_digits = count_digits<1>(value);
|
||||
format_uint<1,Char>(appender(buffer), value, num_digits);
|
||||
format_uint<1, Char>(appender(buffer), value, num_digits);
|
||||
break;
|
||||
}
|
||||
case presentation_type::oct: {
|
||||
@ -2157,7 +2157,7 @@ auto write_int(OutputIt out, UInt value, unsigned prefix,
|
||||
// is not greater than the number of digits.
|
||||
if (specs.alt && specs.precision <= num_digits && value != 0)
|
||||
prefix_append(prefix, '0');
|
||||
format_uint<3,Char>(appender(buffer), value, num_digits);
|
||||
format_uint<3, Char>(appender(buffer), value, num_digits);
|
||||
break;
|
||||
}
|
||||
case presentation_type::chr:
|
||||
@ -2167,11 +2167,11 @@ auto write_int(OutputIt out, UInt value, unsigned prefix,
|
||||
}
|
||||
|
||||
unsigned size = (prefix != 0 ? prefix >> 24 : 0) + to_unsigned(num_digits) +
|
||||
to_unsigned(grouping.count_separators(num_digits));
|
||||
to_unsigned(grouping.count_separators(num_digits));
|
||||
return write_padded<align::right>(
|
||||
out, specs, size, size, [&](reserve_iterator<OutputIt> it) {
|
||||
for (unsigned p = prefix & 0xffffff; p != 0; p >>= 8)
|
||||
*it++ = static_cast<Char>(p & 0xff);
|
||||
for (unsigned p = prefix & 0xffffff; p != 0; p >>= 8)
|
||||
*it++ = static_cast<Char>(p & 0xff);
|
||||
return grouping.apply(it, string_view(buffer.data(), buffer.size()));
|
||||
});
|
||||
}
|
||||
|
||||
@ -216,13 +216,14 @@ inline auto vformat_into(
|
||||
return detail::get_iterator(buf, out);
|
||||
}
|
||||
|
||||
template <
|
||||
typename Output, typename Locale, typename S, typename... T,
|
||||
typename Char = char_t<S>,
|
||||
bool enable = (std::ranges::output_range<Output, Char> ||
|
||||
std::output_iterator<remove_cvref_t<Output>, Char>)&&detail::
|
||||
is_locale<Locale>::value&& detail::is_exotic_char<Char>::value,
|
||||
FMT_ENABLE_IF(enable)>
|
||||
template <typename Output, typename Locale, typename S, typename... T,
|
||||
typename Char = char_t<S>,
|
||||
bool enable =
|
||||
(std::ranges::output_range<Output, Char> ||
|
||||
std::output_iterator<remove_cvref_t<Output>,
|
||||
Char>)&&detail::is_locale<Locale>::value &&
|
||||
detail::is_exotic_char<Char>::value,
|
||||
FMT_ENABLE_IF(enable)>
|
||||
inline auto format_to(Output&& out, const Locale& loc, const S& format_str,
|
||||
T&&... args) {
|
||||
return vformat_to(std::forward<Output>(out), loc,
|
||||
@ -230,13 +231,14 @@ inline auto format_to(Output&& out, const Locale& loc, const S& format_str,
|
||||
fmt::make_format_args<buffer_context<Char>>(args...));
|
||||
}
|
||||
|
||||
template <
|
||||
typename Output, typename Locale, typename S, typename... T,
|
||||
typename Char = char_t<S>,
|
||||
bool enable = (std::ranges::output_range<Output, Char> ||
|
||||
std::output_iterator<remove_cvref_t<Output>, Char>)&&detail::
|
||||
is_locale<Locale>::value&& detail::is_exotic_char<Char>::value,
|
||||
FMT_ENABLE_IF(enable)>
|
||||
template <typename Output, typename Locale, typename S, typename... T,
|
||||
typename Char = char_t<S>,
|
||||
bool enable =
|
||||
(std::ranges::output_range<Output, Char> ||
|
||||
std::output_iterator<remove_cvref_t<Output>,
|
||||
Char>)&&detail::is_locale<Locale>::value &&
|
||||
detail::is_exotic_char<Char>::value,
|
||||
FMT_ENABLE_IF(enable)>
|
||||
inline auto format_into(Output&& out, const Locale& loc, const S& format_str,
|
||||
T&&... args) {
|
||||
return vformat_into(std::forward<Output>(out), loc,
|
||||
@ -278,11 +280,11 @@ inline auto vformat_to(
|
||||
return detail::get_iterator(buf, out);
|
||||
}
|
||||
|
||||
template <
|
||||
typename OutputIt, typename Locale, typename S, typename... T,
|
||||
typename Char = char_t<S>,
|
||||
bool enable = detail::is_output_iterator<OutputIt, Char>::value&&
|
||||
detail::is_locale<Locale>::value&& detail::is_exotic_char<Char>::value>
|
||||
template <typename OutputIt, typename Locale, typename S, typename... T,
|
||||
typename Char = char_t<S>,
|
||||
bool enable = detail::is_output_iterator<OutputIt, Char>::value &&
|
||||
detail::is_locale<Locale>::value &&
|
||||
detail::is_exotic_char<Char>::value>
|
||||
inline auto format_to(OutputIt out, const Locale& loc, const S& format_str,
|
||||
T&&... args) ->
|
||||
typename std::enable_if<enable, OutputIt>::type {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user