It would be nice to have a setting to allow safe auto-conversions. Currently trying to read an int as int64 in libconfig++ throws an exception unless auto_convert is set, even though this can never lead to loss of data.
I don't want to turn auto_convert on in my application, as I don't want people specifying floats and having them get truncated down to ints, but I'd like for people to be able to leave off the 'L' when specifying integers, and then later cast those to int64.
This was fixed in 0a5cfd99532531500daa1b459257636d3220afc8
libconfig++ will now silently convert int64<->int as long as it's within range, and otherwise it throws a new SettingRangeException
It would be nice to have a setting to allow safe auto-conversions. Currently trying to read an int as int64 in libconfig++ throws an exception unless auto_convert is set, even though this can never lead to loss of data.
I don't want to turn auto_convert on in my application, as I don't want people specifying floats and having them get truncated down to ints, but I'd like for people to be able to leave off the 'L' when specifying integers, and then later cast those to int64.