mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-28 05:09:44 +01:00
Distinguish float from double
This commit is contained in:
committed by
Victor Zverovich
parent
a927dda9bb
commit
b87ac4d840
@@ -1003,6 +1003,13 @@ FMT_API bool grisu_format(Double value, buffer<char>& buf, int precision,
|
||||
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>
|
||||
char* sprintf_format(Double value, internal::buffer<char>& buf,
|
||||
sprintf_specs specs) {
|
||||
|
||||
Reference in New Issue
Block a user