Function utils::stod

Function Documentation

inline auto utils::stod(const std::string &str) -> double

Convert string to double.

This is a thin wrapper around std::stod, which checks to make sure that the entire input was converted successfully, and throws an invalid_argument error if not.

Parameters:

str – The string to be converted

Returns:

str converted to a double