diff --git a/include/fmt/color.h b/include/fmt/color.h index 57b7f578..34de634c 100644 --- a/include/fmt/color.h +++ b/include/fmt/color.h @@ -563,9 +563,10 @@ OutputIt vformat_to( fmt::emphasis::bold | fg(fmt::color::red), "{}", 42); \endrst */ -template >::value&& - detail::is_string::value> +template < + typename OutputIt, typename S, typename... Args, + bool enable = detail::is_output_iterator>::value && + detail::is_string::value> inline auto format_to(OutputIt out, const text_style& ts, const S& format_str, Args&&... args) -> typename std::enable_if::type { diff --git a/include/fmt/core.h b/include/fmt/core.h index f6e68868..9bfee019 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -2429,7 +2429,8 @@ FMT_CONSTEXPR FMT_INLINE auto parse_format_specs( case 'G': return parse_presentation_type(pres::general_upper, float_set); 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); case 's': return parse_presentation_type(pres::string, diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h index 2ed35df1..3086191a 100644 --- a/include/fmt/ostream.h +++ b/include/fmt/ostream.h @@ -95,7 +95,7 @@ void format_value(buffer& buf, const T& value) { auto&& format_buf = formatbuf>(buf); auto&& output = std::basic_ostream(&format_buf); #if !defined(FMT_STATIC_THOUSANDS_SEPARATOR) - output.imbue(std::locale::classic()); // The default is always unlocalized. + output.imbue(std::locale::classic()); // The default is always unlocalized. #endif output << value; output.exceptions(std::ios_base::failbit | std::ios_base::badbit); diff --git a/include/fmt/std.h b/include/fmt/std.h index dda3c84c..5bafcefb 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -137,8 +137,7 @@ template struct formatter { debug_ = true; ++it; } - if (it != end && (*it == 'g' || *it == 'n')) - path_type_ = *it++; + if (it != end && (*it == 'g' || *it == 'n')) path_type_ = *it++; return it; } @@ -246,8 +245,7 @@ FMT_END_NAMESPACE #ifdef __cpp_lib_source_location FMT_BEGIN_NAMESPACE FMT_EXPORT -template<> -struct formatter { +template <> struct formatter { template FMT_CONSTEXPR auto parse(ParseContext& ctx) { return ctx.begin(); } @@ -384,7 +382,7 @@ template struct formatter { FMT_EXPORT template struct formatter< - T, Char, // DEPRECATED! Mixing code unit types. + T, Char, // DEPRECATED! Mixing code unit types. typename std::enable_if::value>::type> { private: bool with_typename_ = false; @@ -415,7 +413,7 @@ struct formatter< # ifdef FMT_HAS_ABI_CXA_DEMANGLE int status = 0; std::size_t size = 0; - std::unique_ptr demangled_name_ptr( + std::unique_ptr demangled_name_ptr( abi::__cxa_demangle(ti.name(), nullptr, &size, &status), &std::free); string_view demangled_name_view; diff --git a/include/fmt/xchar.h b/include/fmt/xchar.h index 2bf8c276..9a7aa4d7 100644 --- a/include/fmt/xchar.h +++ b/include/fmt/xchar.h @@ -172,11 +172,11 @@ inline auto vformat_to( return detail::get_iterator(buf, out); } -template < - typename OutputIt, typename Locale, typename S, typename... T, - typename Char = char_t, - bool enable = detail::is_output_iterator::value&& - detail::is_locale::value&& detail::is_exotic_char::value> +template , + bool enable = detail::is_output_iterator::value && + detail::is_locale::value && + detail::is_exotic_char::value> inline auto format_to(OutputIt out, const Locale& loc, const S& format_str, T&&... args) -> typename std::enable_if::type { diff --git a/src/fmt.cc b/src/fmt.cc index 6638bb4a..5330463a 100644 --- a/src/fmt.cc +++ b/src/fmt.cc @@ -101,7 +101,7 @@ extern "C++" { // gcc doesn't yet implement private module fragments #if !FMT_GCC_VERSION -module : private; +module :private; #endif #include "format.cc"