On 8/14/2015 12:14 AM, Sönke Ludwig wrote:
Am 14.08.2015 um 07:11 schrieb Walter Bright:
Make the type for storing a Number be a template parameter.
Then we'd lose the ability to distinguish between integers and floating point in
the same lexer instantiation, which is vital for certain input files to avoid
losing precision for 64-bit integers. The only solution would be to use Decimal,
but that doesn't exist yet and would be slow.

Two other solutions:

1. 'real' has enough precision to hold 64 bit integers.

2. You can use a union of 'long' and a template type T. Use the 'long' if it fits, and T if it doesn't.

Reply via email to