[core] add ability to stringify doubles that are integer with and without trailing ".0"

This commit is contained in:
Konstantin Käfer
2018-10-17 15:52:11 +02:00
parent decbde1616
commit 43687b4781
5 changed files with 18 additions and 12 deletions

View File

@@ -49,9 +49,9 @@ inline std::string toString(uint8_t num) {
return std::to_string(unsigned(num));
}
std::string toString(float);
std::string toString(double);
std::string toString(long double);
std::string toString(float, bool decimal = false);
std::string toString(double, bool decimal = false);
std::string toString(long double, bool decimal = false);
inline std::string toString(std::exception_ptr error) {
assert(error);