message: workaround parsing infinity via stream for gcc
diff: #include <sstream>
  #include <stdexcept>
  +#include <string>
  namespace realm {
  @@ -80,7 +81,8 @@ StringData get_printable_table_name(StringData name);
  StringData get_printable_table_name(const Table& table);
  template <typename T>
  -T stot(std::string const& s) {
  +inline T stot(std::string const& s)
  +{
  std::istringstream iss(s);
  T value;
  iss >> value;
  @@ -90,6 +92,32 @@ T stot(std::string const& s) {
  return value;
  }
  +template <>
  +inline double stot(std::string const& s)
  +{
  + double value;
  + try {
  + value = stold(s); // parsing NaN and +-Infinity are well defined in this conversion to long double
  + }
  + catch (const std::exception& e) {
  + throw std::invalid_argument(util::format("Cannot convert string '%1' to double: '%2'", s, e.what()));
  + }
  + return value;
  +}
  +
  +template <>
  +inline float stot(std::string const& s)
  +{
  + float value;
  + try {
  + value = stof(s); // parsing NaN and +-Infinity are well defined in this conversion to long double
  + }
  + catch (const std::exception& e) {
  + throw std::invalid_argument(util::format("Cannot convert string '%1' to float: '%2'", s, e.what()));
  + }
  + return value;
  +}
  +
  } // namespace utils
  } // namespace realm
  