diff options
Diffstat (limited to 'staging_vespalib/src/vespa/vespalib/util/programoptions.h')
-rw-r--r-- | staging_vespalib/src/vespa/vespalib/util/programoptions.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/util/programoptions.h b/staging_vespalib/src/vespa/vespalib/util/programoptions.h index 0bd3eb7c3c9..0c75f9b2c72 100644 --- a/staging_vespalib/src/vespa/vespalib/util/programoptions.h +++ b/staging_vespalib/src/vespa/vespalib/util/programoptions.h @@ -262,6 +262,7 @@ struct ProgramOptions::NumberOptionParser : public OptionParser { _number(number), _defaultValue(defValue) {} + ~NumberOptionParser() override; void set(const std::vector<std::string>& arguments) override; void setDefault() override { _number = _defaultValue; } @@ -270,6 +271,9 @@ struct ProgramOptions::NumberOptionParser : public OptionParser { } }; +template<typename Number> +ProgramOptions::NumberOptionParser<Number>::~NumberOptionParser() = default; + struct ProgramOptions::BoolOptionParser : public OptionParser { bool& _value; bool _defaultValue; @@ -285,10 +289,12 @@ struct ProgramOptions::FlagOptionParser : public OptionParser { FlagOptionParser(const std::string& nameList, bool& value, const std::string& description); FlagOptionParser(const std::string& nameList, bool& value, const bool& unsetValue, const std::string& description); + ~FlagOptionParser() override; void set(const std::vector<std::string>&) override { _value = !_unsetValue; } void setDefault() override { _value = _unsetValue; } }; + struct ProgramOptions::StringOptionParser : public OptionParser { std::string& _value; std::string _defaultValue; @@ -296,6 +302,7 @@ struct ProgramOptions::StringOptionParser : public OptionParser { StringOptionParser(const std::string& nameList, std::string& value, const std::string& description); StringOptionParser(const std::string& nameList, std::string& value, const std::string& defVal, const std::string& desc); + ~StringOptionParser() override; void set(const std::vector<std::string>& arguments) override { _value = arguments[0]; } void setDefault() override { _value = _defaultValue; } |