22inline namespace util {
29 throw runtime_error{
"unexpected value for option: " +
string{opt_}};
42 throw runtime_error{
"missing value for option: " +
string{opt_}};
57 const string_view
arg{*it_};
58 if (!(
arg.size() > 1 &&
arg[0] ==
'-')) {
66 if (
arg.size() == 2) {
73 const auto pos =
arg.find_first_of(
'=', 2);
74 opt_ =
arg.substr(2,
pos - 2);
75 if (
pos != string_view::npos) {
76 val_ =
arg.substr(
pos + 1);
82 opt_ =
arg.substr(1, 1);