Fix a linkage error introduced by #1360 (#1362)

This commit is contained in:
Victor Zverovich 2019-10-13 08:23:47 -07:00
parent 5e58eb97b1
commit 0e94b931a2
2 changed files with 7 additions and 7 deletions

View File

@ -1040,13 +1040,6 @@ FMT_API bool grisu_format(Double value, buffer<char>& buf, int precision,
return true; return true;
} }
template <>
char* sprintf_format<float>(float value, internal::buffer<char>& buf,
sprintf_specs specs) {
// printf does not have a float format modifier, it only supports double.
return sprintf_format<double>(value, buf, specs);
}
template <typename Double> template <typename Double>
char* sprintf_format(Double value, internal::buffer<char>& buf, char* sprintf_format(Double value, internal::buffer<char>& buf,
sprintf_specs specs) { sprintf_specs specs) {

View File

@ -1138,6 +1138,13 @@ struct sprintf_specs {
template <typename Double> template <typename Double>
char* sprintf_format(Double, internal::buffer<char>&, sprintf_specs); char* sprintf_format(Double, internal::buffer<char>&, sprintf_specs);
template <>
inline char* sprintf_format<float>(float value, internal::buffer<char>& buf,
sprintf_specs specs) {
// printf does not have a float format specifier, it only supports double.
return sprintf_format<double>(value, buf, specs);
}
template <typename Handler> template <typename Handler>
FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) { FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
switch (spec) { switch (spec) {