mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-13 22:50:05 +00:00
parent
5e58eb97b1
commit
0e94b931a2
@ -1040,13 +1040,6 @@ 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) {
|
||||
|
@ -1138,6 +1138,13 @@ struct sprintf_specs {
|
||||
template <typename Double>
|
||||
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>
|
||||
FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
|
||||
switch (spec) {
|
||||
|
Loading…
Reference in New Issue
Block a user