mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 02:37:36 +02:00
Apply clang-format
* use clang-format v17.0.6 to reformat the tree * tweak some places so that clang-format does not mutate the layout of code too much Signed-off-by: Kefu Chai <tchaikov@gmail.com>
This commit is contained in:
committed by
Victor Zverovich
parent
bbee753579
commit
6855bd532b
@ -563,7 +563,8 @@ OutputIt vformat_to(
|
|||||||
fmt::emphasis::bold | fg(fmt::color::red), "{}", 42);
|
fmt::emphasis::bold | fg(fmt::color::red), "{}", 42);
|
||||||
\endrst
|
\endrst
|
||||||
*/
|
*/
|
||||||
template <typename OutputIt, typename S, typename... Args,
|
template <
|
||||||
|
typename OutputIt, typename S, typename... Args,
|
||||||
bool enable = detail::is_output_iterator<OutputIt, char_t<S>>::value &&
|
bool enable = detail::is_output_iterator<OutputIt, char_t<S>>::value &&
|
||||||
detail::is_string<S>::value>
|
detail::is_string<S>::value>
|
||||||
inline auto format_to(OutputIt out, const text_style& ts, const S& format_str,
|
inline auto format_to(OutputIt out, const text_style& ts, const S& format_str,
|
||||||
|
@ -2429,7 +2429,8 @@ FMT_CONSTEXPR FMT_INLINE auto parse_format_specs(
|
|||||||
case 'G':
|
case 'G':
|
||||||
return parse_presentation_type(pres::general_upper, float_set);
|
return parse_presentation_type(pres::general_upper, float_set);
|
||||||
case 'c':
|
case 'c':
|
||||||
if (arg_type == type::bool_type) throw_format_error("invalid format specifier");
|
if (arg_type == type::bool_type)
|
||||||
|
throw_format_error("invalid format specifier");
|
||||||
return parse_presentation_type(pres::chr, integral_set);
|
return parse_presentation_type(pres::chr, integral_set);
|
||||||
case 's':
|
case 's':
|
||||||
return parse_presentation_type(pres::string,
|
return parse_presentation_type(pres::string,
|
||||||
|
@ -137,8 +137,7 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
|
|||||||
debug_ = true;
|
debug_ = true;
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
if (it != end && (*it == 'g' || *it == 'n'))
|
if (it != end && (*it == 'g' || *it == 'n')) path_type_ = *it++;
|
||||||
path_type_ = *it++;
|
|
||||||
return it;
|
return it;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,8 +245,7 @@ FMT_END_NAMESPACE
|
|||||||
#ifdef __cpp_lib_source_location
|
#ifdef __cpp_lib_source_location
|
||||||
FMT_BEGIN_NAMESPACE
|
FMT_BEGIN_NAMESPACE
|
||||||
FMT_EXPORT
|
FMT_EXPORT
|
||||||
template<>
|
template <> struct formatter<std::source_location> {
|
||||||
struct formatter<std::source_location> {
|
|
||||||
template <typename ParseContext> FMT_CONSTEXPR auto parse(ParseContext& ctx) {
|
template <typename ParseContext> FMT_CONSTEXPR auto parse(ParseContext& ctx) {
|
||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
|
@ -172,11 +172,11 @@ inline auto vformat_to(
|
|||||||
return detail::get_iterator(buf, out);
|
return detail::get_iterator(buf, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <
|
template <typename OutputIt, typename Locale, typename S, typename... T,
|
||||||
typename OutputIt, typename Locale, typename S, typename... T,
|
|
||||||
typename Char = char_t<S>,
|
typename Char = char_t<S>,
|
||||||
bool enable = detail::is_output_iterator<OutputIt, Char>::value &&
|
bool enable = detail::is_output_iterator<OutputIt, Char>::value &&
|
||||||
detail::is_locale<Locale>::value&& detail::is_exotic_char<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,
|
inline auto format_to(OutputIt out, const Locale& loc, const S& format_str,
|
||||||
T&&... args) ->
|
T&&... args) ->
|
||||||
typename std::enable_if<enable, OutputIt>::type {
|
typename std::enable_if<enable, OutputIt>::type {
|
||||||
|
Reference in New Issue
Block a user