From de3bbcff531ef30e206d701d0f897d5931bd7404 Mon Sep 17 00:00:00 2001 From: Barry Revzin Date: Wed, 27 Jul 2022 07:14:08 -0500 Subject: [PATCH] Renaming copy_str_range to copy_str. --- include/fmt/core.h | 2 +- include/fmt/ranges.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index d8b03125..e011f445 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1653,7 +1653,7 @@ auto copy_str(InputIt begin, InputIt end, appender out) -> appender { } template -FMT_CONSTEXPR auto copy_str_range(R&& rng, OutputIt out) -> OutputIt { +FMT_CONSTEXPR auto copy_str(R&& rng, OutputIt out) -> OutputIt { return detail::copy_str(rng.begin(), rng.end(), out); } diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h index 5a13fcc2..98110b7b 100644 --- a/include/fmt/ranges.h +++ b/include/fmt/ranges.h @@ -352,7 +352,7 @@ struct formatter struct format_each { template void operator()(const T& v) { - if (i > 0) out = detail::copy_str_range(separator, out); + if (i > 0) out = detail::copy_str(separator, out); out = detail::write_range_entry(out, v); ++i; } @@ -383,9 +383,9 @@ struct formatter decltype(ctx.out()) { auto out = ctx.out(); - out = detail::copy_str_range(opening_bracket_, out); + out = detail::copy_str(opening_bracket_, out); detail::for_each(values, format_each{0, out, separator_}); - out = detail::copy_str_range(closing_bracket_, out); + out = detail::copy_str(closing_bracket_, out); return out; } }; @@ -509,18 +509,18 @@ struct range_formatter< auto format(R&& range, FormatContext& ctx) const -> decltype(ctx.out()) { detail::range_mapper> mapper; auto out = ctx.out(); - out = detail::copy_str_range(opening_bracket_, out); + out = detail::copy_str(opening_bracket_, out); int i = 0; auto it = detail::range_begin(range); auto end = detail::range_end(range); for (; it != end; ++it) { - if (i > 0) out = detail::copy_str_range(separator_, out); + if (i > 0) out = detail::copy_str(separator_, out); ; ctx.advance_to(out); out = underlying_.format(mapper.map(*it), ctx); ++i; } - out = detail::copy_str_range(closing_bracket_, out); + out = detail::copy_str(closing_bracket_, out); return out; } };