Currently, if you use instance.get_setting_as<double>, the setting has to be explicitly double.
E.g., you can write parameter: 1.0 or parameter: 1. and read it as a double, but parameter: 1 causes an error, even though it's perfectly safe. Of course there are some edge cases where you want to read a really large integer value, and converting that to a double will result in a loss of precision. However, I think that if the user wants to read that into a double, the loss of precision is probably acceptable for them.
Currently, if you use
instance.get_setting_as<double>
, the setting has to be explicitly double.E.g., you can write
parameter: 1.0
orparameter: 1.
and read it as a double, butparameter: 1
causes an error, even though it's perfectly safe. Of course there are some edge cases where you want to read a really large integer value, and converting that to a double will result in a loss of precision. However, I think that if the user wants to read that into a double, the loss of precision is probably acceptable for them.