|
|
|
|
@ -125,9 +125,10 @@ GncOption::set_value(ValueType value)
|
|
|
|
|
if constexpr (std::is_same_v<std::decay_t<ValueType>,
|
|
|
|
|
GncMultichoiceOptionIndexVec>)
|
|
|
|
|
option.set_multiple(value);
|
|
|
|
|
else if constexpr (std::is_same_v<ValueType, size_t> ||
|
|
|
|
|
std::is_same_v<std::decay_t<ValueType>, std::string> ||
|
|
|
|
|
std::is_same_v<std::remove_cv<ValueType>, char*>)
|
|
|
|
|
else if constexpr
|
|
|
|
|
(std::is_same_v<ValueType, size_t> ||
|
|
|
|
|
std::is_same_v<std::decay_t<ValueType>, std::string> ||
|
|
|
|
|
std::is_same_v<std::remove_cv<ValueType>, char*>)
|
|
|
|
|
option.set_value(value);
|
|
|
|
|
}
|
|
|
|
|
}, *m_option);
|
|
|
|
|
@ -150,12 +151,14 @@ GncOption::set_default_value(ValueType value)
|
|
|
|
|
(std::is_same_v<std::decay_t<decltype(option)>,
|
|
|
|
|
GncOptionMultichoiceValue>)
|
|
|
|
|
{
|
|
|
|
|
if constexpr (std::is_same_v<std::decay_t<ValueType>,
|
|
|
|
|
GncMultichoiceOptionIndexVec>)
|
|
|
|
|
if constexpr
|
|
|
|
|
(std::is_same_v<std::decay_t<ValueType>,
|
|
|
|
|
GncMultichoiceOptionIndexVec>)
|
|
|
|
|
option.set_multiple(value);
|
|
|
|
|
else if constexpr (std::is_same_v<ValueType, size_t> ||
|
|
|
|
|
std::is_same_v<std::decay_t<ValueType>, std::string> ||
|
|
|
|
|
std::is_same_v<std::remove_cv<ValueType>, char*>)
|
|
|
|
|
else if constexpr
|
|
|
|
|
(std::is_same_v<ValueType, size_t> ||
|
|
|
|
|
std::is_same_v<std::decay_t<ValueType>, std::string> ||
|
|
|
|
|
std::is_same_v<std::remove_cv<ValueType>, char*>)
|
|
|
|
|
option.set_default_value(value);
|
|
|
|
|
}
|
|
|
|
|
}, *m_option);
|
|
|
|
|
|