Explicitly cast a value to the decltype of get_value().

Can't always rely on implicit conversion working.
This commit is contained in:
John Ralls 2021-08-17 15:41:26 -07:00
parent bbe8ebbc15
commit 3d1812aacd

View File

@ -899,7 +899,7 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
return;
}
auto value{scm_to_value<std::decay_t<decltype(option.get_value())>>(new_value)}; //Can't inline, set_value takes arg by reference.
option.set_value(value);
option.set_value(static_cast<decltype(option.get_value())>(value));
}, swig_get_option($self));
}
catch(const std::invalid_argument& err)