1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:37:34 +00:00

AK: Support long doubles in format strings

This commit is contained in:
Hediadyoin1 2021-05-07 11:32:01 +02:00 committed by Andreas Kling
parent f4072a5038
commit 8ed3315dec
2 changed files with 91 additions and 0 deletions

View file

@ -185,6 +185,16 @@ public:
SignMode sign_mode = SignMode::OnlyIfNeeded);
#ifndef KERNEL
void put_f80(
long double value,
u8 base = 10,
bool upper_case = false,
Align align = Align::Right,
size_t min_width = 0,
size_t precision = 6,
char fill = ' ',
SignMode sign_mode = SignMode::OnlyIfNeeded);
void put_f64(
double value,
u8 base = 10,
@ -397,6 +407,17 @@ struct Formatter<double> : StandardFormatter {
void format(FormatBuilder&, double value);
};
template<>
struct Formatter<long double> : StandardFormatter {
Formatter() = default;
explicit Formatter(StandardFormatter formatter)
: StandardFormatter(formatter)
{
}
void format(FormatBuilder&, long double value);
};
#endif
template<>