Closed tjhei closed 4 weeks ago
Why can't you just use
string_to_int
and check that the result is nonnegative?
Do you mean like this? Or do you mean I should just do this wherever I need to parse unsigned ints?
Yes, something like this, but I was really just thinking of using string_to_int
everywhere. You probably use this for reading parameters, where the ParameterHandler
has already checked that the numbers you're parsing are non-negative.
has already checked that the numbers you're parsing are non-negative.
Yes. Except I then have to somehow convert a std::vector<int>
to std::vector<unsigned int>
to store it (for example compositional degrees).
required for #5748