| 16 | } |
| 17 | |
| 18 | void OptionParser::addSwitch(String const& flag, String description) { |
| 19 | if (!m_options.insert(flag, Switch{flag, std::move(description)}).second) |
| 20 | throw OptionParserException::format("Duplicate switch '-{}' added", flag); |
| 21 | } |
| 22 | |
| 23 | void OptionParser::addParameter(String const& flag, String argument, RequirementMode requirementMode, String description) { |
| 24 | if (!m_options.insert(flag, Parameter{flag, std::move(argument), requirementMode, std::move(description)}).second) |