diff options
Diffstat (limited to 'include/fmt/compile.h')
-rw-r--r-- | include/fmt/compile.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index a4c7e495..3b3f166e 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -14,8 +14,8 @@ FMT_BEGIN_NAMESPACE namespace detail { template <typename Char, typename InputIt> -FMT_CONSTEXPR inline counting_iterator copy_str(InputIt begin, InputIt end, - counting_iterator it) { +FMT_CONSTEXPR inline auto copy_str(InputIt begin, InputIt end, + counting_iterator it) -> counting_iterator { return it + (end - begin); } @@ -57,7 +57,7 @@ struct udl_compiled_string : compiled_string { #endif template <typename T, typename... Tail> -const T& first(const T& value, const Tail&...) { +auto first(const T& value, const Tail&...) -> const T& { return value; } @@ -488,18 +488,19 @@ FMT_CONSTEXPR OutputIt format_to(OutputIt out, const S&, Args&&... args) { template <typename OutputIt, typename S, typename... Args, FMT_ENABLE_IF(detail::is_compiled_string<S>::value)> -format_to_n_result<OutputIt> format_to_n(OutputIt out, size_t n, - const S& format_str, Args&&... args) { +auto format_to_n(OutputIt out, size_t n, const S& format_str, Args&&... args) + -> format_to_n_result<OutputIt> { using traits = detail::fixed_buffer_traits; auto buf = detail::iterator_buffer<OutputIt, char, traits>(out, n); - format_to(std::back_inserter(buf), format_str, std::forward<Args>(args)...); + fmt::format_to(std::back_inserter(buf), format_str, + std::forward<Args>(args)...); return {buf.out(), buf.count()}; } template <typename S, typename... Args, FMT_ENABLE_IF(detail::is_compiled_string<S>::value)> -FMT_CONSTEXPR20 size_t formatted_size(const S& format_str, - const Args&... args) { +FMT_CONSTEXPR20 auto formatted_size(const S& format_str, const Args&... args) + -> size_t { return fmt::format_to(detail::counting_iterator(), format_str, args...) .count(); } |