diff --git a/include/fmt/compile.h b/include/fmt/compile.h index ca8b4285..e4b12f34 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -351,7 +351,7 @@ template struct get_type_impl> { template using get_type = typename get_type_impl::type; -template struct is_static_compiled_format : std::false_type {}; +template struct is_compiled_format : std::false_type {}; template struct text { basic_string_view data; @@ -365,7 +365,7 @@ template struct text { }; template -struct is_static_compiled_format> : std::true_type {}; +struct is_compiled_format> : std::true_type {}; template constexpr text make_text(basic_string_view s, size_t pos, @@ -413,7 +413,7 @@ template struct field { }; template -struct is_static_compiled_format> : std::true_type {}; +struct is_compiled_format> : std::true_type {}; template struct concat { L lhs; @@ -428,7 +428,7 @@ template struct concat { }; template -struct is_static_compiled_format> : std::true_type {}; +struct is_compiled_format> : std::true_type {}; template constexpr concat make_concat(L lhs, R rhs) { @@ -518,19 +518,17 @@ constexpr auto compile(S format_str) { } } -template < - typename CompiledFormat, typename... Args, - typename Char = typename CompiledFormat::char_type, - FMT_ENABLE_IF(internal::is_static_compiled_format::value)> +template ::value)> std::basic_string format(const CompiledFormat& cf, const Args&... args) { basic_memory_buffer buffer; cf.format(std::back_inserter(buffer), args...); return to_string(buffer); } -template < - typename OutputIt, typename CompiledFormat, typename... Args, - FMT_ENABLE_IF(internal::is_static_compiled_format::value)> +template ::value)> OutputIt format_to(OutputIt out, const CompiledFormat& cf, const Args&... args) { return cf.format(out, args...);