std::to_string() can also convert a floating-point argument to string, using the "%f" printf format (see http://en.cppreference.com/w/cpp/string/basic_string/to_string ) So add this support to our to_sstring() as well. Note that if you want to use a different format, e.g., "%g", you can, by using the to_sstring_sprintf function, for example to_sstring_sprintf(12345678.9, "%g") results in "1.23457e+07". Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
11 KiB
11 KiB