diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index c6aa1232..ba1ea970 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1040,13 +1040,6 @@ FMT_API bool grisu_format(Double value, buffer& buf, int precision, return true; } -template <> -char* sprintf_format(float value, internal::buffer& buf, - sprintf_specs specs) { - // printf does not have a float format modifier, it only supports double. - return sprintf_format(value, buf, specs); -} - template char* sprintf_format(Double value, internal::buffer& buf, sprintf_specs specs) { diff --git a/include/fmt/format.h b/include/fmt/format.h index 12bf0f48..289acb08 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1138,6 +1138,13 @@ struct sprintf_specs { template char* sprintf_format(Double, internal::buffer&, sprintf_specs); +template <> +inline char* sprintf_format(float value, internal::buffer& buf, + sprintf_specs specs) { + // printf does not have a float format specifier, it only supports double. + return sprintf_format(value, buf, specs); +} + template FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) { switch (spec) {