Personally, I don't find the name to_signed()
clearly implies uN -> iN
(i.e. same size integer). I'd rather see something like safe transmute used here, which makes it clearer (to me, at least) that we're effectively transmuting this integer to another integer of the same size.
1 Like