aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Zverovich <victor.zverovich@gmail.com>2020-10-27 07:19:28 -0700
committerVictor Zverovich <victor.zverovich@gmail.com>2020-11-01 06:08:50 -0800
commit28a8eae8506ba67775d74a530af913c015ae5197 (patch)
treeb564566c2089ffbfb60aed090f2d1675fb233fcb
parent236fea1f008e1b4216d5dd5f3a5e1ab3051b794a (diff)
downloadfmtlib-28a8eae8506ba67775d74a530af913c015ae5197.tar.gz
Cleanup
-rw-r--r--include/fmt/color.h8
-rw-r--r--include/fmt/compile.h15
-rw-r--r--include/fmt/format.h15
3 files changed, 19 insertions, 19 deletions
diff --git a/include/fmt/color.h b/include/fmt/color.h
index e89d4e3a..94e3419d 100644
--- a/include/fmt/color.h
+++ b/include/fmt/color.h
@@ -589,10 +589,10 @@ OutputIt vformat_to(
\endrst
*/
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) ->
+ 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 {
return vformat_to(out, ts, to_string_view(format_str),
fmt::make_args_checked<Args...>(format_str, args...));
diff --git a/include/fmt/compile.h b/include/fmt/compile.h
index 8b79a530..3a33b020 100644
--- a/include/fmt/compile.h
+++ b/include/fmt/compile.h
@@ -668,13 +668,14 @@ OutputIt format_to(OutputIt out, const S&, const Args&... args) {
}
template <typename OutputIt, typename CompiledFormat, typename... Args>
-typename std::enable_if<(detail::is_output_iterator<
- OutputIt, typename CompiledFormat::char_type>::value&&
- std::is_base_of<detail::basic_compiled_format,
- CompiledFormat>::value),
- format_to_n_result<OutputIt>
->::type format_to_n(OutputIt out, size_t n,
- const CompiledFormat& cf, const Args&... args) {
+auto format_to_n(OutputIt out, size_t n, const CompiledFormat& cf,
+ const Args&... args) ->
+ typename std::enable_if<
+ detail::is_output_iterator<OutputIt,
+ typename CompiledFormat::char_type>::value &&
+ std::is_base_of<detail::basic_compiled_format,
+ CompiledFormat>::value,
+ format_to_n_result<OutputIt>>::type {
auto it =
format_to(detail::truncating_iterator<OutputIt>(out, n), cf, args...);
return {it.base(), it.count()};
diff --git a/include/fmt/format.h b/include/fmt/format.h
index fbe50450..6b03e857 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3056,8 +3056,7 @@ struct format_handler : detail::error_handler {
basic_format_parse_context<Char> parse_context;
Context context;
- format_handler(OutputIt out,
- basic_string_view<Char> str,
+ format_handler(OutputIt out, basic_string_view<Char> str,
basic_format_args<Context> format_args, detail::locale_ref loc)
: parse_context(str), context(out, format_args, loc) {}
@@ -3080,8 +3079,8 @@ struct format_handler : detail::error_handler {
FMT_INLINE void on_replacement_field(int id, const Char*) {
auto arg = get_arg(context, id);
context.advance_to(visit_format_arg(
- default_arg_formatter<OutputIt, Char>{
- context.out(), context.args(), context.locale()},
+ default_arg_formatter<OutputIt, Char>{context.out(), context.args(),
+ context.locale()},
arg));
}
@@ -3105,8 +3104,8 @@ struct format_handler : detail::error_handler {
if (begin == end || *begin != '}')
on_error("missing '}' in format string");
}
- context.advance_to(
- visit_format_arg(arg_formatter<OutputIt, Char>(context, &parse_context, &specs), arg));
+ context.advance_to(visit_format_arg(
+ arg_formatter<OutputIt, Char>(context, &parse_context, &specs), arg));
return begin;
}
};
@@ -3776,8 +3775,8 @@ void detail::vformat_to(
arg);
return;
}
- format_handler<iterator, Char, buffer_context<Char>> h(
- out, format_str, args, loc);
+ format_handler<iterator, Char, buffer_context<Char>> h(out, format_str, args,
+ loc);
parse_format_string<false>(format_str, h);
}