| 169 | */ |
| 170 | template <typename T, typename std::enable_if<std::is_arithmetic<T>::value, int>::type = 0> |
| 171 | inline std::string arithmetic_to_string(T val, int decimal_places = 0) |
| 172 | { |
| 173 | std::stringstream ss; |
| 174 | ss << std::fixed; |
| 175 | ss.precision((decimal_places) ? decimal_places : std::numeric_limits<T>::digits10 + 1); |
| 176 | ss << val; |
| 177 | return ss.str(); |
| 178 | } |
| 179 | |
| 180 | /** Makes the calling thread to sleep for a specified number of seconds |
| 181 | * |
no test coverage detected