Add function to disable implicit value

This commit is contained in:
Jean-Baptiste Bayle 2019-05-29 14:51:46 +02:00
parent bd20573829
commit 87f458d663

View File

@ -309,6 +309,9 @@ namespace cxxopts
virtual std::shared_ptr<Value> virtual std::shared_ptr<Value>
implicit_value(const std::string& value) = 0; implicit_value(const std::string& value) = 0;
virtual std::shared_ptr<Value>
no_implicit_value() = 0;
virtual bool virtual bool
is_boolean() const = 0; is_boolean() const = 0;
}; };
@ -825,6 +828,13 @@ namespace cxxopts
return shared_from_this(); return shared_from_this();
} }
std::shared_ptr<Value>
no_implicit_value()
{
m_implicit = false;
return shared_from_this();
}
std::string std::string
get_default_value() const get_default_value() const
{ {