22 const std::string &option,
23 const std::list<std::string> &values)
25 if(values.size() != 1)
31 return values.front();
35 const std::string &option,
36 const std::list<std::string> &values)
42 const std::string &option,
43 const std::list<std::string> &values)
54 "failed to parse '" + string_value +
"' as integer",
"--" + option};
Thrown when users pass incorrect command line arguments, for example passing no files to analysis or ...
std::string require_exactly_one_value(const std::string &option, const std::list< std::string > &values)
Returns the only value of a single element list, throws an exception if not passed a single element l...
void assert_no_values(const std::string &option, const std::list< std::string > &values)
Asserts that the list of values to an option passed is empty.
std::size_t require_one_size_value(const std::string &option, const std::list< std::string > &values)
Returns the only Nat value of a single element list, throws an exception if not passed a single eleme...
#define PRECONDITION_WITH_DIAGNOSTICS(CONDITION,...)
optionalt< T > string2optional(const std::string &str, int base=10)
convert a string to an integer, given the base of the representation works with signed and unsigned i...