29 #ifndef DOXYGEN_SHOULD_SKIP_THIS 46 value = std::stof(str, &pos);
47 }
catch (std::invalid_argument&) {
48 GUM_ERROR(TypeError,
"the value is not a number");
49 }
catch (std::out_of_range&) {
50 GUM_ERROR(OutOfBounds,
"the value is too huge");
54 for (
auto iter = str.begin() + pos, end = str.end(); iter != end; ++iter) {
55 if (!std::isspace(static_cast< unsigned char >(*iter)))
56 GUM_ERROR(TypeError,
"the value is not a number");
63 "the value does not belong to the domain of the variable");
74 value = std::stod(str, &pos);
75 }
catch (std::invalid_argument&) {
76 GUM_ERROR(TypeError,
"the value is not a number");
77 }
catch (std::out_of_range&) {
78 GUM_ERROR(OutOfBounds,
"the value is too huge");
82 for (
auto iter = str.begin() + pos, end = str.end(); iter != end; ++iter) {
83 if (!std::isspace(static_cast< unsigned char >(*iter)))
84 GUM_ERROR(TypeError,
"the value is not a number");
91 "the value does not belong to the domain of the variable");
96 #endif // DOXYGEN_SHOULD_SKIP_THIS GUM_SCALAR operator[](const std::string &str) const
returns the T_VAL corresponding to a string
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
#define GUM_ERROR(type, msg)