Add support for long double in Writer.

This commit is contained in:
Victor Zverovich
2013-09-08 16:27:12 -07:00
parent 1e724a9d33
commit bcef11c0d1
2 changed files with 23 additions and 17 deletions
+10 -6
View File
@@ -552,28 +552,32 @@ class BasicWriter {
BasicWriter &operator<<(unsigned value) {
return *this << IntFormatter<unsigned, TypeSpec<0> >(value, TypeSpec<0>());
}
BasicWriter &operator<<(long value) {
return *this << IntFormatter<long, TypeSpec<0> >(value, TypeSpec<0>());
}
/**
Formats *value* and writes it to the stream.
Formats *value* and writes it to the stream.
*/
BasicWriter &operator<<(unsigned long value) {
return *this <<
IntFormatter<unsigned long, TypeSpec<0> >(value, TypeSpec<0>());
}
/**
Formats *value* using the general format for floating-point numbers
(``'g'``) and writes it to the stream.
*/
BasicWriter &operator<<(double value) {
FormatDouble(value, FormatSpec(), -1);
return *this;
}
/**
Formats *value* using the general format for floating-point numbers
(``'g'``) and writes it to the stream.
*/
BasicWriter &operator<<(long double value) {
FormatDouble(value, FormatSpec(), -1);
return *this;
}
BasicWriter &operator<<(Char value) {
*GrowBuffer(1) = value;
return *this;