20 : m_name(std::move(name))
52 const std::size_t idx =
m_value.index();
68 if (std::holds_alternative<int>(
m_value))
69 return std::to_string(std::get<int>(
m_value));
70 else if (std::holds_alternative<double>(
m_value))
71 return std::to_string(std::get<double>(
m_value));
73 return std::get<std::string>(
m_value);
Declares class MultiOption.
void setFromString(const std::string &value)
Sets the value of option from string.
variant_t & defaultValue()
MultiOption(std::string name="")
std::variant< int, double, std::string > variant_t
void setDescription(const std::string &description)
variant_t m_default_value
std::string description() const
std::string value_str()
Returns a string representation of the option's value.
std::string m_description