• Thomas Braun's avatar
    Fix outputting extreme integer values in edge cases · 6ce2f35b
    Thomas Braun authored
    For some gcc version (Ubuntu 5.5.0-12ubuntu1~16.04) the existing code
    crashes when the minimum value of int64_t is outputted.
    
    Resurrect the code from before 546e2cbf (🚨 fixed some warnings,
    2019-03-13) but delegate the sign removal so that the compilers don't
    complain about taking the negative value of an unsigned value.
    
    In addition we also rewrite the expression so that we first increment
    and then negate.
    
    The definition of remove_sign(number_unsigned_t) is never called as
    unsigned values are never negative.
    6ce2f35b
serializer.hpp 33.4 KB