- if (not found || std::string(val) == "help") {
- std::string mesg = std::string("\n");
- if (std::string(val) == "help")
- mesg += std::string("Possible values for option ") + name + ":\n";
- else
- mesg += std::string("Invalid value '") + val + "' for option " + name + ". Possible values:\n";
- for (auto kv : valid_values)
- mesg += " - '" + std::string(kv.first) + "': " + kv.second +
- (kv.first == value ? " <=== DEFAULT" : "") + "\n";
- xbt_die("%s", mesg.c_str());
- }
- value = std::move(val);
+ std::string mesg = "\n";
+ if (std::string(val) == "help")
+ mesg += std::string("Possible values for option ") + name + ":\n";
+ else
+ mesg += std::string("Invalid value '") + val + "' for option " + name + ". Possible values:\n";
+ for (auto const& kv : valid_values)
+ mesg += " - '" + std::string(kv.first) + "': " + kv.second +
+ (kv.first == value ? " <=== DEFAULT" : "") + "\n";
+ xbt_die("%s", mesg.c_str());