Commit Graph
3 Commits
Author SHA1 Message Date
Thomas Braun 6ce2f35ba8 Fix outputting extreme integer values in edge cases
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.
2019-09-03 13:55:15 +02:00
Thomas Braun a4eaaa56d1 .travis.yml: Add gcc 9 and compile with experimental C++20 support 2019-08-26 12:38:36 +02:00
Thomas Braun e0ff1a837c unit-constructor1.cpp: Fix floating point truncation warning 2016-08-25 00:24:33 +02:00